Yokogawa PC-Based MX100 User Manual

Page 243

Advertising
background image

3-8

IM MX190-01E

//connect
comm = openMX("192.168.1.12" &rc);
//get by FIFO
rc = startFIFOMX(comm);
rc = getFIFODataNoMX(comm, 0, &startNo, &endNo);
rc = talkFIFODataMX(comm, 0, startNo, endNo);
do { //date time
rc = getTimeDataMX(comm, &dataNo, &datetime, &usertime,
&flag);
} while (! (flag & DAQMX_FLAG_ENDDATA));
do { //meaasured data
rc = getChDataMX(comm, &dataNo, &chinfo, &datainfo,
&flag);
} while (! (flag & DAQMX_FLAG_ENDDATA));
rc = stopFIFOMX(comm);
//disconenct
rc = closeMX(comm);
#ifdef WIN32
FreeLibrary(pDll);
#endif
return rc;
}
//////////////////////////////////////////////////////////////

Description

Overview
Data retrieval is possible by starting the FIFO. The range to be retrieved is specified

by the FIFO number and the data number. The time stamp corresponding to the
data number and the measured data are retrieved separately. The end is

determined by the flag.

Include File Statement
#include "DAQMX.h"

Load Library Statement
The load library statement is from #ifdef WIN32 to #endif //WIN32.A callback type

(such as DLLOPENMX) is used.

3.2 Program - MX100/Visual C -

Advertising