14 retrieval of the measured data – Yokogawa PC-Based MX100 User Manual
Page 699
![background image](/manuals/360310/699/background.png)
14-13
IM MX190-01E
MX100 for Extended API - Visual Basic -
14
Retrieval of the Measured Data
Program Example
Attribute VB_Name = "Module1"
Public Sub Main()
'connect
comm = openMX100("192.168.1.12", rc)
'get
rc = measStartMX100(comm)
rc = measDataChMX100(comm, 1)
value = dataValueMX100(comm, 1)
rc = measStopMX100(comm)
'disconnect
rc = closeMX100(comm)
End Sub
Description
Overview
Data retrieval is possible by starting the FIFO. The amount of retrievable data within
the FIFO data on channel 1 of the MX100 is retrieved and stored in the field. Gets
the measured value data (one point) of the current status (first measurement point)
and concludes the process.
Communication Connection
comm = openMX100("192.168.1.12", rc)
The IP address of the MX100 is specified. This statement implicitly specifies the
communication constant DAQMX_COMMPORT (communication port number of the
MX100).
FIFO Start
rc = measStartMX100(comm)
Starts the FIFO on the MX100.
Retrieval of the Measured Data of Channel 1
rc = measDataChMX100(comm, 1)
The amount of retrievable measured data from channel 1 of the MX100 is retrieved
and stored in the field. The first measurement point is set as the current status.
Retrieval of Measured Values
value = dataValueMX100(comm, 1)
Retrieves the measured values of the current status of channel 1 from the field
where the measured data is stored.
14.2 Programming - MX100/Visual Basic -