Program Examples; Checking Data Lines - Keysight VXI Bus 75000 C Series User And Programming Manual

Digital i/o module
Hide thumbs Also See for VXI Bus 75000 C Series:
Table of Contents

Advertisement

Program Examples

Program Examples
The following BASIC program examples demonstrate a few of the uses of the
Keysight E1458A Digital I/O Module. The hardware setup needed to support the
example is described.

Checking Data Lines

This example checks for stuck data lines on all ports. It demonstrates sending
data, setting bits, and checking the result. If the programmed state of the port is
not correct, the program prints a message and stops. If a fast check of the data
lines reveals a stuck line, then a bit by bit check of the data lines is performed
and any errors found are printed.
Hardware setup: This example assumes that all 96 data lines are connected to a
peripheral device. Further, all 96 data lines must be provided with some kind of
pull-up (either internal or external).
1431655765 ! Alternating 0 and 1, 32-Bit .
",";Pattern(3,I) ! Alternate 0 and 1.
Keysight E1458A 96-Channel Digital I/O Module User Guide
10 RE-SAVE "Chk_line"!
20 ASSIGN @Dio TO 70918! I/O path to digital I/O module.
30 DIM Pattern(1:3,0:1),Value(1:3),! Mon(1:3)
40 INTEGER Errflg,Ready ,Bits!
50 Errflg = 0! Set to no error.
60 DATA
-1431655766,1431655765, -1431655766,1431655765, -1431655766,
70 READ Pattern(*)!
80 OUTPUT @Dio;"*RST;*OPC?"! Establish defaults.
90 ENTER @Dio;Ready! Wait for completion.
100 FOR I = 0 TO 1! Fast test of the data lines.
110OUTPUT @Dio;"SOUR:DIG:DATA0:LW96 ";Pattern(1,I);","; Pattern(2,I);
120OUTPUT @Dio;"*OPC?"!
130ENTER @Dio;Ready! Wait for completion .
140OUTPUT @Dio;"SOUR:DIG: DATA0:LW96?"
150ENTER @DIO;Value(1),Value(2), Value(3) ! Readback of port programming. !
160FOR J=1 TO 3!
170IF Val(J) <> Pattern(J,I) THEN! Port not programmed.
180PRINT "Port not programmed"
190STOP!
200END IF!
210NEXT J!
220OUTPUT @Dio;"SOUR:DIG :DATA0:LW96:MON?" ! Read data lines.
230ENTER @Dio;Mon(1),Mon(2),Mon(3)!
240FOR J=1 TO 3!
Using the Keysight E1458A Digital I/O Module
!
53

Advertisement

Table of Contents
loading

This manual is also suitable for:

E1458a

Table of Contents