Retrieval of the measured data – Yokogawa PC-Based MX100 User Manual
Page 404
![background image](/manuals/360310/404/background.png)
7-6
IM MX190-01E
Retrieval of the Measured Data
Program Example 1
This program retrieves measured data.
//////////////////////////////////////////////////////////////
// DARWIN sample for measurement
#include
#include "DAQDARWIN.h"
//////////////////////////////////////////////////////////////
int main(int argc, char* argv[])
{
int rc; //return code
CDAQDARWIN daqdarwin; //class
int flag;
CDAQDARWINDateTime datetime;
CDAQDARWINChInfo chinfo;
CDAQDARWINDataInfo datainfo(NULL, &chinfo);
//connect
rc = daqdarwin.open("192.168.1.11");
//get
rc = daqdarwin.talkDataByBinary(0, 1, 0, 2, datetime);
do { //meaasured data
rc = daqdarwin.getChDataByBinary(datainfo, &flag);
} while (! (flag & DAQDARWIN_FLAG_ENDDATA));
//disconenct
rc = daqdarwin.close();
return rc;
}
//////////////////////////////////////////////////////////////
Description
Overview
When retrieving data, the talker is executed first, and then data retrieval is executed
in units of channels or lines. The end is determined by the flag.
Include File Statement
#include "DAQDARWIN.h"
7.3 Programming - DARWIN/Visual C ++ -