VB.NET
Dim Ret As Integer
Dim Str(8) As Byte
Dim FltData(2) As Single
Dim ArraySize As Integer
Str(0) = 62
Str(1) = 51
Str(2) = 246
Str(3) = 224
Str(4) = 62
Str(5) = 151
Str(6) = 2
Str(7) = 59
FltData(0) = 0
FltData(1) = 0
ArraySize = 2
Ret = GpCnvCvsArray(Str, FltData, ArraySize)
(Result)
FltData[0] : 0.1757464
FltData[1] : 0.2949389
C
DWORD Ret;
BYTE Str[8];
float FltData[2];
DWORD ArraySize;
Str[0] = 62;
Str[1] = 51;
Str[2] = 246;
Str[3] = 224;
Str[4] = 62;
Str[5] = 151;
Str[6] = 2;
Str[7] = 59;
FltData[0] = 0;
FltData[1] = 0;
ArraySize = 2;
Ret = GpCnvCvsArray(Str, FltData, ArraySize);
(Result)
FltData[0] : 0.1757464
FltData[1] : 0.2949389
C#
uint Ret;
byte[] Str = new byte[8];
float[] FltData = new float[2];
uint ArraySize;
Str[0] = 62;
Str[1] = 51;
Str[2] = 246;
Str[3] = 224;
Str[4] = 62;
Str[5] = 151;
Str[6] = 2;
Str[7] = 59;
FltData[0] = 0;
FltData[1] = 0;
ArraySize = 2;
Ret = gpib.CnvCvsArray(Str, FltData, ArraySize);
(Result)
FltData[0] : 0.1757464
FltData[1] : 0.2949389
Python
Ret = ctypes.c_ulong()
Str = (ctypes.c_ubyte * 8)()
FltData = (ctypes.c_float * 2)()
ArraySize = ctypes.c_ulong()
Str[0] = 62
Str[1] = 51
Str[2] = 246
Str[3] = 224
Str[4] = 62
Str[5] = 151
Str[6] = 2
Str[7] = 59
FltData[0] = 0
FltData[1] = 0
ArraySize.value = 2
Ret.value = GpibPy.GpCnvCvsArray(Str, FltData, ArraySize)
(Result)
FltData[0] : 0.1757464
FltData[1] : 0.2949389