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.

Non-velocity Algorithms.........................................................................................41<br />

Formatting <strong>and</strong> Interpreting Data.........................................................................................41<br />

Mask Data .....................................................................................................................41<br />

Unsigned 32-bit Integer Data........................................................................................42<br />

Digital Point Data ..........................................................................................................43<br />

IEEE Float Data ..............................................................................................................43<br />

Two-Channel Analog Modules...............................................................................44<br />

Chapter 3: Using the SNAP Ethernet I/O Driver Toolkit ........................ 45<br />

Introduction ..........................................................................................................................45<br />

A Note on Multithreading .............................................................................................46<br />

Installing the Driver Toolkit..................................................................................................46<br />

Overview of the ActiveX Components .................................................................................46<br />

ActiveX Names <strong>and</strong> IDs.................................................................................................47<br />

Important ActiveX Client Issues....................................................................................47<br />

OptoSnapIoMemMapX General Instructions................................................................48<br />

OptoSnapIoStreamX General Instructions ....................................................................48<br />

Using Visual Basic 6.0 or Higher...................................................................................49<br />

Using VBA <strong>and</strong> Microsoft Office ...................................................................................49<br />

Using VBScript...............................................................................................................49<br />

Using Borl<strong>and</strong> Delphi 5..................................................................................................50<br />

Using the ActiveX Components without the Driver Toolkit ..........................................50<br />

Building the ActiveX Component with Visual C++ 6.0..................................................50<br />

Overview of the C++ Classes ...............................................................................................50<br />

OptoSnapIoMemMap Procedures.................................................................................51<br />

O22SnapIoStream Procedures ......................................................................................51<br />

Using Visual C++ with the Core C++ Code....................................................................52<br />

Using Linux g++ with the Core C++ Code......................................................................52<br />

Examples Included................................................................................................................52<br />

O22SnapIoMemMapX ActiveX Examples.....................................................................52<br />

O22SnapIoStreamX ActiveX Example...........................................................................53<br />

O22SnapIoMemMap C++ Class Examples....................................................................54<br />

O22SnapIoStream C++ Class Examples........................................................................54<br />

MemMap Example Code......................................................................................................55<br />

Create the OptoSnapIoMemMapX Component ............................................................55<br />

Open a Connection to the Brain ....................................................................................55<br />

Close the Connection to the Brain ................................................................................55<br />

Configure Points ............................................................................................................56<br />

Set an Output Based on an Input ..................................................................................57<br />

Streaming Example Code .....................................................................................................57<br />

Create the OptoSnapIoStreamX Component ................................................................58<br />

Open a Connection to the Brain ....................................................................................58<br />

Start Listening to a Brain ..............................................................................................58<br />

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

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

Saved successfully!

Ooh no, something went wrong!