
48 Chapter 5 Documentation Number UD128A8D4602 Manual
B&B Electronics Mfg Co – 707 Dayton Rd - PO Box 1040 - Ottawa IL 61350 - Ph 815-433-5100 - Fax 815-433-5104
B&B Electronics Ltd – Westlink Comm. Pk. – Oranmore, Galway, Ireland – Ph 353-91-792444 – Fax 353-91-792445
Device1.Open
Call EnableTest1
End If
If Device.Name = “DAQ2” Then
Set Device2 = Device
Device2.Open
Call EnableTest2
End If
Next Device
End Sub
This routine uses the Count property. The number of connected
devices can be found by checking the BBDaqEnum.Devices.Count.
Note that disconnecting a device automatically closes that device
and accessing any property or calling any function results in an
error.
Device Numbers and Names
Set Device1 = Connected.Devices(1)
or
Set Device2 = Connected.Devices(2)
or
Set Device2 = Connected.Devices(1)
‘ \ Or By Name: - The named device must be attached
Set Device1 = Connected.Devices(“DAQ1”)
or
Set Device1 = Connected.Devices(“DAQ2”)
or
Set Device3 = Connected.Devices(“DAQ3”)
‘ \ 8. If we have one, Open it.
Device1.Open
Device3.Open
Alias Variable Creation for Each I/O Point
Rather than addressing each I/O Point through the
Device.IOPoints(ID) method, it is possible to set up a variable for
each I/O point. This shortens the time that it takes Visual Basic to
access the I/O point.
Commenti su questo manuale