設定例

VB.NET用

Dim Ret As Integer

Dim Str(8) As Byte

Dim DblData As Double

 

Str(0) = 63

Str(1) = 198

Str(2) = 127

Str(3) = 113

Str(4) = 97

Str(5) = 198

Str(6) = 148

Str(7) = 230

Ret = GpCnvCvd(Str, DblData)

(実行結果)

DblData : 0.175764248601957

 

C言語用

DWORD Ret;

BYTE Str[8];

double DblData;

 

Str[0] = 63;

Str[1] = 198;

Str[2] = 127;

Str[3] = 113;

Str[4] = 97;

Str[5] = 198;

Str[6] = 148;

Str[7] = 230;

Ret = GpCnvCvd(Str, &DblData);

(実行結果)

DblData : 0.175764248601957

 

C#用

uint Ret;

byte[] Str = new byte[8];

double DblData;

 

Str[0] = 63;

Str[1] = 198;

Str[2] = 127;

Str[3] = 113;

Str[4] = 97;

Str[5] = 198;

Str[6] = 148;

Str[7] = 230;

Ret = gpib.CnvCvd(Str, out DblData);

(実行結果)

DblData : 0.175764248601957

 

Python用

Ret = ctypes.c_ulong()

Str = (ctypes.c_ubyte * 8)()

DblData = ctypes.c_double()

 

Str[0] = 63

Str[1] = 198

Str[2] = 127

Str[3] = 113

Str[4] = 97

Str[5] = 198

Str[6] = 148

Str[7] = 230

Ret.value = GpibPy.GpCnvCvd(Str, ctypes.byref(DblData))

(実行結果)

DblData : 0.175764248601957