Example 8, Time Based Control - CAI Networks WebControl PLC User Manual

Programmable logic controller
Table of Contents

Advertisement

SET OP1 1
SET OP2 0
SET OP3 0
RET
LIGHTS_GO:
SET OP1 0
SET OP2 0
SET OP3 1
RET
LIGHTS_AM:
SET OP1 0
SET OP2 1
SET OP3 0
RET
STOP:
CALLSUB LIGHTS_AM
DELAY 5000
CALLSUB LIGHTS_ST
DELAY 60000
CALLSUB LIGHTS_AM
SET RAM2 5
flash:
XOR OP2 1 OP2
DELAY 500
DEC RAM2
BNZ flash
CALLSUB LIGHTS_GO
RET

6.4.8 Example 8, Time based Control

WARNING: For time critical application, please make sure to check CYEAR correct
before taking action based on system clock. When WebControl
ROM hard coded time in 2011. If PLC reporting year 2011, the NTP or real time clock
has not sync the local clock yet.
This example will have five subroutines. WebControl
through them. The "HOURLY" routing will compare analog input 1 and analog input 2,
if A1 - A2 > 10, send an email notice 1. You can use similar logic to adjust your solar
Copyright(c) 2008,-2013 CAI Networks, Inc.
TM
WebControl
PLC User Guide Version 3.02.17f
TM
TM
PLC will continuously loop
boot up, it will uses
36

Advertisement

Table of Contents
loading

Table of Contents