Specify ID when Using Multiple Devices

When using multiple devices at the same time, it is necessary to initialize each device and obtain a different ID.
Execute functions by specifying the ID of each device. At the time of termination, perform termination processings for each device.

The following example is an example using multiple devices.

Use two AD16-16(LPCI)L and one DA16-4(LPCI)L, and each device is set to the following device name.
The variables that store the ID of each device are ID_AD1, ID_AD2 and ID_DA1

AD16-16(LPCI)L 1st : AIO000
AD16-16(LPCI)L 2nd : AIO001
DA16-4(LPCI)L      : AIO002

Visual Basic .NET

Device

AD16-16(LPCI)L 1st

AD16-16(LPCI)L 2nd

DA16-4(LPCI)L

DeviceName

AIO000

AIO001

AIO002

ID Declaration

Dim ID_AD1 As Short

Dim ID_AD2 As Short

Dim ID_DA1 As Short

Init

Ret = AioInit("AIO000" ,ID_AD1)

Ret = AioInit("AIO001" ,ID_AD2)

Ret = AioInit("AIO002" ,ID_DA1)

Other Functions

Ret = Aio***( ID_AD1, *** )

Ret = Aio***( ID_AD2, *** )

Ret = Aio***( ID_DA1, *** )

Visual C#

Device

AD16-16(LPCI)L 1st

AD16-16(LPCI)L 2nd

DA16-4(LPCI)L

DeviceName

AIO000

AIO001

AIO002

ID Declaration

short ID_AD1;

short ID_AD2;

short ID_DA1;

Init

Ret = aio.Init("AIO000" ,out ID_AD1);

Ret = aio.Init("AIO001" ,out ID_AD2);

Ret = aio.Init("AIO002" ,out ID_DA1);

Other Functions

Ret = aio.***( ID_AD1, *** );

Ret = aio.***( ID_AD2, *** );

Ret = aio.***( ID_DA1, *** );

Visual C++ (MFC)

Device

AD16-16(LPCI)L 1st

AD16-16(LPCI)L 2nd

DA16-4(LPCI)L

DeviceName

AIO000

AIO001

AIO002

ID Declaration

short ID_AD1;

short ID_AD2;

short ID_DA1;

Init

Ret = AioInit("AIO000" ,&ID_AD1);

Ret = AioInit("AIO001" ,&ID_AD2);

Ret = AioInit("AIO002" ,&ID_DA1);

Other Functions

Ret = Aio***( ID_AD1, *** );

Ret = Aio***( ID_AD2, *** );

Ret = Aio***( ID_DA1, *** );

Python

Device

AD16-16(LPCI)L 1st

AD16-16(LPCI)L 2nd

DA16-4(LPCI)L

DeviceName

AIO000

AIO001

AIO002

ID Declaration

ID_AD1 = ctypes.c_short()

ID_AD2 = ctypes.c_short()

ID_DA1 = ctypes.c_short()

Init

Ret.value = caio.AioInit ( b"AIO000" , ctypes.byref(ID_AD1))

Ret.value = caio.AioInit ( b"AIO001" , ctypes.byref(ID_AD2))

Ret.value = AioInit( b"AIO002" , ctypes.byre(ID_DA1))

Other Functions

Ret.value = caio.Aio***( ID_AD1, *** )

Ret.value = caio.Aio***( ID_AD2, *** )

Ret.value = cai.Aio***( ID_DA1, *** )