EasyManua.ls Logo

Omron NS - Page 12

Omron NS
73 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Section 1 Outline of Macro Function
1-10
NS series Macro Referenc
e
Constant
Usable constants for macro program and procedure are described in the following table.
Item Explanation
Decimal constant -32768 to 32767 can be input when using word (16-bit)
-2147483648 to 2147483647 can be input when using 2
words (32-bit)
Hexadecimal constant H0 to HFFFF can be input when using word (16-bit)
H0 to HFFFFFFFF can be input when using 2 words (32-bit)
Character String Enclose in “ “
E.g. ”ABCDE”
Branches
The following keywords can be used for specifying conditions.
Item Explanation
IF
ELSEIF
ELSE
ENDIF
Enclose conditional expressions in parentheses () after the IF and
ELSEIF.
Always use ENDIF at the end. Up to 8 nests can be input.
There is no restrictions for inputting the number of lines under IF
sentence. However, the total number of characters used in whole
macro must be no more than 3000 characters.
E.g.
IF($W100 == 1) ‘If $W100 is 1
$W99 = 1;
ELSEIF($W100 == 2) ‘if $W100 is 2
$W99 = 2;
ELSE ‘if $W100 is other than 1 or 2
$W99 = 3;
ENDIF

Other manuals for Omron NS

Related product manuals