Agilent E1330B User Manual

HP 75000 Series B
HP E1330B Quad 8-Bit Digital I/O Module
User’s Manual and SCPI Programming Guide
Where to Find it - Online and Printed Information:
System installation (hardware/software)............VXIbus Configuration Guide*
HP VIC (VXI installation software)*
Module configuration and wiring.......................This Manual
SCPI programming.............................................This Manual
SCPI example programs.....................................This Manual, Driver Disk
SCPI command reference ..................................This Manual
Register-Based Programming.............................This Manual
VISA language information................................HP VISA User’s Guide
HP VEE programming information....................HP VEE User’s Manual
*Supplied with HP Command Modules, Embedded Controllers, and VXLink.

Manual Part Number: E1330-90007
Printed in U.S.A. E0597
Contents
HP E1330B User’s Manual
Warranty .......................................................................................................................5
Safety Symbols.............................................................................................................6
WARNINGS.................................................................................................................6
Declaration of Conformity............................................................................................7
Reader Comment Sheet ................................................................................................9
Chapter 1
Getting Started ............................................................................................................. 11
Using This Chapter.....................................................................................................11
Technical Description.................................................................................................11
Instrument Definition..................................................................................................13
Downloading SCPI Drivers........................................................................................13
Programming the Digital I/O Module.........................................................................13
SCPI Command Format Used in This Manual ....................................................14
Specifying SCPI Commands ...............................................................................14
Initial Operation..........................................................................................................16
Chapter 2
Configuring the HP E1330B Digital I/O Module ......................................................17
Using This Chapter.....................................................................................................17
Setting the Address Switch......................................................................................... 18
Enabling Pull-ups........................................................................................................19
Selecting the Interrupt Line ........................................................................................20
Combining the Flag Lines...........................................................................................21
Digital I/O Module Peripheral Pinout.........................................................................22
Configuring for Isolated Digital I/O...........................................................................25
Connecting to a GPIO Peripheral ............................................................................... 26
Using with External Pull-ups......................................................................................28
Typical Connection..................................................................................................... 29
Chapter 3
Using the HP E1330B Digital I/O Module .................................................................31
Using This Chapter.....................................................................................................31
Addressing the Module...............................................................................................31
Operation Overview....................................................................................................32
Default and Reset States.............................................................................................33
Setting the Polarity......................................................................................................33
Setting the Handshake Mode......................................................................................34
Handshake Timing ..............................................................................................34
Inputting Data Bytes and Bits..................................................................................... 35
Input .................................................................................................................... 35
Outputting Data Bytes and Bits..................................................................................36
Output .................................................................................................................. 36
Multiple Port Operations ............................................................................................ 37
Using Trace Memory.................................................................................................. 38
Contents 1
Chapter 4
Understanding the HP E1330B Digital I/O Module .................................................41
Using This Chapter.....................................................................................................41
Port Description..........................................................................................................41
Data Lines .......................................................................... ......... ........................ 41
The FLG Line (Input) ..........................................................................................42
The CTL Line (Output) .......................................................................................42
The I/O
Line (Output) .........................................................................................42
The STS Line ...................................................................................................... 43
The PIR Line .......................................................................................................43
The RES
Line ...................................................................................................... 43
Default and Reset States.............................................................................................43
Setting the Polarity......................................................................................................43
Using the Handshake Modes......................................................................................44
Handshake Modes ............................................................................................... 45
Inputting Data Bytes and Bits..................................................................................... 50
Bit Input ...............................................................................................................50
Byte Input ............................................................................................................50
Outputting Data Bytes and Bits..................................................................................51
Bit Output ............................................................................................................51
Byte Output .........................................................................................................52
Multiple Port Operations ............................................................................................ 53
Multiple Port Handshaking .................................................................................53
Multiple Port Input/Output .................................................................................. 54
Chapter 5
HP E1330B Digital I/O Module Command Reference .............................................57
Using This Chapter.....................................................................................................57
Command Types.........................................................................................................57
Common Command Format ................................................................. ......... ......57
SCPI Command Format ...................................................................................... 57
Linking Commands .............................................................................................59
SCPI Command Reference.........................................................................................60
DISPlay Subsystem.....................................................................................................61
:MONitor:PORT ..................................................................................................61
:MONitor:PORT? ................................................................................................62
:MONitor[:STATe] ............................................................................................. 62
:MONitor[:STATe]? ............................................................................................63
MEASure Subsystem.................................................................................................. 64
:DIGital:DATAn[:type]:BITm? ..........................................................................64
:DIGital:DATAn[:type]:TRACe ......................................................................... 65
:DIGital:DATAn[:type][:VALue]? ..................................................................... 66
:DIGital:FLAGn? ................................................................................................ 67
MEMory Subsystem................................................................................................... 68
:DELete:MACRo ................................................................................................ 68
:VME:ADDRess ..................................................................................................69
:VME:ADDRess? ................................................................................................ 69
:VME:SIZE ......................................................................................................... 70
2 Contents
Chapter 5
HP E1330B Digital I/O Module Command Reference (continued)
MEMory Subsystem (continued)
:VME:SIZE? ........................................................................................................70
:VME:STATe ...................................................................................................... 71
:VME:STATe? .................................................................................................... 71
[SOURce:] Subsystem................................................................................................ 72
DIGital:CONTroln:POLarity .............................................................................. 74
DIGital:CONTroln:POLarity? ............................................................................ 74
DIGital:CONTroln[:VALue] ..............................................................................75
DIGital:CONTroln[:VALue]? .............................................................................75
DIGital:DATAn[:type]:BITm .............................................................................76
DIGital:DATAn[:type]:BITm? ............................................................................77
DIGital:DATAn[:type]:HANDshake:DELay .....................................................78
DIGital:DATAn[:type]:HANDshake:DELay? ....................................................79
DIGital:DATAn[:type]:HANDshake[:MODE] ..................................................80
DIGital:DATAn[:type]:HANDshake[:MODE]? ................................................. 81
DIGital:DATAn[:type]:POLarity ........................................................................82
DIGital:DATAn[:type]:POLarity? ...................................................................... 82
DIGital:DATAn[:type]:TRACe ..........................................................................83
DIGital:DATAn[:type][:VALue] ........................................................................ 84
DIGital:DATAn[:type][:VALue]? ...................................................................... 85
DIGital:FLAGn:POLarity ................................................................................... 86
DIGital:FLAGn:POLarity? ................................................................................. 86
DIGital:HANDshaken:DELay ............................................................................87
DIGital:HANDshaken:DELay? ..........................................................................88
DIGital:HANDshaken[:MODE] .........................................................................88
DIGital:HANDshaken[:MODE]? ........................................................................89
DIGital:IOn? ........................................................................................................89
DIGital:TRACe:CATalog? .................................................................................90
DIGital:TRACe[:DATA] .................................................................................... 90
DIGital:TRACe[:DATA]? ..................................................................................91
DIGital:TRACe:DEFine ......................................................................................91
DIGital:TRACe:DEFine? .................................................................................... 92
DIGital:TRACe:DELete:ALL .............................................................................92
DIGital:TRACe:DELete[:NAME] ...................................................................... 92
STATus Subsystem.....................................................................................................93
:OPERation:CONDition? .................................................................................... 94
:OPERation:ENABle ...........................................................................................94
:OPERation:ENABle? .........................................................................................94
:OPERation[:EVENt]? ........................................................................................ 94
:PRESet ............................................................................................................... 94
:QUEStionable:CONDition? ............................................................................... 95
:QUEStionable:ENABle ......................................................................................95
:QUEStionable:ENABle? ....................................................................................95
:QUEStionable[:EVENt]? ................................................................................... 95
Contents 3
Chapter 5 (continued)
SYSTem Subsystem ................................................................................................... 96
:CDEScription? ................................................................................................... 96
:CTYPe? .............................................................................................................. 96
:ERRor? ............................................................................................................... 97
:VERSion? ........................................................................................................... 97
IEEE 488.2 Common Commands............................................................................... 98
Command Quick Reference........................................................................................99
Appendix A
HP E1330B Digital I/O Specifications ......................................................................103
Appendix B
HP E1330B Digital I/O Module Register Information ...........................................105
Using This Appendix................................................................................................ 105
Addressing the Registers.......................................................................................... 105
The Base Address ..............................................................................................106
Register Offset ...................................................................................................108
Reset and Registers ...................................................................................................109
Register Definitions..................................................................................................109
Register Descriptions................................................................................................111
Manufacturer Identification Register ................................................................111
Device Identification Register ...........................................................................111
Card Status/ Control Register ............................................................................111
Port Interrupt Control Register ..........................................................................112
Port Transfer Control Register ..........................................................................113
Port Control/ Status Register .............................................................................114
Port Data Register .............................................................................................115
Port Handshake Register ...................................................................................116
Port Delay Register ...........................................................................................117
Port Normalization Register .............................................................................. 118
A Register-Based Output Algorithm ........................................................................119
A Register-Based Input Algorithm ...........................................................................120
Programming Examples............................................................................................121
System Configuration ........................................................................................121
Resetting the Module ......................................................... ......... ...................... 122
Reading the ID, Device Type, and Status Registers .........................................123
Writing an 8-Bit Byte ........................................................................................125
Writing a 16-Bit Word ......................................................................................127
Reading an 8-Bit Byte .......................................................................................128
Reading a 16-Bit Word ..................................................................................... 130
Debugging Basic Register-Based Programs ..................................................... 130
PIR Interrupts on the HP E1330 ........................................................................ 131
HP E1330B Non-data Line I/O .........................................................................136
Embedded Computer Example ..........................................................................140
4 Contents
Appendix C
Error Messages ..........................................................................................................143
Certification
Hewlett-Packard Company certifies that this product met its published specifications at the time of shipment from the factory. Hewlett­Packard further certifies that its calibration measurements are traceable to the United States National Institute of Standards and Technology (formerly National Bureau of Standards), to the extent allowed by that organization’s calibration facility, and to the calibration facilities of other International Standards Organization members.
Warranty
This Hewlett-Packard product is warranted against defects in materials and workmanship for a period of three years from date of shipment. Duration and conditio ns of wa rrant y for this p roduc t may be su perseded when th e pro duct is in tegrate d in to (bec omes a part of) other HP products. During the warranty period, Hewlett-Packard Company will, at its option, either repair or replace products which prove to be defective.
For warranty service or repai r, this produc t must be return ed to a service facility design ated by Hewlett-Pa ckard (HP). Bu yer sha ll prep ay shipping charges to HP and HP shall pay shipping charges to return the product to Buyer. However, Buyer shall pay all shipping charges, duties, and taxes for products returned to HP from another country
HP warrants that its software and firmware designated by HP for use with a product will execute its programming instructions when properly installed on that product. HP does not warrant that the operation of the product, or software, or firmware will be uninterrupted or error free.
Limitation Of Warranty
The foregoing warranty sh all not apply to defects resu lting from im proper or ina dequate ma intenance by Buyer, Bu yer-supplie d products or interfacing, unauthorized modification or misuse, operation outside of the environmental specifications for the product, or improper site preparation or ma intenance.
The design and implementation of any circuit on this product is the sole responsibility of the Buyer. HP does not warrant the Buyer’s circuitry or malfunctions of HP products that result from the Bu yer’s circuitry. In addition, HP does not war rant any damage that occurs as a result of the Buyer’s circuit or any defects that result from Buyer-supplied products.
NO OTHER WARRANTY IS EXPRESSED OR IMPLIED. HP SPECIFICALLY DISCLAIMS THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Exclusive Remedies
THE REMEDIES PROVIDED HEREIN ARE BUYER’S SOLE AND EXCLUSIVE REMEDIES. HP SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER BASED ON CONTRACT, TORT, OR ANY OTHER LEGAL THEORY.
Notice
The information contained in this document is subject to change without notice. HEWLETT-PACKARD (HP) MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. HP shall not be liable for errors contained herein or for incidental or consequential damag e s in connection with the furnishing, performance or use of this material. This document contains proprietary infor mation which is pr otected by copyright. All rights are reserved. No part of this document may be photocopied, reproduced, or translated to another language without the prior written consent of Hewlett-Packard Company. HP assumes no responsibility for the use or reliability of its software on equipment that is not furnished by HP.
U.S. Government Restricted Rights
The Software and Documentation have been developed entirely at private expense. They are delivered and licensed as "commercial computer software" as defined in DFARS 252.227- 7013 (Oct 1988), DFARS 252.211-7015 (May 1991) or DFARS 252.227-7014 (Jun
1995), as a "commercial item" as defined in FAR 2.101(a), or as "Restricted computer software" as defined in FAR 52.227-19 (Jun
1987)(or any equivalent agency regulation or contract clause), whichever is applicable. You have only those rights provided for such Software and Documentation by the applicable FAR or DFARS clause or th e HP standard software agreement for the produ ct involved
HP E1330B Quad 8-Bit Digital I/O User’s Manual
Edition 7
Copyright © 1997 Hewlett-Packard Company. All Rights Reserved.
5
Documentation History
All Editions and Updates o f this manu al and t heir cre ation da te are li sted belo w. The first Edi tion o f the m anual i s Edition 1. The Edition number increments by 1 whenever the manual is revised. Updates, which are issued between Editions, contain replacement pages to correct or add additional information to the current Edition of the manual. Whenever a new Edition is created, it will contain all of the Update information for the previous Edi tion. Each ne w Edition or Upd ate also incl udes a revised copy of this d ocumentation h istory page.
Edition 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Edition 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .September 1990
Edition 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . April 1992
Edition 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .September 1992
Edition 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .November 1993
Edition 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .June 1995
Edition 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .May 1997
Safety Symbols
Instruction manual symbol affixed to
Instruction manual symbol affixed to product. Indicates that the user must refer to
product. Indicates that the user must refer to the manual for specific WARNING or
the manual for specific WARNING or CAUTION information to avoid personal
CAUTION information to avoid personal injury or damage to the product.
injury or damage to the product.
Indicates the field wiring terminal that must be connected to earth ground before
operating the equipme nt—protects against electrical shock in case of fault.
WARNING
Alternating current (AC)
Direct current (DC).
Indicates hazardous voltages.
Calls attention to a procedure, practice , or condition that could cause bodily injury or death.
or
Frame or chassis ground terminal—typically connects to the equipment' s metal frame.
CAUTION
Calls attention to a procedure, practice , or condition that could p ossibly cause damage to equipment or permane nt loss of data.
WARNINGS
The following genera l safety precautions must be observed during all phases of operation, service, and r epair of this produ ct. Failure to comply with these precautions or with specific warnings elsewhere in this manual violates safety standards of design, manufacture, and intended use of the product. Hewlett-Packar d Company assumes no liabilit y for the customer's failu re to comply with these requirements.
Ground the equipment: For Safety Class 1 equipment (equipment having a protective earth terminal), an uninterruptible safety earth ground must be provided from the mains power source to the product input wiring terminals or supplied power cable.
DO NOT operate the product in an explosive atmosphere or in the presence of flammable gases or fumes. For continued protection against fire, replace the line fuse(s) only with fuse(s) of the same voltage and current rating and type. DO NOT
use repaired fuses or short-circuited fuse holders. Keep away from live circuits: Operating personnel must not remove equipment covers or shields. Procedures involving the removal of
covers or shields are for use by service-tr ained personnel on ly. Under certain conditions, dangerous voltages may exist even with the equipment swi tched off . To avoid da ngerous el ectrica l shock, DO N OT perform procedure s involvin g cover or sh ield remova l unless you are qualified to do so.
DO NOT operate damaged equipmen t: Whenever it is possible that the safety protection features built in to this product have been impaired, either through physical damage, excessive moisture, or any other reason, REMOVE POWER and do not use the product until safe operation can be verified by service-trained personnel. If necessary, return the product to a Hewlett-Packard Sales and Service Office for service and repair to ensure that safety features are maintained.
DO NOT service or adjust alone: Do not attempt internal service or adjustment unless another person, capable of rendering first aid and resuscitation, is present.
DO NOT substitute parts or modify equipment: Because of the dange r of introd ucing addi tional h azards, do not install substitute parts or perform any unauthorized mod ification to the product. Return the product to a Hewlett-Packard Sales and Service Office for servi ce and repair to ensure that safety features are maintained.
6
Declaration of Conformity
according to ISO/IEC Guide 22 and EN 45014
Manufacturer’s Name: Hewlett-Packard Company
Loveland Manufacturing Center
Manufacturer’s Address: 815 14th Street S.W.
Loveland, Colorado 80537
declares, that the product:
Product Name: Quad 8-Bit Digital I/O Module Model Number: HP E1330B Product Options: All
conforms to the following Product Specifications: Safety: IEC 1010-1 (1990) Incl. Amend 1 (1992)/EN61010-1 (1993)
CSA C22.2 #1010.1 (1992) UL 1244
EMC: CISPR 11:1990/EN55011 (1991): Group 1 Class A
EN50082-1:1992 IEC 801-2:1991: 4kVCD, 8kVAD IEC 801-3:1984: 3 V/m IEC 801-4:1988: 1kV Power Line, .5kV Signal Lines
Supplementary Information: The product herewith complies with the requirements of the Low Voltage Directive 73/23/EEC and the EMC Directive 89/336/EEC (inclusive 93/68/EEC) and carries the "CE" marking acco rdingly.
Tested in a typical configuration in an HP B-Size VXI mainframe.
June 15, 1995
European contact: Your local Hewlett-Packard Sales and Service Office or Hewlett-Packard GmbH, Depart-
ment HQ-TRE, Herrenberger Straße 130, D-71034 Böblingen, Germany (FAX +49-7031-14-3143)
Jim White, QA Manager
7
Notes:
8
Pl
ease fold and tape for ma
ili
ng
Reader Comment Sheet
HP E1330B Quad 8-Bit Digital I/O User’s Manual
Edition 7
You can help us improve our manuals by sharing you r comments and sug gestions. In appreciation of your time, we will enter you in a quarterly drawing for a Hewlett-Packard Palmtop Personal Computer (U.S. government employees
are not eligible for the drawing).
Your Nam e
Company Name
Job Title
Address
City, State/Province
Country
Zip/Postal Code
Telephone Number with Area Code
Please list the system controller, operating system, programming language, and plug-in modules you are using.
fold here
BUSINESS REPLY MAIL
FIRST CLASS PERMIT NO. 37 LOVELAND, CO
POSTAGE WILL BE PAID BY ADDRESSEE
cut along this li ne
HEWLETT-PACKARD COMPANY
Measurement Systems Division Learning Products Department P.O. Box 301 Loveland, CO 80539-9984
NO POSTAGE
NECESSARY
IF MAILED
IN THE
UNITED STATES
fold here
Please pencil-in one circle for each statement below: Disagree Agree
The documentation is well organized. OOOOO
Instructions are easy to understand. OOOOO
The documentation is clearly written. OOOOO
Examples are clear and useful. OOOOO
Illustrations are clear and helpful. OOOOO
The documentation meets my overall expectations. OOOOO
Please write any comments or suggestions below–be specific.
Using This Chapter
This chapter describes the Quad 8-bit Digital I/O Module and how to program the Module using SCPI (Standard Commands for Programmable Instruments) commands. This chapter contains the following sections:
Technical Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 11
Instrument Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 13
Downloading SCPI Drivers . . . . . . . . . . . . . . . . . . . . . . . . . Page 13
Programming the Digital I/O Module. . . . . . . . . . . . . . . . . . Page 13
Initial Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 16
Technical Description
The HP E1330B Quad 8-Bit Digital I/O Module (referred to as the Digital I/O module) is a four port digital input/output module intended for data communication and digital control in electronic environments. The Digital I/O module is compatible with TTL levels (0-5V) or CMOS levels (using external pull-ups). The Digital I/O module complies wi th VXIbus (VMEbus Extensions for Instrumentation) definitions for the P1 bus connector on B-sized modules. A jumper on the module sets the VXIbus interrupt level.
Chapter 1
Getting Started
Figure 1-1. HP E1330B Digital I/O Module
Getting Started 11Chapter 1
Each port is identical and con si st s of 6 cont ro l lines and 8 data lines. There are 7 registers for control and status on each port. In addition, the module also has Manufacturer ID, Device Type, and Module Status/Control Registers. Figure 1-1 shows the locations of the ports and a simplified diagram of a single port. Of the seven control lines, three (I/O FLG) are used with SCPI commands and three (RES
, STS, and PIR) are
, CTL, and
controlled through register access. Chapte r 4 — “Understanding the HP E1330B Digital I/O Module” contains detailed descriptions of these lines.
Each port has two sets of hardware configuration jumpers. One set of jumpers allows you to connect the FLG lines together for multi-port dat a transmission. Another jumper selects either open collector operation or internal pull-up to TTL compatible levels on the data lines. Chapter 2 — “Configuring the HP E1330B Digital I/O Module” describes how to set these jumpers.
SCPI commands provided for the Digital I/O allow opera tion on a singl e bit, 8-bit "BYTE" format, 16-bit "WORD" format (using 2 ports), or 32-bit "LWORd" format (using 4 ports).
Table 1-1 shows the mapping of bit numbers from the 8-bit ports to the 16- or 32-bit ports. Chapter 5 — “HP E1330B Digital I/O Command Reference” describes each command in detail and Chapter 3 — “Using the HP E1330B Digital I/O Module” gives examples of the use of SCPI commands.
Table 1-1. Data Lines
8-bit (BYTE) Operations
Port # 0 1 2 3 Bit designations 7------0 7------0 7------0 7------0
16-bit (WORD) Operations
Port # 0 2 Bit designations 15------8 7------0 15------8 7------0
32-bit (LWORd) Operations
Port # 0 Bit designations 31------24 23------16 15------8 7------0
Two 3-meter, 60-wire ribbon cabl es with an insulation displacement hea der connector (ribbon cable c onnector) on o ne end a re incl uded with the Dig ital I/O module. Additional cable sets can be ordered (HP part number E1330-61601) from your nearest Hewlett-Packard Sales Office.
12 Getting Started Chapter 1
Instrument Definition
Each Digital I/O module installed in an HP mainframe is treated as an independent instrument; having a unique secondary HP-IB address. Each instrument is also assig ned a dedicated error queue, inpu t and output buffers, status registers and, if applicable, dedicat ed mainframe memory space for readings or data. Multiple Digital I/O modules cannot be combined into a single instrument.
Downloading SCPI Drivers
The HP Digital I/O Driver allows the HP E1330B module to operate with either B-size mainframes or HP E1405/06 Command Modules in a C-size mainframe. The driver implements the Standard Commands for Programmable Instrumentation (SCPI) command language. The B-size HP E1300/E1301 Mainframe has a bui lt in driver, or can use a downloa dable driver. The two driver s are slightl y differ ent and the diff erences are de tailed
in Chapter 5 — “HP E1330B Digital I/O Command Reference”. To use the HP E1330B with a C- size mainframe and command module, you
must use a downloadable dr iver. The downloadable driver name for the Digital I/O module is “DIG_IO”. The procedure for downloading the drivers is contained in the HP E1405B and HP E1406A Command Module User Guides.
Programming the Digital I/O Module
To program the Digital I/O module us ing SCPI commands, you will nee d to know the controller language and int erface a ddresses you will be using. See the HP 75000 Series B or Series C Installation and Getting Started Guide for detailed interface addressing and controller language information.
Note This discussion applies only to SCPI (Standard Commands for
Programmable Instruments ) programming. See Append ix B — “Digital I/O Register Information” for details on register addr essing. Do not mix SCPI programming and direct register access.
Getting Started 13Chapter 1
SCPI Command
Format Used in This
Manual
SCPI commands can be used in either long or short form. A long form example is:
DISPlay:MONitor ON
The same command, without the lower case letters, is the short form. For example:
DISP:MON ON
Either the long form or th e short for m commands ca n be used to perform the same result. The long and short forms can also be mixed within the same program code. The commands are case insensitive, either upper or lower case letters are accepted.
<> is a
Specifying SCPI
Commands
In the command examples shown above, the item enclosed in parameter required to use the command, however, do not include the brackets when sending the command. In this example, the parameter input can be replaced with any one of the following:
allowable values of the parameters are given in Chapter 5 — “HP E1330B Digital I/O Module Command Reference”. You must include at least one space between the keywords and the parameter.
Some commands are shown with items enclosed in square brackets ( These are implied or optional items that do not have to be included. For example, the complete command syntax listing for the first example is:
DISPlay:MONitor[:STATe] <0|1 or OFF|ON>
The item enclosed in brackets, [:STATe], does not have to be i ncluded for the command to work. Complete descr ip ti ons of the SCPI command language, syntax, parameter types, and usage are in Chapter 5 of this manual.
SCPI command s related to the Digital I/O module use three types of parameters to specify a port number, a bit number, or a multiple port combining operation. Each type is briefly described here. Descriptions and examples of usage can be found in Chapter 3 of this manual.
0, 1, OFF, or ON. The
Specifying a Port The Digi tal I/O module has four identical por ts numbered from 0 to 3. SCPI
commands that relate to a specific port use a special parameter to indicate the port number. For example:
[]).
[SOURce:]DIGital:DATAn <value>
This command writes the parameter portion of the the number the last character of the example, to set all port 2 data lines to logical zero, use the command:
[SOURce:]DIGital:DATA2 0
The value of n may vary for multiple port commands and operations. A description of multiple port commands is on page 15.
14 Getting Started Chapter 1
DATA keyword. Replace the n with the port number, making
<value> to the port specified by the n
DATA keyword without spaces. For
Specifying a Bit Each of the four ports on the module has eight bi-directional data lines,
corresponding to eight programmable data bits. Some SCPI commands allow you manipulate or read these bits individually. For example:
MEASure:DIGital:DATAn:BITm?
This command reads the state of a bit, specified by m, on port n. The result will be either 0 or 1, indica ting the current l ogical state of the bit. Replac e m with the desired bit number, and n with the desired port number, making each number the last characters of the spaces. For example, to read bit 7 on port 0, use the following command:
MEASure:DIGital:DATA0:BIT7?
For single ports, the value of m can range from 0 to 7. Some multiple port operations and commands may allow bit numbers to range from 0 to 31.
DATA and BIT keywords without
Specifying Multiple Port
Operations
The Digital I/O modul e all o ws you to set or read multiple ports or b its with a single command. For example:
MEASure:DIGital:DATAn[:type]?
This command uses an opti onal keyword, [:type], to specify how many ports are combined in a single re tur n ed val ue. T he l o wer cas e ke yword
[:type] is
replaced with one of a fixed set o f keywords. For exam ple, to read al l 4 ports (all 32-bits) as a single returned value, use the command:
MEASure:DIGital:DATA0:LWORd?
Keywords are provided to allow port combin ation s of 16- or 32-bits. Us ing multiple ports is described in more detail in Chapt er 4 of this manual.
Getting Started 15Chapter 1
Initial Operation
Use the following example t o verify init ial operati on. The example first sets and then queries the polarity of a logical true condition on the port 0 FLG line. The example uses an HP Ser ies 200/30 0 Computer with HP BASIC as the programming language. The computer is connected to an HP E1301 Mainframe using the Hewlet t-Packard Interface Bus (H P-IB)*. The HP -IB interface select code is 7, the HP-IB primary address is 09, and the HP-IB secondary address (used to specify the Digital I/O module) is 18. Refer to the B-Size Installation and Getting Started Guide for more details.
10 ASSIGN @Dio TO 70918 20 DIM Polarity$[3] 30 OUTPUT @Dio;"*RST" 40 OUTPUT @Dio;"*OPC?" 50 ENTER @Dio;Ready
60 OUTPUT @Dio;"SOUR:DIG:FLAG0:POL POS;*OPC?" 70 ENTER @Dio;Ready
80 OUTPUT @Dio;"SOUR:DIG:FLAG0:POL?"
90 ENTER @Dio;Polarity$ 100 IF Polarity$ <> "POS" THEN 110 DISP "Polarity Check ERROR" 120 PAUSE 130 ELSE 140 DISP"Polarity set to "&Polarity$ 150 END IF 160 OUTPUT @Dio;"SOUR:DIG:F LAG 0 :PO L NEG;*OPC?"
170 ENTER @Dio;Ready 180 OUTPUT @Dio;"SOUR:DIG:F LAG 0 :POL? "
190 ENTER @Dio;Polarity$ 200 IF Polarity$ <> "NEG" THEN 210 DISP "Polarity Check ERROR" 220 PAUSE 230 ELSE 240 DISP"Polarity set to "&Polarity$ 250 END IF 260 OUTPUT @Dio;"*RST" 270 OUTPUT @Dio;"*OPC?" 280 ENTER @Dio;Ready 290 END
!Sets an I/O path to the module.
!Reset the module. !Wait for the module to finish. !Hold here until command is finished.
!Set POSitive polarity. !Wait for finish.
!Query the polarity state. !Get the result. !Check the result. !Error discovered. !Pause on error.
!Set NEGative polarity. !Wait for finish.
!Query the polarity state. !Get the result. !Check the result. !Error discovered. !Pause on error.
!Restore the module. !Wait for the module to finish.
* HP-IB is Hewlett-Packard’s implementation of IEEE Std 488.1-1984.
16 Getting Started Chapter 1
Configuring the HP E1330B Digit a l I/O
Using This Chapter
Chapter 2
Module
This chapter shows how to configure the Digital I/O module for use in a VXIbus mainframe, connect peripheral devices, and configure the module for operation. Refer to Figure 2-1 for locations of jumpers and switches. This chapter contains the following sections:
Setting the Address Switch. . . . . . . . . . . . . . . . . . . . . . . . . . Page 18
Enabling Pull-ups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 19
Selecting the Interrupt Line. . . . . . . . . . . . . . . . . . . . . . . . . . Page 20
Combining the Flag Lines. . . . . . . . . . . . . . . . . . . . . . . . . . . Page 21
Digital I/O Module Peripheral Pinout. . . . . . . . . . . . . . . . . . Page 22
Configuring for Isolated Digital I/O . . . . . . . . . . . . . . . . . . . Page 25
Connecting to a GPIO Peripheral . . . . . . . . . . . . . . . . . . . . . Page 26
Using with External Pull-ups . . . . . . . . . . . . . . . . . . . . . . . . Page 28
Typical Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 29
Figure 2-1. HP E1330B Digital I/O Module
Configuring the HP E1330B Digital I/O Module 17Chapter 2
Setting the Address Switch
Refer to Figure 2-1. In the center rear of the module, next to the P1 connector, you will fi nd the logical address switch. It s factory sett ing is 144; rockers 4 and 7 a re closed, all othe rs are open. You can select the addr ess of
the Digital I/O module to any number 0–255 (d eci mal ). The defaul t se tt ing of the address switch is shown in Figure 2-2.
Note To be recognized as an instrument when you are using the Digital I/O
module in an HP E1300/1301 Mainframe or with an HP E1405 or E1406 Command Module, the logical address must be set to a multiple of 8.
Figure 2-2. Logical Address Switch Set at 144
18 Configuring the HP E1330B Digital I/O Module Chapter 2
Enabling Pull-ups
Note The jumper in the enabled posit ion does not add an i nput pull -up res isto r to
Referring to Figure 2- 1, no te the pull-up enable jumpers near the middle of each of the large ICs. The data lines of each port can be independently configured for either passive or active pull-up to TTL high levels. The factory-shipped condition is pull-up disa bled for all ports. The data lines may be either inputs or outputs. When the data lines are outputs, and the jumper is in the enabl ed position, the outputs are acti vely forced high. When the data lines are inputs, the jumper position makes no difference.
each data line, it enables a chip-internal pull-up network.
Each data line has an active resistive terminating network. The active circuitry ensures that when power is removed from the module, the data lines are not loaded. With power applied, the resistive terminating network is equivalent to that shown in Figure 2-3.
Figure 2-3. Equivalent Data Line Termination
Configuring the HP E1330B Digital I/O Module 19Chapter 2
Selecting the Interrupt Line
The VXI peripheral i nterrupt bus consists o f seven lines which can car ry the interrupt signal to th e commander. The most common li ne to be used is line one, as this is the usual default interrupt line. Many VXIbus commanders have a way to change the interrupt line they manage (for example, the E1405/06 has an interrupt line allocation table). When doing direct register-based programming, instead of using the SCPI driver, set the interrupt line to a line that is not used by the SCPI driver. Module interrupt priority can be established with these lines. In general, the higher the line number, the higher the priority.
Referring to Figure 2-1, near the P1 connector you will find two sets of jumper pins labeled X and 1 through 7 (JM15 and JM16). The Digital I/O module is factory-shipped with the interrupt set to 1. If you need to change the interrupt level you must move both jumpers on the blocks. Spare jumpers, used for combining the flag (FLG) lines, are stored on the unused ground pins of this connector when it ships from the factory.
Figure 2-4. Priority Interrupt Connector (Factory Setting)
Note The interrupt circuitry for the HP E1330B is implemented as release on
interrupt acknowledge (ROAK). The HP E1330B Digital I/O module will de-assert (or release) the interrupt request line during an interrupt acknowledge cycle.
The interrupt circuitry on the HP E1330A is implemented as release on register access (RORA). The HP E13 30A Di gital I/O module will cont inu e to assert the interrupt request line until the Port Control/Status Register on the Digital I/O module is accessed.
Both the HP E1330A and HP E1330B may be used with the HP E1300A/ E1301A and with the HP E1405A/B and HP E1406A. If you are using HP Compiled SCPI (i.e., HP E1570A), you must use the HP E1330B.
20 Configuring the HP E1330B Digital I/O Module Chapter 2
Combining the Flag Lines
Each port contains a Flag Line, labeled FLG, that can be use d to implement a handshake scheme with a peripheral. For single port operations, the FLG lines can be used in the factory default setting (no flag lines combined) to handshake with a peripheral. For multi-port operations with a single handshake line, you can combine the flag line from multiple ports. The combined flag lines are physically tied together. An ac tion on any of the combined flag lines performs that action for all combined flag lines.
Figure 2-5 shows the locations of the flag combining switches and how to set them. Before setting any flag combine switches, you may wish to read the discussion regarding allowable port combinations and handshaking in Chapter 4 of this manual.
Note When using FLG and CTL for handshaking on multiple port operations,
CTL is set for each port sequentially, beginning at the lowest numbered port.
Figure 2-5. Flag Combine Switches
Configuring the HP E1330B Digital I/O Module 21Chapter 2
Digital I/O Module Peripheral Pinout
Figure 2-6 shows pinouts for the Digital I/O module connectors. Each is compatible with easy cr imp connections to ri bbon cables for standar d digital I/O interfacing. Figure 2-7 shows the data line location on the supplied ribbon cables. Figure 2-8 shows how to connect the cables. Detail s about the
functioning of these pins i s covered in Chapt er 4 — “Understandin g the HP E1330B Digital I/O Module but line names are as follows:
RES
STS Status Line - used as an auxiliary hand shake line. Input
PIR Peripheral Interrupt Line - used to si gnal a peripheral
FLG Flag Line - used to handshake data between a
CTL Control Line - used to handshake data between a
I/O
Reset Line - used to res et a peripheral. Output from the
Digital I/O module.
to the Digital I/ O module.
interrupt. Input to the Digital I/O module.
peripheral and the Digital I/O module. Controlled by the peripheral. Input to the Digital I/O module.
peripheral and the Digital I/O module. Controlled by the Digital I/O module. Output from the Digital I/O module.
Input/Output Line - used to establish input or output on a port. Controlled by the Digital I/O module. Input to the Digital I/ O module.
22 Configuring the HP E1330B Digital I/O Module Chapter 2
Figure 2-6. J1 and J2 Connector Pinouts
Configuring the HP E1330B Digital I/O Module 23Chapter 2
Figure 2-7. Data Line Location on Ribbon Cables
Figure 2-8. Connecting the Digital I/O Cable
24 Configuring the HP E1330B Digital I/O Module Chapter 2
Configuring for Isolated Digital I/O
The two Digital I/O module per iph era l connectors, J1 and J2, each have 60 pins. An industry standar d isolated di gital I/O peri pheral, like the Opto 22
16 Position Single Channel Mounting Rack, is a 50-pin connection. The connector is either a card edge or a header connector (similar to J1 on the
Digital I/O module). For exa m ple, the Opto 22 edge connector; PB16H uses a header connector. They both have the same pin-out for the ribbon ca ble. Both can accommodate up to 16 single chann el I/O lines.
12 of the wires on the supplied ribbon cable are not connected. Figure 2-8 shows the ribbon cable connect ions. The method of connection to the ribbon cable can be faci lit ated by the use of sp ecial ty f ixtur es fo r th ese connec tors , but there is no standard for connector keys or spacing.
For the Opto 22
Pins 27–57 on the ri bbon cable, od d numbered pins on ly, correspo nd to pins 17–47 on the Opto 22 connect pins 1 and 49 on the Opto 22
Procedure 1. Carefully cut lines 1-11 on the ribbon cable and line 59. A tan wire
should be the first wire on the ribbon cable after you make the cut.
rack, lines 1–10 are not used on th e peripher al conne ctor.
rack. All even numbered pins are ground. Do not
rack, PB16C, uses a card
rack connector.
2. Select the 50-pin connector you need , either edg e connecto r or heade r connector and attach the ribbon cable.
3. Connect the ribbon cable to the Opto 22 digital operation.
Opto 22 is a registered trademark of Opto 22, Huntington B each, CA 92649
rack for optically isolated
Configuring the HP E1330B Digital I/O Module 25Chapter 2
Connecting to a GPIO Peripheral
The GPIO interface is a widely used standard parallel interface for connecting computers to peri pherals. The GPIO interface may em ploy up to 32-bits of bi-directional data transfer. The Digital I/O module and the GPIO interface have identical line definitions but diff erent pin assignments. Ports A-D on the GPIO are defined as ports 0-3 on the Digital I/O module.
Procedure 1. Connect the ribbon cable to connector J1 and/or J2 on the Digi ta l I/O
module.
2. Connect the wires on the ribbon cable to the peripheral as described in Table 2-1 for the GPIO interface.
Figure 2-9. Typical Isolated Peripheral Hookup
26 Configuring the HP E1330B Digital I/O Module Chapter 2
Table 2-1. Digital I/O Pinout to GPIO Pinout
Port 0
Digital I/O GPIO
Connector J1 J2 Connector J1 J2
Name Pin # Pin# Name Pin# Pin#
D00 D01 D02 D03 D04 D05 D06 D07
RES0
STS0
PIR0 FLG0 CTL0
I/O0
Connector J2 J1 Connector J2 J1
43 45 47 49 51 53 55 57
5
9 13 17 21 25
Port 2
Digital I/O GPIO
33 15 34 16 35 17 36 18 12 26
9 27 13 31
D10 D11 D12 D13 D14 D15 D16
D17 RES1 STS1
PIR1
FLG1
CTL1
I/O1
Port 1
Digital I/O GPIO
27 29 31 33 35 37 39 41
3
7 11 15 19 23
Port 3
Digital I/O GPIO
22 21 20 19
29 25 30
11
4 3 2 1
8 7
Name Pin # Pin# Name Pin# Pin#
D20 D21 D22 D23 D24 D25 D26 D27
RES2
STS2
PIR2 FLG2 CTL2
I/O2
For the Digital I/O connectors, all even numbered pins are ground.
For the GPIO connector, pins 5, 6, 10, 14, 23, 24, 28 and 32 are ground.
43 45 47 49 51 53 55 57
13 17 21 25
33 15 34 16 35 17 36
18 5 9
12
26
9 27 13 31
D30 D31 D32 D33 D34 D35 D36
D37 RES3 STS3
PIR3
FLG3
CTL3
I/O3
27 29 31 33 35 37 39 41
11 15 19 23
4
22
3
21
2
20
1
19 3 7
29
8
25
7 30 11
Configuring the HP E1330B Digital I/O Module 27Chapter 2
Using with External Pull-ups
The Digital I/O module data lines can be used in an open collector configuration. Connections for open collector require the use of external power supplies and pull-up resistors. The internal pull-up mode of the Digital I/O module should be d isabled for open collecto r output. Figure 2-10 shows a single data line connection. The value of the pull-up resistor is calculated as follows:
Vcc 5.0 Vdc=
Imax Iout
Vcc
----------- -
R
Imax
The value of TTL high with the 200 Ω pull-up resistor is calculated as follows:
V
High
Vcc
safety_factor× 48mA 0.52× 25mA===
Low
5
------------ -
0.025
-------------------------- -
× 4.84Vdc==
6200 200+
200== =
6200
Figure 2-10. T ypical Open Collector Data Line
28 Configuring the HP E1330B Digital I/O Module Chapter 2
Loading...
+ 126 hidden pages