Yokogawa PC-Based MX100 User Manual

Page 734

Advertising
background image

16-16

IM MX190-01E

Description

Overview
The program is an example of reading and writing all setup items. The following four

actions are executed.
• Gets the setup data from the MX100 collectively.

• Retrieves the setup data of the setup data field by item.
• Writes the setup data in the setup data field by item.

• Sends the setup data to the MX100 collectively.
Each item is retrieved and written from the first number to the end number.

Setup data can be processed collectively by using setup items.
Be sure to prepare string fields of sufficient size.

By saving and loading groups of item numbers and item strings, you can backup the
setup data.

For setup item numbers, see section 6.3.

Communication Connection

int comm = DAQMX100.openMX100(enc.GetBytes(address), out rc);
The IP address of the MX100 is specified. This statement implicitly specifies the
communication constant DAQMX_COMMPORT (communication port number of the

MX100).

Getting the Setup Data Collectively

rc = DAQMX100.getItemAllMX100(comm);
Gets all items of the MX100 setup data collectively and stores in the setup data field.

Retrieval of the Setup Data by Item

rc = DAQMX100.readItemMX100(comm, i, strItem, lenItem, out
realLen);
Retrieves the contents of item number “i” from the setup data field.

Writing the Setup Data by Item

rc = DAQMX100.writeItemMX100(comm, i, strItem);
Writes the contents of strItem to item number “i” of the setup data field.

Sending the Setup Data Collectively

rc = DAQMX100.setItemAllMX100(comm);
Sends all items of the setup data to the MX100 collectively.

Comm. cut

rc = DAQMX100.closeMX100(comm);
Drops the connection.

16.2 Programming - MX100/C# -

Advertising