Component: J1939 Automotive Node (Comms: System): Difference between revisions
Appearance
Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix TSL |- | width="20%" style="color:gray;" | Version | 1.1 |- | width="20%" style="color:gray..." |
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"" |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 92: | Line 92: | ||
===ClearSPN=== | ===ClearSPN=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ClearSPN''' | ||
|- | |- | ||
| colspan="2" | Clears the list of registered SPN allowing new SPN to be registered. | | colspan="2" | Clears the list of registered SPN allowing new SPN to be registered. | ||
| Line 106: | Line 106: | ||
===Get_Address=== | ===Get_Address=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Get_Address''' | ||
|- | |- | ||
| colspan="2" | Returns the device (ECU) actual address | | colspan="2" | Returns the device (ECU) actual address | ||
| Line 120: | Line 120: | ||
===Get_Status=== | ===Get_Status=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Get_Status''' | ||
|- | |- | ||
| colspan="2" | Returns the system status. 0 = Ready. 1 = Waiting address claim | | colspan="2" | Returns the system status. 0 = Ready. 1 = Waiting address claim | ||
| Line 134: | Line 134: | ||
===Initialise=== | ===Initialise=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Initialise''' | ||
|- | |- | ||
| colspan="2" | Initialise the CAN network and J1939 protocol | | colspan="2" | Initialise the CAN network and J1939 protocol | ||
| Line 153: | Line 153: | ||
===Message_Data_Clear=== | ===Message_Data_Clear=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Message_Data_Clear''' | ||
|- | |- | ||
| colspan="2" | Clear the CAN Data Buffer | | colspan="2" | Clear the CAN Data Buffer | ||
| Line 172: | Line 172: | ||
===Message_Data_Read_SPN=== | ===Message_Data_Read_SPN=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Message_Data_Read_SPN''' | ||
|- | |- | ||
| colspan="2" | Read the SPN value from the CAN data buffer | | colspan="2" | Read the SPN value from the CAN data buffer | ||
| Line 196: | Line 196: | ||
===Message_Data_Set=== | ===Message_Data_Set=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Message_Data_Set''' | ||
|- | |- | ||
| colspan="2" | Set all data in CAN Data Buffer to given value. e.g. 0 or 0xFF | | colspan="2" | Set all data in CAN Data Buffer to given value. e.g. 0 or 0xFF | ||
| Line 220: | Line 220: | ||
===Message_Data_Write_SPN=== | ===Message_Data_Write_SPN=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Message_Data_Write_SPN''' | ||
|- | |- | ||
| colspan="2" | Write the SPN value to the CAN data buffer | | colspan="2" | Write the SPN value to the CAN data buffer | ||
| Line 249: | Line 249: | ||
===Process=== | ===Process=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Process''' | ||
|- | |- | ||
| colspan="2" | Does the message processing. Call this often. | | colspan="2" | Does the message processing. Call this often. | ||
| Line 268: | Line 268: | ||
===RegisterSPN=== | ===RegisterSPN=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''RegisterSPN''' | ||
|- | |- | ||
| colspan="2" | Allows a SPN and PGN to be registered onto the system. Returns 1 if the SPN has been regisered successfully. | | colspan="2" | Allows a SPN and PGN to be registered onto the system. Returns 1 if the SPN has been regisered successfully. | ||
| Line 307: | Line 307: | ||
===Rx_Message_Check=== | ===Rx_Message_Check=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Rx_Message_Check''' | ||
|- | |- | ||
| colspan="2" | If a data message has been received returns the PGN,otherwise 0 | | colspan="2" | If a data message has been received returns the PGN,otherwise 0 | ||
| Line 321: | Line 321: | ||
===Rx_Message_Data=== | ===Rx_Message_Data=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Rx_Message_Data''' | ||
|- | |- | ||
| colspan="2" | Returns the DLC and data of the last received message | | colspan="2" | Returns the DLC and data of the last received message | ||
| Line 340: | Line 340: | ||
===Rx_Message_Source=== | ===Rx_Message_Source=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Rx_Message_Source''' | ||
|- | |- | ||
| colspan="2" | Returns the Source Address of the last received message | | colspan="2" | Returns the Source Address of the last received message | ||
| Line 354: | Line 354: | ||
===Rx_Transfer_Check=== | ===Rx_Transfer_Check=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Rx_Transfer_Check''' | ||
|- | |- | ||
| colspan="2" | Check for incoming multipart data transfers. If received, returns the PGN else 0 | | colspan="2" | Check for incoming multipart data transfers. If received, returns the PGN else 0 | ||
| Line 368: | Line 368: | ||
===Rx_Transfer_Data=== | ===Rx_Transfer_Data=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Rx_Transfer_Data''' | ||
|- | |- | ||
| colspan="2" | Returns the byte count and data of the transfer message data | | colspan="2" | Returns the byte count and data of the transfer message data | ||
| Line 392: | Line 392: | ||
===Tx_Message_Send=== | ===Tx_Message_Send=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Tx_Message_Send''' | ||
|- | |- | ||
| colspan="2" | Send the prepared CAN message | | colspan="2" | Send the prepared CAN message | ||
| Line 421: | Line 421: | ||
===Tx_Transfer_Send=== | ===Tx_Transfer_Send=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Tx_Transfer_Send''' | ||
|- | |- | ||
| colspan="2" | Send a mulitpart data transfer message. Returns number of bytes accepted. Limited by max message size. | | colspan="2" | Send a mulitpart data transfer message. Returns number of bytes accepted. Limited by max message size. | ||
| Line 451: | Line 451: | ||
==Property reference== | ==Property reference== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | NAME | ||
|- | |- | ||
|- | |- | ||
| Line 516: | Line 516: | ||
| colspan="2" | Byte buffer size to allocate for received multipart messages. Maximum is 1785 or available RAM | | colspan="2" | Byte buffer size to allocate for received multipart messages. Maximum is 1785 or available RAM | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | CAN | ||
|- | |- | ||
|- | |- | ||
| Line 535: | Line 535: | ||
| colspan="2" | Data rate of the bus specified in thousand bits per second, Kbps. | | colspan="2" | Data rate of the bus specified in thousand bits per second, Kbps. | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Connections | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | SPI | ||
|- | |- | ||
|- | |- | ||
Latest revision as of 14:37, 13 July 2026
| Author | Matrix TSL |
| Version | 1.1 |
| Category | Comms: System |
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. | |
| Return | |
Get_Address
| Get_Address | |
| Returns the device (ECU) actual address | |
| Return | |
Get_Status
| Get_Status | |
| Returns the system status. 0 = Ready. 1 = Waiting address claim | |
| Return | |
Initialise
| Initialise | |
| Initialise the CAN network and J1939 protocol | |
| Preferred_Address | |
| Preferred Address (Requested Address) | |
| Return | |
Message_Data_Clear
| Message_Data_Clear | |
| Clear the CAN Data Buffer | |
| DataBuffer | |
| Return | |
Message_Data_Read_SPN
| Message_Data_Read_SPN | |
| Read the SPN value from the CAN data buffer | |
| SPN | |
| DataBuffer | |
| Return | |
Message_Data_Set
| Message_Data_Set | |
| Set all data in CAN Data Buffer to given value. e.g. 0 or 0xFF | |
| DataBuffer | |
| Value | |
| Return | |
Message_Data_Write_SPN
| Message_Data_Write_SPN | |
| Write the SPN value to the CAN data buffer | |
| SPN | |
| Value | |
| DataBuffer | |
| Return | |
Process
| Process | |
| Does the message processing. Call this often. | |
| TimeElapsed | |
| Time elapsed since last call, in mS. Can be zero for frequent calling. | |
| Return | |
RegisterSPN
Rx_Message_Check
| Rx_Message_Check | |
| If a data message has been received returns the PGN,otherwise 0 | |
| Return | |
Rx_Message_Data
| Rx_Message_Data | |
| Returns the DLC and data of the last received message | |
| DataBuffer | |
| Return | |
Rx_Message_Source
| Rx_Message_Source | |
| Returns the Source Address of the last received message | |
| Return | |
Rx_Transfer_Check
| Rx_Transfer_Check | |
| Check for incoming multipart data transfers. If received, returns the PGN else 0 | |
| Return | |
Rx_Transfer_Data
| Rx_Transfer_Data | |
| Returns the byte count and data of the transfer message data | |
| DataBuffer | |
| Buffer to receive copied data | |
| Size | |
| Size (byte count) of buffer | |
| Return | |
Tx_Message_Send
| Tx_Message_Send | |
| Send the prepared CAN message | |
| PGN | |
| DLC | |
| DataBuffer | |
| Return | |
Tx_Transfer_Send