Initial Operation - 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

Initial Operation

Initial Operation
Use the following example to verify initial operation. The example sets and then
queries the polarity of a logical true condition on the port 0 FLG line.
The example uses an HP Series 200/300 Computer with BASIC as the
programming language. The computer is connected to an Keysight 1406A
Command Module in the C-Size VXIbus cardcage using the General Purpose
Interface Bus (GPIB). The GPIB interface select code is 7, the GPIB primary
address is 09, and the GPIB secondary address (used to specify the digital I/O
module) is 18. Refer to the C-Size VXIbus Systems Configuration Guide for more
details about programming languages and interfaces.
Keysight E1458A 96-Channel Digital I/O Module User Guide
10 ASSIGN @Dio TO 70918! Sets an I/O path to the module.
20 DIM Polarity$[3]!
30 OUTPUT @Dio;"*RST"! Reset the module.
40 OUTPUT @Dio;"*OPC?"! Wait for the module to finish.
50 ENTER @Dio;Ready! Hold here until command is finished.
60 OUTPUT @Dio;"SOUR:DIG :FLAG0:POL POS;*OPC?" ! Set POSitive polarity.
70 ENTER @Dio;Ready! Wait for finish.
80 OUTPUT @Dio;"SOUR:DIG :FLAG0:POL?" ! Query the polarity state.
90 ENTER @Dio;Polarity$! Get the result.
100 IF Polarity$ <> "POS" THEN! Check the result.
110 DISP "Polarity Check ERROR"! Error discovered.
120 PAUSE! Pause on error.
130 ELSE
140 DISP"Polarity set to "&Polarity$
150 END IF
160 OUTPUT @Dio;"SOUR:DIG :FLAG0:POL NEG;*OPC?" ! Set NEGative polarity.
170 ENTER @Dio;Ready! Wait for finish.
180 OUTPUT @Dio;"SOUR:DIG :FLAG0:POL?" ! Query the polarity state.
190 ENTER @Dio;Polarity$! Get the result.
200 IF Polarity$ <> "NEG" THEN! Check the result.
210 DISP "Polarity Check ERROR"! Error discovered.
220 PAUSE! Pause on error.
230 ELSE
240 DISP"Polarity set to "&Polarity$
250 END IF
260 OUTPUT @Dio;"*RST"! Restore the card.
270 OUTPUT @Dio;"*OPC?"! Wait for the module to finish.
280 ENTER @Dio;Ready!
290 END
Getting Started
17

Advertisement

Table of Contents
loading

This manual is also suitable for:

E1458a

Table of Contents