52
M3i.48xx / M3i.48xx-exp Manual
.NET programming languages
Software
Using Managed C++/CLI
The SpcmDrv.NET.dll needs to be included within the project options. Please select „Project“ - „Properties“ - „References“ and finally „Add
new Reference“. After this all functions and constants of the driver object are available.
Please see the example in the directory CppCLR as a start:
Example for digitizerNETBOX and remotely installed cards:
Using VB.NET
The SpcmDrv.NET.dll needs to be included within the project options. Please select „Project“ - „Properties“ - „References“ and finally „Add
new Reference“. After this all functions and constants of the driver object are available.
Please see the example in the directory VB.NET as a start:
Example for digitizerNETBOX and remotely installed cards:
Using J#
The SpcmDrv.NET.dll needs to be included within the Solution Explorer in the References section. Please use right mouse and select „AddRef-
erence“. After this all functions and constants of the driver object are available.
Please see the example in the directory JSharp as a start:
Example for digitizerNETBOX and remotely installed cards:
// ----- open card -----
hDevice = Drv::spcm_hOpen("/dev/spcm0");
if ((int)hDevice == 0)
{
Console::WriteLine("Error: Could not open card\n");
return 1;
}
// ----- get card type -----
dwErrorCode = Drv::spcm_dwGetParam_i32(hDevice, Regs::SPC_PCITYP, lCardType);
dwErrorCode = Drv::spcm_dwGetParam_i32(hDevice, Regs::SPC_PCISERIALNR, lSerialNumber);
// ----- open card -----
hDevice = Drv::spcm_hOpen("TCPIP::192.168.169.14::INST0::INSTR");
' ----- open card -----
hDevice = Drv.spcm_hOpen("/dev/spcm0")
If (hDevice = 0) Then
Console.WriteLine("Error: Could not open card\n")
Else
' ----- get card type -----
dwError = Drv.spcm_dwGetParam_i32(hDevice, Regs.SPC_PCITYP, lCardType)
dwError = Drv.spcm_dwGetParam_i32(hDevice, Regs.SPC_PCISERIALNR, lSerialNumber)
' ----- open card -----
hDevice = Drv.spcm_hOpen("TCPIP::192.168.169.14::INST0::INSTR")
// ----- open card -----
hDevice = Drv.spcm_hOpen("/dev/spcm0");
if (hDevice.ToInt32() == 0)
System.out.println("Error: Could not open card\n");
else
{
// ----- get card type -----
dwErrorCode = Drv.spcm_dwGetParam_i32(hDevice, Regs.SPC_PCITYP, lCardType);
dwErrorCode = Drv.spcm_dwGetParam_i32(hDevice, Regs.SPC_PCISERIALNR, lSerialNumber);
' ----- open card -----
hDevice = Drv.spcm_hOpen("TCPIP::192.168.169.14::INST0::INSTR")