Agilent E1458A Users Guide

Contents
HP E1458A Digital I/O Module User’s Manual
Warranty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
WARNINGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Safety Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Declaration of Conformity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Reader Comment Sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Chapter 1. Getting St ar te d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Using Thi s C h a pter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Instrument Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Downloading the SCPI Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Programming th e Digital I/O Module . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
SCPI Command F ormat Used in this Manua l . . . . . . . . . . . . . . . . . . . . . 14
Specifying SCPI Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Initial Opera ti on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Chapter 2. Configuring the HP E1458A Digi tal I/O Mod ule . . . . . . . . . . . . . . . . . 19
Using Thi s C h a pter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
WARNINGS and CAUTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Setting the Address Switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Setting the Interrupt Priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Enabling the Data Line Pull-up Network . . . . . . . . . . . . . . . . . . . . . . . . . 22
Combining the Flag Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Installing t he HP E1458A Digita l I/O Module in a Mainframe . . . . . . . . . . . . . . 25
Connecting to Peripheral Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Configuring for Isolated Digital I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Chapter 3. Using the HP E1458A Digital I/O Module . . . . . . . . . . . . . . . . . . . . 31
Using Thi s C h a pter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Port Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Data Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
The FLG Line (Input) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
The CTL Line (Output) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
The I/O Line (Out put) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
The STS Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
The PIR Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
The RES Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
The UTS Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Addressing the Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Operation Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Default & Reset States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Setting the Polarity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Using the Handshake Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Handshake Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Handshake Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Input/Output of Data Bytes and Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
HP E1458A Digital I/O Module User’s Manual Contents 1
Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Multiple-Port Oper a t i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Multiple-Port Handsha ki ng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Multiple-Port Input/Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Using the UTS Control Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Static Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Active Configur ation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Using as an Open Collector Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Program Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Checking Data Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Setting Polarity and Handshake . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Using Trace Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Chapter 4. HP E1458A Command Refere nce . . . . . . . . . . . . . . . . . . . . . . . . 59
DISPlay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
DISPlay:MONitor:PORT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
DISPlay:MONitor:PORT? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
DISPlay:MONit or[:STATe] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
DISPlay:MONit or[:STATe]? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
MEASure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
MEASure:DIGital:DATAn[:type][:VALue]? . . . . . . . . . . . . . . . . . . . . . 68
MEASure:DI Gital:DATAn[:type]:BITm? . . . . . . . . . . . . . . . . . . . . . . . 69
MEASure:DI Gital:DATAn[:type]:TRACe . . . . . . . . . . . . . . . . . . . . . . 71
MEASure:DI Gital:FLAGn? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
MEMory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
MEMory:DELete:MACRo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
MEMory:VME:ADDRess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
MEMory:VME:ADDRess? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
MEMory:VME :SIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
MEMory:VME :SIZE ? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
MEMory:VME:STATe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
MEMory:VME:STATe? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
[SOURce:] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
[SOURce:]DIGital:CONTroln:POLa ri ty . . . . . . . . . . . . . . . . . . . . . . . 81
[SOURce:]DIGital:CONTroln:POLa ri ty? . . . . . . . . . . . . . . . . . . . . . . . 82
[SOURce:]DIGital:CONTroln[:V A Lue] . . . . . . . . . . . . . . . . . . . . . . . . 82
[SOURce:]DIGital:CONTroln[:V A Lue] ? . . . . . . . . . . . . . . . . . . . . . . . 83
[SOURce:]DIGital:DATAn[:type]:BITm . . . . . . . . . . . . . . . . . . . . . . . 83
[SOURce:]DIGital:DATAn[:type]:BITm? . . . . . . . . . . . . . . . . . . . . . . 85
[SOURce:]DIGital:DATAn[:type]:BITm:MONitor ? . . . . . . . . . . . . . . . . . 86
[SOURce:]DIGital:DATAn[:type]:HANDshake:DEL ay . . . . . . . . . . . . . . . 87
[SOURce:]DIGital:DATAn[:type]:HANDshake:DEL ay? . . . . . . . . . . . . . . 89
[SOURce:]DIGital:DATAn[:type]:HANDshake[:MODE] . . . . . . . . . . . . . . 90
[SOURce:]DIGital:DATAn[:type]:HANDshake[:MODE]? . . . . . . . . . . . . . 91
[SOURce:]DIGital:DATAn[:type]:MONitor? . . . . . . . . . . . . . . . . . . . . 92
[SOURce:]DIGital:DATAn[:type]:POLarity . . . . . . . . . . . . . . . . . . . . . 94
[SOURce:]DIGital:DATAn[:type]:POLarity? . . . . . . . . . . . . . . . . . . . . 95
[SOURce:]DIGital:DATAn[:type]:TRACe . . . . . . . . . . . . . . . . . . . . . . 96
[SOURce:]DIGital:DATAn[:type][ :VALue] . . . . . . . . . . . . . . . . . . . . . 97
[SOURce:]DIGital:DATAn[:type][:VALue]? . . . . . . . . . . . . . . . . . . . . . 99
[SOURce:]DIGital:FLAGn:POLarit y . . . . . . . . . . . . . . . . . . . . . . . . . 100
2 HP E1458A Digit al I/ O Module User’s Man ual Cont ents
[SOURce:]DIGital:FLAGn:POLarity? . . . . . . . . . . . . . . . . . . . . . . . . 100
[SOURce:]DIGital:HANDshaken:DELa y . . . . . . . . . . . . . . . . . . . . . . . 101
[SOURce:]DIGital:HANDshaken:DELa y? . . . . . . . . . . . . . . . . . . . . . . 102
[SOURce:]DIGital:HANDshaken[:MODE] . . . . . . . . . . . . . . . . . . . . . . 103
[SOURce:]DIGital:HANDshaken[:MODE]? . . . . . . . . . . . . . . . . . . . . . 104
[SOURce:]DIGital:IOn? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
[SOURce:]DIGital:TRACe:CATalog? . . . . . . . . . . . . . . . . . . . . . . . . . 105
[SOURce:]DIGital:TRACe[:DATA] . . . . . . . . . . . . . . . . . . . . . . . . . 105
[SOURce:]DIGital:TRACe[:DATA]? . . . . . . . . . . . . . . . . . . . . . . . . . 106
[SOURce:]DIGital:TRACe:DEFine . . . . . . . . . . . . . . . . . . . . . . . . . . 106
[SOURce:]DIGital:TRACe:DEFine? . . . . . . . . . . . . . . . . . . . . . . . . . 107
[SOURce:]DIGital:TRACe:DELete[:NAME] . . . . . . . . . . . . . . . . . . . . . 107
[SOURce:]DIGital:TRACe:DELete:ALL . . . . . . . . . . . . . . . . . . . . . . . 107
STATus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
STATus:OPE Ra tion:CONDition? . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
STATus:OPERation:ENABle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
STATus:OPERation:ENABle? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
STATus:OPE Ra tion[: EVENt]? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
STATus:PRESet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
STATus:QUEStionable:CONDition? . . . . . . . . . . . . . . . . . . . . . . . . . 109
STATus:QUEStionable:ENABle . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
STATus:QUEStionable:ENABle? . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
STATus:QUEStionable[:EVENt]? . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
SYSTem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
SYSTem:CDEScription? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
SYSTem:CTYP e? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
SYSTem:ER Ror? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
SYSTem:VERSion? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
IEEE 488.2 Common Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Command Quick Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Appendix A. Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Appendix B. HP E1458A Register Information . . . . . . . . . . . . . . . . . . . . . . . . 119
Using This Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Addressing the Regi st ers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
The Base Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Register Offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Reset and Register s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Register Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Register Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Manufacturer Identification Register . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Device Ident i fication Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Card Status/Control Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Card Interru pt St at us Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Port Interrupt Control Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Port Transfer Control Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Port Control /Status Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Port Data R eg ister . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Port Handshake Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Port Delay Regist er . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Port Norma li za tion Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
HP E1458A Digital I/O Module User’s Manual Contents 3
Port State Sense Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
A Register- Bas ed Ou tpu t Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
A Register- Bas ed Input Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Programming Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Appendix C. HP E1458A Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
4 HP E1458A Digital I/O Module User’s M anual Cont ents
Certification
Hewlett-Pac kard Compa ny certif ies that this product met its published spec ifica tion s at the time of shipment from the factory. Hewl et t ­Packard fur th er cer tif ies that its cal ib rati on me asu re ment s are trace abl e to the Unite d Stat es Nation al Instit ut e of Stand ard s and Tech­nology (for mer l y Nati onal Bur ea u of Sta ndar ds ), to the exte nt allo wed by that orga ni zati on’ s cal ib rat ion f ac ili t y, and t o the c alibrati o n facilities of ot her Inte rna tional Standards Organiz at i on memb er s.
Warranty
This Hewlett-Packard product is warranted against defects in materials and workmanship for a period of three years from date of ship­ment. Duratio n and conditi ons of warr ant y for thi s produ ct m ay be sup erse ded when t he product is int egrat e d into (becom e s a part of) other HP produc ts. During the warran ty perio d, Hewl ett -Pa ck ar d Com pa ny will , at its optio n, either repai r or repl ac e produc t s whi ch prove to be defective.
For warrant y servic e or repai r, thi s produc t must be retur ned to a service faci lity de sign at ed by Hewlet t-P ac kard (HP ). Buyer sha l l pre­pay shipping cha rges to HP and HP shall pay shipping c harge s to retu rn the product to Buyer. However, Buye r shall pay all shi ppi n g charges , dut ies, and ta xe s for produc t s ret urn ed to HP fr om an ot her count ry.
HP warrants that its software and firmware designated by HP for use with a product will execute its programming instructions when properly insta lle d on that produc t. HP does not wa rrant that the oper ati on of the pro duc t, or softwa re , or firm war e will be uninterrupted or er ror free .
Limitation Of Warranty
The foregoing war ra nty sh all not apply to de fect s resul ting from imprope r or inadequate mainte nan ce by Buyer, Buye r-sup pl ied pr od­ucts or interfacing, unauthorized modification or misuse, operation outside of the environmental specifications for the product, or im­proper site pr ep ar at ion or ma int ena nce.
The design and imple men ta tio n of any circui t on this produc t is the sole respon sibi l ity of the Buyer. HP does not war rant the Buye r’s circuitry or malf unc tion s of HP products that result from the Buyer’ s circui try . In addition, HP does not warra nt any dama ge tha t oc­curs as a result of the Buyer’s circui t or any defects that resul t from Buyer-supplied pr oducts.
NO OTHER WARRANTY IS EXPRESSED OR IMPLIE D. HP SPECIFICALLY DI SCLAI MS THE IMPLI ED W ARRANTIE S OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Exclusive Remedie s
THE REMEDIES PROVIDED HEREIN ARE BUYER’S SOLE AND EXCLUSIVE REM EDI ES. HP SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER BASED ON CON­TRACT, TORT, OR ANY OTHER LEGAL THEORY.
Notice
The inform at i on c ont ained in this docum en t is subj ec t to chan ge wi t hout not i ce . HEWL E TT- P AC KARD (HP) MAKES NO WAR­RANTY OF ANY KIND WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIM ITE D TO, THE IMPLI ED WAR­RANTIES OF MERCHANTABILITY AND FITNES S FOR A PARTICULAR PURPOSE. HP shall not be liable for errors contained herein or for inci de nt al or consequential dam ag es in conne cti on wi t h the furni s hi ng, per fo rma nce or use of this materi al . This doc u­ment contains proprietary information which is protected by copyright. All rights are reserved. No part of this document may be photo­copied, repr oduc ed , or transl ate d to anothe r lan gua ge wi thout t he prior wr itten cons en t of Hewlet t-P ac kar d Compa ny. HP assume s no respons ibility for th e us e or reli ability of i t s so ftw ar e on equipme nt th at is not fur ni shed 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 sof t ware" as defined in DFARS 252.227- 7013 (Oct 1988), DFARS 252.211-7015 (May 1991) or DFARS 252.227-7014 (Jun
1995), as a "commerci al item " as define d in FAR 2.101(a) , or as "Restric ted com puter softwar e" as defin ed in FAR 52.22 7-19 (Jun
1987)(or any equivalent agency re gulation or contract clause), whic hever is appli cable. You have only th ose rights provided for s uch Software and Documentation by the applicable FAR or DFARS clause or the HP standard software agreement for the product involved.
HP E1458A 96-Cha nne l Digit al I/O Module User’s Manua l
Copyrigh t © 1996 He wlett-Packa rd Com pan y. All Rig ht s Reser ve d.
Edition 2
HP E1458A 96-Channel Digital I/O Module User’s Manual 5
Documentatio n History
All Editions and Updates of this manual and their creation date are listed below. The first Edition of the manual is Edition 1. The Edi­tion number increm ents by 1 whenever the manua l is revised . Updates, whic h are issued betwee n Edit ions , contain repl a cem ent pa ges 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 inf orma t io n for the previ ou s Edi ti on. Each new Ed iti on or Upda te also incl ude s a revis ed c opy of this doc um en tat io n hi s­tory page.
Edition 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . October 1993
Edition 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . July 1996
Safety Symbols
Instruction manual sym bol affixe d to prod­uct. Indicates that the user must refer to the manual for specific WARNING or CAU­TION information to avoid personal injury or dama ge t o t he pr o du ct .
Indicates the field wiring terminal that must be connec ted t o eart h groun d bef or e opera t ­ing the equipment—protects against electri­cal sho ck in ca se of fault.
Fram e or cha ss is gro und t er m i nal — ty pi -
or
cally connects to the equipment’s metal frame.
WARNING
CAUTION
Alternating curre nt (AC) .
Direct curr en t (DC).
Indicates hazardous voltages.
Calls at te nt i on t o a pr oce dure, prac tice, or condit ion t hat co ul d ca use bodi l y inj ury or death.
Calls at te nt i on t o a pr oce dur e, pr ac ti c e, or c on ­dition t hat co ul d pos sibl y ca us e da m age to equipment or permanent loss of data.
WARNINGS
The following ge ner al safet y prec aut io ns mus t be obse rv ed du ring al l phas es of operati on , servi ce , and repai r of this prod uct . Failure to compl y with thes e pr ecaut i ons or with spec i fic warni ngs elsewhe re in this manua l violat es safety stand ard s of desig n, manufactur e, and inten ded use of the produc t. Hewl ett- Pac kar d Com pan y assum es no lia bi lit y for the custo mer’ s fai lure to comply with these requirements.
Ground the e qui pm en t: For Saf ety Class 1 equipme n t ( equipment ha ving a protec t ive earth t er m i nal ) , a n uni nterruptible sa fety eart h
ground must be provide d from the ma in s power sour ce to the prod uct input wi ring ter m inal s or suppli ed power cable .
DO NOT operat e the pr oduc t in an expl os ive atmo sph er e or in the pres en ce of flammabl e gase s or fume s.
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: Operati ng pers onne l must not re move equi pm e nt cover s or shiel ds . Proc ed ure s invo lv in g the rem ova l of covers or shi el ds are for use by se rv ic e- t ra ined personnel only. Under certain conditi ons , dangerous voltages m ay exist even with the equipment switc hed off. To avoid dange rous e lectr ical shock , DO NOT perform proc edu res involvi ng cover or shield removal unless you are qualified to do so.
DO NOT operate damaged equipment: Whene ver it i s possi bl e that the sa fe ty prot e ct ion fe at ur es buil t int o thi s product have been im ­paired, eithe r through phys ical da m age , exces sive mois ture , or any other reas on, REMOVE POW E R and do not use the produc t unt il safe operation can be verifie d by serv ice-t ra ined pers onn el. If necessary, return the produ ct to a Hewlett -Pac kar d Sales a nd Se rvice Of­fice 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 resus ci t at i on, is pr esent.
DO NOT substitute parts or modify equipment: Becaus e of the da nge r of intr oduc ing ad di tion al hazar ds , do not inst al l subs tit ute parts or perform any unaut hor ized modi ficat io n to the produc t. Retur n the produ ct to a Hewlet t-P ac kard Sa les and Se rvic e Offi ce for service and repair to ensure that safety features are maintained.
6 HP E1458A 96-Channel Digital I/O Module User’s Manual
Declaration of Conformity
according to ISO/IEC Guide 22 and EN 45014
Manufacture r ’s Name : Hewlett-Pa ck ard Com pa ny
Lovela nd M a nufacturi ng Ce nt er
Manufacture r’s Addre s s: 815 14th Stre et S.W .
Loveland, Colorado 80537
declares, that the produc t:
Product Name: 96-Channe l Digita l I/O Modul e
Model Number: HP E1458A
Product Options: All
conforms to the followi ng Produc t Spe cific ati ons:
Safety: IEC 1010-1 (1990) Incl . Amend 1 (1992) /E N610 10 (1993)
CSA C22.2 #1010.1 (1 992) UL 1244
EMC: CISPR 11:1990/ EN5 5011 (1991): Group 1, Class A
IEC 801-2:1991/ E N5008 2-1 (1 992) : 4kVCD, 8k VA D IEC 801-3:1984/ E N5008 2-1 (1 992) : 3 V/m IEC 801-4:1988/ E N5008 2-1 (1 992) : 1kV Power Lin e 5kV Signal Lines IEC 801-5 (Draft 1992): 1kV
Supplementar y Informa tio n: The pr oduc t her ewi th compl ie s wit h th e requ ire m e nts of the Low Volt ag e Di re ctive 73/23/EE C and the E MC Directive 89/336/EEC.
Tested in a typic al confi gur at ion in an HP C-Size VXI mainfr am e .
October 8, 1993 Jim White, QA Manage r
European c ont act : You r loca l He wle tt-Packard Sale s a nd Se rvi ce Offi c e or Hewl et t- Pac ka rd GmbH, De partm e nt HQ-TRE, Herren be rge r Straß e 130, D-71034 Böbl in gen, Germa ny (FAX +49- 7031 -14- 3143 ).
HP E1458A 96-Channel Digital I/O Module User’s Manual 7
Notes
8 HP E1458A 96-Channel Digital I/O Module User’s Manual
Please fold and tape for mailing
Reader Comme nt She et
HP E1458A 96-Channel Digital I/O Module User’s Manual
Edition 2
You can help us impr ove our ma nua ls by shari ng you r comm ent s and sugg est ion s. In appreciat ion of your time, we will enter you in a quarterly drawing for a Hewlett -Pac kar d Palmt op Per sonal Computer (U.S. government e mployees
are not eligible for the drawing).
Your Name
Company Name
Job Title
Address
City, State/Province
Country
Zip/Postal Code
Telephone Number with Area Code
Please list the system c ontr olle r, oper ati ng syste m, pro gramm ing langua ge, and plug-i n modul es you are using.
fold here
UNITED STATES
BUSINESS REPLY MAIL
FIRST CLASS PERMIT NO. 37 LOVELAND, CO
HEWLETT-PACKARD COMPANY
cut along this line
Measurement Systems Division
Learning Products Department P.O. Box 301 Loveland, CO 80539-9984
NO POSTAGE
NECESSARY
IF MAILED
IN THE
fold here
Please pencil-in one circle for each stateme nt below: Disagree Agree
The docum entation is well organized. OOOOO
Instructions a re easy to unde rsta nd. OOOOO
The documentation i s cle arly written. OOOOO
Examples are cle ar and usef ul. OOOOO
Illustra tions ar e cle a r and he lp ful . OOOOO
The documentation meets my overall expectations. OOOOO
Please write any comments or suggestions below--be spe c ific.
10 HP E1458A 96-Channel Digita l I/O Modu le User’s Man ual
Using This Chapter
This chapter describes the HP E1458A 96-Channel Digital I/O Modu le and how to program the module usin g SCPI (Standard Comm ands fo r Programmable Instruments) comm ands. This chapter contains the followi ng sections:
Digital I/O Module Description. . . . . . . . . . . . . . . . . . . . . . . Page 11
Instrument Definition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 14
Downloading the SCPI Drivers. . . . . . . . . . . . . . . . . . . . . . . Page 14
Programming the Digit al I/O Module . . . . . . . . . . . . . . . . . . Page 14
Initial Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 16
Digital I/O Module Description
The HP E1458A 96-Chann el Digital I/O Module (re ferred to as the "digital I/O modul e") is a 12-port digital input/output mod ule intended for data communication and digital control in electronic environments. The digital I/O module is compatible with TTL levels (0-5V) and CMOS levels (using an external pull-up). The digital I/O module complies with VXIbus (VMEbus Extensions for Instrumentation) definitions for the P1 and P2 bus connectors on C-sized modules. A jumper on the module sets the VXIbus interrupt level.
Chapter 1
Getting Started
Each port is identical and consists of seven control lines and eight data lines. There are eight registers for control and sta tus on each port. In addition, the module has Manufacturer ID, Device ID, Module Status/Control and Interrupt Status registers. Figure 1-1 shows the locations of the ports and a simplified diagram of a single port. Of the se ven control line s, three (I/ are used with SCPI commands, three ( through register access and one, UTS, can be used to force all data lines into a three-state mode. Chapter 3, "Using the HP E1458A Digital I/O Module," contains detailed descriptions of these lines.
Each port has two hardware configuration switches. On e s w it ch all o ws y o u to connect the flag lines together for multiport data transmission. Another switch selects either active pull-up or passive pull-up to TTL compatible levels on th e d a t a l i n es . C hapter 2, "Configurin g the HP E1458A Digit al I/O Module," desc ribes how t o set thes e swit ches.
SCPI commands provided for the digit al I/O module allow op eration in 8-bit “BYTE” format, 16-bit “WORD” format (using two ports), 32-bit “LWORd” format (using four ports), 64-bit “LW64” format (using eight ports), and 96-bit “LW96” format (using all ports).
RES, STS, and PIR) are controlled
O, CTL, and FLG)
Chapter 1 Getting Started 11
Figure 1-1. HP E1458A Digital I/O Module
12 Getting Started Chapter 1
Table 1-1. Data Lines
8-bit (BYTE) Operations
Port 01234567891011 Bit Numbers 7 — 0 7 — 0 7 — 0 7 — 0 7 — 0 7 — 0 7 — 0 7 — 0 7 — 0 7 — 0 7 — 0 7 — 0
16-bit (WORD) Operations
Port 0246810 Bit Numbers 15 — 8 7 — 0 15 — 8 7 — 0 15 — 8 7 — 0 15 — 8 7 — 0 15 — 8 7 — 0 15 — 8 7 — 0
32-bit (LWORd) Operations
Port 048 Bit Numbers 31—24 23 —16 15— 8 7—0 3 1—24 23—16 15—8 7—0 31—24 23—16 15—8 7— 0
64-bit (LW64) Operations
Port 0891011 Bit Numbers 63—56 55—48 47—40 39—32 31—24 23—16 15—8 7—0 7 — 0 7 — 0 7 — 0 7 — 0
96-bit (LW96) Operations
Port 0 Bit Numbers 95—88 87—80 79—72 71—64 63—56 55—48 47—40 39—32 31—24 23—16 15—8 7—0
Table 1-1 shows the mappin g of b it numbers from the 8-bit ports to t he 16 -, 32-, 64-, and 96-bit ports. Chapter 4, "HP E1458A Co mmand Re ference," describes each command in detail and Chapter 3, "Using the HP E1458A Digital I/O Module," gives some examples of the use of SCPI commands.
Connections are made through 64-pin header connectors. Each connector contains connections for three ports as shown in Figure 1-1. Four cables with the 64-pin header installed are included with the HP E1458A mod ule.
®
Additional cable sets and special Opt o22
cables can be ordered from Hewlett-Packard. (Contact your Hewlett-Packard Sales office.) The cable part numbers are shown below. Additional details about these cables are given in Chapter 2, "Configuring the HP E1458A Digital I/O Module."
HP Part Number Description
E1458-6160 1 Four 2-meter cables, 64 -pin he ader s to unt ermina te d
E1458-61604 (HP E1458A Option 022)
flat ribbon cable
Two 1.5-meter cable s, two 64 -pin he ader s to three 50-pin headers for Opt o22
®
connections.
Chapter 1 Getting Started 13
Instrument Definition
Each HP E1458A Digital I/O Module ins talled in an HP mainfram e is treated as an independent instrument, having a unique secondary HP-IB address. Each instrument is also assigned a ded icated error queue, input and output buffers, status registers and, if applicable, dedicated mainframe memory space for readings or data. Multiple digital I/O modules cannot be combined into a single instrument .
Downloading the SCPI Drivers
The digital I/O driver allows the HP E1458A mod ule to operate with an HP E1405B or E1406 Comm and Mod ule usin g the Stand ard Comm ands f or Programmable Instruments (SC PI) co mman d language. The drive r name for the digital I/O module is “DIG_IO”.
The procedure for downloading the drivers is contained in the Downloadi ng
SCPI Device Drivers Installation Note supplied with the module. T he C-Size VXIbus Systems Configurat ion Gui d e also contain th e installati on
procedure.
Programming the Digital I/O Module
To program the digital I/O module usi ng SC PI, you must select the controller language, inte rface address, and SCPI commands. Guidelines for SCPI command selection for the digital I/O mod ule are covered in this manual. See the C-Size VXIbus Systems Configuration Guide for detailed interface addressing and controller language information .
Note This discussion appli es only to SCPI (Standard Com mand s for
Programmable Instrumen ts) programm ing. See "Register D escrip tion s" in Appendix B for details on register addressing. Do not mix SCPI programming and direct register access.
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 lowercase letters, is the short form. For example:
DISP:MON <ON>
14 Getting Started Chapter 1
Either the long form or the short form commands can be used to perform the same result. The long and short forms can also be mix ed within the same program code. The commands are case insensitive; either upper- or lowercase letters are accepted.
In the command examples sh own above, the item enclosed in angle brackets
< >) is a parameter required to use the command. In this example, the
( parameter input can be replaced with any one of the following:
ON. The allowable values of the parameters are given in Chapter 4, "HP
0, 1, OFF, or
E1458A Command Reference." You must be sure to include a space between the SCPI keyword and any parameters.
Some commands are shown with item s enclosed in square brackets (
[ ] ).
These are implied or optional items that do not have to be included. Fo r example, the complete command syntax listin g for the first example is:
DISPlay:MONitor [:ST ATe] <0|1 or OFF|ON>
The item enclosed in brackets, [:STATe], does not have to be included for the command to work.
Complete descriptions of the SCPI command language, syntax, parameter types, and usage are in Chapter 4 of this manual.
Specifying SCPI
Commands
SCPI commands related to the HP E1458A Digital I/O Modu le 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.
Specifying the Port The digital I/O module has twelve identical ports numb ered from 0 to 11.
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 <value> to the port specified by the n portion of t h e
DATA parameter. Replace the n with the po rt number, making the num be r
the last characters of the
DATA keyword without spaces. For example, to set
all port 2 data lines to logical zero, use the following command:
[SOURce:]DIGital:DATA2 0
The value of n may vary for multiple-port comm ands and operation s. A description of multipl e-port command s follows later in this chapter.
Specifyin g a Bit Each of the twelve ports on the digital I/O mod ule has ei ght bi -di rectional
data bits. Some SCPI commands allo w you to man ipul ate or read thes e bits individually. For example:
MEASure:DIGital:DATAn:BITm?
Chapter 1 Getting Started 15
This command reads the state of a bit, specified by m, on port n. The result of the command will be either 0 or 1, indicating the current state of the bit. Replace m with the desired bit number, an d n with the desired port number, making each number the last characters of the
DATA and BIT keywords
without spaces. For exampl e, to read the state of bit 7 on port 0, use the following command:
MEASure:DIGital:DATA0:BIT7?
For single ports, th e valu e of m can range from 0 to 7. Some multiple port operations and commands may allow bit numbers to range from 0 to 95.
Specifying Multiple-
Port Operations
Initial Operation
The digital I/O module allows you to set or read multiple po rts or bits with a single comman d. For exam ple:
MEASure:DIGital:DATAn[:type]?
This command uses an optional keyword [:type] to specify how many ports are combined in a single returned value. The lowercase keyword
[:type] is
replaced with one of a fixed set of keywords. For example, to read all 12 ports (all 96 bits) as three returned values, use the command:
MEASure:DIGital:DATA0:LW96?
Keywords are provided to allow port combinations of 16, 32, 64, or 96 bits. Using multiple port s is described in more detail in Chapter 3 of this manual.
Use the following example to verify initial op eratio n. The example sets and then queries the polarity of a logical true conditi on on th e port 0 FLG line.
The example uses an HP Series 200/30 0 Comput er with HP BASIC as the programming language. The computer is connected to an HP 1406A Command Module in the C-Si ze VXIbus cardcage using the Hewlett-Packard Interface Bus (HP-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 C-Size VXIbus Systems Configurat ion Gui d e for more details about programming languages and interfaces.
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 PO S; *OP C? "
Continued on next page.
! Set POSitive polarity.
16 Getting Started Chapter 1
70 ENTER @Dio;Ready ! Wait for f inish. 80 OUTPUT @Dio;"SOUR: DIG
:FLAG0:POL?"
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; "SO UR: DIG
:FLAG0:POL NEG;*O PC?"
170 ENTER @Dio;Ready ! Wait for finish. 180 OUTPUT @Dio; "SO UR: DIG
:FLAG0:POL?"
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" 270 OUTPUT @Dio; "*O PC?" ! Wait for the module to finish. 280 ENTER @Dio;Ready ! 290 END
! Query the polarity state.
! Set NEGative polarity.
! Query the polarity state.
! Restore the card.
Chapter 1 Getting Started 17
Notes
18 Getting Started Chapter 1
Configuring the HP E1458A Digital I/O
Using This Chapter
This chapter shows how to configure the HP E1458A Dig ital I/O Mod ule for use in a VXIbus mainframe, install it in a mainframe, connect peripheral devices, and configure the module for operation. This chapter contains the following sections:
Chapter 2
Module
WARNINGS and CAUTIONS . . . . . . . . . . . . . . . . . . . . . . . Page 19
Setting the Address Switch . . . . . . . . . . . . . . . . . . . . . . . . . . Page 20
Setting the Interrupt Priority . . . . . . . . . . . . . . . . . . . . . . . . . Page 21
Enabling the Data Line Pull-up Network . . . . . . . . . . . . . . . Page 22
Combining the Flag Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 24
Installing the Digital I/O Mod ule in a Mainframe. . . . . . . . . Page 25
Connecting to Peripheral Devices . . . . . . . . . . . . . . . . . . . . . Page 26
Configuring for Isolated Digital I/O . . . . . . . . . . . . . . . . . . . Page 29
WARNINGS and CAUTIONS
WARNING SHOCK HAZARD. Only service-trained personnel who are
aware of the hazards involved should install, remove, or configure the digital I/O module. Before you remove any installed module, disconnect AC power from the mainframe. Disconnect power connected to the inputs/outputs of this module and other modules in the mainframe.
CAUTION MAXIMUM INPUTS. The maximum voltage that can be applied to
any pin on any port is 5 Vdc. The maximum current allowed through any data line is 3.2 mA and through any control line is
1.75 mA.
STATIC ELECTRICITY Static electric ity is a major cause of component failure. To prevent damage to the electrical components in the module, observe anti-static te chni ques whenever removi ng a module from the mainfram e or whenev er working on a module.
Chapter 2 Configuring the HP E1458A Digital I/O Module 19
Setting the Address Switch
Figure 2-1 shows the location and facto ry default setting of the logical address switch (LADDR). The factory setting is decimal 144; switch positions 4 and 7 are closed, all oth ers ar e open. The factory setting of decimal 144 results in a HP-IB secondary address of 18 (144 divid ed by 8). You can set the address of the digital I/O modul e to any numb er in the range of 0 to 255 (decimal).
Note For the digital I/O module to be recognized as an instrument when you are
using it with an HP E1405/E1406 Command M odul e and using S CPI commands, the logi cal address sh ould be set to an integer multiple of 8.
Figure 2-1. Log ical Address Switch
20 Configuring the HP E1458A Digital I/O Module Chapter 2
Setting the Interrupt Priority
The VXIbus peripheral interrupt uses seven lines to carry the interrupt signal to the commander. The most comm on line 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 HP E1405/E1406 has an interrupt line allo cation tabl e). When doin g direct register-based programming (inst ead of using the register-based SCPI driver), set the interrupt line to a line that is not used by the register-based SCPI driver. Module interrupt priority can be established with these lines; in general, the higher the line numbe r, the hig h e r the priority. Figu re 2-2 shows the location and factory default setting of the interrupt priority jumper. Setting Level X disables the interrupt capabili ty.
Note The interrupt priority MUST be set to a line handled by the command
module when using and HP E1405 or HP E1406 Command M odul e. Level X priority should not be used under normal operating co ndit ions . Changing the inte rrupt priority level is not recomm en ded. Do not change the default setting (level 1) unless specifically instructed to do so.
The interrupt circuitry for the HP E1458A Digital I/O Module is implemented as release on inte rrupt acknowledge (ROAK). The digital I/O module will de-assert (or release) the interrupt request line during an interrupt acknowledge cycle.
Figure 2-2. Interrupt Priority Jumper
Chapter 2 Configuring the HP E1458A Digital I/O Module 21
Enabling the Data Line Pull-up Network
The characteristics of the data lines on each port are determined by the SN75ALS160 bus transceiver chip (see Figure 3-3). This chip was designed to drive the IEEE 488 bus, which is a proven high reliability communication bus . The data lines of each port contain a terminatin g network that is always present. This terminating network has the characteristics of being high impedance when the power to the module is off. This ensures that when power is removed from the module, the data lines do not load what is connected to them. With power applied, the terminating network is equivalent to the 3k/6.2k resistiv e network that is shown in Figure 2-3.
The resistive terminating network provid es a pull-up to a logi c high level. In addition to the resistive te rminati on, an active pull-up to TTL levels for outputs may be enabled by the pull-up enab le switches.
Figure 2-3 shows the location of the pull -u p enab le switches and a detail of a single pull-up enable switch setting . The factory-shipped default is pull-up disab led for all ports.
The data lines may be either outputs or inputs. When the data lines are outputs and the switch is in the enabled posti tion , the output s will be forced high by both the resistive termination and the active pull-up. When the data lines are outputs and the switch is in the disabled posi tion , the output s will be forced high by only the 3k/6.2k resistiv e termination .
When the data lines are inputs, the resistive terminati on network is the dominating load th at must be driven. This resistive termin ation netwo rk , if not driven, will go to a logic high. This characteristic may be used to sense a contact closure to ground. When the data lines are inputs, the positi on of the pull-up enable switches makes no difference, as the pull-up enable is only for outputs.
22 Configuring the HP E1458A Digital I/O Module Chapter 2
Figure 2-3. Pull-up Enable Swit ches
Chapter 2 Configuring the HP E1458A Digital I/O Module 23
Combining the Flag Lines
Each port contains a Flag Line, labeled FLG, that can be used to implemen t a handshake scheme with a peripheral. For single-port operations, the FLG lines can be used in the factory default setting (no flag lines comb ined) to handshake with a periph e ral. Fo r m ulti-port operations with a single handshake line, you c an combin e the flag line from multi ple ports. The combined flag lines are physically tied together. An action on any of the combined flag lines performs that action for all combined flag lin es.
Figure 2-4 shows the locations of the flag co mbi ning switches and how to set them. Before setting any flag combine switches, you may wis h to read the discussion regarding allowable port com binati ons and hand shakin g in Chapter 3 of this manual.
Note When using the FLG and CTL for handshaking on mult iple-port op erations,
the CTL line is set for each port sequentially beginn ing at the lowest ­numbered port.
Figure 2-4. Flag Combining Switche s
24 Configuring the HP E1458A Digital I/O Module Chapter 2
Instal ling the HP E145 8A Digi tal I/O Mod ule in a Mainfr ame
The HP E1458A Digital I/O Modul e may be installed in any slot (except slot 0) in a C-size mainframe. Refer to Figure 2-5 to install the module in a mainframe.
Set the extraction levers out.
Slide the module into any slot (except slot 0) until the backplane connectors touch.
Tighten the top and bottom screws to secure the module to the mainframe.
NOTE: The extraction levers will not seat the backplane connectors on older VXIbus mainframes. You must manually seat the connectors by pushing in the module until the front panel is flush with the front of the mainframe. The extraction levers may be used to guide or remove the switch module.
To remove the module from the mainframe, reverse the procedure.
Seat the module into the mainframe by pushing in the extraction levers.
2-5. Installing the Module in a Mainframe
Chapter 2 Configuring the HP E1458A Digital I/O Module 25
Connecting to Peripheral Devices
Each of the four HP E1458A Digital I/O Module periph eral connecto rs has 64 pins. The connectors are compati ble with in dust ry standard 64-pin .100" X .100" wiremount so ckets. A compatible sock et can be obtained by ordering HP part number 1252-1581 (3M Part Number 7964 -6500EC) for compatibility wit h 0.050" ribbon cable. For discrete wire compatibility use 3M part number CHG-2064-J010 10-KCP .
Figure 2-5 shows the peripheral connectors, their pin numbers, and the corresponding line names. Figure 2-6 shows the digital I/O ribbon c ables (HP Part Number E1458-61601) an d the line locations with in the ribbon connector.
Note Not all control lines are required for every application. The use of each
control line is described in Chapter 3.
26 Configuring the HP E1458A Digital I/O Module Chapter 2
Figure 2-6. Connecto r Pin Assig nment s
Chapter 2 Configuring the HP E1458A Digital I/O Module 27
2-7. Connectio ns Withi n the Ribbon Cable
28 Configuring the HP E1458A Digital I/O Module Chapter 2
Configuring for Isolated Digital I/O
An industry-stand ard isolated di gital I/O peripheral, like the Opto 22
16-Position S ingl e-Channel Mo unting Rack, is a 50-pin connection. The connector is either a card edge or a header connector. Do not connect pins 1 and 49 on the Opto 22
For example, the Opt o 22
rack connector.
rack, PB16C, uses a card edge connector; PB16H uses a header connector. They both have the same pinout for a ribbon cable. Both can accommodate up to 16 single-channel I/O lines.
A cable designed to connect up to six ports to three Opto 22
racks is available from Hewlett-Packard, either as Option 022 when ordering the HP E1458A, or as Hewlett-Packard part number E1458-61604. Figure 2-7 shows the connections from six ports to three racks.
Opto 22 is a registered trad ema rk of Opto 22, Hunti ngton Be ac h, CA 92649
Chapter 2 Configuring the HP E1458A Digital I/O Module 29
Figure 2-8. Opto 22 Connectio ns
30 Configuring the HP E1458A Digital I/O Module Chapter 2
Using the HP E1458A Digital I/O Module
Using This Chapter
This chapter is divided into twelve sections and details ho w to use the HP E1458A Digital I/O Modu le.
Chapter 3
Port Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 31
Addressing the Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 34
Operation Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 35
Default & Reset States. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 36
Setting the Polarity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 36
Using the Handshake Modes . . . . . . . . . . . . . . . . . . . . . . . . . Page 37
Input/Output of Data Bytes and Bits . . . . . . . . . . . . . . . . . . Page 43
Multiple Port Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 46
Using the UTS Control Line . . . . . . . . . . . . . . . . . . . . . . . . . Page 50
Using as an Open Collector Output. . . . . . . . . . . . . . . . . . . . Page 52
Typical Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 53
Program Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 54
Port Description
Data Line s Each port has eight data lines, numbered from 0 to 7. The data lines can be
Each of the digital I/O module ports has eight data lines and seven cont rol lines. Not all these lines are required for every application. Figure 1-1 earlier in this manual shows the data and control lines. The followin g subsections des crib e the use of these lines.
set as an 8-bit group, as part of a larger group, or individually using SCPI commands.
The logical TRUE conditi on of the data lines c an be controlled with SCPI commands. Positi ve polarity is the default. The following tabl e shows the effect of changing the Polarity with Input and Output operatio ns for each data line.
Input Operations Output Operations
POSitive Polarity TTL High = 1 1 = TTL High
TTL Low = 0 0 = TTL Low
NEGative Polarity TTL High = 0 0 = TTL High
TTL Low = 1 1 = TTL Low
Chapter 3 Using the HP E1458A Digital I/O Module 3 1
The data lines in each port, as a group, can be set to use an internal +5 Vdc pull-up during output operation s. Additi onally , the UTS control lin e can force all the data lines in a port to the three-state condition (non-sourcing ).
The FL G Line
(Inpu t)
The CTL Line
(Output)
Each port has a flag (FLG) line. A flag line is an input line from a peripheral and has two states, READY and BUSY. A flag line is normally used in conjunction with the corresponding control line (CTL) to establish a handshake between a peripheral and the digital I/O module. SCPI commands that define handshake modes typically use the FLG and CTL lines. The state of the FLG line can also be read with a SCPI command to implement custom handshakes. Positive polarity is the default. The following shows the e ffect of changing the pol arity of the FLG line:
POSitive Polarity TTL Hi gh = BUS Y = 1
TTL Low = READY = 0
NEGative Polarity TTL High = READY = 0
TTL Low = BUSY = 1
Each port has a control line (CTL). A control line is an output line from the digital I/O module to the peripheral and has two states, TRUE and FALSE. A control line is normally used in conjunction with the corresponding flag line on the same port to establish a handshake between a peripheral and the digital I/O module. SCPI commands that define handshake modes typically use the FLG and CTL lines. The state of the CTL line can be read and set with SCPI commands to implement custom handshakes. Positive polarity is the default. The following shows the effect of changing the polarity of the CTL line:
The I/O Line
(Output)
POSitive Polarity TTL High = TRUE = ON = 1
TTL Low = FALSE = OFF = 0
NEGative Polarity TTL High = FALSE = OFF = 0
TTL Low = TRUE = ON = 1
Each port has an I/O line. An I/O line is an output from the HP E1458A Digital I/O Module to the peripheral and has two states, TRUE or FALS E. The state of the I/ cannot be changed.
When the I/
the data transceiver of that port is enabled fo r input. The pe ripheral should respond to the signal by enabling itself to send data.
When the I/
the data transceiver of that port is enabled for output . The peripheral should respond to the signal by enabling itself to receive data.
O line is not directly programmabl e. The I/O line polarity
O line is: TTL High =TRUE = 1 = Input
O line is: TTL Low = FALSE = 0 = Output
32 Using the HP E1458A Digital I/O Module Chapter 3
CAUTION To prevent damage to the digital I/O module, when the I/O line
is set for Output (TTL Low), the peripheral MUST NOT attempt to source on any data lines.
Note The I/O, CTL and RES lines are true open colle ctor o utput lines (see
Figure 3-3). An external pull-up is required for proper operation. The FLG, PIR and STS input lin es have a 3k/6.2 k pull -u p termination. If the PIR and STS lines are not used, then connecting them to the I/ provide the pull-up that the I/
O and CTL lines need.
O and CTL line will
The STS Line Ea ch port has a status line labeled STS. The STS line is an input line to the
digital I/O module. The use of the STS line is only at the register level and is not supported by SCPI commands. Refer to Appendix B, "HP E1458A Register Information," for more informat ion abou t this line.
The PIR Line Each port has a peripheral interrupt request line labeled PIR. The PIR line
is an input line to the digital I/O modul e. The use of the PIR lin e is only at the register level and is not supported by SCPI commands. Refer to Appendix B for more information about this line.
The RES Li ne Each port has a reset line labeled RES. The RES line is an output line to the
peripheral. Control of the supported by SCPI commands. Refer to Appendix B for more information about this line.
RES line is only at the register level and is not
The UTS Line Each port has a user three-state line labeled UTS . The UTS line is an input
line to the digital I/O modul e. A TTL Low level on the UTS line will forc e the data line transceiver into a three-state mode. The data lines will be held in the three-state mode independent of the programmed state of the port. A TTL High on the UTS line allows normal digital I/O module operation. The UTS line can also be left unconnected to allow normal digital I/O mo dule operation. See the section "Using the UTS Control Lin e" later in this chapter for a description of its use.
Chapter 3 Using the HP E1458A Digital I/O Module 3 3
Addressing the Module
The examples shown in this chapter use the default addresses for the interface, command module, and digital I/O modul e. The add ress uses bot h HP-IB primary and secondary addresses. The default address is:
7 0 9 1 8
HP-IB Primary Address HP-IB Secondary
Address
Interface Select Code Command Module
HP-IB Address
Digital I/O Module
Address Instrument
(LADDR÷8)
To establish these defaults as an I/O path in HP BASIC, the program examples use this code:
10 ASSIGN @Dio TO 70918
Each digital I/O modul e in a system mu st have a different logical address. Additionally, no two instruments in the same system can have the same logical address. Setting the logical address is described in Chapter 2, "Configuring th e HP E1458A Dig ital I/O Mod ule".
34 Using the HP E1458A Digital I/O Module Chapter 3
Operation Overview
The following steps illustrate general operation of the HP E1458A Digital I/O Modu le.
Chapter 3 Using the HP E1458A Digital I/O Module 3 5
Default & Reset States
At initial power-on and following th e *RST command, the HP E1458A Digital I/O Module is set to the follo wing st ates :
CTL line 0 = TTL Low I/ Data, FLG, and CTL line Polarity POSitive Handshake mode NONE
NOTE Following power-on or *RST, the digital I/O module is set to the input m o de
(I/O = TRUE). If no peripheral is driving the data lines, they will float to a TTL High state.
Setting the Polarity
The logical true level of the control (CTL) line, the flag (FLG) line, and the data lines of each port can be set to either TTL High (> 2.5V) or TTL Low (< 1.4V) levels. SCPI commands use the POLarity keywo rd as:
O line TRUE = input = TTL Low
[SOURce:]DIGital: CO NTr oln:POLar ity < PO Sitiv e or NEGative> to set the
control line’s (CTL) polarity on port n.
[SOURce:]DIGital: F LAGn:P OLar ity <PO Sitiv e or NEGative> to set the
flag line’s (FLG) polarity on port n
[SOURce:]DIGital: DAT A
data lines polarity on port n.
Example DIG:DATA1:P OL PO S
This command sets the polarity to positive on po rt 1 data lines, a TTL High will be input as a 1 or a bit set to 1 will output a TTL High level.
*RST (reset) condition is positive polarity for co ntrol (CTL), flag
The (FLG), and data lines on all ports.
.
n:POLarity <POSitive or NEGative> to set th e
36 Using the HP E1458A Digital I/O Module Chapter 3
Using the Handshake Modes
Handshaking ensures correct transfer of data between devices. You must set both the mode and the timing to establish correct handshaking. SCPI commands support th e following modes of handshaking :
LEADing Edge
TRAiling Edge
PULSe
PARTial
STRobe
NONE
These SCPI commands set the type of handshake mode used:
[SOURce:]DIGital:DATAn[:type]:HANDshake[:MODE] <mode>
[SOURce:]DIGital:HANDshaken[:MODE] <mode>
These SCPI commands set the timing of the handshake (where timing applies):
[SOURce:]DIGital:DATAn[:type]:HANDshake:DELay <time>
[SOURce:]DIGital:HANDshakenDELay <time>
Han dshake Mod es The operation of each handshake mode for input or outpu t operations is
described in the following subsections. In these discussions , only the FLG, CTL, and DATA lines are included. Other port control li nes, controlled on ly through register access, are described in Appendix B of this manual.
Chapter 3 Using the HP E1458A Digital I/O Module 3 7
LEADing Edge The LEADing Edge handshake makes use of both the CTL and FLG lin es.
The input and output operations are described below.
INPUT OUTPUT
The digital I/O module sen ses
1
the FLG line and waits for READY.
The digital I/O module sets the
2
I/
O line HIGH.
The digital I/O module sets CTL
3
TRUE. The peripher al sens es the CT L
4
line and places data on the data lines.
The peripheral sets the FLG line
5
to BUSY indicating data is valid.
The digital I/O module sen ses
6
the FLG line and latches the data.
The digital I/O module returns
7
CTL to FALSE.
The peripher al sens es the CT L
8
line and returns the FLG line to READY.
The digital I/O module checks
1
the state of the FL G lin e (must be READY).
The digital I/O module sets
2
the I/
O line LOW.
The digital I/O module places
3
the data on the data lines. After waiting the programmed
4
delay time, T module sets CTL to TRUE.
The peripheral sen ses t he
5
CTL line and sets the FLG line to BUSY while it latches the dat a.
When the digital I/O module
6
senses the FLG line in the BUSY state, it sets the CTL line to FALSE and monit ors the FLG line.
When the peripheral returns
7
the FLG line to READY (indicating it has latched the data), the next handshake can begin.
, the digital I/O
d
38 Using the HP E1458A Digital I/O Module Chapter 3
TRAiling Edge The TRAil ing Edg e handshake makes use of both the CTL and FLG lin es.
The input and output operations are described below.
INPUT OUTPUT
The digital I/O module sen ses
1
the FLG line and waits for READY.
2 The digital I/O mo dule sets the
I/
O line HIGH.
The digital I/O module sets CTL
3
TRUE. The peripher al sens es the CT L
4
line and sets the FLG line to BUSY.
The digital I/O module sen ses
5
the FLG BUSY and sets the CTL line FALSE.
The peripher al sens es the CT L
6
line change and places data on the data lines.
The peripher al indicat es th e
7
data is valid by returning the FLG line to READY.
The digital I/O module sen ses
8
the FLG READY and latches the data.
The digital I/O module checks
1
the state of the FL G lin e (must be READY).
2 The digital I/O module sets
the I/O line LOW. The digital I/O module places
3
the data on the data lines. After waiting the programmed
4
delay time, T module sets CTL to TRUE.
The peripheral sen ses t he
5
CTL line and sets the FLG line to BUSY while it latches the dat a.
The peripheral re turns the
6
FLG line to READY indicating the end of data tra nsf er .
The digital I/O module senses
7
the FLG line in the READY state and return s CTL to FALSE.
, the digital I/O
d
Chapter 3 Using the HP E1458A Digital I/O Module 3 9
PULSe The PULSe handshake makes use of both the CTL and FLG lines. The input
and output operations are described below.
INPUT OUTPUT
The digital I/O module sen ses
1
the FLG line and waits for READY.
The digital I/O module sets the
2
I/
O line HIGH.
The digital I/O module sets CTL
3
TRUE. The peripher al sens es the CT L
4
line and sets the FLG line to BUSY.
The peripheral places the dat a
5
on the d at a l in es an d ind ic at e s valid data by sett ing the FLG line to READY.
The digital I/O module sen ses
6
the FLG READY, return s CTL to FALSE, and latches the input data.
The digital I/O module checks
1
the state of the FL G lin e (must be READY).
The digital I/O module sets
2
the I/
O line LOW.
The digital I/O module places
3
the data on the data lines. After waiting the programmed
4
delay time, T module sets CTL to TRUE.
The digital I/O module then
5
waits another delay time , Td, and sets the CTL line to FALSE.
The peripheral sen ses t he
6
CTL line change, sets the FLG line to BUSY and latches the dat a.
When the data is entered, the
7
peripheral returns the FLG line to READY.
, the digital I/O
d
40 Using the HP E1458A Digital I/O Module Chapter 3
PARTial The PARTial handshake mak es use of both the CTL and FLG lines. The
input and output operations a re described below.
INPUT OUTPUT
The digital I/O module sets the
1
I/
O line HIGH.
The digital I/O module sets CTL
2
TRUE. The peripher al sens es the CT L
3
line and sets the data lines.
The peripher al holds the F L G
4
line READY for at least 250 nsecs and then sets the FLG line BUSY to indicate the data is valid.
The digital I/O module sen ses
5
the FLG line change to BUSY and latches the data.
The digital I/O module t hen se ts
6
the CTL line FALSE.
The digital I/O module sets
1
the I/
O line LOW.
The digital I/O module places
2
the data on the data lines. After waiting the programmed
3
delay time, T module sets CTL to TRUE.
The peripheral sen ses t he
4
CTL line change, sets the FLG line to READY for a minimum of 250 nsecs, latches the da ta , an d set s th e FLG line to BUSY.
The digital I/O module senses
5
the change of the FLG line and sets CTL to FALSE.
, the digital I/O
d
Chapter 3 Using the HP E1458A Digital I/O Module 4 1
STRobe The STRobe handshake makes use of the CTL line, but not the FLG line.
The input and output operations are described below.
INPUT OUTPUT
The digital I/O module sets the
1
I/
O line HIGH.
The digital I/O module sets CTL
2
TRUE. The peripher al sens es the CT L
3
line and sets the data lines.
The digital I/O module waits the
4
programm ed time delay , T after setting CTL TRUE and then latc hes t he da ta .
The digital I/O module then
5
returns CTL to FALSE.
The digital I/O module sets
1
the I/
O line LOW.
The digital I/O module places
2
the data on the data lines. After waiting the programmed
3
delay time, T module sets CTL to TRUE.
The peripheral sen ses t he
4
d,
CTL line and latches the dat a.
After waiting the programmed
5
delay time, T module sets CTL to FALSE.
, the digital I/O
d
, the digital I/O
d
NONE When hands hake is set to NONE, no control or flag lines are used. The HP
E1458A Digital I/O Modul e will input data or output data when programmed. The I/
O line is set for output (LOW) before data is output. Data lines programmed for output will remain as outp ut until anoth er command is received.
Handshake NONE can be combined with the SCPI commands
MEASure:DIGital:FLAGn and [SOURce:]DIGital:CONTroln to create custom
handshakes.
Handsh ak e Ti min g Handshake timing is set through the SC PI commands
[SOURce:]DIGital:DATAn[:type]:HANDshake:DELay <time> or [SOURce:]DIGital:HANDshakenDELay <time>. Handshake timing is
generally used for data output operations. Timing for data input affects only STRobe handshake mode.
42 Using the HP E1458A Digital I/O Module Chapter 3
Input/Output of Data Bytes and Bits
Data input is performed using commands in the SCPI MEASure:DIGit a l subsystem. Data output is performed using the commands in SCPI
[SOURce:]DIGital sub syst em .
The returned value of an input, or the TTL levels of an output, will depend upon the POLarity programmed for the port.
Both input and output operatio ns will attem pt to complete the handshake mode set for the port and may "hang" if required handshake operations are not completed.
Input Input operations can involve sing le bits, 8-bit bytes, or mult iple byt es.
Single-bit input operations always return a decimal value of 0 or 1. Byte or multiple -byte inpu t operations always return numbers in decimal format.
Bit Input The SCPI command for inputt ing th e stat e of a single bit on a data port is:
MEASure:DIGit al:DAT An[:type] :B ITm ?
This command instructs the HP E1458A Digital I/O Mo dule to return a value of either 0 or 1, indicating the condition of bit m on port n, following completion of the input handshake. The value returned depends upon the programmed state of the port POLarity. In the default state (POSi tive polarity) a TTL High on the data line specified by m will return a 1. For example, the following HP BASIC program code will request and dis play the state of data line 3 (bit-3) on port 4.
120 OUTPUT @Dio;"MEAS: DIG : DATA4:BIT3?" 130 ENTER @Dio;Bits 140 DISP "State of bit 3 on port 4" ;Bits
Bit numbers range from 0 to 7 for single-port operations. For multiple-port operations, bit numbers can range from 0 to 95. The section "Multipl e-P ort Operations" later in this chapter describes bit numbering for multiple-port operations. For a single port, the data lines number an d bit numbers correspond:
Dn_7 Dn_6 Dn_5 Dn_4 Dn_3 Dn_2 Dn_1 Dn_0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
In this manual the physical data lines are indic ated as Dn_1. The n should be replaced with the port number for the input operation. For examp le, bit 3 of port 6 affects the state of data line D6_3.
Chapter 3 Using the HP E1458A Digital I/O Module 4 3
Byte Input The SCPI comman d reques ting an 8-bit byte from a data port is:
MEASure:DIGit al:DAT An[:BYTE] [:VALue] ?
This command instructs the HP E1458A Digital I/O Mo dule to return a decimal value between 0 and 255, indicating the condition of the data lines on port n, following completi on of the inpu t handshak e. The value returned depends upon the programmed state of the port POLarity . In the default state (POSitive pola rity) if all data lines are at a TTL Low level, the returned value will be 0; if all lines are at a TTL High level, the returned value will be 255. For example, the followin g HP BASIC program code will request and display the decimal value of the data lines on port 2.
120 OUTPUT @Dio;"MEAS:DIG:DATA2?" 130 ENTER @Dio;Result 140 DISP "Decimal value of port 2 data lines ";Result
Port numbers range from 0 to 11 for single-port operations. The section "Multiple-Po rt Operations" later in this chapter describes port num be ring for multiple-port operations. For a single port, the returned decimal value will have the following correspon dence to the port data l ines:
Dn_7 Dn_6 Dn_5 Dn_4 Dn_3 Dn_2 Dn_1 Dn_0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 MSB LSB
Output Output operations can involve single bits, 8-bit byt es, or multip le bytes.
Single-bit output operations always expect a value of 0 or 1. Byte or multiple-b yte outp ut operations can accept numb ers in decim al, hexadecimal, octal, or binary fo rmats.
Bit Output The SCPI command for setting th e state of a single bi t on a data port is:
[SOURce:]DIGital: DAT An[:type] :BIT m <value>
This command instructs the digital I/O module to set bit m on port n to <value>, using the output handshake. The actual TTL level set on the
corresponding data line depends upon the programmed state of the port polarity. If <value> is 1 and the default polarity (POSitive polarity) is used, the data line corresponding to bit m will be set to a TTL High level. For example, the following HP BASIC prog ram code will set the state of data line 2 (bit-2) on port 6 to a value of 1.
120 OUTPUT @Dio;"DIG:DATA6:BIT 2 1"
44 Using the HP E1458A Digital I/O Module Chapter 3
Bit numbers range from 0 to 7 for single-port operations. For multiple-port operations, bit numbers can range from 0 to 95. The section "Multipl e-P ort Operations" later in this chapter describes bit numbering for multiple-port operations. For a single port, the data lines number an d bit numbers correspond:
Dn_7 Dn_6 Dn_5 Dn_4 Dn_3 Dn_2 Dn_1 Dn_0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
In this manual the physical data lines are indic ated as Dn_1. The n should be replaced with the port number for the input operation. For examp le, bit 3 of port 6 affects the state of data line D6_3.
Byte Output The SCPI command synt ax to send an 8-bit byte to a data port is:
[SOURce:]DIGital: DAT An[:B YTE][:V ALue] [<base>] <valu e>
This command instructs the HP E1458A Digital I/O Mo dule to set the port
n data lines to <value> using the output hand shake. The option al parameter <base> defines the numb ering sys tem to us e to impl ement <valu e> on the
data lines. There are four values allowed for <base>:
no parameter decimal format #H hexadecimal format #Q octal format #B binary format
The TTL levels set on the data lines depends upon the programmed po rt polarity. In the default state (POS iti ve polarity) a TTL High level will be set for any bit set to 1. For example, the following four HP BASIC program lines all perform the same function and set the same data lines on port 3:
120 OUTPUT @Dio; "DI G:DATA3 170" 120 OUTPUT @Dio;"DIG:DATA3 #HAA" 120 OUTPUT @Dio; "DI G:DATA3 #Q252" 120 OUTPUT @Dio; "DI G:DATA3 #B10101010"
If port 3 is in the default POSitive polarity mode, the TTL levels set on the data lines by any of the program lines above will be:
TTL level High Low High Low High Low High Low Data line D3_7 D3_6 D3_5 D3_4 D3_3 D3_2 D3_1 D3_0
Chapter 3 Using the HP E1458A Digital I/O Module 4 5
Port numbers range from 0 to 11 for single-port operations. The section "Multiple-Po rt Operations" later in this chapter describes port num be ring and byte order for multiple-port operations. For sing le-port operations, the most significant bit is bit 7. The table below sho ws the bit nu mbers and the corresponding data lines.
Dn_7 Dn_6 Dn_5 Dn_4 Dn_3 Dn_2 Dn_1 Dn_0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 MSB LSB
Multiple-Port Operations
The HP E1458A Digital I/O Module supports mult iple-port op erations. You can combine operatio ns using 2, 4, 8, or all 12 ports with a sing le SCPI command. Mul tiple-port operations ar e shown in the SCPI command syntax as the optional keyword initiates a handshake and returns one or more va lues:
MEAS:DIG:DATAn[:type]?
[:type]. For example, this SCPI command syntax
The optional keyword [:type] is replaced by one of the following keywords :
:BYTE This keyword, or no keyword (default), is used for 8-bit port
operations.
:WORD This keyword is used to combine 2 adjacent ports for 16-bit port
operations.
:LWORd or :LW32 Either keyword is used to combine 4 adjacent ports for 32-bit
operations.
:LW64 This keyword is used to combine 8 adjacent ports for 64-bit
operations.
:LW96 This keyword is used to combine all 12 ports for 96-bit operations.
The SCPI keyword
:DATAn specifies the port to be used for operations by
replacing n with the port number. Multipl e-p ort operations have fixed values allowed for n. For all operations, if n is omitted, port 0 is assumed. The values allowed for n are:
Operation Values of n
:BYTE 0, 1, 2, 3, 4, 5, 6 ,7, 8, 9, 10 , or 11 :WORD 0, 2, 4, 6, 8, or 10 :LWORd 0, 4, or 8 :LW64 0 :LW96 0
46 Using the HP E1458A Digital I/O Module Chapter 3
For example, the following HP BASIC program code will ob tain a decima l value of the state of the 32 data lines contained in ports 4, 5, 6, and 7.
120 OUTPUT @Dio;"MEAS:DIG:DATA4:LWORD?" 130 ENTER @Dio;Result 140 DISP "32 bit longword at port 4 "&Result
Multiple-Port
Han dshakin g
The SCPI command syntax to establish a multiple-port hands hake and set handshake timing is:
[SOURce:]DIGital:DATAn[:type]:HANDshake[:MODE] <mode> [SOURce:]DIGital:DATAn[:type]:HANDshake:DE Lay <time>
The optional keyword handshake delay <time> are all described earlier in this chapter. See the sections "Handshake Modes", "Handshake Timing ", and the introduction to "Multiple-Port Operations" for explanations of these keywords and parameters.
Multiple-p ort handsh aking has th e following two anomali es regarding the CTL and FLG control lines:
Input or Output handshaking using the CTL line. The CTL line is set TRUE or FALSE sequentially on all ports invo lved in the operatio n, from the lowest-numbered port to the highest-n umb ered port. A slig ht time delay exists between each port setting the CTL line TRUE or FALSE. When using handshaking on multipl e-po rt operations, use the hig hest-numbered port CTL line to ensure correct data transfer.
[:type], parameter DATAn, handshake <mode>, and
Multiple-Port
Input/Output
Input or Output handshaking using the FLG line. A change in the state of any FLG line on any combined port continues the handshake operation for all the combined ports. FLG lines can also be electrically combined through a switch setting (see Chapter 2).
Data input is performed using commands in the SCPI
MEASure:DIGigital:DATAn[:type] subsystem. Data output is performed
using the commands in SCPI
The returned value of an input, or the TTL levels of an output, will depend upon the POLarity programmed.
Both Input and Output operations wil l attempt to compl ete the handshake mode set and may "hang" if required handshake operations are not completed.
[SOURce:]DIGital:DATAn[:type] subsystem.
Chapter 3 Using the HP E1458A Digital I/O Module 4 7
The sections "Byte Input" and "Byte Output " earlier in this chapter describe operations that also apply to multipl e-port co mman ds. The values used fo r input and output operatio ns depend upon the
[:type] used in the command.
Values for multiple-port input or out put op erations a re given in the following table:
Input Operations Output Operations
format range format range
BYTE Decimal 0 to 255 Decimal
#H
#Q
#B
WORD Decimal -32768 to 32767 Decimal
#H #Q
#B
LWORd Decimal -214748364 8 to 214748364 7 Decimal
#H #Q
#B
LW64 * Decimal -2147483648 to 21474 83647 Decimal
#H #Q
#B
LW96 * Decimal -2147483648 to 21474 83647 Decimal
#H #Q
#B
-2147483648 to 214748364 7 00000000 to FFFFFFF F
-2147483648 to 214748364 7 00000000 to FFFFFFF F
-2147483648 to 214748364 7 00000000 to FFFFFFF F
-128 to 255 00 to FF
000 to 377
8-bits
-32768 to 32767 0000 to FFF F
00000 to 177777
16-bits
0 to 37777777777
32-bits
0 to 37777777777
32-bits
0 to 37777777777
32-bits
* LW64 and LW96 operations use more than one <value>, each separated by a comma. The range for each of the values is indicated in the table.
For example, to set all 96 bits to 0, use the following comm an d syntax :
SOUR:DIG:DATA0:LW96 0,0,0
Table 3-1 shows allowable port combinatio ns for each value of [:type] and the order of the values for LW64 and LW96 operations.
You can combine multiple-port operatio ns on the same HP E1458A Digital I/O Module. For example, you coul d define two mul tipl e-data ports as a 64-bit port 0 and a 32-bit port 8.
48 Using the HP E1458A Digital I/O Module Chapter 3
Table 3-1. Port Combination s
8-bit (BYTE) Operations
Port 01234567891011 Bit Numbers 7 — 0 7 — 0 7 — 0 7 — 0 7 — 0 7 — 0 7 — 0 7 — 0 7 — 0 7 — 0 7 — 0 7 — 0 Data Lines D0_7
— D0_0
Param eters <value> <value> <value> <value> <value> <value> <value> <value> <value> <value> <value> <value>
D1_7 — D1_0
D2_7 — D_0
D3_7 — D3_0
D4_7 — D4_0
D5_7 — D5_0
D6_7 — D6_0
D7_7 — D7_0
D8_7 — D8_0
D9_7 — D9_0
D10_7 — D10_0
16-bit (WORD) Operations
Port 0246810 Bit Numbers 15 — 8 7 — 0 15 — 8 7 — 0 15 — 8 7 — 0 15 — 8 7 — 0 15 — 8 7 — 0 15 — 8 7 — 0 Data Lines D0_7
— D0_0
Param eters <value> <value> <value> <value> <value> <value>
D1_7 — D1_0
D2_7 — D_0
D3_7 — D3_0
D4_7 — D4_0
D5_7 — D5_0
D6_7 — D6_0
D7_7 — D7_0
D8_7 — D8_0
D9_7 — D9_0
D10_7 — D10_0
32-bit (LWORd) Operations
Port 048 Bit Numbers 31—24 23 —16 15— 8 7—0 31—24 23—16 15—8 7—0 31—24 23—16 15—8 7— 0 Data Lines D0_7
— D0_0
Param eters <value> <value> <value>
D1_7 — D1_0
D2_7 — D_0
D3_7 — D3_0
D4_7 — D4_0
D5_7 — D5_0
D6_7 — D6_0
D7_7 — D7_0
D8_7 — D8_0
D9_7 — D9_0
D10_7 — D10_0
D11_7 — D11_0
D11_7 — D11_0
D11_7 — D11_0
64-bit (LW64) Operations
Port 0 Bit Numbers 63—56 55—48 47—40 39—32 31—24 23—16 15—8 7—0 Data Lines D0_7
— D0_0
Param eters 1st <value> 2nd <val ue>
D1_7 — D1_0
D2_7 — D_0
D3_7 — D3_0
D4_7 — D4_0
D5_7 — D5_0
D6_7 — D6_0
D7_7 — D7_0
96-bit (LW96) Operations
Port 0 Bit Numbers 95—88 87—80 79—72 71—64 63—56 55—48 47—40 39—32 31—24 23—16 15—8 7—0 Data Lines D0_7
— D0_0
Parameters 1st <value> 2nd <value> 3rd <value>
D1_7 — D1_0
D2_7 — D_0
D3_7 — D3_0
D4_7 — D4_0
D5_7 — D5_0
D6_7 — D6_0
D7_7 — D7_0
D8_7 — D8_0
D9_7 — D9_0
D10_7 — D10_0
D11_7 — D11_0
Chapter 3 Using the HP E1458A Digital I/O Module 4 9
Using the UTS Control Line
The UTS line can be used to prevent the HP E1458A Digital I/O Module from sourcing data on the data lines, independent of the programmed st ate of the port. A high or open on the UTS line allows the port to operate normally. When the UTS line is set LOW, the data line transmitter is disabled. The UTS line can be connected and used in eithe r a static or active configuration.
Static
Con figuration
Active
Con figuration
A port is set to transmit on the data lines when a command is received and the programmed hand shake is completed. Use the
SOUR:DIG:DAT A: VAL? comm and to verify the programmed state of the
port. The data lines. These two commands may return different values if the UTS line is LOW.
The UTS line can disabl e th e port transmit te r during program development/debugg ing. Tie the UTS line for each port to ground. This configuration ensures that the digital I/O mo dule c annot transm it on the data lines, independent of the programmed state of the port. The port data receivers are not affected.
The UTS line can be connected to an active signal from the peripheral to ensure that digital I/O module does not attempt to transmit , independent of the programmed state of the port. The peripheral should ho ld the UTS lin e LOW when it is transmitting, and release the line when it is ready to receive. For example, two HP E1458A Dig ital I/O Mod ules could be connected as shown in Figure 3-1. The I/ the port is programmed to transmit. By connecting the I/ port to the UTS lines, the two modules cannot transmit at the same time.
SOUR:DIG:DATA:MON? command returns the actual state of the
O line is set to a TTL Low when
SOUR:DIG : DAT A
O lines from each
50 Using the HP E1458A Digital I/O Module Chapter 3
Figure 3-1. UTS Line Active Config uratio n
Chapter 3 Using the HP E1458A Digital I/O Module 5 1
Using as an Open Collector Output
The HP E1458A Digital I/O Module data lines can be used in an open collector configuration. Con nections for open collector require the use of external power supplies and pull-up resistors. The internal pul l-up mo de of the digital I/O module MUS T be disabled for open co llector outp ut. Figur e 3-2 shows a single data line connection.
Figure 3-2. Typical Open Collector Data Line
The value of the pull-up resistor is calculated as follows:
= 5.0 Vdc
Vcc
= Iout
Imax
Vcc
R =
Imax
The value of TTL High with the 200 pull-up resistor is calculated as follows:
V
= Vcc
High
safety_factor = 48 mA 0.52 = 25 mA
Low
5
=
= 200
0.025
6200
6200 + 200
= 4.84 V
dc
52 Using the HP E1458A Digital I/O Module Chapter 3
Typical Connection
Figure 3-3 shows a typical driver/receiver connection for data transfer. The FLG, PIR, and STS lines have a resistiv e pull-up netwo rk . The data lines do not have a resistive pull-up, but can use an internal pull-up in th e SN75ALS160. The internal pull -up requ ires that the data lines sin k 3.2 mA to pull the line to less than 0.4 V. The I/ collector and require external pull-up to logic high.
O, CTL, and RES lines are open
Figure 3-3. Typical Driver/Receiver Connections
Chapter 3 Using the HP E1458A Digital I/O Module 5 3
Program Examples
The following HP BASIC program examples demo nstrate a few of the uses of the HP E1458A Digital I/O Module. The ha rdware 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 st at e of the port is not correct, the program prints a message and stops. I f 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 examp le assumes th at 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).
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, 1431655765
70 READ Pattern(*) ! 80 OUTPUT @Dio;"*RST ; *OP C? " ! Establish defaults. 90 ENTER @Dio;Ready ! Wait for completion. 100 FOR I = 0 TO 1 ! Fast test of the data lines. 110 OUTPUT @Dio;"SOUR:DIG
:DATA0:LW96 ";Pattern(1,I);","; Pattern(2,I); ",";Pattern(3,I)
120 OUTPUT @Dio;"*O PC?" ! 130 ENTER @Dio;Ready ! Wait for completion . 140 OUTPUT @Dio;"SOUR:DIG:
DATA0:LW96?"
150 ENTER @DIO;Value(1),Value( 2),
Value(3)
160 FOR J=1 TO 3 ! 170 IF Val(J) <> Pa tte rn(J ,I) T HEN ! Port not programmed. 180 PRINT "Port not programmed" ! 190 STOP ! 200 END IF ! 210 NEXT J ! 220 OUTPUT @Dio;"SOUR:DIG
:DATA0:LW 96:MON?"
!
! Alternating 0 and 1, 32-Bit .
! Alternate 0 and 1.
! Readback of port programming.
!
! Read data lines.
Continue d on nex t page.
54 Using the HP E1458A Digital I/O Module Chapter 3
230 ENTER @Dio;Mon(1),Mon(2),Mon(3)! 240 FOR J=1 TO 3 ! 250 IF Mon(J) <> Pattern(J,I) THEN! Data line error. 260 PRINT "One or more
data lines stuck"
270 Errflg = 1 ! Set error flag. 280 END IF ! 290 NEXT J ! 300 NEXT I ! 310 IF Errflg = 1 THEN ! Find the stuck line(s). 320 OUTPUT @Dio;"*RST;*OPC?" ! Restore defaults. 330 ENTER @Dio;Ready ! Wait for completion. 340 FOR I = 0 T O 1 ! I is logic counter. 350 FOR J = 0 TO 95 ! J is bit counter. 360 OUTPUT @Dio;"SOUR:DIG
:DATA0:LW 96:BIT"&VAL$(J)& " " &VAL$(I)$";*OPC?"
370 ENTER @Dio;Ready ! Wait for completion. 380 OUTPUT @Dio;"SO U R
:DIG:DATA0:LW96:BIT" &VAL$(J)&":MON?"
390 ENTER @Dio;Bits ! 400 IF Bits <> I THEN ! 410 PRINT "Logi c a l ";I;" at bit ";J;
" error found"
420 END IF ! 430 NEXT J ! 440 NEXT I ! 450 ELSE ! 460 PRINT " Data Line test passed" ! 470 END IF ! 480 END !
!
! Set a bit.
! Get the state of the bit.
!
Setting Pol arit y and
Handshake
This example demonstrates settin g the port pol arity and handsh ake mode for a 16-bit port. Handshake mode LEADing will be set and the polarity of the FLG and CTL lines will be invert ed.
Hardware setup: Port 0 and 1 data lines are connected to correspondin g perpheral data lines. Port 1 CTL and FLG lines are used and are connected to the handshake lines of the perpherial. Port 0 CTL and FLG lines are not used or connected.
Chapter 3 Using the HP E1458A Digital I/O Module 5 5
10 RE-SAVE "Pol_hnd ! 20 ASSIGN @Dio TO 70918 ! 30 INTEGER Ready, Words,Bits ! 40 OUTPUT @Dio;"*RST ; *OP C? " ! 50 ENTER @Dio;Ready ! Wait for completion. 60 OUTPUT @Dio;"SOUR:DIG:CONT1
:POL NEG;*OPC?"
70 ENTER @Dio;Ready ! Wait for completion. 80 OUTPUT @Dio;"SOUR:DIG:FLAG1
:POL NEG;*OPC?"
90 ENTER @Dio;Ready ! Wait for completion. 100 OUTPUT @Dio;"SOUR:DIG:DATA0
:WORD:HAND LEAD;*OPC?"!
110 ENTER @Dio;Ready !Wait fo r completio n. 120 OUTPUT @Dio;"SOUR:DIG:DATA0
:WORD #H6565;*OPC?"
130 ENTER @Dio;Ready ! 140 OUTPUT @Dio;"SOUR:DIG:DATA:
:WORD #HAAAA;"*OPC?" 150 ENTER @Dio;Ready 160 OUTPUT @Dio;"MEAS:DIG:DATA0
:WORD?" 170 ENTER@Dio;Words !
180 PRINT "Integer value of port 0 ";Words ! 190 OUTPUT @Dio;"MEAS:DIG:DATA0
:WORD:BIT9?" 200 ENTER @Dio;Bits !
210 PRINT "Bit 9, data line D1_1, value ";Bits ! 220 END !
! Set CTL polarity.
!Set FLG polarity.
!Set output handshake mode.
! Send 6565 hex using hardware handshake.
! Send AAAA hex using hardware handshake.
! Read the 16-bit port using hardware handshake.
! Read the state of a bit using hardware handshake.
Using Trace
These examples demonstrate using trace memory in various configurations.
Memory
Hardware setup: Exampl e 2 uses an external VME memory c ard. You can also use shared memory on the c omma nd module for the HP E1405B/E1406. The memory starting address is usually at #H20000 0. (Use the
VXI:CONF :DLI S ? query to locate the address).
NOTE Byte swapping may occur when using the :TRAC E commands with HP SCPI.
If you are using a Motorola processor, the bytes are written or read to memory with the lowest port receiving the least significant byte (the case when directly addressing the port through SCPI commands). An Intel processor, however, when used with the The bytes are written or read from memory with the lowest port receiving the most significant byte and the highest port the le ast significant byte.
56 Using the HP E1458A Digital I/O Module Chapter 3
:TRACE comma nds w ill swap the order the of the bytes.
Trace Memory
Example 1
This example writes 20 byt es as 10 WORDS at ports 0 and 1.
10 RE-SAVE "Trace_1" ! 20 ASSIGN @ Dio TO 70918 ! 30 INTEGER A(1:10) ,Ready ! 40 DATA 65,66,67,68,69,70,71,
72,73,74 50 READ A(*) !
60 OUTPUT @Dio;"*RST ; *OP C? " ! 70 ENTER @Dio;Ready ! Wait for completion. 80 OUTPUT @Dio;"SOUR: DIG
:TRAC:DEF alpha,100;*OPC?" 90 ENTER @Dio;Ready ! Wait for completion.
100 OUTPUT @Dio USI NG "K,10(W )
";"SOUR:DIG:TRACE alpha,
#220";A(*) 110 OUTPUT @Dio; "SO UR: DIG
:DATA0:WORD:TRAC alpha;
*OPC?" 120 ENTER @Dio;Ready ! Wait for completion.
130 OUTPUT @Dio; "SO UR: DIG
:TRAC:DEL alpha;
*OPC?" 140 ENTER @Dio;Ready ! Wait for completion.
150 END
! A, B, C, D, E, F, G, H, I, J
! Define memory name alpha.
! Fill memory alpha with 20 bytes.
! Output the 20 bytes.
! Remove memory block.
Trace Memory
Example 2
This example writes 20 byt es as 10 WORDS at ports 0 and 1 as in the first example, it uses an external VME memory board.
10 RE-SAVE "Trace"_2 ! 20 ASSIGN @ Dio TO 70918 ! 30 INTEGER A(1:10) ,Ready ! 40 DATA 65,66,67,68,69,70,71,
72,73,74 50 READ A(*) !
60 OUTPUT @Dio;"*RST ; *OP C? " ! 70 ENTER @Dio;Ready ! Wait for completion. 80 OUTPUT @Dio;"M EM:VME
:ADDR #H200000;*OPC?" 90 ENTER @Dio;Ready ! Wait for completion.
100 OUTPUT @Dio;"MEM:VME
:SIZE 100;*OPC?" 110 ENTER @Dio;Ready ! Wait for completion.
120 OUTPUT @Dio;"MEM:VME
:STAT ON;*OPC?" 130 ENTER @Dio;Ready ! Wait for completion.
Continued on ne xt pa ge.
! A, B, C, D, E, F, G, H, I, J
! Define memory location.
! Reserve 100 bytes.
! Enable memory.
Chapter 3 Using the HP E1458A Digital I/O Module 57
140 OUTPUT @Dio; "SO UR: DIG
:TRAC:DEF alpha,100;*OPC?" 150 ENTER @Dio;Ready ! Wait for completion.
160 OUTPUT @Dio USI NG
"K,10(W)";"SOUR:DIG:TRACE
alpha,#220";A(*) 170 OUTPUT @Dio; "SO UR: DIG
:DATA0:WORD:TRAC alpha;
*OPC?" 180 ENTER @Dio;Ready ! Wait for completion.
190 OUTPUT @Dio; "SO UR: DIG :TRA C
:DEL alpha;*&OPC?" 200 ENTER @Dio;Ready ! Wait for completion.
210 END
! Define memory name alpha.
! Fill memory alpha with 20 bytes.
! Output the 20 bytes.
! Remove memory block.
Trace Memory
Example 3
This example reads 40 WORDS from ports 0 and 1.
10 RE-SAVE "Trace_3" ! 20 ASSIGN @ Dio TO 70918 ! 30 DIM Head$[4] ! 40 INTEGER A(1:20) ,Ready ! 50 OUTPUT @Dio;"*RST ; *OP C? " ! 60 ENTER @Dio;Ready ! Wait for completion. 70 OUTPUT @Dio;"SOUR: DIG
:TRAC:DEF alpha,80;*OPC?" 80 ENTER @Dio;Ready ! Wait for completion.
90 OUTPUT @Dio;"MEAS:DIG
:DATA0:WORD: T RACE alpha;
*OPC?" 100 ENTER @Dio;Ready ! Wait for completion.
110 OUTPUT @Dio; "SO UR: DIG
:TRAC:DATA? alpha" 120 ENTER @Dio USING "4A,40(W)";
Head$;A(*) 130 OUTPUT @Dio; "SO UR: DIG
:TRACE:DEL alpha;*OPC?" 140 ENTER @Dio;Ready ! Wait for completion.
150 END
! Define memory name alpha.
! Output 80 bytes.
! Request the data.
!
! Remove memory block.
58 Using the HP E1458A Digital I/O Module Chapter 3
HP E1458A Command Reference
Using This Chapter
This chapter describes Standard Commands for Programmable I nstrum ents (SCPI) and summarizes IEEE 488.2 Common (*) commands applicable to the HP E1458A Digital I/O Module. This chapter contains the following sections:
Command Fundamentals . . . . . . . . . . . . . . . . . . . . . Page 59
SCPI Command Reference . . . . . . . . . . . . . . . . . . . . Page 63
DISPlay Sub system . . . . . . . . . . . . . . . . . . . . . . . . Page 64
MEASure Subsystem . . . . . . . . . . . . . . . . . . . . . . . Page 67
MEMory Subsystem . . . . . . . . . . . . . . . . . . . . . . . . Page 73
[SOURce:] Subsystem . . . . . . . . . . . . . . . . . . . . . . . Page 78
STATus Subsystem . . . . . . . . . . . . . . . . . . . . . . . . Page 108
SYSTem Sub system . . . . . . . . . . . . . . . . . . . . . . . . Page 111
IEEE 488.2 Common Commands . . . . . . . . . . . . . . . . Page 113
Command Quick Reference . . . . . . . . . . . . . . . . . . . . Page 114
Chapter 4
Command Fundamentals
Commands are separated into two types: IEEE 488.2 Common com mands and SCPI commands.
Common
Command
Format
The IEEE 488.2 standard defines the Common commands th at perform functions like reset, self-test, status byte query, etc. Common commands are four or five characters in length, always begin with the asterisk character (*), and may include one or more parameters. The command keyword is separated from the first parameter by a space character. Common commands are not documented, except in a general manner, in this manual. Some examples of Co mm on comm ands a re:
*RST *ESR 32 *STB?
Chapter 4 HP E1458A Command Reference 59
SCPI
Command
Format
SCPI commands perform functions like making m easurem ents, querying instrument states, or retrieving data. The command structure is a hierarchical structure that usually consists of a top-level (or root) comman d, one or more lower-level commands, and their parameters. The followi ng exampl e shows part of a typical subsystem:
[SOURce:]
DIGital
:DATA
n
[:VALue]? :BIT
m?
Command
Separator
Abbreviated and
Short Commands
[SOURce:]
third-level command (where n is the port number 0 - 11), and fourth-level commands (where m is the queried bit locatio n).
A colon (:) always separates one command from the next lower-level command. This is illustrated as follows:
MEASure:DIGital:DAT An:V ALue?
Colons separate the root command from the second level (MEASure: DIG it al) and the second from the third level (
The command syntax shows most com mands as a mix of upper- and lowercase letters. The uppercase letters indicate an abbreviated spelling for the command. For shorter program lines, send only the abbreviated form. For better program readability use the entire command. The instru ment wil l accept either the abbreviated form or the entire command.
For example, if the command reference syntax shows the command
MEAS and MEASURE ar e both acceptable forms. Other forms of MEASure, such as MEASU or MEASU R will generate an error.
is the root command, DIGital is a second-level command, :DATAn is a
:VALue and :BITm are
DIGital:DAT An), and so forth.
MEASure, then
The instrument does not disting uish between upp ercase and lowercase characters. Therefore
Command keywords can be entered in their full form as shown above, or can be entered in their short form. In this manual, the entry required in short form commands is always capitalized. The short form is generally used for examples in this manual.
MEASURE, measure, and MeAsUrE are all acceptable.
60 HP E1458A Command Reference Chapter 4
Implied
Commands
Implied commands appear in square brackets ( [ ] ) in the command syntax. (Note that the brackets are not part of the command and are not sent to the instrument .) Suppose you send a second-level co mman d but do not send the preceding implied command. In this case, the in strum ent assum es you inten d to use the implied command and it responds as if you had sent it. Examine this excerpt from the
[SOURce:] subsystem sho wn below: [SOURce:]
DIGital
:DATA
n
[:VALue] <parameter> :BITm <parameter>
The root command
[SOURce:] is implied. To set the instrum ent to ou tput a logic al 1
to bit 0 of port 3, you may send either:
[SOURce:]DIGital: DAT A3: BIT0 1
or
DIGital:DATA3: BI T0 1
Parameters Parameter Types. The following table contains explanations and examples of
parameter types you might see later in this chapter. Parameters must always be separated from the keywords by a space.
Parameter Type Explanations and Examples
Numeric Accepts all commonly us ed decimal representati ons of
numbers including opt ional si gns, decimal points, and scientific notation.
123, 123E2, -123, -1.23E2, .123, 1.23E-2, 1.23000E-01 .
Special cases include
MIN, MAX, and DEF.
Boolean Represents a single binary condition th at is either
true or false.
ON, OFF, 1, 0.
Discrete Selects from a finite number of values. These parameters
use mnemonics to represent each valid setting.
An example is the
DIGital:CONT ro ln:POLarit y <polarit y>
command where the parameter <polarity> c an be eith er POS or NEG.
Chapter 4 HP E1458A Command Reference 61
Optional Parameters. Parameters shown within square brackets ( [ ] ) are optional parameters. (Note that the brackets are not part of the command and are not sent to the instrument.) If you do not specify a value for an optional parameter, the instrument chooses a default value. For example, consider the
DISPlay:MONitor:PORT? [<MIN | MAX | DEF>] comman d. If you send the
command without sp ecifying a parameter, the command returns the number of the port last addressed. If you send the command returns 0. If you send the
MIN parameter or the DEF p aramet er, the
MAX parameter, the command returns 11. B e
sure to place a space between the command and the parameter.
Keyword
Substitutions
Linking
Commands
Some comman ds ind ic ate a keyword substit utio n by sho wing th e substitution in square brackets and lowercase letters. (It is important to note that this modifies the keyword and should not be confused with a parameter name.) For example, in the SCPI command
MEASure:DIGit al:DAT An[: type] , the keyword [:type] should be
replaced by one these parameters:
:BYTE
:WORD
:LWORd or :LW32
:LW64
:LW96
Linking IEEE 488.2 Common Comma nds with SCPI Command s. Use a semicolon ( ; ) between the commands. For example:
*RST;DIG:CONT2 1 or DIG:CONT2:POL POS;*IDN?
Linking Multiple SCPI Commands. Use both a semicolon ( ; )and a colon ( : ) between the commands. For example:
DIG:DAT A2:P OL NEG ;:DIG : DAT A2:B IT1 1
62 HP E1458A Command Reference Chapter 4
SCPI Command Reference
The following sections describe the Standard Commands for Programmable Instruments (SCPI) co mman ds for the HP E1458A Digital I/O Mo dule. Commands are listed alphabetically by subsystem and within each subsystem .
Chapter 4 HP E1458A Command Reference 63
The DISPlay subs ystem turns on the monitor mode. Parameters related to the state of the data and control lines are shown on the external terminal. Refer to the C-Si ze VXIbus Systems Configuratio n Guide for supported terminal typ es. The parameters displayed are:
port number
polarity
handshake mode
state of the control line
state of the flag line
values on the data lines
Subsystem Syntax DISPlay
:MONitor
:PORT :PORT? [ [:STAT e] [:STATe]?
<port |
AUTO>
<MAX | MIN | DEF>] <OFF | ON>
DISPlay
DISPlay:MONitor:PORT
DISPlay:MONit or: PO RT [<port>] sets the displayed port number.
Parameters
Comments In the AUTO mode of operation, the display shows the state of the port last
programmed. mode of operation.
Related Commands:
DISPlay:MONitor [: ST AT e] DISPlay:MONitor :PO RT ?
*RST
Condition: AUTO
Parameter
Name
<port>
MIN sets port 0. MAX sets port 11. No pa ramet er or DEF sets AUTO
Parameter
Type
Numeric
or
Discrete
Range of
Values
none, 0 through 11
MIN | MAX | AUTO | DEF
Default
AUTO
Example DISP:MON:PORT 3 sets th e port to be moni tored to 3.
64 HP E1458A Command Reference Chapter 4
DISPlay:MONitor:PORT?
DISPlay:MONitor:PORT? [<MAX | MIN | DEF>], with no param eter, return s a
decimal number indicating the port bein g monitored. If port parameter in the
DEF is specified, the query always returns -1. If MAX is specified, the query returns
the maximum port (alw ays 11). If port (always 0).
Parameters
AUTO was selected as the
DISP:MON:PORT AUTO command, the query returns a -1. If
MIN is specified, the query returns the minimum
[<MA X | MIN | DEF >]
Comme nt s Related Commands:
DISPlay:MONitor :PO RT DISPlay:MONitor [: ST AT e]
*RST
Condition: Not app licable.
Example DISP:MO N:PORT? identifies the port being mo nito red.
DISPlay:MONitor[:STATe]
DISPlay:MONit or[ :ST AT e] <OFF | ON> turns the monitor mode on and off.
Parameters
Parameter
Parameter
Name
Name
Parameter
Optiona l Discrete
Parameter
Type
Type
or
Range of
Values
None
MAX, MIN, or DE F
Range of
Values
Default
None
Default
<
OFF | ON>
Boolean 0 | 1, OFF | ON None
Comme nt s • DISP:MON ON enables the terminal display of port pa rameters. The param eters
are updated to the terminal following each new command accessing a port.
A keyboard entry at the terminal will set DISP: MON OF F .
This command differs from the SOUR:DI G:DAT An[ :type] :MON? comm and; th is command does not perform an actual readback of the port data lines. It returns the last programmed state of the data lines.
Chapter 4 HP E1458A Command Reference 65
Related Commands:
DISPlay:MONitor :PO RT DISPlay:MONitor :PO RT ?
*RST Condition: OFF
Example DISP:MON O N displays the s tate o f the last p ort programmed.
DISPlay:MONitor[:STATe]?
DISPlay:MONitor[:STATe]? returns the s tate o f th e m onitor mode.
Parameters None
Comments DISPlay:MONitor[:S TATe]? returns a 1 if the monitor mode is on
or a 0 if the monitor mode is off.
66 HP E1458A Command Reference Chapter 4
The MEASure subsystem defines the co mm an d set for the HP E1458A Dig ital I/ O Module input statemen ts
Subsystem Syntax MEASure
:DIGital
:DATA
[:BYTE]
:WORD
:LWORd
:LW64
:LW96
:FLAG
n
m?
:BIT :TRACe <name> [:VALue]?
m?
:BIT :TRACe <name> [:VALue]?
or :LW32
m?
:BIT :TRACe [:VALue]?
:BIT :TRACe [:VALue]?
:BIT :TRACe <name> [:VALue]?
<name>
m?
<name>
m?
n?
MEASure
Chapter 4 HP E1458A Command Reference 67
MEASure:DIGital:DATAn[:type][:VALue]?
MEASure:DIGital:DATAn[:BYTE][:VALue]? reads one byte from 8-bit port n
after the completion of the handshake and returns a decimal number between 0 and 255.
MEASure:DIGi tal: DATAn :WO RD[:VAL u e]? reads two by tes (one word) from
16-bit port n after the completion of the handshake and returns a decimal number between -32768 and 32767.
MEASure:DIGi tal: DATAn:L W ORd [: VALue]? reads four bytes (one longword)
from the 32-bit port n after the completion of the handshake and returns a decimal number between -2
MEASure:DIGital:DATAn:LW64[:VALue]? reads eight bytes from the 64-bit port
after the completion of the handshake and returns two decimal numbers, each between -2
MEASure:DIGi tal:DATAn:LW96[:VALue]? reads 12 bytes from the 96-bi t port
after the completion of the handshake and returns three decimal numbers, each between -2
31
31
31
and (231-1).
and (231-1).
and (231-1).
Parameters
Parameter
Name
DATAn
Parameter
Type
Numeric BYTE none, 0 through 11
WORD none, 0, 2, 4, 6, 8, or 10 LWORd none, 0, 4, or 8 LW64 none or 0 LW96 none or 0
Range of
Values
Comme nt s Input data from the digital I/O module is returned in decimal format. Other
formats are not supported for input. However, data out put to the digital I/O module may be in binary, octal, decimal, or hexadecimal.
If n is omitted, the port number is set to 0.
The keyword LW32 may be us ed instead of LWORd.
Chapter 3, "Using the HP E1458A Digital I/O Module," describes the byte order
of mutltiple -byte reads.
:DATAn is the keyword used for commands relating to the data at port n. The p ort
number n must be the last character of the keyword without spaces.
Default
0
68 HP E1458A Command Reference Chapter 4
Related Commands:
[SOURce:]DIGital: DATAn[:type][:VALue] MEASure:DIGit al:DATA
n[:type]:B IT m?
*RST
Condition: Set to inpu t positive true on all ports .
Examples MEAS:DIG: DATA1? reads 8-bit port 1 data. If all data lines are set to 1, this
command returns the value 255.
MEAS:DIG:DATA0: LW64? reads 64-bit port 0 data. If all data lines are set to 1, this
command returns the values -1 and -1.
MEAS:DIG:DATA0: LW96? reads 96-bit port 0 data. If all data lines are set to 1, this
command returns the values -1, -1 and
MEASure:DIGital:DATAn[:type]:BITm?
MEASure:DIGital:DATAn:BYTE:BITm? reads the state of bit m of 8-bit port n after
the completion of the handshake.
MEASure:DIGital:DATAn:WORD:BITm? reads the state of bit m of 16-bit port n
after the completion of the handshake.
MEASure:DIGi tal: DATAn:L W ORd :BITm? reads the state of bit m of the 32-bit port
n after the completion of the hand shake.
-1.
MEASure:DIGital:DATAn:LW64:BITm ? read s the state of bit m of the 64-bit po rt
after the completion of the handshake.
MEASure:DIGi tal: DATAn:L W96:BIT m ? reads the state of bit m of the 96-bit port
after the completion of the handshake.
Chapter 4 HP E1458A Command Reference 69
Parameters
Parameter
Name
DATAn
BIT
m Numeric BYTE 0-7
Parameter
Type
Numeric BYTE none, 0 through 11
WORD none, 0, 2, 4, 6, 8, or 10 LWORd none, 0, 4, o r 8 LW64 none or 0 LW96 none or 0
WORD 0-15 LWORd 0-31 LW64 0-63 LW96 0-95
Range of
Values
Default
0
0
Comments Input data is always assumed to be in binary format since only a single bit of data
is being read. The command returns either a 0 or 1.
The keyword LW32 may be us ed instead of LWORd.
:DATAn is the keyword used for commands relating to the data at port n. The port
number n must be the last character of the keyword without spaces.
:BITm is the keyword that specifies the bit read by this comm an d. Like the DATAn
keyword, no space can be between the keyword
BIT and th e m parameter.
If n is omitted, port 0 is used. If m is omitted, bit 0 is used.
Related Commands: SOURce:DI G ital:DATAn:POLarity
*RST
Condition: Set to inpu t on all ports.
Example MEAS:DIG :DA TA 2:BI T 4 ? reads port 2, bit 4 (data line D2-4).
MEAS:DIG:DA TA0:LW 96:B IT9 5? reads port 0, bit 95 (data line D0-7).
70 HP E1458A Command Reference Chapter 4
MEASure:DIGital:DATAn[:type]:TRACe
MEASure:DIGital:DATAn[:BYTE]:TRACe <name> reads 8-bit port n after the
completion of the handshake and stores the data block in <name>.
MEASure:DIGi tal: DATAn:WO RD:T RACe <name> reads 16-bit port n after the
completion of the handshake and stores the data block in <name>.
MEASure:DIGi tal: DATAn:LWORd:TRACe <name> reads the 32-b it port n after
the completion of the handshake and stores the data block in <name>.
MEASure:DIGi tal: DATAn:LW 64:TRACe <name> r eads the 64-bit port after the
completion of the handshake and stores the data block in <name>.
MEASure:DIGi tal: DATAn:LW 96:TRACe <name> r eads the 96-bit port after the
completion of the handshake and stores the data block in <name>.
Parameters
Parameter
Name
DATAn
<name> String previously defined block na me
Parameter
Type
Numeric BYTE none, 0 thro ugh 11
WORD none, 0, 2, 4, 6, 8, or 10 LWORd none, 0, 4, or 8 LW64 none or 0 LW96 none or 0
(max 12 charact ers )
Range of
Values
Default
Comme nt s :TRACe <name> is the keyword (maximum 12 characters) that specifies the
block where the data should be stored. This blo ck must have been previously defined by the
This command will completely fill the named block. The defined block size sets
the amount of data read. The block size must by an integer multiple of the keyword used in this command. For example, valid block sizes for LWORd are 4, 8, 12, 16 etc.
Input data is returned in decimal format. Other formats are not supported for
input, however data ou tput may be in binary, octal, decim al or h ex ad ecim al.
The keyword LW32 may be us ed instead of LWORd.
[SOURce]:DIGit al:T RACe: DEF ine command.
[:type]
0
None
:DATAn is the keyword used for commands relating to the data at port n. The port
number n must be the last character of the keyword without spaces.
Chapter 4 HP E1458A Command Reference 71
Related Commands:
MEASure:DIGit al:DATAn[:VALue]? SOURce:DIGital:TRACe:DEFINE
*RST Condition: Set to input on all ports .
Example MEAS:DIG:DA TA0:W ORD:T RACe firs t_bl o ck re ads 16-bit data from port 0 and
stores it in the predefined user memory locatio n firs t_block.
MEASure:DIGital:FLAGn?
MEASure:DIG i tal: FLAGn? reads the status of the flag line on port n and returns a
0 or 1 to show whether a peripheral has set the flag line to READY or BUSY.
Parameters
<name>
Parameter
Name
FLAGn
Parameter
Type
Numeric none, 0 through 11 0
Range of
Values
Comme nt s • MEASure:DIGital:FLAG n? is used to implement custo m hands hakes. The
handshake mode must be set to NONE to use this command.
:FLAGn is the keyword used for commands relating to the flag line at port n. The
port number n must be the last character of the keyword without spaces.
If n is omitted FLAG0 is used.
MEASure:DIGital:FLAGn? may be a ffected by the condition of the flag
combining jump ers. Refer to Chapter 2 for additional informati on.
Related Commands:
[SOURce:]DIGital: CONTroln:POLarity? [SOURce:]DIGital: CONTrol [SOURce:]DIGital: FLAG [SOURce:]DIGital: FLAG
n[:VALue] n:POLarity n:POLarity?
Example MEAS:DIG:FLAG1? reads the port1 flag line.
Default
72 HP E1458A Command Reference Chapter 4
The MEMory sub syst em defines the co mman d set for enabling the use of ex tern al VME memory or memory on the command mod ule for storing traces and macros. The addressable range is #H200000 through #HDFFFF8 in A24 space.
Subsystem Syntax MEMory
DELete:MACRo VME:
ADDRess [ ADDRess? [MIN | MAX] SIZE [ SIZE? [MIN | MAX] STATe STATe?
MEMory:DELete:MACRo
MEMory:DELete: MACRo <name > deletes a single macro previously recorded
using the
MEMory
<name>
<base>]<address>
<base>]<siz e>
<state>
*DMC Common com mand.
Parameters
Parameter
Name
<name> String Previously defined bloc k nam e
Parameter
Type
Range of
Values
(maximum 12 charact ers)
Default
None
Comme nt s <name> must have been previously defined by a *DMC (Define Macro) Common
command.
The maximum length for <name> is 12 characters.
This command purges a single, specific macro; th e *PMC Common comman d
purges all macros.
Example MEM:DEL:MACR test _mac ro deletes macro named test_macro previously defined
using the
*DMC Common com mand.
Chapter 4 HP E1458A Command Reference 73
MEMory:VME:ADDRess
MEMory:VME:ADDRess [<ba se>]<address> establi shes the address of ad d-on
VME memory in the system whi ch can then be used to store block data in commands with the
Parameters
:TRACE keyword.
Parameter
Name
<base>
<address>
Parameter
Type
Discrete none, #H, #Q, or #B Decimal Numeric
or
Discrete
Range of
200000
MIN or M AX
Values
- DFFFF8
16
Default
16
None
Comme nt s <base> specifies the numeric format as decimal, hexadecim al, octal, or binary.
IEEE-488.2 specifies the following values for this parameter:
Decimal = no parameter Hexadecimal = #H Octal = #Q Bina ry = #B
Valid values for <base><address> are #H200000 (2 ,0 97,152 decimal) through
#HDFFFF8 (14,680, 056 decim al).
For this memory to actually be used it must also have a defined length and have
been turned ON using the
Related Commands:
SOUR:DIG:TRAC: DEF <name>,<size> MEMory:VME:ADDress? MEMory:VME: SIZE MEMory:VME: STAT e <ON or OFF>
MEMory:VME:STATe command.
<size>
*RST Condition: #H20000 0.
Example MEM:VME:ADDR #H200000 sets the starting VME address to 200000
16.
74 HP E1458A Command Reference Chapter 4
MEMory:VME:ADDRess?
MEMory:VME:ADDRess? [<MIN | MAX>] queries for the current VME memory
address. The optional param eter lets yo u query for the fixed minim um or maximu m address.
Parameters
Comments This command always returns the address in decimal format .
The address returned using MIN is always 2,097,152.
The address returned using MAX is always 14,680,056.
Related Commands:
MEMory:VME:SIZE
MEMory:VME:S IZ E [<ba se>]<siz e> sets the size in bytes of the exte rnal or shared
command module mem ory.
Parameters
Parameter
Name
<MIN | MAX>
MEMory:VME:ADDRess <address> MEMory:VME: ST AT e ? MEMory:VME: SIZ E?[
Parameter
Type
Discrete none, MIN, or MAX None
<MIN or MAX>]
Range of
Values
Default
Parameter
Name
<base> Discrete None, #H, #Q, or #B Decimal
<size> Numeric
Parameter
Type
or
Discrete
Range of
Values
00000016 - C00000
or
MIN or MAX
Default
16
None None
Comments Address plus size must not exceed #HE00000.
<base> specifies the numeric format as decimal, hexad ecimal, octal, or binary.
IEEE-488.2 specifies the following values for this parameter:
Decimal = no parameter Hexadecimal = #H Octal = #Q Bina ry = #B
Chapter 4 HP E1458A Command Reference 75
Related Commands:
MEMory:VME:ADDRess? MEMory:VME: ST AT e ? MEMory:VME: SIZE?
*RST
MEMory:VME:SIZE?
MEMory:VME:S IZ E? [<MIN | MAX > ] queries for the current VME memory size.
The optional parameter lets you query for the fixed maximum or minimum VME memory size.
Parameters
Comme nt s This command always returns the memory size in decimal format.
The size returned using
The size returned using
Related Commands:
MEMory:VME:ADDRess? [<M IN or MAX>] MEMory:VME:STATe? MEMory:VME: SIZE
Condition: #H0 00000.
Parameter
Name
<MIN | MAX>
Parameter
Type
Discrete none, MIN or MAX None
MIN is always 0.
MAX is always 12582912
<size>
Range of
Values
Default
MEMory:VME:STATe
MEMory:VME:STATe <state> enables/disables the use of VME memory for storage.
Parameters
Parameter
Name
<state>
76 HP E1458A Command Reference Chapter 4
Parameter
Type
Boolean 0 or 1, OFF or ON None
Range of
Values
Default
Comments Related Commands:
SOUR:DIG:TRAC: DEF <name><size> SOUR:DIG:TRAC[ :DAT A] <name>< block_data> MEMory:VME:ADDress <address> MEMory:VME: SIZE <size>
*RST Condition : Set to OFF.
Example MEM: VM E:STAT ON enables a ccess to the VME memory.
MEMory:VME:STATe?
MEMory:VME:S TATe? queries the state of the external memory flag.
Parameters None
Comme nt s This command returns a 0 or a 1, indicating external memory is OFF or ON.
Related Commands:
MEMory:VME:ADDRess?[<MIN or MAX>] MEMory:VME: SIZ E?[
<MIN or MAX>]
Chapter 4 HP E1458A Command Reference 77
The [SOURce:] subsys tem defines the comm and set for the HP E1458A Digital I/O Module output st atem ents. It also defines the state and pol arit y of the control line (CTL), the polarity of the flag line (FLG), the handshaking mo de, and hand shake delay for both data input and output. The root comm and
Subsystem Syntax [SOURce:]
DIGital
:CONTrol
:DATA
n
:POLarity <POS | NEG> :POLarity? [:VALue] [:VALue]?
<0 | 1 or ON | OFF>
n
[:BYTE]
m <0 | 1>
:BIT :BITm ?
m
:BIT
:MONitor?
:HANDshake
:DELay :DELay? [:MODE]
[:MODE]? :MONitor? :POLarity :POLarity? :TRACe [:VALue] [<base>]<value> [:VALue]?
:WORD
m <0 | 1>
:BIT :BITm?
m
:BIT
:MONitor? :HANDshake
:DELay
:DELay?
[:MODE]
[:MODE]? :MONitor?
<time>
<NONE | LEADing | TRAiling
| PULSe | PARTial | STRobe
<POS | NEG>
<name>
<time>
<NONE | LEADing | TRAiling
| PULSe | PARTial | STRobe
[SOURce:]
[SOURce:] is optional.
>
>
78 HP E1458A Command Reference Chapter 4
[SOURCE:]
DIGital
:POLarity <POS | NE G > :POLarity? :TRACe [:VALue] [<base>]<value> [:VALue]?
DATA
n
:LWORd or LW 32
:BIT :BITm ? :BIT
:HANDshake
:MONitor? :POLarity :POLarity? :TRACe [:VALue] [<base>]<value> [:VALue]?
:LW64
:BIT :BITm? :BIT
:HANDshake
:MONitor? :POLarity :POLarity? :TRACe [:VALue] [<base>]<value> [:VALue]?
<name>
m <0 | 1> m
:MONitor?
:DELay
:DELay?
[:MODE]
[:MODE]?
<POS | NEG>
<name>
m <0 | 1> m
:MONitor?
:DELay
:DELay?
[:MODE]
[:MODE]?
<time>
<POS | NEG>
<name>
<time>
<NONE | LEADing | TRAiling
| PULSe | PARTial |STRobe
<NONE | LEADing | TRAiling
| PULSe | PARTial | STRobe
>
>
Chapter 4 HP E1458A Command Reference 79
[SOURCE:]
DIGital
:DATA
n
:LW96
:BIT
m <0 | 1>
:BITm? :BIT
m
:MONitor? :HANDshake
:DELay
:DELay?
[:MODE]
[:MODE]? :MONitor? :POLarity :POLarity? :TRACe [:VALue] [<base>]<value> [:VALue]?
:FLAG
n
:POLarity <POS | NEG> :POLarity?
:HANDshake
:DELay <time> :DELay? [:MODE]
[:MODE]?
:IO
n?
:TRACe
:CATalog? [:DATA] [:DATA]? <nam e> :DEFine <name><size>[<fi ll> ] :DEFine? :DELete
n
<NONE | LEADing | TRAiling
<name><block_d ata>
<name>
[:NAME] :ALL
<time>
<NONE | LEADing | TRAiling
<POS | NEG>
<name>
| PULSe | PARTial | STRobe
<name>
| PULSe | PARTial | STRobe
>
>
80 HP E1458A Command Reference Chapter 4
[SOURce:]DIGital:CONTroln:POLarity
[SOURce:]DIGital:CONTroln:POLarity <polarity> sets the CTL line voltage lev el
for logical true in port n to either TTL High for POSitive polarity or TTL Low for NEGative polarity.
Parameters
Parameter
Name
CONTroln
<polarity >
Parameter
Type
Numeric none, 0 through 11 0 Discrete POSitive or NEGative None
Range of
Values
Comme nt s Control lines are always accessed by their 8-bit port num be r
:CONTroln is the keyword used for commands relating to the control (CTL) lin e at
port n. The port number n must be the last character of the keyword without spaces.
If n is omitted, port 0 is used.
The control line is used with the flag line to handshake data to and from
peripherals.
Related Commands:
[SOURce:]DIGital: CONTroln:POLarity? [SOURce:]DIGital: CONTrol [SOURce:]DIGital: FLAG [SOURce:]DIGital: FLAG
n[:VALue] n:POLarity n:POLarity?
Default
*RST
Condition: PO Larit y = POSitiv e
Example DIG:CONT0:POL POS sets logical true to TTL High on port 0 control line.
Chapter 4 HP E1458A Command Reference 81
[SOURce:]DIGital:CONTroln:POLarity?
[SOURce:]DIGital:CONTroln:POLarity? returns a three-character string, either POS
or NEG, indicating the logical true condition of the control (CTL) line at port n.
Parameters
Parameter
Parameter
Name
CONTroln
Example DIG:CONT 0: PO L ? queries the state of the logical true condition on port 0.
:CONTroln is the keyword used for commands relating to the control (CTL) lin e at
port n. The port number n must be the last character of the keyword without spaces.
If n is omitted, port 0 is used.
[SOURce:]DIGital:CONTroln[:VALue]
[SOURce:]DIGital:CO NT ro ln[:VAL u e] <valu e> sets or clears the control lin e on
the selected port n.
Parameters
Parameter
Name
Parameter
Range of
Type
Numeric none, 0 through 11 0
Values
Range of
Type
Values
Default
Default
CONTroln
<val ue>
Numeric none, 0 through 11 0 Boolean 0 or 1, OFF or ON None
Comme nt s This command is used to create custom handshakes when the HANDshake is set
to NONE.
:CONTroln is the keyword used fo r comm ands relating to the c ontrol (CTL) line at
port n. The port number n must be the last character of the keyword without spaces.
The control line is used with th e flag line to handshake data to and from
peripherals.
82 HP E1458A Command Reference Chapter 4
Related Commands:
[SOURce:]DIGital: CONTroln:POLarity [SOURce:]DIGital: CONTrol [SOURce:]DIGital: CONTrol [SOURce:]DIGital: FLAG [SOURce:]DIGital: FLAG
n:POLarity?
n:[:VALue]? n:POLarity n:POLarity?
*RST
Condition: Clears the control line; i.e., sets the contro l line to logical 0.
Example DIG:CONT 2 1 sets the 8-bit port 2 control line true.
[SOURce:]DIGital:CONTroln[:VALue]?
[SOURce:]DIGital:CO NT ro ln[:VAL u e]? reads the state of the control line on port n
and returns a 0 or 1, indicating the logi cal conditio n of the CTL line.
Parameters
Parameter
Name
CONTroln
Comme nt s This command is used to create custom handshakes when the HANDshake is set
to NONE.
The condition of the CTL line returned by this command is the logical true value
set by the
DIG:CONTn :[:VALue]? command.
Parameter
Type
Numeric none, 0 through 11 0
Range of
Values
Default
Example DIG:CONT 2 ? returns the current state of the 8-bit port 2 control line.
[SOURce:]DIGital:DATAn[:type]:BITm
[SOURce:]DIGital:DATAn [:BYTE]:BITm <value> sets bit m on 8-bit port n.
[SOURce:]DIGital:DATAn :WORD:BITm <value> sets bit m on 16 -bit port n.
[SOURce:]DIGital:DATAn :LWORd :BI Tm < value> sets bit m on 32-bit port n.
[SOURce:]DIGital:DATAn:LW64:BITm <value> sets bit m on 64-bit port n.
[SOURce:]DIGital:DATAn :LW96: BITm <value > sets bit m on 96-bit port n.
Chapter 4 HP E1458A Command Reference 83
Parameters
Parameter
Name
DATAn
BIT
m Numeric BYTE 0 - 7
<value>
Parameter
Type
Numeric BYTE none, 0 through 11
WORD none, 0, 2, 4, 6, 8, or 10 LWORd none, 0, 4, or 8 LW64 none or 0 LW96 none or 0
WORD 0 - 15 LWORd 0 - 31 LW64 0 - 63 LW96 0 - 95
Nume r i c 0 or 1 N one
Range of
Values
Default
0
None
Comme nt s :DATAn and :BITm are the keywords use d to write data to port n and bit m. The port
number n and bit number m must be the la st c haracter of the ke yword without spaces.
For 16-bit operations using :WORD, n must be 0, 2, 4, 6, 8, or 10.
For 32-bit operations using :LWORd, n must be 0, 4, or 8.
For 64-bit or 96-bit operations using :LW6 4 or :LW96, n must be 0.
The keyword LW32 may be used in stead of LWORd.
Related Commands:
[SOURce:]DIGital: DATAn[:VALue] [SOURce:]DIGital: DATA
*RST
Condition: All ports are set for data input.
n:POLarity
Example DIG:DATA3:BIT4 1 sets bit 4 (the 5th bit) of port 3 to logical 1.
84 HP E1458A Command Reference Chapter 4
[SOURce:]DIGital:DATAn[:type]:BITm?
[SOURce:]DIGital:DATAn [:BYTE]:BITm? retu rns a 0 or 1 indicating the current
programmed state of bit m on 8-bit port n.
[SOURce:]DIGital:DATAn :WORD: BIT m? returns a 0 or 1 indicating the current
programmed state of bit m on 16-bit port n.
[SOURce:]DIGital:DATAn :LWORd :BI Tm ? returns a 0 or 1 ind i c ating the current
programmed state of bit m on 32-bit port n.
[SOURce:]DIGital:DATAn :LW64: BITm? ret urns a 0 or 1 indicating the current
programmed state of bit m on 64-bit port n.
[SOURce:]DIGital:DATAn :LW96: BITm? ret urns a 0 or 1 indicating the current
programmed state of bit m on 96-bit port n.
Parameters
Parameter
Name
DATAn
BIT
m Numeric BYTE 0 - 7
Parameter
Type
Numeric BYTE none, 0 through 11
WORD none, 0, 2, 4, 6, 8, or 10 LWORd none, 0, 4, or 8 LW64 none or 0 LW96 none or 0
WORD 0 - 15 LWORd 0 - 31 LW64 0 - 63 LW96 0 - 95
Range of
Values
Comments This command performs a readback of the data line register. the
DIG:DAT An[ :type]: BI Tm:MO N? comm and return s the actual conditi on of the data
lines.
The keyword LW32 may be us ed instead of LWORd.
:DATAn and :BITm are the keywords used to write data to port n and bit m. The
port number n and bit number m must be the last character of the keyword without spaces.
For 16-bit operations using :WORD, n must be 0, 2, 4, 6, 8, or 10.
Default
0
None
For 32-bit operations using :LWORd, n must be 0, 4, or 8.
For 64-bit or 96-bit operations using :LW64 or :LW96, n must be 0.
Chapter 4 HP E1458A Command Reference 85
Related Commands:
[SOURce:]DIGital: DATAn[:VALue] [SOURce:]DIGital: DATA
n:POLarity
Example DIG:DATA3:B IT 4:VAL? returns a 0 or 1 indicating the last programm ed state of bit
4 on port 3.
[SOURce:]DIGital:DATAn[:type]:BITm :MONitor?
[SOURce:]DIGital:DATAn [:BYTE] :BIT m :MO Nitor? returns a 0 or 1, indicating
the current state of the data line specified by bit m on 8-bit port n.
[SOURce:]DIGital:DATAn :WORD: BIT m: MONitor? ret urns a 0 or 1, indicating
the current state of the data line specified by bit m on 16-bit port n.
[SOURce:]DIGital:DATAn :LWORd :BI Tm :M ONi to r? returns a 0 or 1, indicating
the current state of the data line specified by bit m on 32-bit port n.
[SOURce:]DIGital:DATAn :LW64: BITm:MO Nit or? returns a 0 or 1, indicating the
current state of the data line specified by bit m on 64-bit port n.
[SOURce:]DIGital:DATAn :LW96: BITm:MO Nit or? returns a 0 or 1, indicati ng the
current state of the data line specified by bit m on 96-bit port n.
Parameters
Parameter
Name
DATAn
BIT
m
Parameter
Type
Numeric BYTE none, 0 through 11
WORD none, 0, 2, 4, 6, 8, or 10 LWORd none, 0, 4, or 8 LW64 none or 0 LW96 none or 0
Numeric BYTE 0 - 7
WORD 0 - 15 LWORd 0 - 31 LW64 0-63 LW96 0-95
Range of
Values
Default
None
Comments This command performs a readback of the actual condition of the data line. The
DIG:DAT An[ :type]B ITm? command returns the programmed st ate of the data line.
The value returned is not affected by the programmed data line polarity. A 1
returned always indicates a TTL High level on the data line.
0
For 16-bit operations using :WORD, n must be 0, 2, 4, 6, 8, or 10 .
86 HP E1458A Command Reference Chapter 4
For 32-bit operations using :LWORd, n must be 0 , 4, or 8.
For 64-bit or 96-bit operations using :LW6 4 or :LW96, n must be 0.
The keyword LW32 maybe used inst ead of LW ORd.
:DATAn and :BITm are the keywords used to write data to port n and bit m. The
port number n and bit number m must be the last character of the keyword without spaces.
Related Commands:
[SOURce:]DIGital: DATAn:BITn[:VALue]? [SOURce:]DIGital: DATA
n:POLarity
Example DIG:DAT A3:BIT4:MON? returns either a 0 or a 1 indicatin g the current conditio n of
bit 4 on port 3.
[SOURce:]DIGital:DATAn[:t ype] :H ANDshake:DELay
[SOURce:]DIGital:DATAn[:BYTE]:HANDshake:DELay <time> sets the delay
between data output and the control line for data output at 8-bit port n.
[SOURce:]DIGital:DATAn :WORD:HANDshake: DEL ay <time> sets the delay
between data output and the control line for data output at 16-bit port n
[SOURce:]DIGital:DATAn :LWORd :HANDshake:DEL ay <time> sets the delay
between data output and the control line for data output at the 32-bit port n.
[SOURce:]DIGital:DATAn :LW64: HANDshake:DEL ay <time> sets the delay
between data output and the control line for data output at the 64-bit port.
[SOURce:]DIGital:DATAn :LW96: HANDshake:DEL ay <time> sets the delay
between data output and the control line for data output at the 96-bit port.
Chapter 4 HP E1458A Command Reference 87
Parameters
Parameter
Name
DATAn
<time> Nume ric
Parameter
Type
Numeric BYTE none, 0 through 11
WORD none, 0, 2, 4, 6, 8, or 10 LWORd none, 0, 4, or 8 LW64 none or 0 LW96 none or 0
Discrete MIN | MAX | DEF
Range of
Values
2
µs to 15 µs
µs to 150 µs
20
200
µs to 1.5 ms
2ms to 15ms
Default
0
None
Comme nts This command is related to the handshake mode in use. Chapter 3 describes the
handshake modes and timing.
The delay tim e must be se t to the sam e val ue on a ll po rts u sed in a mult iple -port oper ation .
MAX sets a 15-ms delay. DEF sets 2-µs delay. MIN sets a delay of 0. Because o f
hardware ambiguity at this delay setting, the actual delay is not guaranteed. Note
MIN is illegal for PULSe or STRobe handshakes.
that
This command sets the strobe pulse width for both input and ou tput STRo be
handshakes.
DIGital:DATAn:HANDshake[:MODE] NONE command ignores any programmed
delay time. For all other modes of handshaking, 2
Specific bands of delay settings are not allowed. These are: µs > <time> < 2 µs
0
µs > <tim e> < 20 µs
15 150
µs > <time> < 200 µs
µs is the minimum.
1.5 ms > <time> < 2.0 ms The controller uses a rounded-up value for <tim e> if th ese val ues are s pecifie d.
The keyword LW32 may be used ins tead of LWORd.
DIG:DATA n [:type]: HANDshake is the s equence used for comm ands relating to
data handshaking at ports defined by n. The port number n must be the last character of the keyword without spaces.
Related Commands:
[SOURce:]DIGital:HANDshak e n[:MO DE] [SOURce:]DIGital: CONTrol [SOURce:]DIGital: CONTrol [SOURce:]DIGital: FLAG
n:POLarity n[:VALue]
n:POLarity
88 HP E1458A Command Reference Chapter 4
*RST Condition: Delay is set to 2 µs.
Example DIG:HAND3:DEL .005 sets the delay between the data output and the assertion of
the control line to true on 8-bit port 3 to 5 ms.
[SOURce:]DIGital:DATAn[:type]:HANDshake:DELay?
[SOURce:]DIGital:DATAn [:BYTE] :HANDsh ake:DEL ay? queries for the delay time
between data output and the control line for data output at 8-bit port n and returns a decimal number between 0 and .015.
[SOURce:]DIGital:DATAn :WORD: HANDshake:DEL ay? qu eries for the delay time
between data output and the control line for data output at 16-bit port n and returns a decimal number between 0 and .015.
[SOURce:]DIGital:DATAn :LWORd :HANDshake:DEL ay? queries for the delay
between data output and the control line for data output at the 32-bit port n and returns a decimal numbe r between 0 and .015.
[SOURce:]DIGital:DATAn :LW64: HANDshake:DEL ay? queries for the delay
between data output and the control line for data output at the 64-bit port and returns a decimal number between 0 and .015.
[SOURce:]DIGital:DATAn :LW96: HANDshake:DEL ay? queries for the delay
between data output and the control line for data output at the 96-bit port and returns a decimal number between 0 and .015.
Parameters
Parameter
Name
DATAn
< MIN | MA X | DE F> Discrete None or MIN | MAX | DEF None
Parameter
Type
Numeric BYTE none, 0 through 11
WORD none, 0, 2, 4, 6, 8, or 10 LWORd none, 0, 4, or 8 LW64 none or 0 LW96 none or 0
Comme nt s The keyword LW32 m ay be us ed instead of LWORd.
MIN or DEF returns 0.000002. MAX returns 0.015.
DIG:DATAn[:type]:HANDshake is the sequence used for commands relating to
data handshaking at ports defined by n. The port number n must be the last character of the keyword without spaces.
Range of
Values
Default
0
Chapter 4 HP E1458A Command Reference 89
[SOURce:]DIGital:DATAn[:type]:HANDshake[:MODE]
[SOURce:]DIGital:DATAn [:BYTE]:HANDshake[:MODE] <mode> selects the type
of handshake and defines the timing relationsh ip between the control (CTL) lin e, the flag (FLG) line, and when data is transferred in either direction between the HP E1458A Digital I/O Module and a peripheral on 8-bit port n.
[SOURce:]DIGital:DATAn :WORD:HANDshake[ :MODE] <mode> selects the
handshake mode used on the 16-bit port n.
[SOURce:]DIGital:DATAn :LWORd :HANDshake[:M O DE] <mo de > selects the
handshake mode used on the 32-bit port n.
[SOURce:]DIGital:DATAn :LW64:HANDshake[ :MODE] <mode> selects the
handshake mode used on the 64-bit port.
[SOURce:]DIGital:DATAn :LW96:HANDshake[ :MODE] <mode> selects the
handshake mode used on the 96-bit port.
Parameters
Parameter
Name
DATAn
<mode> Discrete NONE, LEADing,
Parameter
Type
Numeric BYTE none, 0 through 11
WORD none, 0, 2, 4, 6, 8, or 10 LWORd none, 0, 4, or 8 LW64 none or 0 LW96 none or 0
Comments Handshake modes are described in Chapter 3.
The handshake <mode> must be the same on all ports used in multiple-port
operations.
The keyword LW32 may be us ed instead of LWORd.
DIG:DATAn[:type]HANDs hake is the sequence used for commands relating to data
handshaking at port n. The port number n must be the last character of the keyword without spaces.
NONE deletes all automatic data handshaking between the HP E1458A Dig ital
I/O Module and the peripheral. For custom handshaking, the control and the flag lines are controlled by the
DIGital:CONTroln and MEAS:DIGital:FLAGn commands.
Range of
Values
TRAiling, PULSe
PARTial, or STRobe
Default
0
NONE
90 HP E1458A Command Reference Chapter 4
Related Commands:
[SOURce:]DIGital:HANDshak e n:[DELay] [SOURce:]DIGital: CONTrol [SOURce:]DIGital: CONTrol [SOURce:]DIGital: FLAG
n:POLarity n[:VALue]
n:POLarity
*RST
Condition: M ode is NONE on all ports .
Example DIG:DATA3:HAND LEAD sets the handshake mode to LEADing on 8-bit port 3.
[SOURce:]DIGital:DATAn[:type]:HANDshake[:MODE]?
[SOURce:]DIGital:DATAn [:BYTE] :HANDsh ake[:M ODE]? returns a string
indicating th e type of handshake set on 8-bit port n.
[SOURce:]DIGital:DATAn :WORD:HANDshake[ :MODE] ? returns a string
indicating th e type of handshake set on the 16-bi t port n.
[SOURce:]DIGital:DATAn :LWORd :HANDshake[:M O DE]? returns a s tring
indicating th e type of handshake set on the 32-bi t port n.
[SOURce:]DIGital:DATAn :LW64:HANDshake[ :MODE] ? returns a string indicating
the type of handshake set on the 64-bit port.
[SOURce:]DIGital:DATAn :LW96:HANDshake[ :MODE] ? returns a string indicating
the type of handshake set on the 96-bit port.
Parameters
Parameter
Name
DATAn
Parameter
Type
Numeric BYTE none, 0 through 11
WORD none, 0, 2, 4, 6, 8, or 10 LWORd none, 0, 4, or 8 LW64 none or 0 LW96 none or 0
Range of
Values
Default
0
Comme nt s The handshake <mode> must be th e sam e on all ports used in multiple-port
operations.
The keyword LW32 may be us ed instead of LWORd.
Chapter 4 HP E1458A Command Reference 91
This command will return one of the following strings:
NONE LEAD TRA PULS PART STR
:DATAn[:type] HANDshake? is the sequence used for commands relating to data
handshaking at port n. The port number n must be the last character of the keyword without spaces.
Related Commands:
[SOURce:]DIGital:HANDshak e n:[DELay] [SOURce:]DIGital: CONTrol [SOURce:]DIGital: CONTrol [SOURce:]DIGital: FLAG
n:POLarity n[:VALue]
n:POLarity
*RST
Condition: M ode is NONE on all ports .
Example DIG:DATA3:HA ND ? returns the handshake mode set on port 3.
[SOURce:]DIGital:DATAn[:type]:MONitor?
[SOURce:]DIGital:DATAn [:BYTE]:MONitor? returns a de cimal value ind icating
the current state of the data lines on 8-bit port n. The value returned is in the range of 0 to 255.
[SOURce:]DIGital:DATAn :WORD: MONit or? returns a decimal value indicating
the current state of the data lines on 16-bit port n. The value returned is in the range of -32768 to 32767.
[SOURce:]DIGital:DATAn :L WO Rd:MONitor? returns a decimal value indicating
the current state of the data lines on 16-bit port n. The value returned is in the range
31
of -2
[SOURce:]DIGital:DATAn :LW64:MONitor? returns two decimal values indicati ng
the current state of the data lines on 64-bit port n. The values returned a r e each in the range of -2
to (231 - 1).
31
to (231 - 1).
[SOURce:]DIGital:DATAn :LW96:MONitor? returns three decimal values
indicating th e current state of the data lines on 96-bit port n. The values returned are each in the range of -2
31
to (231 - 1).
92 HP E1458A Command Reference Chapter 4
Parameters
Parameter
Name
DATAn
Parameter
Type
Numeric BYTE none, 0 through 11
WORD none, 0, 2, 4, 6, 8, or 10 LWORd none, 0, 4, or 8 LW64 none or 0 LW96 none or 0
Range of
Values
Default
Comme nt s This command performs a readback of the actual condition of the selected data
port. The the data port.
The value returned is not affected by the programmed data line polarity. The
returned value indicates the actual TTL state of the data lines.
DIG:DATAn [:type]: MO N? is the sequence used for commands relating to data lines
at port n. The port numb e r n must be the last character of the keyword without spaces.
The keyword LW32 may be us ed instead of LWORd.
Related Commands:
[SOURce:]DIGital: DATAn[:type]:POLarity
DIG:DATAn[:type][:VALue]? command returns the programmed state of
0
*RST
Condition: M ode is NONE on all ports .
Example DIG:DAT A3:M ON ? returns a number representing the state of the data lines on 8-bit
port 3.
Chapter 4 HP E1458A Command Reference 93
[SOURce:]DIGital:DATAn[:type]:POLarity
[SOURce:]DIGital:DATAn [:BYTE]:POLarity <polarity> sets the data line voltage
level for logical true in port n to either TTL High for POSitive polarity or TTL Low for NEGative polarity.
[SOURce:]DIGital:DATAn :WORD:POLarity <polarity> sets the data line voltage
level for logical true in the 16-bit port n to either TTL High for POSitive polarity or TTL Low for NEGative polarity.
[SOURce:]DIGital:DATAn :LWORd :POL arit y <polarity> sets the data line vol tage
level for logical true in the 32-bit port n to either TTL High for POSitive polarity or TTL Low for NEGative polarity.
[SOURce:]DIGital:DATAn :LW64: POLari t y <polarit y> sets the d ata line v oltage
level for logical true in the 64-bit port n to either TTL High for POSitive polarity or TTL Low for NEGative polarity.
[SOURce:]DIGital:DATAn :LW96: POLari t y <polarit y> sets the d ata line v oltage
level for logical true for all ports to either TTL High for POSitive polarity or TTL Low for NEGative polarity.
Parameters
Parameter
Name
DATAn
<polarity> Discre te POSitive or NEGative None
Parameter
Type
Numeric BYTE none, 0 through 11
WORD none, 0, 2, 4, 6, 8, or 10 LWORd none, 0, 4, or 8 LW64 none or 0 LW96 none or 0
Range of
Values
Default
0
Comments :DATAn is the keyword used for co mman ds r elating to the data lines at port n. The
port number n must be the last character of the keyword without spaces.
Related Commands:
[SOURce:]DIGital: DATAn:POLarity? [SOURce:]DIGital: DATA [SOURce:]DIGital: DATA
*RST Condition: POLarit y = POSitiv e
n[:VALue] n:BITm
Example DIG:DAT A0:P OL PO S sets log ic al true to TTL High on 8-bit port 0 data lines.
94 HP E1458A Command Reference Chapter 4
[SOURce:]DIGital:DATAn[:type]:POLarity?
[SOURce:]DIGital:DATAn [:BYTE]:POLarity? returns a string, either POS or NEG,
indicating th e logical true conditi on of the data lines of 8-bit po rt n.
[SOURce:]DIGital:DATAn :WORD: POLari t y? returns a string, either POS or NEG,
indicating th e logical true conditi on of the data lines of 16-bit port n.
[SOURce:]DIGital:DATAn :LWORd :POL arit y? returns a string, either POS or NEG,
indicating th e logical true conditi on of the data lines of the 32-bit port n.
[SOURce:]DIGital:DATAn :LW64: POLari ty? retu rn s a string, either POS or NEG,
indicating th e logical true conditi on of the data lines of the 64-bit port.
[SOURce:]DIGital:DATAn :LW96: POLari ty? returns a string, either POS or NEG,
indicating th e logical true conditi on of the data lines of the 96-bit port.
Parameters
Parameter
Name
DATAn
Parameter
Type
Numeric BYTE none, 0 through 11
WORD none, 0, 2, 4, 6, 8, or 10 LWORd none, 0, 4, or 8 LW64 none or 0 LW96 none or 0
Range of
Values
Default
0
Example DIG:DAT A0:P OL? returns the state of the logi cal true condi tion on port 0 as either
POS or NEG.
Chapter 4 HP E1458A Command Reference 95
[SOURce:]DIGital:DATAn[:type]:TRACe
[SOURce:]DIGital:DATAn [:BYTE]:TRACe <name> writes the named block of
data to 8-bit port n whenever the port is ready to start a new handshake.
[SOURce:]DIGital:DATAn :WORD: TRACe <name> writes the named block of
data to 16-bit port n whenever the port is ready start a new handshake.
[SOURce:]DIGital:DATAn :LWORd:TRACe <name> writes the named block of
data to the 32-bit port n whenever the port is ready to start a new handshake.
[SOURce:]DIGital:DATAn :LW64:TRACe <name> writes the named block of dat a
to the 64-bit port whenever the port is ready to start a new handshake.
[SOURce:]DIGital:DATAn :LW96:TRACe <name> writes the named block of dat a
to the 96-bit port whenever the port is ready to start a new handshake.
Parameters
Parameter
Name
DATAn
<name> String Name of user memory block
Parameter
Type
Numeric BYTE none, 0 through 11
WORD none, 0, 2, 4, 6, 8, or 10 LWORd none, 0, 4, or 8 LW64 none or 0 LW96 none or 0
Range of
Values
(maximum 12 characters)
Comments The keyword LW32 may be us ed instead of LWORd.
:DATAn and :TRACe are the keywords used to write data to port n from block
<name>. The port number n must be the last character of the keyword without
spaces.
Related Commands:
[SOURce:]DIGital: DATAn[:VALue] [SOURce:]DIGital: DATA
*RST
Condition: All ports are set for data input.
n:POLarity
Example DIG:DATA2:T RAC: W ORD fir st_bloc k writes data from the user memory block
first_block to 16-bit port 2.
Default
0
None
96 HP E1458A Command Reference Chapter 4
[SOURce:]DIGital:DATAn[:type][:VALue]
[SOURce:]DIGital:DATAn [:BYT E] [:VAL u e] [<base>]<value > writes data to 8-bit
port n. Values can be binary, octal, decimal, or hexadecimal.
[SOURce:]DIGital:DATAn :WORD[:VALue] [<base>]<value> writes data to 16-bit
port n. Values can be binary, octal, decimal, or hexadecimal.
[SOURce:]DIGital:DATAn :L WORd[:VALue ] [<base>]<value> writes data to the
32-bit port n. Values can be binary, octal, decimal, or h ex ad ecim al.
[SOURce:]DIGital:DATAn :LW64[:VALue] [<base>]<value> writes data to the
64-bit port. Values can be binary, octal, decimal, or hexad ecimal.
[SOURce:]DIGital:DATAn :LW96[:VALue] [<base>]<value> writes data to the
96-bit port. Values can be binary, octal, decimal, or hexad ecimal.
Parameters
Parameter
Name
DATAn
<base> Discrete None, #H, #Q, or #B Decimal
<value>
Parameter
Range of
Type
Numeric BYTE none, 0 through 11
Numeric BYTE -27 to (28-1)
WORD none, 0, 2, 4, 6, 8, or 10 LWORd none, 0, 4, or 8 LW64 none or 0 LW96 none or 0
WORD -2 LWORd -231 to (231-1) LW64 -2 LW96 -2
15
31 31
Comments The keyword LW32 may be used in stead of LWORd.
<base> specifies the numeric format as decimal, hexadecim al, octal, or binary.
IEEE-488.2 specifies the following values for this parameter:
Decimal = no parameter Hexadecimal = #H Octal = #Q Bina ry = #B
Default
Values
0
None
to (216-1) to (231-1)
to (231-1)
Chapter 4 HP E1458A Command Reference 97
:DATAn is the keyword used for command s relating to data output at port n. The
port number n must be the last character of the keyword without spaces.
Related Commands:
[SOURce:]DIGital: DATAn:BITm [SOURce:]DIGital: DATAn:POLarity
*RST
Condition: All ports are set for data input.
Examples DIG:DATA3 27 writes the binary equivalent of the decimal num ber 27 (00011 011)
to 8-bit port 3.
DIG:DATA3 #B00011011 writes the same byte of data as in the example above to
port 3, but uses binary format.
98 HP E1458A Command Reference Chapter 4
[SOURce:]DIGital:DATAn[:type][:VALue]?
[SOURce:]DIGital:DATAn [:BYTE][:VALue]? returns the programmed state of 8-bit
port n as a decimal number between 0 and 255.
[SOURce:]DIGital:DATAn :WORD[ :VAL u e]? returns the programmed state of
16-bit port n as a decimal number between -32768 and 32767.
[SOURce:]DIGital:DATAn :LWO Rd [:V ALue]? returns the programmed state of
32-bit port n as a decimal number between -2
[SOURce:]DIGital:DATAn :LW64[ :VAL ue]? returns the programmed st ate of the
64-bit port as two decimal values, each in the range of -2
[SOURce:]DIGital:DATAn :LW96[:VALue]? returns the programmed state the
96-bit port as three decimal numbers, each in the range of -2
31
and (2
31
- 1).
31
to (231 - 1).
31
to (231 - 1).
Parameters
Parameter
Name
DATAn
Parameter
Type
Numeric BYTE none, 0 through 11
WORD none, 0, 2, 4, 6, 8, or 10 LWORd none, 0, 4, or 8 LW64 none or 0 LW96 none or 0
Range of
Values
Comme nt s This command returns the programmed state of the data lines. The
DIG:DAT An[ :type]: MO N? r eturns the a ctual state of the data lines.
:DATAn is the keyword used for commands relating to data output at port n . The
port number n must be the last character of the keyword without spaces.
Default
0
Related Commands:
[SOURce:]DIGital: DATAn:BITm [SOURce:]DIGital: DATAn:POLarity
*RST
Condition: All port s are set for data input.
Example DIG:DATA3? returns the decimal equivalent of the data lines on 8-bit port 3.
Chapter 4 HP E1458A Command Reference 99
[SOURce:]DIGital:FLAGn:POLarity
[SOURce:]DIGital:FLAGn:POLarity <POS or NEG> sets the voltage level for
logical true to eit he r TTL High, POSitive, or TTL Low, NEGative, on the FLG handshake line.
Parameters
Parameter
Parameter
Name
FLAGn
<polarity >
Comme nt s :FLAGn is the keyword used for commands relating to the flag line at port n. The
port number n must be the last character of the keyword without spaces.
Related Commands:
[SOURce:]DIGital: FLAGn:POLarity? [SOURce:]DIGital: CONTrol [SOURce:]DIGital: CONTrol
*RST
Condition: PO Larit y = POSitiv e
Example DIG:FLAG0:POL POS sets logical true to TTL High on the port 0 flag line.
[SOURce:]DIGital:FLAGn:POLarity?
[SOURce:]DIGital:F LAGn:POLarity? returns a string, eithe r POS or NEG,
indicating th e logical true conditi on of the flag (FLG ) line.
Range of
Type
Numeric none, 0 through 11 0 Discrete POSitive or NEGative None
Values
Default
n:POLarity n:POLarity?
Parameters
Parameter
Name
FLAGn
Parameter
Type
Numeric none, 0 through 11 0
Range of
Values
Default
Example SOURCE:DIGIT AL: FLAG 0:PO Larit y? uses lon g co mm ands to qu ery th e state of the
logical true conditio n on port 0.
DIG:FLA G0: PO L ? pe rforms the same function as the example above with short
commands.
100 HP E1458A Command Reference Chapter 4
Loading...