FSoE-Rahmenstruktur anhand von Beispielen erklärt
Ein Byte Sicherheitsdaten: Die einfachste Safety-PDU
Diese enthält nur eine Sicherheitsdateninstanz, bestehend aus nur einem Byte
| Offset | Größe | Name | Beschreibung |
|---|---|---|---|
| 0 | 1 Byte | Command | Befehl |
| 1 | 1 Byte | SafeData[0] | Sicherheitsdaten, Oktett 0 |
| 2 | 2 Byte | CRC_0 | 16-Bit-CRC |
| 4 | 2 Byte | Conn_Id | eindeutige Verbindungs-ID |
Alle Mehrbyte-Felder werden in Little-Endian gespeichert.
FSoEShortestSafetyPDU.h
struct __attribute__((packed)) FSoEShortestSafetyPDU {
uint8_t Command;
uint8_t SafeData_0;
uint16_t CRC_0;
uint16_t Conn_Id;
};Zwei Byte Sicherheitsdaten
| Offset | Größe | Name | Beschreibung |
|---|---|---|---|
| 0 | 1 Byte | Command | Befehl |
| 1 | 1 Byte | SafeData[0] | Sicherheitsdaten, Oktett 0 |
| 2 | 1 Byte | SafeData[1] | Sicherheitsdaten, Oktett 1 |
| 3 | 2 Byte | CRC_0 | 16-Bit-CRC |
| 5 | 2 Byte | Conn_Id | eindeutige Verbindungs-ID |
Alle Mehrbyte-Felder werden in Little-Endian gespeichert.
FSoETwoByteSafeDataPDU.h
struct __attribute__((packed)) FSoETwoByteSafeDataPDU {
uint8_t Command;
uint8_t SafeData_0;
uint8_t SafeData_1;
uint16_t CRC_0;
uint16_t Conn_Id;
};Vier Byte Sicherheitsdaten
| Offset | Größe | Name | Beschreibung |
|---|---|---|---|
| 0 | 1 Byte | Command | Befehl |
| 1 | 1 Byte | SafeData[0] | Sicherheitsdaten, Oktett 0 |
| 2 | 1 Byte | SafeData[1] | Sicherheitsdaten, Oktett 1 |
| 3 | 2 Byte | CRC_0 | 16-Bit-CRC 0 |
| 5 | 1 Byte | SafeData[2] | Sicherheitsdaten, Oktett 2 |
| 6 | 1 Byte | SafeData[3] | Sicherheitsdaten, Oktett 3 |
| 7 | 2 Byte | CRC_1 | 16-Bit-CRC 1 |
| 9 | 2 Byte | Conn_Id | eindeutige Verbindungs-ID |
Alle Mehrbyte-Felder werden in Little-Endian gespeichert.
FSoEFourByteSafeDataPDU.h
struct __attribute__((packed)) FSoEFourByteSafeDataPDU {
uint8_t Command;
uint8_t SafeData_0;
uint8_t SafeData_1;
uint16_t CRC_0;
uint8_t SafeData_2;
uint8_t SafeData_3;
uint16_t CRC_1;
uint16_t Conn_Id;
};Quelle: ETG.5100 S (D) V1.2.0, Tabelle 4: Shortest safety PDU und Tabelle 3: General Safety PDU, auf Anfrage erhältlich von der EtherCAT Technology Group (ETG)
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow