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 processing for each device.

Here is an example of using multiple devices.

When using two ZM-C2H-PE, each device is set to the following DeviceName.
The variables that store the ID of each device are ID_ZM1, ID_ZM2.

ZM-C2H-PE 1st: ZM000
ZM-C2H-PE 2nd: ZM001

 

Visual Basic .NET

Device

ZM-C2H-PE 1st

ZM-C2H-PE 2nd

DeviceName

ZM000

ZM001

ID Declaration

Dim ID_ZM1 As Integer

Dim ID_ZM2 As Integer

Init

Ret = ZmInit("ZM000" ,ID_ZM1)

Ret = ZmInit("ZM001" ,ID_ZM2)

Other Functions

Ret = Zm***( ID_ZM1, *** )

Ret = Zm***( ID_ZM2, *** )

 

Visual C#

Device

ZM-C2H-PE 1st

ZM-C2H-PE 2nd

DeviceName

ZM000

ZM001

ID Declaration

short ID_ZM1;

short ID_ZM2;

Init

Ret = zm.Init("ZM000" ,out ID_ZM1);

Ret = zm.Init("ZM001" ,out ID_ZM2);

Other Functions

Ret = zm.***( ID_ZM1, *** );

Ret = zm.***( ID_ZM2, *** );

 

Visual C++ (MFC)

Device

ZM-C2H-PE 1st

ZM-C2H-PE 2nd

DeviceName

ZM000

ZM001

ID Declaration

short ID_ZM1;

short ID_ZM2;

Init

Ret = ZmInit("ZM000" ,&ID_ZM1);

Ret = ZmInit("ZM001" ,&ID_ZM2)

Other Functions

Ret = Zm***( ID_ZM1, *** );

Ret = Zm***( ID_ZM2, *** );