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.

IsOpenDone V<br />

Close V<br />

Return Values<br />

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

Point Configuration Methods<br />

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

Method Description<br />

SetCommOptions V<br />

[in] long nTimeOutMS<br />

[in] long nReserved<br />

Use after a call to OpenEnet() or OpenEnet2() to check whether the<br />

connection process is completed. Will return<br />

SIOMM_ERROR_NOT_CONNECTED_YET (-7) until the connection is<br />

completed, a timeout occurs, or another error occurs.<br />

Using this function in a program provides a way for the user to<br />

cancel the connection process. See the Visual Basic examples for<br />

more information.<br />

Closes the connection to the brain.<br />

Sets options for communication with the brain.<br />

nTimeOutMS is the timeout value in milliseconds for<br />

communications to the SNAP brain. nReserved is not currently used<br />

<strong>and</strong> should be set to zero.<br />

v The OptoSnapIoMemMapX ActiveX component has a variant-only version of this method.<br />

Use the following methods to configure I/O points. For more information, see “Referencing SNAP<br />

I/O Points” on page 13 <strong>and</strong> “Configuring I/O Points” on page 18.<br />

ConfigurePoint V<br />

[in] long nPoint<br />

[in] long nPointType<br />

SetDigPtConfiguration<br />

[in] long nPoint<br />

[in] long nPointType<br />

[in] long nFeature<br />

SetAnaPtConfiguration<br />

[in] long nPoint<br />

[in] long nPointType<br />

[in] float fOffset<br />

[in] float fGain<br />

[in] float fHiScale<br />

[in] float fLoScale<br />

Method Description<br />

SetPtConfiguration V (ActiveX Only)<br />

[in] long nPoint<br />

[in] long nPointType<br />

[in] long nFeature<br />

[in] float fOffset<br />

[in] float fGain<br />

[in] float fLoScale<br />

[in] float fHiScale<br />

[in] float fWatchdogValue<br />

[in] long nWatchdogEnabled<br />

Configures a point with the specified point type (see<br />

page 13 for point numbers <strong>and</strong> page 19 for point types).<br />

Configures a digital point with the specified point type <strong>and</strong><br />

feature.<br />

For digital feature values, see page 125.<br />

Configures an analog point with the specified point type,<br />

offset, gain, <strong>and</strong> scale. See “Configuring I/O Points” on<br />

page 18.<br />

Configures a point with the specified point type, feature,<br />

offset, gain, scale, <strong>and</strong> watchdog.<br />

See “Configuring I/O Points” on page 18. For digital feature<br />

values, see page 125.<br />

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

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

Saved successfully!

Ooh no, something went wrong!