VDT2 port name assignment using string or S_VDT list number
peter.vandersman
The idea behind this request is to be able to automate the port assignment to work with one or more connected devices.
This would allow devices to be connected at random to the any of the available ports while the user can then assign each device to one of the available port names. Prerequisite are that
a) one can find out what device is connected (which is possible by for instance devices that support the SCPI protocol and issue an *IDN? request to which the device will respond with its ID), and
b) that the port assignment in VDT2 is either accepting a port name in the form of a string from the list in S_VDT (set by VDTGetPortList2/SCAN) or perhaps an index into this list.
You can use /P=$portName with VDT2. For example:
VDTGetPortList2
String list = S_VDT
String secondPort = StringFromList(1, list)
VDT2/P=$secondPort baud=9600, databits=8, stopbits=2, parity=0
VDTOperationsPort2 $secondPort
End
Also, new for Igor Pro 9 (now in beta testing), all of the VDT2 operations are thread-safe and we added a /P=portName flag to various VDT2 operations. Thanks to Michael Huth of byte-physics for contributing these features.
December 10, 2020 at 06:22 am - Permalink