Setup Example

image\head10.gif VB.NET

Dim Ret, Cmd(31), talker, stbyte As Integer

Dim Pstb(31) As Integer  ' Returned status byte array

Cmd(0) = 2  ' Number of talkers

Cmd(1) = 3  ' Talker address

Cmd(2) = 4  ' Talker address

Ret = GpPoll(Cmd, Pstb)

talker = Cmd(Pstb(0))

stbyte = Pstb(Pstb(0))

 

image\head10.gif C

DWORD Ret, Cmd[31] talker, stbyte;

DWORD Pstb[31]; /* Returned status byte array */

Cmd[0] = 2; /* Number of talkers */

Cmd[1] = 3; /* Talker address */

Cmd[2] = 4; /* Talker address */

Ret = GpPoll(Cmd, Pstb);

talker = Cmd[Pstb[0]];

stbyte = Pstb[Pstb[0]];

 

image\head10.gif C#

uint Ret, talker, stbyte;

uint[] Cmd = new uint[31];

uint[] Pstb = new uint[31]; /* Returned status byte array */

Cmd[0] = 2; /* Number of talkers */

Cmd[1] = 3; /* Talker address */

Cmd[2] = 4; /* Talker address */

Ret = gpib.Poll(Cmd, Pstb);

talker = Cmd[Pstb[0]];

stbyte = Pstb[Pstb[0]];

 

image\head10.gif Python

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

Pstb = (ctypes.c_ulong * 31)() # Returned status byte array

Cmd[0] = 1 # Number of talkers

Cmd[1] = 3 # Talker address

Cmd[2] = 4 # Talker address

Ret.value = GpibPy.GpPoll(Cmd, Pstb)

talker.value = Cmd(Pstb[0)

stbyte.value = Pstb(Pstb[0])