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.

APPENDIX A: SNAP ETHERNET-BASED BRAIN MEMORY MAP<br />

IP address data type consists of four 1-byte integers. As shown in the example below, the<br />

lower-numbered address reads or writes the first byte:<br />

Example:<br />

This address<br />

FFFF F030 0034<br />

FFFF F030 0035<br />

FFFF F030 0036<br />

FFFF F030 0037<br />

Byte Ordering <strong>and</strong> Data Ordering<br />

All non-mask data for points in bank <strong>and</strong> point areas are arranged in low point/low address order,<br />

as follows:<br />

Point 0 at 0x....00<br />

Point 1 at 0x....04<br />

Point 2 at 0x....08<br />

Etc.<br />

All masks <strong>and</strong> multi-byte values (floats, integers, <strong>and</strong> so on) are in Big-Endian format, which<br />

means that the higher-ordered byte is in the lower-ordered address.<br />

See page 41 for more information <strong>and</strong> examples.<br />

General Notes<br />

Reads/writes this byte<br />

10. 192. 55. 123<br />

For these brains, you cannot read or write more than 2,034 bytes at a time via TCP. Via UDP, the<br />

limit is 1,480 bytes.<br />

Within these limits, you can read or write to an entire area within the memory map, using a block<br />

read or write. (Each area of the map is shown under a separate heading in the following pages.)<br />

For example, using TCP, you could read or write up to 2034 bytes of data—about a third of the<br />

entire area—in the “Analog <strong>and</strong> Digital Point Configuration Information—Read/Write” area<br />

shown on page 125. If you are reading, just ignore any data in the reserved addresses between<br />

points.<br />

If you read or write beyond the last valid address in any area, however, you may receive an error.<br />

Reading or writing in multiples of four bytes is generally faster than accessing a number of bytes<br />

that is not a multiple of four.<br />

CAUTION: In certain areas, if you read or write less than a quadlet, the data will be useless. For<br />

example, reading two bytes of a float won’t give complete data. Even more important, if you read<br />

only two bytes of a float in an area such as the Read <strong>and</strong> Clear area of the map, not only will the<br />

data you receive be useless but also the information in the memory map will be erased (cleared).<br />

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

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

Saved successfully!

Ooh no, something went wrong!