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.

GetStatusWatchdogTime<br />

[out] long pnTimeMS<br />

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

Use the following methods to write to the status area of the brain. For more information about<br />

the status area of the memory map, see “Status Area Write—Read/Write” on page 107.<br />

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

Time/Date Methods<br />

Retrieves the watchdog time in milliseconds.<br />

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

Write Methods Description<br />

SetStatusOperation V<br />

[in] long nOpCode<br />

SetStatusBootpRequest V<br />

[in] long nFlag<br />

SetStatusDegrees V<br />

[in] long nDegFlag<br />

SetStatusWatchdogTime V<br />

[in] long nTimeMS<br />

Sends an operation code to the SNAP brain.<br />

0x0001 - Send Powerup Clear<br />

0x0002 - Reset to defaults<br />

0x0003 - Store to flash<br />

0x0004 - Erase flash configuration<br />

0x0005 - Reset hardware<br />

See address FFFFF0380000 on page 107 for more information.<br />

Sets the brain to send BootP request when turned on.<br />

0 (default) = Send BootP request only if brain's IP address is 0.0.0.0.<br />

1 = Always send BootP request when brain is turned on.<br />

Sets the temperature degrees unit flag.<br />

1 = degrees F; 0 = degrees C<br />

Sets watchdog time in milliseconds.<br />

0 disables the watchdog.<br />

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

Use the following methods to read or from the time <strong>and</strong> date area of the SNAP Ethernet-<strong>based</strong><br />

brain. For more information about the time <strong>and</strong> date area of the memory map, see “Date <strong>and</strong> Time<br />

Configuration—Read/Write” on page 107.<br />

Read Methods Description<br />

GetDateTime<br />

[out] string pbstrDateTime<br />

Retrieves the brain’s time <strong>and</strong> date as a string in the<br />

format YYYY-MM-DD HH:MM:SS.00<br />

Write Methods Description<br />

SetDateTime<br />

[in] string bstrDateTime<br />

Read Methods Description<br />

Sets the brain’s time <strong>and</strong> date as a string in the<br />

format YYYY-MM-DD HH:MM:SS.00<br />

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

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

Saved successfully!

Ooh no, something went wrong!