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.

Bytes 0–3<br />

Bytes 4–7<br />

Bytes 8–11<br />

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

Write Response Packet (Brain➞PC)<br />

When the brain receives the Powerup Clear, it sends a Write Response packet back to the host<br />

PC acknowledging receipt. In binary notation, the response packet looks like this:<br />

The rcode parameter contains the ACK or NAK for the transaction. The 0 in this example indicates<br />

an ACK.<br />

In hex, the packet looks like this: 000004200000000000000000. The 0 shown in bold type is the<br />

ACK in the rcode.<br />

See “Error Codes” on page 98 for information on what to do if you receive a NAK.<br />

Configuring<br />

destination_ID tl rt tcode pri<br />

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0<br />

source_ID rcode reserved<br />

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0<br />

reserved<br />

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0<br />

SNAP Ethernet-<strong>based</strong> brains can recognize the presence <strong>and</strong> type of an analog module on the<br />

rack, but the values for each of the points must be configured if they do not match the default for<br />

that module type. For example, the brain can report that a SNAP-AITM module is in position 4,<br />

but if the points are anything other than the default value of ±150 mV, you must configure them<br />

by writing configuration codes to the points. Module types <strong>and</strong> default values are shown on<br />

page 18.<br />

Digital modules <strong>and</strong> empty positions are reported the same by the brain: they are assumed to be<br />

digital input modules. If a position contains a digital output module, you must configure the<br />

points as outputs.<br />

Configuring I/O Point Types—Write Quadlet Request Packet (PC➞Brain)<br />

Suppose you have a digital output module in position 0 on the rack. Since the brain cannot<br />

distinguish a digital module from an empty position, you need to configure the module’s four<br />

output points (points 0–3) as outputs. You configure them by writing to each one’s Point Type<br />

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

memory map. On page 125 you can see this area of the map.<br />

84 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!