Readitemmx100 – Yokogawa PC-Based MX100 User Manual

Page 775

Advertising
background image

17-41

IM MX190-01E

17

Functions for the MX100 (Extended API) - Visual C/Visual Basic/Visual Basic.NET/C# -

readItemMX100

Syntax

int readItemMX100(DAQMX100 daqmx100, int itemNo, char *
strItem, int lenItem, int * realLen);

Declaration

Visual Basic
Public Declare Function readItemMX100 Lib "DAQMX100"(ByVal
daqmx100 As Long, ByVal itemNo As Long, ByVal strItem As
String, ByVal lenItem As Long, realLen As Long) As Long
Visual Basic.NET
Public Declare Ansi Function readItemMX100 Lib
"DAQMX100"(ByVal daqmx100 As Integer, ByVal itemNo As Integer,
ByVal strItem As String, ByVal lenItem As Integer, ByRef
realLen As Integer) As Integer
C#
[DllImport("DAQMX100.dll" CharSet=CharSet.Auto,
EntryPoint="readItemMX100")]
public static extern int readItemMX100(int daqmx100, int
itemNo, byte[] strItem, int lenItem, out int realLen);

Parameters

daqmx100

Specify the device descriptor.

itemNo

Specify the setup item number.

strItem

Specify the field where the string is to be stored.

lenItem

Specify the byte size of the field where the string is to be stored.

realLen

Specify the return destination for the length of the actual string.

Description

Stores the contents of the specified setup item as a string in the specified field.
• The string stored to the field includes the terminator (NULL).

• If the return destination is specified, returns the length of the actual string. The

terminator is not included.

• The strings that can be stored are, in general, ASCII strings.

Return value

Returns an error number.

Error:
Not descriptor

No device descriptor.

Not Support

Unsupported setup item.

Not Data

The string storage field is insufficient.

Reference

CDAQMX100::getClassMXItemConfig
CDAQMXItemConfig::readItem

17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions

Advertising