GpPollEx

image\BLTLRGSQ.gifBoards that Support the Function image\SETUP.gif image\SANBTN.gif

 

 

image\head10.gif Operation            Serial poll is done regardless of the existence of SRQ toward all the devices set up.

 

image\head10.gif Format                 

(VB.NET)

Dim Ret As Integer

Dim Cmd(xxxx) As Integer ' (xxxx specifies the maximum amount of devices + 1.)

Dim Pstb(xxxx) As Integer ' (xxxx specifies the maximum amount of devices + 1.)

Dim Psrq(xxxx) As Integer ' (xxxx specifies the maximum amount of devices + 1.)

Ret = GpPollEx(Cmd, Pstb, Psrq)

 

(C)

DWORD Ret;

DWORD *Cmd;

DWORD *Pstb;

DWORD *Psrq;

Ret = GpPollEx(Cmd, Pstb, Psrq);

 

(C#)

uint Ret;

uint[] Cmd = new uint[xxxx]; /* (xxxx specifies the maximum amount of devices + 1.) */

uint[] Cmd = new uint[xxxx]; /* (xxxx specifies the maximum amount of devices + 1.) */

uint[] Psrq = new uint[xxxx]; /* (xxxx specifies the maximum amount of devices + 1.) */

Ret = gpib.PollEx(Cmd, Pstb, Psrq);

 

(Python)

Ret = ctypes.c_ulong()

Cmd = (ctypes.c_ulong * xxxx)() #(xxxx specifies the maximum amount of devices + 1.)

Pstb = (ctypes.c_ulong * xxxx)() #(xxxx specifies the maximum amount of devices + 1.)

Psrq = (ctypes.c_ulong * xxxx)() #(xxxx specifies the maximum amount of devices + 1.)

Ret.value = GpibPy.GpPollEx(Cmd, Pstb, Psrq)

 

image\head10.gif Mode                   Master mode only

 

image\head10.gif Parameters

Cmd     :  Command array

[0] Number of devices

[1] Other device's address

[2] Other device's address

image\CONTINUE.gif

 

Pstb     :  Returned status byte array (return value)

[0] Have no meaning

[1] Status byte of specifies Cmd(1) (at timeout -1)

[2] Status byte of specifies Cmd(2) (at timeout -1)

image\CONTINUE.gif

 

Status byte for Pstb

image\PollExStb_wmf.gif

 

Psrq      :  A status whether SRQ was found. (return value)

Returns 1 if SRQ is found, 0 otherwise.

[0] Number of SRQ sended devices

[1] SRQ status of specifies Cmd(1)

[2] SRQ status of specifies Cmd(2)

image\CONTINUE.gif

 

Status of Psrq

image\PollExSrq_wmf.gif

 

Ret        :  Return value

0      : There are some (or one) devices SRQ sended

80    : GpIni() hasn't execute

128  : There is no device SRQ sended

140  : Asynchronous function is executing now

240  : ESC key pressed

252  : GP-IB error

254  : Timeout

255  : Illegal call

(See "Return Values" for details.)

 

image\head10.gif Notes

1  When more than one machine was specified, unlike GpPoll, serial poll is done toward all the machines, regardless of the existence of SRQ.

When more than one machine was specified, unlike GpPoll, serial poll is done toward all the machines, regardless of the existence of SRQ.

Cmd(0) = 3

Cmd(1) = 2

Cmd(2) = 5

Cmd(3) = 17

Ret = GpPollEx(Cmd(0), Pstb(0), Psrq(0))

 

<Result>

Ret  : 0

Pstb(1) : 40H

Pstb(2) : 20H

Pstb(3) : 60H

Psrq(0) : 2

Psrq(1) : 1

Psrq(2) : 0

Psrq(3) : 1

 

2  Can get status byte, if not recognize SRQ.

 

3  The contents of the Pstb array are initialized by 0 within the function.