Supported platforms: CODESYS 2.3, CODESYS 3.5, CODESYS 3.5 SAFETY
This guide describes how to use Address Claiming with J1939 PGN messages.
SDK 3.8 & MultiTool 6.6 or newer or MultiTool Creator is required.
CODESYS 2.3:
CODESYS 3.5:
|
Address claiming is a network management protocol to dynamically reserve source addresses in J1939 based systems.
Epec address claiming library is implemented according to ISOBUS standard ISO 11783-5. The functionality in SAE J1939-81 is the same.
Define Address Claiming for control unit using MultiTool Creator's Address Claiming tab.
Epec control unit can have one or many address claiming device names
At least one name is required to initialize address claiming server and to use PGNs with address claiming
See more information in Epec MultiTool Creator manual
Define J1939 device in MultiTool Creator's network editor
J1939 device can use manual address or address claiming
When J1939 device uses address claiming, the name's search conditions needs to be defined
Search conditions depend on use case or device which is searched for
Typical use cases for search conditions are:
Function name and optionally function instance
Industry group, device class and function name
See more information in Epec MultiTool Creator manual
Define J1939 PGN messages
Control unit's own address in PGN can be manual or use address claiming device
In Tx PGN source address is the control unit's own address
In Rx PGN destination address is the control unit's own address
J1939 device's address in PGN is manual or uses address claiming depending on the J1939 device's definition
In typical use case, when address claiming is used in a PGN message, both source and destination addresses are defined to use address claiming
When PGN is defined in MultiTool Creator to use address claiming, the code template is generated automatically and the application uses SPN data in the same way than without address claiming.
Code template uses DeviceToPGN function block instances to implement address monitoring to a PGN message.
When PGN message uses address claiming there are few things which differ from using manual addresses:
1 PGN is not added to J1939's PGN list before the address claiming procedure is OK.
This is done on-fly automatically by library
2 DeviceToPGN function block automatically sets PGN cycle time to 0 when own address is not valid or address matching sequence is in progress
Tx PGN cyclic transmit will not start before addresses are valid
Default cycletime is restored automatically when address is valid
Application should not change PGN's cycle time when library has suspended the transmit
3 PGN's addresses will change automatically on-fly if claimed addresses change
4 Application should not use PGN's manual transmit triggers when addresses are not valid
This section describes the variables which are generated related to the PGN message's address claiming support.
Additionally, other variables are generated related to e.g. address claim server.
When address claiming is used for PGN's source and/or destination address code template includes:
DeviceToPGN function block instance and execution
Enable boolean variable for each function block instance (TRUE by default)
When J1939 device is defined to use address claiming and it is used in a PGN message:
Search condition variable is generated to code template. Initialized to the conditions set in MultiTool Creator.
Search conditions are used to search matching device from address claiming server.
The enable variable can be used by the application in a use case where search condition would be changed on-fly.
In this use case the sequence needs to be reset by setting PGN's ACL enable to FALSE.
New J1939 device is searched after search conditions are changed and enable is set TRUE.
CODESYS 2.3
Function block instances are defined in J1939 structures.
Code template variables: |
|
J1939_CAN1.In.Engine.ACL_EEC1 J1939_CAN1.Out.Engine.ACL_TSC1 |
|
|
Enable variables are defined in J1939 structures.
Code template variables: |
|
J1939_CAN1.In.Engine.ACL_EEC1Enable J1939_CAN1.Out.Engine.ACL_TSC1Enable |
|
|
Search condition is defined in global variable (one per J1939 device)
Code template variables: |
|
G_ACL_CAN1_Engine_SearchConditions |
|
|
CODESYS 3.5 6000 series or 5050
Function block instances are defined in J1939 structures.
Code template variables: |
|
J1939_CAN1.In.Engine.ACL_EEC1 J1939_CAN1.Out.Engine.ACL_TSC1 |
|
|
Enable variables are defined in J1939 structures.
Code template variables: |
|
J1939_CAN1.In.Engine.ACL_EEC1Enable J1939_CAN1.Out.Engine.ACL_TSC1Enable |
|
|
Search condition is defined in global variable (one per J1939 device)
Code template variables: |
|
G_ACL_CAN1_Engine_SearchConditions |
|
|
CODESYS 3.5 S/E series
Function block instances are defined in G_J1939_CAN<X>_RPGN and G_J1939_CAN<X>_TPGN global variable lists.
Code template variables: |
|
G_J1939_CAN1_RPGN.Engine_EEC1_ACL G_J1939_CAN1_TPGN.Engine_TSC1_ACL |
|
|
Enable variables are defined in J1939 structures.
Code template variables: |
|
G_J1939.CAN1.In.Engine.ACL_EEC1Enable G_J1939.CAN1.Out.Engine.ACL_TSC1Enable |
|
|
Search condition is defined in global variable (one per J1939 device)
Code template variables: |
|
G_J1939.ACL_CAN1_Engine_SearchConditions |
|
|
Address claiming library
J1939 library
Epec MultiTool Creator manual (available in Epec extranet)
Source file topic100630.htm
Last updated 19-Dec-2024