F_ConvStateToString

F_ConvStateToString 1:

Die Funktion F_ConvStateToString liefert den EtherCAT-Slave-State als String. Bei nState = 0 wird ‘ ‘ geliefert, sonst, z.B. bei nState = 1, wird ‘INIT ‘ geliefert. Wenn mehrere Meldungen anstehen, werden diese mit Leerzeichen separiert.

F_ConvStateToString 2: Eingänge

VAR_INPUT
    nState : WORD;
END_VAR

Name

Typ

Beschreibung

nState

WORD

EtherCAT-Slave-State als WORD

0x___1 = 'INIT'
0x___2 = 'PREOP'
0x___3 = 'BOOT'
0x___4 = 'SAFEOP'
0x___8 = 'OP'
0x001_ = 'Slave signals error'
0x002_ = 'Invalid vendorId, productCode... read'
0x004_ = 'Initialization error occurred'
0x008_ = 'Slave disabled'
0x010_ = 'Slave not present'
0x020_ = 'Slave signals link error'
0x040_ = 'Slave signals missing link'
0x080_ = 'Slave Slave signals unexpected link'
0x100_ = 'Communication port A'
0x200_ = 'Communication port B'
0x400_ = 'Communication port C'
0x800_ = 'Communication port D'

Voraussetzungen

Entwicklungsumgebung

Zielplattform

Einzubindende SPS- Bibliotheken

TwinCAT v3.1.0

PC oder CX (x86, x64, Arm®)

Tc2_EtherCAT