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

Page 493

Advertising
background image

9-5

IM MX190-01E

DARWIN - Visual Basic -

9

Retrieval of the Measured Data

Program Example 1

This program retrieves measured data.

Public Function Main()
Dim datetime As DarwinDateTime
Dim chinfo As DarwinChInfo
Dim datainfo As DarwinDataInfo
'connect
host = "192.168.1.11"
comm = openDARWIN(host, rc)
'get
rc = talkDataByBinaryDARWIN(comm, 0, 1, 0, 2, datetime)
Do
rc = getChDataByBinaryDARWIN(comm, chinfo, datainfo, flag)
Loop While (flag And DAQDARWIN_FLAG_ENDDATA) = 0
'disconnect
rc = closeDARWIN(comm)
End Function

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.

Flow of the Process
The flow chart shown below omits the declaration section.

Last channel?

Connect

Declare the retrieval

of the measured data

Get the measured data

channel by channel

Disconnect

END

START

closeDARWIN

getChDataByBinaryDARWIN

talkDataByBinaryDARWIN

openDARWIN

9.2 Programming - DARWIN/Visual Basic -

Advertising