Supported platforms: CODESYS 3.5 SP19 SAFETY
Run-time statuses per SDG.
|
Name of the Member |
Data Type |
Default value |
Description |
|
OutputValid |
BOOL |
FALSE |
Output value is valid. |
|
ValueMismatch |
BOOL |
FALSE |
Message data mismatch. |
|
SRVTimeout |
BOOL |
FALSE |
Safety Relevant Validation Timeout |
|
SCTimeout |
BOOL |
FALSE |
Safety Cycle Timeout |
|
CRCError |
BOOL |
FALSE |
CRC error |
|
DataError |
BOOL |
FALSE |
Error in SDG initial data. This error is not recoverable. |
|
SPNError |
BOOL |
FALSE |
Error in SPN data. In case the error is in initial data, the error is not recoverable. |
|
DisableMismatch |
BOOL |
TRUE |
Disables ValueMismatch error setting at start. This does not affect to OutputValid status |
|
PreviousValid |
BOOL |
FALSE |
Previous SDG was valid |
|
SHMReceived |
BOOL |
FALSE |
SHM received |
|
Received |
BOOL |
FALSE |
SDG received successfully at least once after error or rising edge of i_Enable |
The S_J1939 FB instance output statuses.
|
Name of the Member |
Data Type |
Default value |
Description |
|
OutputValid |
BOOL |
FALSE |
Main FB status ok. |
|
ParameterError |
BOOL |
FALSE |
Parameter error when initializing the FB. |
|
Name of the Member |
Data Type |
Default value |
Description |
| pSHM_PGN | POINTER TO EPEC_J1939.J1939_PGN |
NULL |
Pointer to SHM buffer |
| pSDM_PGN | POINTER TO EPEC_J1939.J1939_PGN | NULL | Pointer to SDM buffer |
| pSafeSPNs | POINTER TO S_J1939_SPN | NULL | Pointer to validated SPNs in safe memory |
| NumberOfSafeSPNs | UINT | 0 | Number of SPNs in safe memory |
| SCT | SAFEUINT | 0 |
Safety Cycle Time (ms) Tx: Cycle time for triggering the sending of the SDG. |
| SRVT | SAFEUSINT | 0 |
Safety Related Validation Time (ms) Rx: Maximum time between receiving SHM and corresponding SDM |
| SequenceNumber | USINT | 0 | Sequence number which is incremented when the SDG is sent or received |
| SendSequence | S_J1939_SendSequence | idle | Sending sequence state machine value |
| OldTimestamp | UDINT | 0 |
Rx: Previous SDM timestamp (ms) for SC timeout calculation. Tx: Previous SHM send time (ms) for Safety Cycle time. |
| SDMTimeStamp | UDINT | 0 | SDM timestamp (us). |
| SHMTimeStamp | UDINT | 0 | SHM timestamp (us). |
| ExtractedCOBID | DWORD | 0 | SDM COB-ID extracted from SHM. |
| ExtractedCRC | DWORD | 0 | SDM data CRC extracted from SHM. |
| ExtractedSequence | USINT | 0 | Sequence number extracted from SHM. |
| InitError | EPEC_J1939.J1939_ReturnCodes | - | Initialization error. |
| Status | SDGStatus | - | Operation statuses and errors. |
|
Name of the Member |
Data Type |
Value |
Description |
|
idle |
INT |
0 |
No operation, after SCT create messages and send shm |
|
send_sdm |
INT |
1 |
Send sdm |
|
Name of the Member |
Data Type |
Default value |
Description |
|
Size |
DWORD |
0 |
Size of the SPN (bits) |
|
pData |
POINTER TO BYTE |
NULL |
Pointer to data |
Source file SafeJ1939DataTypes.htm
Last updated 4-Sep-2025