beautypg.com

Bus input/output gn – Measurement Computing Digital488 User Manual

Page 34

background image

Section 3 Command Descriptions

3.4

Bus Input/Output Gn

The Bus Output command determines whether input port data, output port data

or both will be transmitted on the bus when the Digital488 is addressed to talk. The
amount of data sent is dependent on the Pn command.

The G0 default mode causes all input and output port data to be sent to the

controller when addressed to talk. The G1 mode causes only data from the ports
programmed as inputs to be returned when addressed to talk. The G2 mode causes only
data from ports programmed as outputs to be returned when addressed to talk.

If all ports are programmed as outputs with G1 selected and the Digital488 is

addressed to talk, nothing will be transmitted and the bus will hang. The converse will
also cause the bus to hang with all ports programmed as inputs and G2 selected.

G0

Input and output port data is send on talk

G1

Only input port data is sent on talk

G2

Only output port data is sent on talk

Example:

CLEAR 718

reset the Digital488

OUTPUT 718;"P0C1X"

port1 as output, ports 2-5 as input

OUTPUT 718;"G1X"

select only input ports

ENTER 718; A$

read data from the input ports

DISP A$

display shows FFFFFFFF (data is
dependent on what is connected.

OUTPUT 718;"G2X"

select output ports

ENTER 718; A$

read data from the output ports

DISP A$

display shows 00 (outputs default to 0)

This manual is related to the following products: