
8NJ-series Instructions Reference Manual (W502)
CONTENTS
OutABit .................................................................................................................... 2-57
Sequence Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-59
End .......................................................................................................................... 2-60
RETURN ................................................................................................................. 2-61
MC and MCR ........................................................................................................... 2-62
JMP ......................................................................................................................... 2-74
FOR and NEXT ....................................................................................................... 2-76
BREAK .................................................................................................................... 2-81
Comparison Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-83
EQ (=) ...................................................................................................................... 2-84
NE (<>) .................................................................................................................... 2-86
LT (<), LE (<=), GT (>), and GE (>=) ...................................................................... 2-88
EQascii .................................................................................................................... 2-91
NEascii .................................................................................................................... 2-93
LTascii, LEascii, GTascii, and GEascii .................................................................... 2-95
Cmp ......................................................................................................................... 2-98
ZoneCmp ............................................................................................................... 2-100
TableCmp .............................................................................................................. 2-102
AryCmpEQ and AryCmpNE .................................................................................. 2-105
AryCmpLT, AryCmpLE, AryCmpGT, and AryCmpGE ........................................... 2-107
AryCmpEQV and AryCmpNEV ............................................................................. 2-110
AryCmpLTV, AryCmpLEV, AryCmpGTV, and AryCmpGEV ................................. 2-112
Timer Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-115
TON ....................................................................................................................... 2-116
TOF ....................................................................................................................... 2-120
TP .......................................................................................................................... 2-123
AccumulationTimer ................................................................................................ 2-126
Timer ..................................................................................................................... 2-129
Counter Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-133
CTD ....................................................................................................................... 2-134
CTD_** .................................................................................................................. 2-136
CTU ....................................................................................................................... 2-138
CTU_** .................................................................................................................. 2-140
CTUD .................................................................................................................... 2-142
CTUD_** ................................................................................................................ 2-146
Math Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-151
ADD (+) ................................................................................................................. 2-152
AddOU (+OU) ........................................................................................................ 2-154
SUB (-) .................................................................................................................. 2-156
SubOU (-OU) ......................................................................................................... 2-158
MUL (*) .................................................................................................................. 2-161
MulOU (*OU) ......................................................................................................... 2-163
DIV (/) .................................................................................................................... 2-166
MOD ...................................................................................................................... 2-168
ABS ....................................................................................................................... 2-170
RadToDeg and DegToRad .................................................................................... 2-172
SIN, COS, and TAN .............................................................................................. 2-174
ASIN, ACOS, and ATAN ....................................................................................... 2-177
SQRT .................................................................................................................... 2-180
LN and LOG .......................................................................................................... 2-182
EXP ....................................................................................................................... 2-185
EXPT (**) ............................................................................................................... 2-187
Inc and Dec ........................................................................................................... 2-189
Rand ...................................................................................................................... 2-191
AryAdd ................................................................................................................... 2-193
AryAddV ................................................................................................................ 2-195
ArySub ................................................................................................................... 2-197
ArySubV ................................................................................................................ 2-199