Unsafe_SDG_Receiver (FB)¶
FUNCTION_BLOCK Unsafe_SDG_Receiver
J1939-76 Safety SDG receiver.
Unsafe_SDG_Receiver does receive J1939-76 SDG messages (SHM and SDM) for a configured SDG produced by a J1939SafetySafe.Safe_SDG_Producer and send by a Unsafe_SDG_Sender via CAN driver.
Basics and data flow¶
For an overview of general data flow see the J1939SafetySafe library main documentation and the J1939 Safety example.project function block J1939_example_CFC.
Sequence of operation on update of SHM¶
SHM_RecvCnt is incremented signaling the SHM data are updated and valid
SHM data are updated
Sequence of operation on update of SDM¶
SDM_RecvCnt is incremented signaling the SDM data are updated and valid
SDM data are updated
- InOut:
Scope
Name
Type
Initial
Comment
Input
xEnableBOOLTRUE
Enable the receiver.
dwPGNDWORDParameter Group Number (PGN).
usiSrcAddrUSINT0
Source Address.
itfCL2DriverICL2DriverCAN driver to use.
Output
xBusyBOOLFALSE
In operation.
xErrorBOOLFALSE
Error occured.
eErrorIDERROR.NO_ERROR
Error status
SDGUJ1939SafetyItf.SAFETY_DATA_GROUP_UNSAFE