snap ethernet-based i/o units protocols and programming guide
snap ethernet-based i/o units protocols and programming guide
snap ethernet-based i/o units protocols and programming guide
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
CHAPTER 2: OVERVIEW OF PROGRAMMING<br />
Similarly, an off-latch is set when the value of a digital point changes from on to off, <strong>and</strong> it<br />
remains set until cleared.<br />
Latching is automatic <strong>and</strong> needs no configuration. Using memory map values, you can read the<br />
on-latch or off-latch state of any digital point, <strong>and</strong> you can clear latches.<br />
Counters (Digital Points)<br />
This feature applies to digital points on I/O <strong>units</strong> with the following brains only:<br />
SNAP-UP1-ADS<br />
SNAP-B3000-ENET<br />
On these I/O <strong>units</strong>, any digital input can be used as a counter. When configured, it will count the<br />
number of times the input changes from off to on.<br />
When a counter is configured, it is automatically activated.<br />
Using memory map values, you can stop a counter if required <strong>and</strong> then start it again. You can also<br />
clear a counter, so it begins counting again from zero. For example, to count the number of<br />
widgets produced per shift, you would clear the counter at the start of each shift <strong>and</strong> read it at<br />
the end of each shift.<br />
Quadrature Counters (Digital Points)<br />
I/O <strong>units</strong> with the following brains also support quadrature counters for quadrature encoder<br />
devices:<br />
SNAP-UP1-ADS<br />
SNAP-B3000-ENET<br />
SNAP-ENET-RTC<br />
SNAP-WLAN-FH-ADS<br />
SNAP-ENET-RTC<br />
SNAP-WLAN-FH-ADS<br />
A quadrature counter requires a SNAP quadrature input module, which is attached to the encoder<br />
device. The module sends a pulse to the brain upon each change in quadrature state, <strong>and</strong> the<br />
brain counts the pulses <strong>and</strong> keeps track of the direction <strong>and</strong> rotation. The counter counts up if<br />
quadrature Point A leads Point B; it counts down if Point A lags behind Point B.<br />
Optionally, you can assign a third digital input as an index for a quadrature counter. The index<br />
automatically resets the count, <strong>and</strong> it shows what the count was when the index was triggered.<br />
Counts are sometimes lost, due to noise or encoder problems, for example; with the index, you<br />
can see whether the count varies too much.<br />
Using a Simple Quadrature Counter<br />
When you configure the points on the quadrature input module in ioManager or ioControl, the<br />
simple quadrature counter feature (without an index) is automatically included.<br />
SNAP Ethernet-Based I/O Units Protocols <strong>and</strong> Programming Guide 21