User manual
Toolbox 32 User Manual 1.47d www.cse-semaphore.com/mykingfisher
Page
105
Example - Initialising Variables On First Scan
Variables can be initialised after ladder logic is downloaded by using the logic below. To initialise variables
after a warm start or power reset or after downloading the SDB file, use #YSYS.SCAN1 instead of
#YSYS.ENABLE.
│ │
├Initialise registers after downloading ladder logic ┼ ┤
│ │
│LadderDownld R1QuietTimer │
│#YSYS.ENABLE #R51 │
├─────┤ ├────────────────────────────────────────────────────────────(Copy)────┤
│ 0 │
│ │
Figure: Initialising variables on the first ladder scan
Example - Timer Flag
An RTU has 64 timer registers that can be used once each in ladder logic. Although the amount of timer
registers may appear to be low, each timer register can be used to regularly set and reset a register bit. The
register bit can then be used an unlimited number of times in the ladder to rollover totals or to regularly copy
data into registers etc. In addition to timers, there are also a number of periodic system registers which can
also be used an unlimited number of times. Please see the appendix RTU Data, System Registers, Clock
Registers. The 3.6 Sec Flag below is true once every 3.6 seconds and is true for one scan of the ladder.
│ │
├Create a periodic flag for counting hours run ┼ ┤
│ │
│DoEvery3.6s 3.6 Sec Flag │
│ #T2 #R100.1 │
├──[PERIOD]────────────────────────────────────────────────────────────( )─────┤
│ 360 100ths │
│ │
Figure: 3.6 Second Periodic Flag (used for counting hours run)