7 channel configuration functions – Sensoray Smart A/D User Manual
Page 12

S
ENSORAY
I
NSTRUCTION
M
ANUAL
S
MART
A/D D
RIVER
FOR
W
INDOWS
Page 10
3.6.4 GetIoNetVersion()
This function is applicable if you are using Networking Smart A/D™ boards.
Function:
Returns the IoNet™ firmware version number, times 100. For example, a call to this function that returns the value
200 indicates that the IoNet™ unit is running firmware version number 2.00.
This function is useful when it is necessary to automatically determine whether a board feature—which may be
available only in specific firmware releases—is accessible in an installed IoNet™ Smart A/D™ product.
Prototype:
long GetIoNetVersion( long hBD );
Example:
///////////////////////////////////////////////////////////////////////////
// Get the IoNet firmware version that board number 2 is running.
///////////////////////////////////////////////////////////////////////////
double netversion = GetIoNetVersion( 2 ) / 100.0;
3.6.5 ChkIoNetReset()
This function is applicable if you are using Networking Smart A/D™ boards.
Function:
Returns a value that indicates whether the designated IoNet™ unit experienced a reset since the last time this
function was called.
IoNet™ hardware resets are not usually caused by application programs. Consequently, there is often a need for
the application to determine if a reset event has occurred. This function provides a mechanism for determining if
such a reset event has occurred.
All IoNet™ products maintain a Reset Flag that is set upon hardware reset of the unit. This function returns the
state of the Reset Flag and clears the flag so that future calls to this function will indicate that the IoNet™ has not
been reset. Only a hardware reset of the IoNet™ unit will cause the Reset Flag to be set again.
Prototype:
long ChkIoNetReset( long hBD );
Example:
///////////////////////////////////////////////////////////////////////////
// Determine if board number 0 has been reset.
///////////////////////////////////////////////////////////////////////////
if ( ChkIoNetReset(0) )
{
// Insert code here to handle unexpected IoNet resets.
}
3.7 Channel Configuration Functions
All channel configuration functions specify a channel number parameter which designates the channel to be affected by the
function. Channel numbers always begin at zero and extend upward to the maximum valid channel number belonging to the
addressed board.
Parameter
Type
Description
hBD
long
Board handle.
return value
long
Board’s IoNet™ firmware version number, times 100.
Parameter
Type
Description
hBD
long
Board handle.
return value
long
Non-zero value indicates IoNet™ unit has been
reset since the last call to this function.