Download Print this page

Omron NS Reference Manual page 12

Hide thumbs Also See for NS:

Advertisement

Section 1 Outline of Macro Function
NS series Macro Reference
Constant
Usable constants for macro program and procedure are described in the following table.
Item
Decimal constant
Hexadecimal constant
Character String
Branches
The following keywords can be used for specifying conditions.
Item
IF
ELSEIF
ELSE
ENDIF
-32768 to 32767 can be input when using word (16-bit)
-2147483648 to 2147483647 can be input when using 2
words (32-bit)
H0 to HFFFF can be input when using word (16-bit)
H0 to HFFFFFFFF can be input when using 2 words (32-bit)
Enclose in " "
E.g. "ABCDE"
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)
$W99 = 1;
ELSEIF($W100 == 2)
$W99 = 2;
ELSE
$W99 = 3;
ENDIF
Explanation
Explanation
'If $W100 is 1
'if $W100 is 2
'if $W100 is other than 1 or 2
1-10

Advertisement

loading

This manual is also suitable for:

Ns-series