Webcontrol Plc Examples; Example 1 Set Output Based On Condition - CAI Networks WebControl PLC User Manual

Programmable logic controller
Table of Contents

Advertisement

RAM63
RAM73
RAM83
RAM1B1
1 bit access to purpose RAM 1 only. This only availavble
RAM1B2
for RAM1 Delay operator is not valid on these. Not displayed
...
anywhere, store in the SAME RAM1 location
RAM1B32
UROM1
32 bit signed integer user value stored in EEPROM
UROM2
read only, value sets through general tab on web GUI.
UROM3
UROM4
COUNTER
32 bit counter can be read, compare, or set
FCOUNTER
read only, frequency per second up to 2MHz.
WSRPLY
read and write, automatically set by web server during WEBSET
call when server specified a value like "SET_WC=12345678".
LED
read and write, When read 0 means LED is off, 1 means LED is
on, 2 means LED is heart beat. When write, valie is 0,1,or 2.
ALLINS
read only, All 8 TTL as a byte. Only in 3.02.17a firmware
ALLOUTS
read write, All 8 TTL output as a byte, only in 3.02.17a
firmware.

6.4 WebControl PLC Examples

For best understanding how PLC logic working, you can try to copy and paste the
examples below into your WebControl PLC program screen to check them out.
Please note PLC logic will execute from START to END. Then it will continue from
START to END, forever repeating. If you last line of PLC code could skip next
instruction, like those TST instruction, it might skip your first line when condition met.
Please do pay attention to it. If you use CALLSUB to run subroutine, after finishing
the subroutine, the logic will return back to where CALLSUB called and continue.

6.4.1 Example 1 Set Output based on condition

Control incubator heater connected to TTL output 1. If temperature T3 is less than 37
degree C turn ON the heater; if T3 is greater or equal to 39 degree C, turn the heater
OFF,.
START
TSTLE T3 370 OP1
NOP
TSTGT T3 389
SET OP1 0
Copyright(c) 2008,-2013 CAI Networks, Inc.
TM
WebControl
PLC User Guide Version 3.02.17f
30

Advertisement

Table of Contents
loading

Table of Contents