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.

CHAPTER 3: USING THE SNAP ETHERNET I/O DRIVER TOOLKIT<br />

Write Methods Description<br />

SetStreamConfiguration<br />

[in] long nOnFlag<br />

[in] long nIntervalMS<br />

[in] long nPort<br />

[in] long nIoMirroringEnabled<br />

[in] long nStartAddress<br />

[in] long nDataSize<br />

SetStreamTarget<br />

[in] long nTarget<br />

[in] BSTR bstrIpAddressArg<br />

Return values are shown on page 61.<br />

Scratch Pad Read/Write Methods<br />

Use the following methods to read or write data in the Scratch Pad area of the brain. SNAP<br />

Ultimate brains contain all Scratch Pad areas; SNAP Ethernet brains contain only Scratch Pad<br />

bits; SNAP Simple I/O brains do not have any Scratch Pad areas. For more information about the<br />

Scratch Pad area of the memory map, see page 129.<br />

Note that some methods differ for Active X <strong>and</strong> C++.<br />

GetScratchPadBitArea<br />

[out] long pnBits63to32<br />

[out] long pnBits31to0<br />

Sets streaming configuration information. Also<br />

see SetStreamTarget below.<br />

Sets the IP address for the given target. There are<br />

eight possible targets.<br />

Read Methods Description<br />

GetScratchPadIntegerArea (ActiveX only)<br />

[in] long nStartIndex<br />

[out] O22_SIOMM_ScratchPadIntegerBlock pBlock<br />

GetScratchPadIntegerArea (C++ only)<br />

[in] long nStartIndex<br />

[in] long nLength<br />

[out] l_array pnData<br />

GetScratchPadFloatArea (ActiveX only)<br />

[in] long nStartIndex<br />

[out] O22_SIOMM_ScratchPadFloatBlock pBlock<br />

GetScratchPadFloatArea (C++ only)<br />

[in] long nStartIndex<br />

[in] long nLength<br />

[out] f_array * pfData<br />

GetScratchPadStringArea (ActiveX only)<br />

[in] long nStartIndex<br />

[out] O22_SIOMM_ScratchPadStringBlock pBlock<br />

GetScratchPadStringArea (C++ only)<br />

[in] long nStartIndex<br />

[in] long nLength,<br />

[out] SIOMM_ScratchPadString pStringData<br />

Reads the state of the Scratch Pad bit<br />

area.<br />

Reads a block of 256 integers from the<br />

Scratch Pad integer area.<br />

Reads an array of up to 256 integers from<br />

the Scratch Pad integer area.<br />

nLength must be between 1 <strong>and</strong> 256.<br />

Reads a block of 256 floats from the<br />

Scratch Pad float area.<br />

Reads an array of up to 256 floats from the<br />

Scratch Pad float area.<br />

nLength must be between 1 <strong>and</strong> 256.<br />

Reads a block of 8 strings from the Scratch<br />

Pad string area.<br />

Reads a block of up to 8 strings from the<br />

Scratch Pad string area.<br />

nLength must be between 1 <strong>and</strong> 8.<br />

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

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

Saved successfully!

Ooh no, something went wrong!