2 Instruction Descriptions
2-622
NJ-series Instructions Reference Manual (W502)
GetPLCError
The GetPLCError instruction gets the highest level status (partial fault or minor fault) and highest level
event code of the current Controller errors in the PLC Function Module.
The GetPLCError instruction gets the highest level status and the highest level event code of the cur-
rent Controller errors in the PLC Function Module and outputs them to Level and Code.
If there are currently no Controller errors, the value of error flag Out is FALSE.
If there is more than one Controller error at the highest event level, the value of Code is the event code
for the Controller error that occurred first.
Instruction Name FB/FUN Graphic expression ST expression
GetPLCError Get PLC Controller
Error Status
FUN Out:=GetPLCError(Level,
Code);
Variables
Name Meaning I/O Description Valid range Unit Default
Out Error flag
Output
TRUE: Controller error
exists.
FALSE:No Controller error
Depends on data type.
Level Highest
event level
Highest level status of all
current Controller errors in
the PLC Function Module
0: No Controller 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 Controller errors
in the PLC Function Module
16#0000_0000: No Control-
ler 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
Function
(@)GetPLCError
EN Out
Level
Code