14.08.2013 Views

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

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Read <strong>and</strong> clear latches for individual points.<br />

CHAPTER 4: USING THE IEEE 1394-BASED PROTOCOL<br />

To read latches for individual points, see the memory map area “Digital Point Read—Read<br />

Only” on page 121, <strong>and</strong> use the on-latch or off-latch state starting address for the point you want<br />

to read. For example, you would read off-latch status for point 0 starting at address<br />

FFFFF0800002.<br />

To read a bank of points, see the memory map area “Digital Bank Read—Read Only” on<br />

page 119. The starting address for reading the state of on-latches is FFFFF0400008, <strong>and</strong> the<br />

starting address for off-latches is FFFFF0400010.<br />

To read <strong>and</strong> clear latches for individual points, see the memory map area “Digital Read <strong>and</strong><br />

Clear—Read Only” on page 132. If you are reading <strong>and</strong> clearing the on-latch at point 1, for<br />

example, you would use the starting address FFFFF0F00104.<br />

For help in underst<strong>and</strong>ing the data you read, see “Formatting <strong>and</strong> Interpreting Data” on page 41.<br />

Counters<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 />

When configured, it will count the number of times the input changes from off to on. Using<br />

counters involves two steps: configuring the counter <strong>and</strong> reading data.<br />

Configuring a Counter<br />

To configure a digital input as a counter, first configure the point as an input. Write to the<br />

“Analog <strong>and</strong> Digital Point Configuration Information—Read/Write” area of the memory map.<br />

(See page 125.) For example, to configure point 0 as a counter, you would write to the memory<br />

map address FFFFF0C00004, using 00000100 as the data for a digital input.<br />

Next, configure the point feature as a counter. In the same area of the memory map, for<br />

point 0 you would write to the address FFFFF0C00008 <strong>and</strong> use 00000001 as the data for a counter.<br />

Reading a Counter<br />

SNAP-ENET-RTC<br />

SNAP-WLAN-FH-ADS<br />

You can:<br />

Read counters for individual points <strong>and</strong> leave them counting<br />

Read a bank of points <strong>and</strong> leave them counting<br />

Read <strong>and</strong> clear individual point counters in one step, setting the counters back to zero.<br />

To read counters for individual points, see the memory map area “Digital Point Read—Read<br />

Only” on page 121, <strong>and</strong> use the counter data starting address for the point you want to read. For<br />

example, you would read counter data for point 1 starting at address FFFFF0800044.<br />

SNAP Ethernet-Based I/O Units Protocols <strong>and</strong> Programming Guide 89

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!