VB.NET
Dim Ret, Cmd(31) As String
Dim ErrCode As Integer
Cmd(0) = 3 ' Number of commands
Cmd(1) = &H3F
Cmd(2) = &H23
Cmd(3) = &H08
Ret = GpCommandAsync(Cmd)
' Completion check
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; /* Number of commands */
Cmd[1] = 0x3f;
Cmd[2] = 0x23;
Cmd[3] = 0x08;
Ret = GpCommandAsync(Cmd);
/* Completion check */
while (TRUE) {
Ret = GpCheckAsync(0, &ErrCode);
if (Ret != 140) {
break;
}
}
C#
uint Ret;
uint[] Cmd = new uint[31];
uint ErrCode;
Cmd[0] = 3; /* Number of commands */
Cmd[1] = 0x3f;
Cmd[2] = 0x23;
Cmd[3] = 0x08;
Ret = gpib.CommandAsync(Cmd);
/* Completion check */
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 # Number of commands
Cmd[1] = 0x3f
Cmd[2] = 0x23
Cmd[3] = 0x08
Ret.value = GpibPy.GpCommandAsync(Cmd)
# Completion check
while True:
Ret.value = GpibPy.GpCheckAsync(0, ctypes.byref(ErrCode))
if Ret.value != 140:
break