Example 3 - a modulo 6 counter – INFICON STC-2002 Thin Film Deposition Controller Operating Manual User Manual

Page 187

Advertising
background image

p STC-2002

DEPOSITION CONTROLLER

y

SECTION 5.XX

e page 185 of 276 ^

programming statements. The counters can alternately be named with letters in consecutive order based on
their numeric sequence (eg. 400=A, 401=B, etc.).

Counters

Counter A Is represented by the ID 400. Using the 400 identification, the counter when used as an

output can have current count, count advancement (increment) and count reset to zero (clear). Similarly,
using the 400 identification, the counter as an input can have values written to the counter. The function
code I is valid to test a state. The I/O term I400 would be true at the positive transition to count 44 of the
counter. The I/O term I344 is true while counter A exists at count 44.

Outputs

Outputs of logical I/O expressions can clear or advance the count within a counter. These are of

the form s400 (set), c400 (clear), a400 (arm), or d400 (drop). Set and arm act identically when used with
counters. Each positive edge of these terms advances the counter one count, incrementing the counter in a
00..01..02..03......98..99..00..01 sequence.

Resetting

Clear (C400) and drop (D400) are two ways to reset the counter to its 00 count. Clear is a level

sensitive clear which sets the counter to its 00 state and keeps it there as long as it is true. Any attempts to
advance the count (S400 or A400) while C400 is active will be ignored. The drop (D400) input is positive
edge sensitive and thus sets the counter to its 00 state on the positive occurrence of the drop event (D400).
The fact that D400 remains true does not affect the ability of the counter to be advanced by either S400 or
A400 commands. If during a single I/O program evaluation pass, both a set (or arm) and clear (or drop) are
active, the clear has priority and count will go to zero and the advance count event will be lost.

Example 3 - A Modulo 6 Counter

A Modulo 6 counter will be implemented which closes output relay 8 for 1 second on every fifth

push of the INC push key on the hand controller (not really too useful but demonstrates some fundamentals
and can be easily tested). Also, each press alternates the illumination state of the LED#2 between off and
on.

The Program

The following program implements this modulo 6 counter.

1:

I89 P 0350

2:

I350 S400

3:

I400 #5 = I350 & D400

4:

I400 #5 = N T15

5:

I400 #1 & O65

Table 5.6: Modulo 6 Counter Program

Rung By Rung

rung 1: Examines the INC push key (I89) and produces an event on the positive edge to softnode 350.
rung 2: The occurrence of the positive edge of the soft node is used to advance the counter.
rung 3: When the counter is in the state 05, and the soft node then goes True, the counter is cleared to zero

rather than advancing to 6.

rung 4: Generates a one second (trip) pulse on relay 8 (ID#15) when the counter has been incremented

from the 5 state to the 00 state, each 5

th

press of the INC hand controller key.

rung 5: Masks the least significant bit of counter 400 and displays it to LED#2.

Advertising