GpibSetPPoll


Function

Sets response line of parallel poll of partner apparatus.

Format

Ret = GpibSetPPoll (  Id, AddrArray, DataLineArray, PolarityArray )

Parameter

Id [ VB.NET: Short ][ C, C++: short ][ C#: short ]

Specifies DevID or EqpID.

Whichever it specifies, operation does not change.

 

AddrArray [ VB.NET: Short() ][ C, C++: short * ][ C#: short[] ]

Sets addresses of slave devices to be Parallel Polled by array. (the Max. of device is 31)

 

0 to 30

Address of slave device

-1

Must be used at last of array

iPerforms OR operation of the value from 96 to 126(60H to 7EH ) and high-order bits of primary address when secondary address is being usedj

DataLineArray [ VB.NET: Short() ][ C, C++: short * ][ C#: short[] ]

Sets DIO response line of corresponding device.

Up to 8 devices can be identified at same time because that DIO line is 8-bit width.

furthermore, more than 8 devices can be identified as multi-devices are allotted on same bit.

 

1 to 8

DIO line number

-1

Must be used at last of array

 

PolarityArray [ VB.NET: Short() ][ C, C++: short * ][ C#: short[] ]

Retrieves corresponding polarity of the device.

 

0

Out of phase

1

Inphase

-1

Must be used at last of array

Return Value

Ret [ VB.NET: Integer ][ C, C++: long ][ C#: int ]

 

0

Normality completion

10001

Invalid ID was specified

10002

Driver can not be called

12252

The element of AddrArray is being set out of range, or the number of elements are more than 32

12253

The element of DataLineArray is being set out of range

12254

The element of PolarityArray is being set out of range

12262

Pointer to AddrArray is NULL

12263

Pointer to DataLineArray is NULL

12264

Pointer to PolarityArray is NULL

22273

When device is used as slave (non-controller),  functions for master (controller) are execute

22293

The number of AddrArray is different from other array

Initial Value

AddrArray

-1

Not being set

DataLineArray

-1

Not being set

PolarityArray

-1

Not being set

Remarks

 

Example

Performs following settings. The device with primary address 1 responds on DIO line 1 in phase, the device with primary address 2 responds on DIO line 2 inphase, the device with primary address 3 responds on DIO line 3 out of phase, and the device with primary address 4 responds on DIO line 4 out of phase.

C

short AddrArray[9], DataLineArray[9], PolarityArray[9];

AddrArray[0] = 1;

DataLineArray[0] = 1;

PolarityArray[0] = 1;

AddrArray[1] = 2;

DataLineArray[1] = 2;

PolarityArray[1] = 1;

AddrArray[2] = 3;

DataLineArray[2] = 3;

PolarityArray[2] = 0;

AddrArray[3] = 4;

DataLineArray[3] = 4;

PolarityArray[3] = 0;

AddrArray[4] = -1;

DataLineArray[4] = -1;

PolarityArray[4] = -1;

Ret = GpibSetPPoll ( Id, AddrArray, DataLineArray, PolarityArray );

Performs following settings. The device with primary address 1 and secondary address 96(60H) responds on DIO line 1 in phase, the device with primary address 2 and secondary address 126(7EH) responds on DIO line 2 in phase, the device with primary address 3 and secondary address 96(60H) responds on DIO line 3 out of phase, and the device with primary address 4 and secondary address 126(7EH) responds on DIO line 4 out of phase.

C

short Talker, ListenerArray[255];

Talker = 0 + 0x6000;

ListenerArray[0] = 1;

ListenerArray[1] = 2 + 0x7e00;

short AddrArray[9], DataLineArray[9], PolarityArray[9];

AddrArray[0] = 1 + 0x6000;

DataLineArray[0] = 1;

PolarityArray[0] = 1;

AddrArray[1] = 2 + 0x7e00;

DataLineArray[1] = 2;

PolarityArray[1] = 1;

AddrArray[2] = 3 + 0x6000;

DataLineArray[2] = 3;

PolarityArray[2] = 0;

AddrArray[3] = 4 + 0x7e00;

DataLineArray[3] = 4;

PolarityArray[3] = 0;

AddrArray[4] = -1;

DataLineArray[4] = -1;

PolarityArray[4] = -1;

Ret = GpibSetPPoll ( Id, AddrArray, DataLineArray, PolarityArray );

See Also

GpibGetPPoll, GpibPPoll, GpibResetPPoll