beautypg.com

Measurement Computing Personal488 rev.3.0 For DOS & Windows 3.Xi User Manual

Page 363

background image

15B. Driver488/SUB, W31, W95, & WNT

III. COMMAND REFERENCES - 15. Command References

III-348

Personal488 User’s Manual, Rev. 3.0

EXAMPLE

result = Status(ieee,&StatusResult);
if (statusResult.transfer == TRUE) {
printf(“We have a transfer in progress\n”);
} else {
printf(“There is no transfer in progress\n”);
}

The

Status

command returns various items detailing the current state of Driver488. They are

returned in a data structure, based on the following table:

Status Item

Flag

Values and Description

Controller Active

.CA

TRUE

: Active Controller, FALSE: Not CA.

System Controller

.SC

TRUE

: System Controller, FALSE: Not SC.

Primary Bus Address

.Primaddr

0

to 30: Two-digit decimal number.

Secondary Bus Address

.Secaddr

0

to 31: Two-digit decimal number, or -1 if no address.

Address Change

.addrChange

TRUE

: Address change has occured, FALSE: Not so.

Talker

.talker

TRUE

: Talker, FALSE: Not Talker

Listener

.listener

TRUE

: Listener, FALSE: Not Listener

ByteIn

.bytein

TRUE

: Byte in, ready to read, FALSE: Not so.

ByteOut

.byteout

TRUE

: Byte out, ready to output, FALSE: Not so.

Service Request

.SRQ

TRUE

: SRQ is asserted, FALSE: SRQ is not asserted

Triggered

.triggered

TRUE

: Trigger command received, FALSE: Not so.

Cleared

.cleared

TRUE

: Clear command received, FALSE: Not so.

Transfer in Progress

.transfer

TRUE

: Transfer in progress, FALSE: Not so.

These

Status

items are more-fully described in the following paragraphs:

The Controller Active flag (

.CA

) is true if Driver488 is the Active Controller. If Driver488 is not

the System Controller, then it is initially a Peripheral and it becomes a controller when Driver488
receives control from the Active Controller.

The System Controller flag (

.SC

) is true if Driver488 is the System Controller. The System

Controller mode may be configured during installation or by using the SysController command.

The Primary Bus Address (

.Primaddr

) is the IEEE 488 bus device primary address assigned to

Driver488 or the specified device. This will be an integer from

0

to

30

. The Secondary Bus

Address (

.Secaddr

) is the IEEE 488 bus device secondary address assigned to the specified

device. This will be either

-1

to indicate no secondary address, or an integer from

0

to

31

. Note

that the interface device can never have a secondary address.

The Address Change indicator (

.addrChange

) is set whenever Driver488 become a Talker,

Listener, or the Active Controller, or when it becomes no longer a Talker, Listener, or the Active
Controller. It is reset when

Status

is read. The Talker (

.talker

) and Listener (

.listener

)

flags reflect the current Talker/Listener state of Driver488. As a Peripheral, Driver488 can check
this status to see if it has been addressed to Talk or addressed to Listen by the Active Controller.
In this way, the desired direction of data transfer can be determined.

The ByteIn (

.byteIn

) indicator is set when the I/O adapter has received a byte that can be read by

an

Enter

command. The ByteOut (

.byteOut

) indicator is set when the I/O adapter is ready to

output data. The Service Request field (

.SRQ

), as an active controller, reflects the IEEE 488 bus

SRQ

line signal. As a peripheral, this status reflects the

rsv

bit that can be set by the

Request

command and is cleared when the Driver488 is Serial Polled. For more details, refer to the

SPoll

command in this Sub-Chapter.

The Triggered (

.triggered

) and Cleared (

.cleared

) indicators are set when, as a Peripheral,

Driver488 is triggered or cleared. These two indicators are cleared when

Status

is read. The

Triggered and Cleared indicators are not updated while asynchronous transfers are in progress.
The Transfer in Progress indicator (

.transfer

) indicates that an asynchronous transfer is in

progress.