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.

Streaming Data<br />

CHAPTER 2: OVERVIEW OF PROGRAMMING<br />

NOTE: For email messages, message text including plugins must be 126 bytes (characters) or<br />

less. The message length after all plugins have been exp<strong>and</strong>ed into their data values must be<br />

255 bytes or less.<br />

Examples: Including Data from Memory Map Addresses<br />

Memory map addresses are shown in ioManager, or see Appendix A for the complete memory<br />

map. Here are a couple of examples:<br />

To include the on/off state of a switch on point 3, you would put this in the message:<br />

$!D_F08000C0_<br />

To include the temperature of an ICTD input on point 16, you would use:<br />

$!F_F0A00400_<br />

Sending Binary Data in Event Messages<br />

To send binary data in the text of an event message, begin with &#x <strong>and</strong> end with _. You can<br />

include any number of ASCII hex digits up to the 127-byte limit for the message field. You can<br />

also include multiple &#x plugins. This plugin is resolved after all other plugins have been<br />

resolved, <strong>and</strong> only just before sending the contents of the message field out of the specified<br />

serial ports. Examples:<br />

To include an embedded null (one binary character):<br />

To include a number of binary characters:<br />

&#x00_<br />

&#x0a0dCF0034_<br />

Most communication involves the two-step process of request <strong>and</strong> response. A faster way of<br />

getting information from the SNAP Ethernet-<strong>based</strong> brain, however, is by streaming data.<br />

Streaming does not use TCP/IP; it uses the User Datagram Protocol (UDP) instead.<br />

NOTE: Because Modbus/TCP runs on TCP, not UDP, streaming data via Modbus/TCP is not<br />

possible. However, you can stream to a non-Modbus host at the same time you are using the<br />

Modbus/TCP protocol for another purpose.<br />

Streaming is a fast way to get continuous information about I/O from the SNAP Ethernet-<strong>based</strong><br />

brain <strong>and</strong> is ideal for data acquisition applications. When it streams, the brain sends data at<br />

regular intervals to specified IP addresses. You set up the interval, the IP addresses to receive<br />

the data, <strong>and</strong> (optionally) the port number. The brain sends the data at the specified interval. The<br />

communication is one-way; the brain does not wait for a response.<br />

CAUTION: If you stream to multiple IP addresses, <strong>and</strong> one or more of the streaming targets is<br />

either offline or not running the application that receives the stream, delays may occur. If a target<br />

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

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

Saved successfully!

Ooh no, something went wrong!