To use each function, it is necessary to obtain an ID with the SmcWInit
function.
ID is a number required to identify the device.
The following example is an example of using multiple devices.
The following example is an example using one SMC-8DL-PCI and one SMC-8DF2-PCI.
When using the same model of boards, multiple boards can be used by changing
the board ID with the rotary switch on the board.
Visual Basic .NET
Device |
SMC-8DL-PCI |
SMC-8DF2-PCI |
DeviceName |
SMC000 |
SMC001 |
ID Declaration |
Dim ID_SMC1 As Short |
Dim ID_SMC2 As Short |
Init |
Ret = SmcWInit("SMC000" ,ID_SMC1) |
Ret = SmcWInit("SMC001" ,ID_SMC2) |
Other Functions |
Ret = SmcW***( ID_SMC1, *** ) |
Ret = SmcW***( ID_SMC2, *** ) |
Visual C#
Device |
SMC-8DL-PCI |
SMC-8DF2-PCI |
DeviceName |
SMC000 |
SMC001 |
ID Declaration |
short ID_SMC1; |
short ID_SMC2; |
Init |
Ret = Smc.Init("SMC000" ,out ID_SMC1); |
Ret = Smc.Init("SMC001" ,out ID_SMC2); |
Other Functions |
Ret = Smc.***( ID_SMC1, *** ); |
Ret = Smc.***( ID_SMC2, *** ); |
Visual C++ (MFC)
Device |
SMC-8DL-PCI |
SMC-8DF2-PCI |
DeviceName |
SMC000 |
SMC001 |
ID Declaration |
short ID_SMC1; |
short ID_SMC2; |
Init |
Ret = SmcWInit("SMC000" ,&ID_SMC1); |
Ret = SmcWInit("SMC001" ,&ID_SMC2); |
Other Functions |
Ret = SmcW***( ID_SMC1, *** ); |
Ret = SmcW***( ID_SMC2, *** ); |
Python
Device |
SMC-8DL-PCI |
SMC-8DF2-PCI |
DeviceName |
SMC000 |
SMC001 |
ID Declaration |
ID_SMC1 = ctypes.c_short() |
ID_SMC2 = ctypes.c_short() |
Init |
Ret.value = csmc.SmcWInit ( b"SMC000" , ctypes.byref(ID_SMC1)) |
Ret.value = csmc.SmcWInit ( b"SMC001" , ctypes.byref(ID_SMC2)) |
Other Functions |
Ret.value = csmc.SmcW***( ID_SMC1, *** ) |
Ret.value = csmc.SmcW***( ID_SMC2, *** ) |