Webcontrol Tm Plc Instructions - CAI Networks WebControl PLC User Manual

Programmable logic controller
Table of Contents

Advertisement

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.
TM
6.2 WebControl
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
START
PROTECTED
TSTEQ
a[] b[] (d[])
TSTNE
a[] b[] (d[])
TSTGT
a[] b[] (d[])
TSTLT
a[] b[] (d[])
TSTGE
a[] b[] (d[])
Copyright(c) 2008,-2013 CAI Networks, Inc.
WebControl
PLC Instructions
Description
Start of main program
Must be 2
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.
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.
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.
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.
Tests if a is greater than OR equal to b. Boolean result
loaded into optional destination (d). Zero bit updated with
TM
PLC User Guide Version 3.02.17f
nd
Opcode in PLC, will not display PLC code.
23

Advertisement

Table of Contents
loading

Table of Contents