Component: J1939 Automotive Node (Comms: System)
From Flowcode Help
(Redirected from Component: ID d04f4385 497d 4e46 a71d 2c0ccb4b0421)
Jump to navigationJump to searchAuthor | Matrix TSL |
Version | 1.1 |
Category | Comms: System |
Contents
- 1 J1939 Automotive Node component
- 2 Component Source Code
- 3 Detailed description
- 4 Examples
- 5 Macro reference
- 5.1 ClearSPN
- 5.2 Get_Address
- 5.3 Get_Status
- 5.4 Initialise
- 5.5 Message_Data_Clear
- 5.6 Message_Data_Read_SPN
- 5.7 Message_Data_Set
- 5.8 Message_Data_Write_SPN
- 5.9 Process
- 5.10 RegisterSPN
- 5.11 Rx_Message_Check
- 5.12 Rx_Message_Data
- 5.13 Rx_Message_Source
- 5.14 Rx_Transfer_Check
- 5.15 Rx_Transfer_Data
- 5.16 Tx_Message_Send
- 5.17 Tx_Transfer_Send
- 6 Property reference
J1939 Automotive Node component
Allows an automotive J1939 network node to be created sat on top of CAN bus. Used in heavy duty vehicles it provides a base layer on which 1-16 bit signals or SPN can be assigned and passed between nodes. SPN are arranged into groups called PGN which each contain eight bytes of data.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_J1939.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_J1939.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
ClearSPN
ClearSPN | |
Clears the list of registered SPN allowing new SPN to be registered. | |
- VOID | Return |
Get_Address
Get_Address | |
Returns the device (ECU) actual address | |
- BYTE | Return |
Get_Status
Get_Status | |
Returns the system status. 0 = Ready. 1 = Waiting address claim | |
- BYTE | Return |
Initialise
Initialise | |
Initialise the CAN network and J1939 protocol | |
- BYTE | Preferred_Address |
Preferred Address (Requested Address) | |
- VOID | Return |
Message_Data_Clear
Message_Data_Clear | |
Clear the CAN Data Buffer | |
- BYTE | DataBuffer |
- VOID | Return |
Message_Data_Read_SPN
Message_Data_Read_SPN | |
Read the SPN value from the CAN data buffer | |
- UINT | SPN |
- BYTE | DataBuffer |
- UINT | Return |
Message_Data_Set
Message_Data_Set | |
Set all data in CAN Data Buffer to given value. e.g. 0 or 0xFF | |
- BYTE | DataBuffer |
- BYTE | Value |
- VOID | Return |
Message_Data_Write_SPN
Message_Data_Write_SPN | |
Write the SPN value to the CAN data buffer | |
- UINT | SPN |
- UINT | Value |
- BYTE | DataBuffer |
- BYTE | Return |
Process
Process | |
Does the message processing. Call this often. | |
- UINT | TimeElapsed |
Time elapsed since last call, in mS. Can be zero for frequent calling. | |
- BYTE | Return |
RegisterSPN
Rx_Message_Check
Rx_Message_Check | |
If a data message has been received returns the PGN,otherwise 0 | |
- UINT | Return |
Rx_Message_Data
Rx_Message_Data | |
Returns the DLC and data of the last received message | |
- BYTE | DataBuffer |
- BYTE | Return |
Rx_Message_Source
Rx_Message_Source | |
Returns the Source Address of the last received message | |
- BYTE | Return |
Rx_Transfer_Check
Rx_Transfer_Check | |
Check for incoming multipart data transfers. If received, returns the PGN else 0 | |
- ULONG | Return |
Rx_Transfer_Data
Rx_Transfer_Data | |
Returns the byte count and data of the transfer message data | |
- BYTE | DataBuffer |
Buffer to receive copied data | |
- UINT | Size |
Size (byte count) of buffer | |
- UINT | Return |
Tx_Message_Send
Tx_Message_Send | |
Send the prepared CAN message | |
- UINT | PGN |
- BYTE | DLC |
- BYTE | DataBuffer |
- BYTE | Return |
Tx_Transfer_Send