3
Preset Value
0 to 32,767
4
Timer Value
0 to 32,767
Examples: T,0,0 indicates if Timer 0 is enabled or disabled.
T, 12,4 references the current timer value of timer number 12.
The timer value and status bits can be viewed or changed from the
Timer Status
form. To view
the timer values, click on the
Ladder and C Variables
button from the Toolbar on the Main
Programming form. Select the
Timers
tab. In addition to viewing the state of the timer values,
you can also force changes by double-clicking on the timer value you want to change. A
Change
form will appear to let you enter a new value for the timer. Use the Up/Down arrows to flip
through the pages to access the timers you wish to view.
CTU (Count-Up Counter)
This instruction counts false-to-true rung transitions starting with a COUNT value of 0.
Rung transitions can be caused by events occurring in the program (internal logic) or by
external field devices. When rung conditions for a CTU instruction have made a false-to-true
transition, the COUNT value is incremented by one, provided that the rung containing the
CTU instruction is evaluated between these transitions. When the COUNT value reaches the
PRESET, the DONE bit is set. The ability of the counter to detect false-to-true transitions
depends on the speed (frequency) of the incoming signal (see ladder timing specifications). The
COUNT value is retained when the rung conditions again become false. The COUNT can
only be set to zero using the RES(RESET) instruction that has the same address as the coun-
ter. The counter overflows at 32767, but will continue counting from -32768 if not reset. The
counter bits are updated as follows:
ENABLED: Set when rung is true, and reset when rung is false. Also reset from a
RES(RESET) ladder instruction.
DONE: Set when COUNT is equal to or greater than PRESET. Also reset from a
RES(RESET) ladder instruction.
OVERFLOW: Set when the COUNT increments past 32767.
The CTU address identifies the register where the COUNT value is stored. The counter
address can only reference one of the 64 internal counters: N,0 through N,63. Right-click
on the instruction and choose
Select Counter.
A list of the 64 counters will be displayed. Select
one and click
OK.
Next, set the preset by right-clicking on the instruction and choosing
Set
Preset.
Enter the preset value and click
OK
. You may use the CTU instruction in combination
with the CTD function—one increments the count and the other decrements the count—by
using the same address. In this application the COUNT Value and the PRESET value for each
instruction are one in the same.
The instruction executes in 5.7µs and requires 176 bytes.
The GROUP for this type is the counter number from 0–63. The ELEMENT specifies an
individual function for the selected counter. There are 7 functions associated with each timer:
15-8
SCADA 3000 User’s Manual
Содержание Sensaphone SCADA 3000
Страница 1: ...Sensaphone SCADA 3000 User s Manual Version 2 34...
Страница 6: ...vi SCADA 3000 User s Manual...
Страница 10: ...x SCADA 3000 User s Manual...
Страница 30: ...1 6 SCADA 3000 User s Manual...
Страница 48: ...4 6 SCADA 3000 User s Manual...
Страница 70: ...9 8 SCADA 3000 User s Manual...
Страница 122: ...12 8 SCADA 3000 User s Manual...
Страница 190: ...15 30 SCADA 3000 User s Manual...
Страница 211: ...lead 1 lag 0 else lead 0 lag 1 16 21 Chapter 16 Programming in C...
Страница 212: ...16 22 SCADA 3000 User s Manual...
Страница 236: ...21 8 SCADA 3000 User s Manual...
Страница 248: ...22 12 SCADA 3000 User s Manual...
Страница 258: ...23 10 SCADA 3000 User s Manual...
Страница 274: ...25 8 SCADA 3000 User s Manual...
Страница 288: ...27 8 SCADA 3000 User s Manual...
Страница 294: ...28 6 SCADA 3000 User s Manual...
Страница 296: ...A 2 SCADA 3000 User s Manual...
Страница 302: ...D 2 SCADA 3000 User s Manual...
Страница 318: ...I 2 SCADA 3000 User s Manual...
Страница 320: ...J 2 SCADA 3000 User s Manual...
Страница 322: ...K 2 SCADA 3000 User s Manual...
Страница 335: ...Test Log...
Страница 336: ......