beautypg.com

Ppollconfig – Measurement Computing Personal488 rev.3.0 User Manual

Page 109

background image

Personal488 for Windows 95/98/Me/NT/2000

04-10-01

API Reference 6-41

PPollConfig

Syntax

INT WINAPI PPollConfig(DevHandleT devHandle,BYTE ppresponse);

devHandle

refers to either an interface or an external device to configure for the Parallel

Poll.

ppresponse

is the decimal equivalent of the four binary bits

S

,

P2

,

P1

, and

P0

where

S

is

the Sense bit, and

P2

,

P1

, and

P0

assign the

DIO

bus data line used for the response.

Returns

-1 if error

Bus States

ATN

UNL, MTA, LAG, PPC

Example

errorcode =

PPollConfig
(dmm,0x0D);

Configure device

DMM

to assert

DIO6

when it desires service

(

ist

= 1) and it is Parallel Polled (0x0D = &H0D = 1101

binary;

S

=1,

P2

=1,

P1

=0,

P0

=1; 101 binary = 5 decimal =

DIO6

).

See Also

PPoll, PPollUnconfig, PPollDisable

The

PPollConfig

command configures the Parallel Poll response of a specified bus device. Not all

devices support Parallel Polling and, among those that do, not all support the software control of their
Parallel Poll response. Some devices are configured by internal switches.

The Parallel Poll response is set by a four-bit binary number response:

S

,

P2

,

P1

, and

P0

. The most

significant bit of response is the Sense (

S

) bit. The Sense bit is used to determine when the device will

assert its Parallel Poll response. Each bus device has an internal individual status (

ist

). The Parallel Poll

response is asserted when this

ist

equals the Sense bit value

S

. The

ist

is normally a logic

1

when the

device requires attention, so the

S

bit should normally also be a logic

1

. If the

S

bit is

0

, then the device

asserts its Parallel Poll response when its

ist

is a logic

0

. That is, it does not require attention. However,

the meaning of

ist

can vary between devices, so refer to your IEEE 488 bus device documentation. The

remaining 3 bits of response:

P2

,

P1

, and

P0

, specify which

DIO

bus data line is asserted by the device in

response to a Parallel Poll. These bits form a binary number with a decimal value from

0

through

7

,

specifying data lines

DIO1

through

DIO8

, respectively.

This manual is related to the following products: