Sensoray Smart A/D User Manual

Page 8

Advertising
background image

S

ENSORAY

I

NSTRUCTION

M

ANUAL

S

MART

A/D D

RIVER

FOR

W

INDOWS

Page 6

Example:

//////////////////////////////////////////////////////////////////////////////

// Declare board number 15 to be a Sensoray Model 2518 Network Smart A/D board

// which resides at IP address 135.135.135.127.

//////////////////////////////////////////////////////////////////////////////

char dotadrs[] = “135.135.135.127”;

long successful = SetBoardAttr( 15, 2518, InetAtoN( dotadrs ) );

3.5.2 ResetBoard()

Function:

Invokes a soft reset on the specified Smart A/D™ board. The board is forced to its default condition and is then
tested for a persistent fault condition. The board Fault indicator will momentarily light when this function is called.
After calling ResetBoard(), your application should call GetFaultFlags() to verify that the board does
not have a persistent fault.

Note: in the case of IoNet™ Smart A/D™ products, this function resets only the Smart A/D™ portion of the
product; the IoNet™ core is reset only by power-up and network inactivity timeout events.

Prototype:

void ResetBoard( long hBD );

Example:

///////////////////////////////////////////////////////////////////////////

// Reset board number 5 and determine if any faults are pending.

///////////////////////////////////////////////////////////////////////////

#define BOARDNUM 5

ResetBoard( BOARDNUM );

BOOL FaultsArePending = ( GetFaultFlags( BOARDNUM ) != 0 );

3.5.3 SetIoNetTimeout()

This function is applicable if you are using Networking Smart A/D™ boards.

Function:

Changes the Network Inactivity Timeout Interval (NITI) to the specified value.

All IoNet™ products are designed to execute a watchdog hardware reset if no directed network packets have been
received within the NITI. Upon reset, the NITI assumes a default value as specified in your hardware
documentation. This function can be used to change the NITI to accommodate applications which are not
compatible with the default NITI value.

Note: the specified time interval is a guaranteed minimum value only; the actual time interval is typically about 1.6
seconds longer than the specified value.

Prototype:

void SetIoNetTimeout( long hBD, long msec );

Example:

////////////////////////////////////////////////////////////////////////////////

// Set the Network Inactivity Timeout Interval of board number 2 to 60 seconds.

////////////////////////////////////////////////////////////////////////////////

SetIoNetTimeout( 2, 60000 );

Parameter

Type

Description

hBD

long

Board handle.

Parameter

Type

Description

hBD

long

Board handle.

msec

long

IoNet™ Network Inactivity Timeout Interval, specified in
milliseconds. Values from 0x00000001L to 0x00FFFFFFL are
legal, corresponding to minimum NITI time intervals ranging
from 1ms to approximately 4.7 hours.

Advertising