RTD2K_SetMathPar

 

This function code is used to set the math parameter for a specific RTD virtual channel.

 

C/C++

int RTD2K_SetMathPar ( int hConnection,

BYTE bytChannel,

WORD wMathPar);

 

Visual Basic

Declare Function RTD2K_SetMathPar Lib "MXIO.dll" (ByVal hConnection As Long, ByVal bytChannel As Byte, ByVal iMathPar As integer) As Long

 

Arguments:

hConnection

The handle for an I/O device connection.

bytChannel

The specific channel to be set.

wMathPar

A pointer that stores the specific RTD virtual channel's math parameter. For AVG,Bit 0 of high byte represents the first channel and Bit 1 of high byte represents the second channel.For DEV,the High-Byte as subtrahend and Low-Byte as minuend.

Exp AVG( b'0000-0000 b'0010-0011) = ch5+ch1+ch0

Exp DEV( b'0000-0100 b'0010-0000) = ch2-ch6

 

Return Value:

Succeed

MXIO_OK

Fail

Refer to Return Codes.