beautypg.com

Close, Controlline – Measurement Computing Personal488 rev.3.0 For DOS & Windows 3.Xi User Manual

Page 333

background image

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

III. COMMAND REFERENCES - 15. Command References

III-318

Personal488 User’s Manual, Rev. 3.0

EXAMPLE

errorcode = ClockFrequency(ieee, 8);

The

ClockFrequency

command specifies the IEEE 488 adapter internal clock frequency. The clock

frequency depends upon the design and jumper settings of the interface board. The specified clock
frequency must be the actual clock rate in megahertz (MHz) rounded up to the nearest whole number of
megahertz. The MP488 and MP488CT boards use a fixed clock frequency of 8 MHz.

Note:

This command is not applicable to the NB488.

Close

SYNTAX

int pascal Close(DevHandleT devHandle);

devHandle

refers to either an IEEE 488 interface or an external device.

RETURNS

-1 if error

MODE

Any

BUS STATES

Completion of any pending I/O activities

SEE ALSO

OpenName, MakeDevice, Wait

EXAMPLE

errorcode = Close(wave);

The

Close

command waits for I/O to complete, flushes any buffers associated with the device that is

being closed, and then invalidates the handle associated with the device.

ControlLine

Driver488/SUB only

SYNTAX

int pascal ControlLine(DevHandleT devHandle);

ControlLine

returns a bit mapped number.

devHandle

refers to the I/O adapter. If

devHandle

refers to an external device,

the

ControlLine

command acts on the hardware interface to which the

external device is attached.

RESPONSE

-1 if error,

otherwise, a bit mapped integer indicating the value of the

control lines.

MODE

Any

BUS STATES

None

SEE ALSO

TimeOut

EXAMPLES

result = ControlLine(ieee);
printf(“The response is %X\n”,result);

The

ControlLine

command may be used on either IEEE 488 devices or Serial devices. If the device

specified is an IEEE 488 device, this command returns the status of the IEEE 488 bus control lines as
an 8-bit unsigned value (bits 2 and 1 are reserved for future use), as shown below:

8

7

6

5

4

3

2

1

EOI

SRQ

NRFD

NDAC

DAV

ATN

0

0

If the device refers to a Serial device, this command returns the status of the Serial port control lines as
an 8-bit unsigned value (bits 8 and 7 are reserved for future use), as shown below:

8

7

6

5

4

3

2

1

0

0

DSR

RI

DCD

CTS

DTR

RTS

A fuller description of the above bus line abbreviations are provided below: