2-637
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
System Control Instructions
2
GetECError
GetECError
The GetECError instruction gets the highest level status (partial fault or minor fault) and highest level
event code of the current communications port errors or master errors in the EtherCAT Master Function
Module.
Instruction Name FB/FUN Graphic expression ST expression
GetECError Get EtherCAT Error
Status
FUN Out:=GetECError(Level,
Code);
Variables
Name Meaning I/O Description Valid range Unit Default
Out Error flag
Output
TRUE: Communications
port error or master
error exists.
FALSE:No communications
port error or master
error.
Depends on data type.
--- ---
Level Highest
event level
Highest level status of all
current communications port
errors and master errors in
the EtherCAT Function Mod-
ule
0: No error
2: Partial fault level
3: Minor fault level
0, 2, or 3
Code Highest
level event
code
Highest level event code of
all current communications
port errors and master
errors in the EtherCAT
Function Module
16#0000_0000: No error
16#0007_0000 to
16#FFFF_FFFF: Event code
16#00000000
16#00070000 to
16#FFFFFFFF
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
Out OK
Level OK
Code OK
(@)GetECError
EN Out
Level
Code