Error processing – Yokogawa PC-Based MX100 User Manual

Page 247

Advertising
background image

3-12

IM MX190-01E

//disconnect
rc = closeMX(comm);
#ifdef WIN32
FreeLibrary(pDll);
#endif
return rc;
}
//////////////////////////////////////////////////////////////

Description

Collective Retrieval of Setup Data
getConfigDataMX(comm, &configdata)
The setup data below can be retrieved by the collective retrieval of setup data. For

details on the items that can be retrieved, see section 6.4, “MX100 Types.”
• System configuration data: Stored in the MXSystemInfo structure.

• Status: Stored in the MXStatus structure.
• Basic settings: Basic settings of the system.

Note

The setup data can also be retrieved using the talkConfigMX function and the
getChConfigMX function. The talkConfigMX function is used to declare the retrieval of
the setup data and retrieve the system configuration data, status, and network
information data. Then, the getChConfigMX function is used to retrieve channel setup
data in units of channels.

Collective Setting of Setup Data
setConfigDataMX(comm, &configdata)
The data below can be set by the collective setting of setup data. For details on the
items that can be set, see section 6.4, “MX100 Types.”

• System configuration data: Contents of the MXSystemInfo structure.
• Basic settings: Basic settings of the system.

Setting a DC voltage range to the channel
setVOLTMX(comm, DAQMX_RANGE_VOLT_20MV, 1, 1, 0, 0, 0, 0, 0)
Sets channel number 1 to DC voltage range 20 mV. Scaling is not used.

Error Processing

• Most functions return the result of the function process using an error number (0 if

successful).

• The function getErrorMessageMX can be used to get the error message string

corresponding to the error number. The function getMaxLenErrorMessageMX can
be used to get the maximum length of the error message string.

• The function getLastErrorMX can be used to get the errors from the MX100.
• If an invalid data error occurs in the settings, the setting item number of the

detected error is retrieved by the function.

3.2 Program - MX100/Visual C -

Advertising