Nj-Series Instructions Reference Manual (W502 - Omron NJ501-1500 Reference Manual

Machine automation controller nj-series
Hide thumbs Also See for NJ501-1500:
Table of Contents

Advertisement

2 Instruction Descriptions
ST
Internal
Variables
A
B
C
F
Abc
Def
TON_instance0
TON_instance1
External
Variable
Variables
_AlarmFlag WORD
// Check the value of variable A.
IF (A=TRUE) THEN
TON_instance0(In:=TRUE, PT:=T#5s, Q=>B);
ELSE
TON_instance0(In:=FALSE, Q=>B);
END_IF;
IF (A=FALSE) THEN
TON_instance1(In:=TRUE, PT:=T#5s, Q=>C);
ELSE
TON_instance1(In:=FALSE, Q=>C);
END_IF;
// Create user-defined error.
IF (B=TRUE) OR (C=TRUE) THEN
SetAlarm(
Code:=UINT102,
Info1 :=Abc,
info2 :=Def);
END_IF;
// Reset user-defined error.
IF (F=TRUE) & (B=FALSE) & (C=FALSE) & (_AlarmFlag<>WORD#16#0000) THEN
ResetAlarm(Code:=UINT#102);
END_IF;
2-614
Variable
Data type Initial value
BOOL
False
BOOL
False
BOOL
False
BOOL
False
UINT
123
UINT
456
TON
TON
Data type
Constant
Error Status of User-defined Errors
Comment

NJ-series Instructions Reference Manual (W502)

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nj501-1300Nj501-1400

Table of Contents