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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Logging Data<br />

Area Number<br />

of Bytes<br />

IEEE 1394<br />

packet header<br />

(without CRC)<br />

Useful data<br />

2 Total length of packet<br />

For example, the first bytes of a stream packet might look like this:<br />

CHAPTER 2: OVERVIEW OF PROGRAMMING<br />

Description<br />

2 First byte is zero-filled; second byte contains transaction code 0x0A for an<br />

isochronous data block (4 bits) <strong>and</strong> synchronization code for Opto 22 use (4 bits).<br />

256 Analog values in Engineering Units (IEEE floats). Contains 4 bytes of data for<br />

each of 64 points, starting with point 0.<br />

256 Point feature data (counter data) (unsigned 32-bit integers).<br />

8 On/off state of all digital points (mask)<br />

8 On latch state (mask)<br />

8 Off latch state (mask)<br />

8 Active counters (mask)<br />

Unused data 56 Reserved for future data; zero-filled<br />

These packet bytes: 1st 2nd 3rd 4th 5th 6th 7th 8th 9th 10th 11th 12th<br />

Contain this hex data: header 41 77 33 33 41 3F AC 66<br />

For these points: -- 0 1<br />

On module at position: -- 0<br />

In the body of the stream packet, IEEE floats are arranged in low point/low address order. See<br />

page 43 for an example. All masks in the stream packet are in Big Endian format, however, with<br />

higher-numbered points in the lower-addressed byte. See page 41 for more information about<br />

how data in a mask is formatted.<br />

Your SNAP Ultimate or SNAP Ethernet brain includes a feature that allows data from memory<br />

map addresses to be recorded in a log file. The data from up to 64 memory map addresses can<br />

be logged, <strong>and</strong> all logged data is recorded in one file. The log file holds up to 300 lines of data;<br />

when it is filled, new entries replace the oldest ones.<br />

Logging data requires two steps:<br />

Configure the events (Scratch Pad masks) that trigger logging <strong>and</strong> the memory map<br />

addresses to log data from.<br />

Read the data from the data log.<br />

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

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

Saved successfully!

Ooh no, something went wrong!