Safe_SDG_Producer (FB)ΒΆ
FUNCTION_BLOCK Safe_SDG_Producer
Safe_SDG_Producer does produce a J1939 Safety SDG supposed to be send via a J1939SafetyStd.Unsafe_SDG_Sender.
For an overview of general data flow view see the library main documentation and the J1939 Safety example.project.
- InOut:
Scope
Name
Type
Initial
Comment
Input
xEnableBOOLFALSE
Enable SDG production.The inputs S_usiSHMprio, S_usiSDMprio, S_PGN, S_usiSrcAddr and S_tRefreshTime are sampled with a rising edge.S_usiSHMPrioritySAFEUSINT (0..J1939_CONSTANTS.usiMAX_PRIORITY)
1
SHM send priority:0-7: priority (0: high, 7: low)Note: The SHM priority shall be a value with the same or higher priority (lower value) as the SDM priority.S_usiSDMPrioritySAFEUSINT (0..J1939_CONSTANTS.usiMAX_PRIORITY)
1
SDM send priority:0-7: priority (0: high, 7: low);S_dwPGNDWORD0
Parameter Group Number (PGN).
S_tTransmissionRateTIMETIME#0ms
Transmission rate to send the SDG data.
S_usiSrcAddrUSINT0
Source Address.
S_abyDataARRAY [0..(J1939_CONSTANTS.usiSDM_MAX_DATALENGTH - 1)] OF SAFEBYTE
[0, 0, 0, 0, 0, 0, 0, 0]
SDG data to transmit.
S_usiDataLengthSAFEUSINT (0..J1939_CONSTANTS.usiSDM_MAX_DATALENGTH)
0
Length of SDG data to transmit.
Output
S_xBusyBOOLFALSE
In operation.
S_xErrorBOOLFALSE
Error occured.
S_eErrorIDERROR.NO_ERROR
Error status.
S_SDGSJ1939SafetyItf.SAFETY_DATA_GROUP_SAFESDG data to be send by a J1939SafetyUnsafe.Unsafe_SDG_Sender.