Supported platforms: CODESYS 2.3, CODESYS 3.5
The function block’s purpose is to link address claiming device(s) to J1939 PGN.
PGN’s source and destination addresses are automatically maintained according to address claiming.
PGN can be linked to own address claiming device and/or system device.
For Tx PGN own device means source address and system device destination address. For Rx PGN addresses are reversed.
Tx PGN's cycle time is automatically reset to zero and restored to default cycle depending on address claiming state.
If application uses J1939 PGN triggers to manually send the Tx PGN, the application needs to check the address claiming states of the linked address claiming devices (e.g. check the function block's outputs).
The function block only resets the cycle time automatically. Tx PGN should not be sent when address claiming is not OK. The OK states can be reset on-fly during address changes. |
Input variable name |
Data type |
Description |
i_Enable |
BOOL |
Enable operation |
i_pAddressClaimServer |
POINTER TO ACL_AddressClaimServer |
Pointer to ACL server to search from |
i_pOwnDevice |
POINTER TO ACL_Device |
Pointer to ACL own device to use with PGN, null pointer if not used |
i_pSearchConditions |
POINTER TO ACL_SearchConditions |
Pointer to system device search conditions, null pointer if not used |
i_pJ1939 |
POINTER TO J1939 |
Pointer to J1939 instance which PGN is added to |
i_pPGN |
POINTER TO J1939_PGN |
Pointer to PGN data structure |
i_RxPGN |
BOOL |
TRUE = Rx PGN, FALSE = Tx PGN |
Input variable name |
Data type |
Description |
i_Enable |
BOOL |
Enable operation |
i_pAddressClaimServer |
POINTER TO AddressClaimServer |
Pointer to ACL server to search from |
i_pOwnDevice |
POINTER TO Device |
Pointer to ACL own device to use with PGN, null pointer if not used |
i_pSearchConditions |
POINTER TO SearchConditions |
Pointer to system device search conditions, null pointer if not used |
i_pJ1939 |
POINTER TO EPEC_J1939.J1939 |
Pointer to J1939 instance which PGN is added to |
i_pPGN |
POINTER TO EPEC_J1939.J1939_PGN |
Pointer to PGN data structure |
i_RxPGN |
BOOL |
TRUE = Rx PGN, FALSE = Tx PGN |
Output variable name |
Data type |
Description |
o_State |
ACL_DeviceToPGNState |
State of the internal sequence |
o_OwnDeviceOK |
BOOL |
Own device's address claiming OK, or not in use |
o_SystemDeviceFound |
BOOL |
System device found from address claiming |
o_SystemDeviceOK |
BOOL |
System device address claiming OK, or not in use |
o_Errors |
ACL_DeviceToPGNErrors |
Active error |
Output variable name |
Data type |
Description |
o_State |
DeviceToPGNState |
State of the internal sequence |
o_OwnDeviceOK |
BOOL |
Own device's address claiming OK, or not in use |
o_SystemDeviceFound |
BOOL |
System device found from address claiming |
o_SystemDeviceOK |
BOOL |
System device address claiming OK, or not in use |
o_Errors |
DeviceToPGNErrors |
Active error |
Code and function block instances for J1939 PGNs are generated automatically by MultiTool Creator. |
Source file topic1003067.htm
Last updated 19-Dec-2024