Specifications

App - 32
(3) ReadDeviceRandom (Random read of devices)
(a) Usable ACT control
Usable for all ACT controls.
(b) Function
Randomly reads devices.
(c) Format
Visual Basic
®
, VBA : lRet = object.ReadDeviceRandom(szDeviceList, lSize, lData(0))
Long lRet Return value Output
String szDeviceList Device name Input
Long lSize Number of read points Input
Long lData(n) Read device value Output
Visual C++
®
: lRet = object.ReadDeviceRandom(szDeviceList, lSize, *lplData)
Long lRet Return value Output
CString szDeviceList Device name Input
Long lSize Number of read points Input
Long
*
lplData Read device value Output
VBScript: varRet = object.ReadDeviceRandom(varDeviceList, varSize, lpvarData)
VARIANT varRet
Return value (The contents are LONG type.)
Output
VARIANT varDeviceList
Device name (The contents are character string type.)
Input
VARIANT varSize
Number of read points (The contents are LONG type.)
Input
VARIANT lpvarData
Read device value (The contents are LONG type.)
Output
(d) Description
Reads the devices designated at szDeviceList (varDeviceLicst) by only the
device values for lSize (varSize).
The read device values are stored in IData (IpIData or IpvarData).
• Partition the character strings designated to the device list by breaking
symbols.
The breaking symbols are not necessary after the last device.
(Examples)
Visual Basic
®
, VBA, VBScript : "D0" & vbLf & "D1" & vbLf & "D2"
Visual C++
®
: D0\nD1\nD2
Ensure the strings longer than Isize (varSize) for IData (IplData or
IpvarData).