Yokogawa PC-Based MX100 User Manual

Page 483

Advertising
background image

8-9

IM MX190-01E

DARWIN - Visual C -

8

//get
rc = talkOperationDataDARWIN(comm, 0, 1, 0, 2);
do {
rc = getSetDataByLineDARWIN(comm, line, BUFSIZ, &len,
&flag);
} while (! (flag & DAQDARWIN_FLAG_ENDDATA));
//range
rc = setVOLTDARWIN(comm, DAQDARWIN_RANGE_VOLT_20MV, 0, 1, 2,
0, 0, 0, 0, 0);
//disconnect
rc = closeDARWIN(comm);
#ifdef WIN32
FreeLibrary(pDll);
#endif
return rc;
}
//////////////////////////////////////////////////////////////

Description

Load Library Statement

The load library state is from #ifdef WIN32 to #endif //WIN32.A callback type (such
as DLLOPENDARWIN) is used.

Talker
talkOperationDataDARWIN(comm, 0, 1, 0, 2)
Specifies the type of setup data to be retrieved (setup data of the operation mode)
and the channel range (channels 1 and 2 of subunit number 0).

Retrieval of Setup Data
getSetDataByLineDARWIN(comm, line, BUFSIZ, &len, &flag)
Gets the output by the talker function line by line.
The end is determined by the flag status of “end data.”.

Setting a DC Voltage Range to the Channel
setVOLTDARWIN(comm, DAQDARWIN_RANGE_VOLT_20MV, 0, 1, 2, 0, 0,
0, 0, 0)
Sets the measurement range of channels 1 and 2 of subunit number 0 to 20 mV.
The scaling function is not used.

The constant 20 mV is used to specify the range type.

8.2 Programming - DARWIN/Visual C -

Advertising