Retrieval of the measured data – Yokogawa PC-Based MX100 User Manual

Page 1008

Advertising
background image

19-14

IM MX190-01E

Retrieval of the Measured Data

Program Example

//////////////////////////////////////////////////////////////
// DA100 sample for measurement
#include <stdio.h>
#include "DAQDA100Reader.h"
//////////////////////////////////////////////////////////////
int main(int argc, char* argv[])
{
int rc; //return code
CDAQDA100 daqda100; //class
int value;
//connect
rc = daqda100.open("192.168.1.11");
//get
rc = daqda100.measInstCh(0, 1);
value = ((daqda100.getClassDataBuffer(0, 1))

->getClassDARWINDataInfo()).getValue();

//disconnect
rc = daqda100.close();
return rc;
}
//////////////////////////////////////////////////////////////

Description

Overview
Retrieves instantaneous values of the measured data from channel 1 of DARWIN

subunit number 0 and stores them in the field. Reads the measured values and
concludes the process.

Communication Connection
rc = daqda100.open("192.168.1.11");
The IP address of the DARWIN is specified. This statement specifies the

communication constant for the port number for loading the instantaneous value
data.

Retrieval of the Measured Data of Channel 1
rc = daqda100.measInstCh(0, 1);
Retrieves instantaneous values of the measured data from channel 1 of DARWIN

subunit number 0 and stores them in the field.

Reading Measured Values
value = ((daqda100.getClassDataBuffer(0, 1))-
>getClassDARWINDataInfo()).getValue();
Reads the measured values of channel 1 retrieved from various types of information
on channel 1 through the measured data.

19.5 Program for Loading Instantaneous Value Data - DARWIN/Visual C++ -

Advertising