beautypg.com

G - bus input/output…… 57, G - bus input/output, Caution – Measurement Computing Digital488/80A User Manual

Page 63

background image

G - Bus Input/Output

SYNTAX

Gn

Define mode

n

of data transmission on the IEEE 488 bus when the Digital488/80A

is addressed to Talk, where

n =

value from

0

to

4

.

G0

(Default) Input and output port data are sent when addressed to Talk.

G1

Only input port data is sent

G2

Only output port data is sent

G3

Buffered input and output data are sent

G4

Continuous buffered input and output data are sent

G?

Returns current bus input/output mode

n

.

Note:

The amount of data sent is dependent upon the Port Select (

P

) command.

DESCRIPTION

The Bus Input/Output (

G

) command determines whether input port data, output port data, both input and output port

data, or buffered data are transmitted on the bus when the Digital488/80A is addressed to Talk. The amount of data
sent is dependent upon the Port Select (

P

) command.


The Bus Input/Output (

G

) default mode

G0

causes all input and output port data to be sent to the controller when

addressed to Talk. Mode

G1

causes only data from the ports programmed as inputs to be returned when addressed to

Talk. Mode

G2

causes only data from ports programmed as outputs to be returned when addressed to Talk.


Mode

G3

causes data in the data buffer to be returned when addressed to Talk. Both input and output data (all 40 bits)

are returned in this mode. If the count of readings in the buffer is 0, the Digital488/80A holds off the bus until the next
transition of EDR and another reading has been collected and buffered. After the EDR transition, it returns the newly
collecting reading. The Digital488/80A must be readdressed to Talk to perform subsequent buffered output of EDR
captured data. Mode

G4

is identical to mode

G3

except that the Digital488/80A performs subsequent buffered output

of EDR captured data until the controller stops handshaking.

Note: If all ports are programmed as outputs with mode

G1

selected, and the Digital488/80A is addressed to Talk,

nothing is transmitted and the bus hangs. The converse also causes the bus to hang if all ports are
programmed as inputs with mode

G2

selected.

CAUTION

Because the Configuration (C) command is used, the following programming
example(s) will not work properly if the HVCX1 option is installed with a conflicting
hardware configuration. To be safe, remove the HVCX1 board and replace it with the
jumper board to run the example(s).

EXAMPLE

PRINT#1,"CLEAR08"

Line 1: Reset the Digital488/80A.

PRINT#1,"OUTPUT08;P0C1R0X"

Line 2: Configure Port 1 as output, Ports 2 through 5 as inputs.

PRINT#1,"OUTPUT08;G1X"

Line 3: Select only input ports for data.

PRINT#1,"ENTER08",

INPUT#2,A$

Line 5: Read data from the Digital488/80A input ports.

PRINT A$

Line 6: Display shows:

FFFFFFFF

(Data is dependent upon

what is connected.)

Digital488/80A User’s Manual

967695

Digital488/80A Commands 57