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.

Here is an example of using multiple devices.

Use two CPSN-SSI-4C, and each device is set to the following device name.
The variables that store the ID of each device are ID_SSI1, ID_SSI2.

CPSN-SSI-4C 1st : SSI000
CPSN-SSI-4C 2nd : SSI001

Example in C

Device

CPSN-SSI-4C 1st

CPSN-SSI-4C 2nd

DeviceName

SSI000

SSI001

ID Declaration

short ID_SSI1;

short ID_SSI2;

Init

Ret = SsiInit("SSI000" ,&ID_SSI1);

Ret = SsiInit("SSI001" ,&ID_SSI2)

Other Functions

Ret = Ssi***( ID_DIO1, *** );

Ret = Ssi***( ID_SSI2, *** );

 

Example in Python

Device

CPSN-SSI-4C 1st

CPSN-SSI-4C 2nd

DeviceName

SSI000

SSI001

ID Declaration

ID_SSI1 = ctypes.c_short()

ID_SSI2 = ctypes.c_short()

Init

Ret.value = cssi.SsiInit ( b"SSI000" , ctypes.byref(ID_SSI1))

Ret.value = cssi.SsiInit ( b"SSI001" , ctypes.byref(ID_SSI2))

Other Functions

Ret.value = cssi.Ssi***( ID_SSI1, *** )

Ret.value = cssi.Ssi***( ID_SSI2, *** )