![CAI Networks WebControl PLC Скачать руководство пользователя страница 26](http://html1.mh-extra.com/html/cai-networks/webcontrol-plc/webcontrol-plc_user-manual_3323111026.webp)
WebControl
TM
PLC User Guide Version 3.02.17f
Copyright(c) 2008,-2013 CAI Networks, Inc. 23
the state of the zero bit. Next a branch instruction is used which branches on the
state of the zero bit.
TSTEQ IP1 1 # sets zero bit based on the result of the test instruction
BNZ label
# branches to label if zero bit is non-zero
Format of instructions:
label: (optional)
opcode
operands
Labels must be terminated with a colon ':' and can be a maximum of 10 characters.
6.2 WebControl
TM
PLC Instructions
The following symbols are used in the table below:
d = destination
a,b..c = operands
() = optional, any operand enclosed in parenthesis mean it is an optional operand.
[] = non-blocking delay operator optional to TTL input/output and VARs. 32 bit
unsigned number, represent resolution of 0.001 seconds. When the delay operator is
used on input operands the current value of that input is only used if it has had that
value for greater than the delay period specified between the brackets. When this
operator is used on an output operand the output value is only set for the period
specified in the brackets. All delay periods are specified in milliseconds. Note that
accuracy and timer resolution is approximately 100ms, even though the delay
operator value is in unit of 1mS.
Opcode Operands
Description
START
Start of main program
PROTECTED
Must
be
2
nd
Opcode in PLC, will not display PLC code.
TSTEQ
a[] b[] (d[])
Tests if a is equal to b. Boolean result loaded into optional
destination (d). Zero bit updated with result. If test
evaluates to false then the next instruction is skipped.
TSTNE
a[] b[] (d[])
Tests if a is NOT equal to b. Boolean result loaded into
optional destination (d). Zero bit updated with result. If test
evaluates to false then the next instruction is skipped.
TSTGT
a[] b[] (d[])
Test if a is greater than b. Boolean result loaded into
optional destination (d). Zero bit updated with result. If test
evaluates to false then the next instruction is skipped.
TSTLT
a[] b[] (d[])
Tests if a is less than b. Boolean result loaded into optional
destination (d). Zero bit updated with result. If test
evaluates to false then the next instruction is skipped.
TSTGE
a[] b[] (d[])
Tests if a is greater than OR equal to b. Boolean result
loaded into optional destination (d). Zero bit updated with