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.

CHAPTER 4<br />

Chapter 4<br />

Using the IEEE 1394-<strong>based</strong><br />

Protocol<br />

Memory Mapping<br />

This chapter shows you how to use Opto 22’s IEEE 1394-<strong>based</strong> memory map protocol to write<br />

your own applications for direct communication between a PC <strong>and</strong> a SNAP Ethernet-<strong>based</strong> I/O<br />

unit, for example, if you are writing your own driver. (Information on the Opto 22 SNAP Ethernet<br />

I/O Driver Toolkit, which makes <strong>programming</strong> easier for Microsoft Windows users, is in Chapter<br />

3.)<br />

This chapter assumes the following:<br />

Your Ethernet network—including a PC, hubs if needed, <strong>and</strong> one or more SNAP<br />

Ethernet-<strong>based</strong> I/O <strong>units</strong>—is already installed. (For help installing <strong>and</strong> troubleshooting<br />

your SNAP Ethernet-<strong>based</strong> I/O <strong>units</strong>, see Opto 22 form #1460, the SNAP Ethernet-<strong>based</strong><br />

I/O Units User’s Guide.)<br />

Unique, appropriate IP addresses have been assigned to the brains.<br />

Each SNAP Ethernet-<strong>based</strong> brain can be reached by the host PC using the PING program.<br />

This chapter also assumes that you are familiar with <strong>programming</strong>, TCP/IP or UDP/IP, <strong>and</strong><br />

Ethernet networking. If you are not familiar with these subjects, we strongly suggest you consult<br />

commercially available resources to learn about them before attempting to program applications<br />

for SNAP Ethernet-<strong>based</strong> brains.<br />

The complete SNAP Ethernet-<strong>based</strong> brain memory map is in Appendix A, starting on page 103.<br />

This memory map covers all possible addresses; some may not apply to the brain model you are<br />

using. For detailed information on brain models <strong>and</strong> features, see “SNAP Ethernet-Based Brain<br />

Comparison Chart” on page 6.<br />

The SNAP Ethernet-<strong>based</strong> brain uses the IEEE 1394 specification to provide a st<strong>and</strong>ard for<br />

reading <strong>and</strong> writing data. You do not need to read the specification in order to use the protocol,<br />

however.<br />

IEEE 1394 specifies a memory-mapped model for devices on a serial network. For asynchronous<br />

transfers, it also specifies a request-response protocol for read/write operations. Basically, each<br />

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

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

Saved successfully!

Ooh no, something went wrong!