4retrieval of the measured data – Yokogawa PC-Based MX100 User Manual
Page 254
![background image](/manuals/360310/254/background.png)
4-7
IM MX190-01E
MX100 - Visual Basic
4
Retrieval of the Measured Data
Program Example 1
This program retrieves measured data.
Public Function main()
Dim startNo As MXDataNo
Dim endNo As MXDataNo
Dim dataNo As MXDataNo
Dim usertime As MXUserTime
Dim datetime As MXDateTime
Dim chinfo As MXChInfo
Dim datainfo As MXDataInfo
'connect
host = "192.168.1.12"comm = openMX(host, rc)
'get FIFO
rc = startFIFOMX(comm)
rc = getFIFODataNoMX(comm, 0, startNo, endNo)
rc = talkFIFODataVBMX(comm, 0, startNo, endNo)
Do
rc = getTimeDataMX(comm, dataNo, datetime, usertime, flag)
Loop While (flag And DAQMX_FLAG_ENDDATA) = 0
Do
rc = getChDataMX(comm, dataNo, chinfo, datainfo, flag)
Loop While (flag And DAQMX_FLAG_ENDDATA) = 0
rc = stopFIFOMX(comm)
'disconnect
rc = closeMX(comm)
End Function
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.
4.2 Programming - MX100/Visual Basic -