設定例

VB.NET用

Dim Ret, Cmd(31) As String

Dim ErrCode As Integer

Cmd(0) = 3   ' コマンド数

Cmd(1) = &H3F

Cmd(2) = &H23

Cmd(3) = &H08

Ret = GpCommandAsync(Cmd)

' 終了確認

While True

    Ret = GpCheckAsync(0, ErrCode)

    If (Ret != 140) Then

        Exit While

    End If

End While

 

C言語用

DWORD Ret, Cmd[31];

DWORD ErrCode;

Cmd[0] = 3;   /* コマンド数 */

Cmd[1] = 0x3f;

Cmd[2] = 0x23;

Cmd[3] = 0x08;

Ret = GpCommandAsync(Cmd);

/* 終了確認 */

while (TRUE) {

Ret = GpCheckAsync(0, &ErrCode);

   if (Ret != 140) {

break;

}

}

 

C#用

uint Ret;

uint[] Cmd = new uint[31];

uint ErrCode;

Cmd[0] = 3;   /* コマンド数 */

Cmd[1] = 0x3f;

Cmd[2] = 0x23;

Cmd[3] = 0x08;

Ret = gpib.CommandAsync(Cmd);

/* 終了確認 */

while (TRUE) {

    Ret = gpib.CheckAsync(0, out ErrCode);

    if (Ret != 140) {

        break;

    }

}

 

Python用

Ret, Cmd = ctypes.c_ulong(), (ctypes.c_ulong * 31)()

ErrCode = ctypes.c_ulong()

Cmd[0] = 3   # コマンド数

Cmd[1] = 0x3f

Cmd[2] = 0x23

Cmd[3] = 0x08

Ret.value = GpibPy.GpCommandAsync(Cmd)

# 終了確認

while True:

    Ret.value = GpibPy.GpCheckAsync(0, ctypes.byref(ErrCode))

    if Ret.value != 140:

        break