This example demonstrates how to create a watchdog to determine if a CAN message is being received using the 3S J1939 Libraries in the device tree. This is often needed to determine if the data is valid or not. For example, RPM can have a valid value of 0 however if the CAN message is not being received it is unknown if the data value of 0 reflects the actual engine RPM. It is important to know the CAN message is being received and the data values are being updated.
The J1939 Message used in this example is PGN 61440 and the message ID will be 0x18F00000.
The J1939.ReceiveParameterGroup function block is used indirectly to determine when a message is received and reset the watchdog timer. When the message fails to be received after 5 seconds the message valid state goes false.
This example applies to both uControl Hydraulic controllers and the OpenView line of displays.
Created in Codesys Vesrion 3.5.5.
Comments
0 comments
Please sign in to leave a comment.