Retrieval of the measured data – Yokogawa PC-Based MX100 User Manual
Page 1090
23-12
IM MX190-01E
Retrieval of the Measured Data
Program Example
using System;
using System.Text;
using System.Runtime.InteropServices;
namespace MeasCS
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
int rc;
Encoding enc = Encoding.GetEncoding ("ascii");
String address = "192.168.1.11";
//connect
int comm =
DAQDA100Reader.openDA100Reader(enc.GetBytes(address), out rc);
//get
rc = DAQDA100Reader.measInstChDA100Reader(comm,
0, 1);
int val =
DAQDA100Reader.dataValueDA100Reader(comm, 0, 1);
//disconnect
DAQDA100Reader.closeDA100Reader(comm);
}
}
}
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
int comm =
DAQDA100Reader.openDA100Reader(enc.GetBytes(address), out rc);
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 = DAQDA100Reader.measInstChDA100Reader(comm, 0, 1);
Retrieves instantaneous values of the measured data from channel 1 of DARWIN
subunit number 0 and stores them in the field.
23.4 Program for Loading Instantaneous Value Data -DARWIN/C#-