Keysight VXI Bus 75000 C Series, E1458A User And Programming Manual

75000 Series C

User Manual and SCPI Programming

Keysight E1458A Digital I/O Module

Notices
© Keysight Technologies, Inc. 1996-2019
No part of this manual may be repro­duced in any form or by any means (including electronic storage and retrieval or translation into a foreign language) without prior agreement and written con­sent from Keysight Technologies, Inc. as governed by United States and interna­tional copyright laws.
Manual Part Number
E1458-90002
Edition
Third Edition, October 2019
Published by
Keysight Technologies, Inc. 900 S. Taft Ave. Loveland, CO 80537 USA
Sales and Technical Support
To contact Keysight for sales and techni­cal support, refer to the support links on the following Keysight websites:
www.keysight.com/find/E1458A
(product-specific information and sup­port, software and documentation updates)
www.keysight.com/find/assist (world-
wide contact information for repair and service)
Declaration of Conformity
Declarations of Conformity for this prod­uct and for other Keysight products may be downloaded from the Web. Go to
http://keysight.com/go/conformity and
click on “Declarations of Conformity.” You can then search by product number to find the latest Declaration of Conformity.
Technology Licenses
The hardware and/or software described in this document are furnished under a license and may be used or copied only in accordance with the terms of such license.
Warranty
THE MATERIAL CONTAINED IN THIS DOCUMENT IS PROVIDED “AS IS,” AND IS SUBJECT TO BEING CHANGED, WITHOUT NOTICE, IN FUTURE EDI­TIONS. FURTHER, TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, KEYSIGHT DISCLAIMS ALL WAR­RANTIES, EITHER EXPRESS OR IMPLIED, WITH REGARD TO THIS MANUAL AND ANY INFORMATION CONTAINED HEREIN, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MER­CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. KEYSIGHT SHALL NOT BE LIABLE FOR ERRORS OR FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH THE FURNISHING, USE, OR PERFORMANCE OF THIS DOCUMENT OR OF ANY INFOR­MATION CONTAINED HEREIN. SHOULD KEYSIGHT AND THE USER HAVE A SEP­ARATE WRITTEN AGREEMENT WITH WARRANTY TERMS COVERING THE MATERIAL IN THIS DOCUMENT THAT CONFLICT WITH THESE TERMS, THE WARRANTY TERMS IN THE SEPARATE AGREEMENT SHALL CONTROL.
Keysight Technologies does not warrant third-party system-level (combination of chassis, controllers, modules, etc.) per­formance, safety, or regulatory compli­ance unless specifically stated.
DFARS/Restricted Rights Notices
If software is for use in the performance of a U.S. Government prime contract or subcontract, Software is delivered and licensed as “Commercial computer soft­ware” as defined in DFAR 252.227-7014 (June 1995), or as a “commercial item” as defined in FAR 2.101(a) or as “Restricted computer software” as defined in FAR
52.227-19 (June 1987) or any equivalent agency regulation or contract clause. Use, duplication or disclosure of Software is subject to Keysight Technologies’ stan­dard commercial license terms, and non­DOD Departments and Agencies of the U.S. Government will receive no greater than Restricted Rights as defined in FAR
52.227-19(c)(1-2) (June 1987). U.S. Gov­ernment users will receive no greater than Limited Rights as defined in FAR
52.227-14 (June 1987) or DFAR 252.227­7015 (b)(2) (November 1995), as applica­ble in any technical data.
Safety Information
The following general safety precau­tions must be observed during all phases of operation of this instrument. Failure to comply with these precau­tions or with specific warnings or oper­ating instructions in the product manuals violates safety standards of design, manufacture, and intended use of the instrument. Keysight Technolo­gies assumes no liability for the cus­tomer's failure to comply with these requirements.
General
Do not use this product in any manner not specified by the manufacturer. The protec­tive features of this product must not be impaired if it is used in a manner specified in the operation instructions.
Before Applying Power
Verify that all safety precautions are taken. Make all connections to the unit before applying power. Note the external markings described under “Safety Symbols”.
Ground the Instrument
Keysight chassis’ are provided with a grounding-type power plug. The instrument chassis and cover must be connected to an electrical ground to minimize shock hazard. The ground pin must be firmly connected to an electri­cal ground (safety ground) terminal at the power outlet. Any interruption of the protective (grounding) conductor or disconnection of the protective earth terminal will cause a potential shock hazard that could result in per­sonal injury.
Do Not Operate in an Explosive Atmosphere
Do not operate the module/chassis in the presence of flammable gases or fumes.
Do Not Operate Near Flammable Liquids
Do not operate the module/chassis in the presence of flammable liquids or near containers of such liquids.
Cleaning
Clean the outside of the Keysight mod­ule/chassis with a soft, lint-free, slightly dampened cloth. Do not use detergent or chemical solvents.
Do Not Remove Instrument Cover
Only qualified, service-trained person­nel who are aware of the hazards involved should remove instrument covers. Always disconnect the power cable and any external circuits before removing the instrument cover.
Keep away from live circuits
Operating personnel must not remove equipment covers or shields. Proce­dures involving the removal of covers and shields are for use by service­trained personnel only. Under certain conditions, dangerous voltages may exist even with the equipment switched off. To avoid dangerous elec­trical shock, DO NOT perform proce­dures involving cover or shield removal unless you are qualified to do so.
DO NOT operate damaged equipment
Whenever it is possible that the safety protection features built into this prod­uct have been impaired, either through physical damage, excessive moisture, or any other reason, REMOVE POWER and do not use the product until safe operation can be verified by service­trained personnel. If necessary, return the product to a Keysight Technologies Sales and Service Office for service and repair to ensure the safety features are maintained.
DO NOT block the primary disconnect
The primary disconnect device is the appliance connector/power cord when a chassis used by itself, but when installed into a rack or system the dis­connect may be impaired and must be considered part of the installation.
Do Not Modify the Instrument
Do not install substitute parts or per­form any unauthorized modification to the product. Return the product to a Keysight Sales and Service Office to ensure that safety features are main­tained.
In Case of Damage
Instruments that appear damaged or defective should be made inoperative and secured against unintended oper­ation until they can be repaired by qualified service personnel
Do NOT block vents and fan exhaust: To ensure adequate cooling and venti­lation, leave a gap of at least 50mm (2") around vent holes on both sides of the chassis.
Do NOT operate with empty slots: To ensure proper cooling and avoid dam­aging equipment, fill each empty slot with an AXIe filler panel module.
Do NOT stack free-standing chassis: Stacked chassis should be rack­mounted.
All modules are grounded through the chassis: During installation, tighten each module's retaining screws to secure the module to the chassis and to make the ground connection.
Operator is responsible to maintain safe operating conditions. To ensure safe operating conditions, modules should not be operated beyond the full temperature range specified in the Environmental and physical specifica­tion. Exceeding safe operating condi­tions can result in shorter lifespan, improper module performance and user safety issues. When the modules are in use and operation within the specified full temperature range is not maintained, module surface tempera­tures may exceed safe handling condi­tions which can cause discomfort or burns if touched. In the event of a module exceeding the full temperature range, always allow the module to cool before touching or removing modules from the chassis.
iv
Safety Symbols
A CAUTION denotes a hazard. It calls attention to an operating pro­cedure or practice, that, if not cor­rectly performed or adhered to could result in damage to the product or loss of important data. Do not proceed beyond a CAUTION notice until the indicated condi­tions are fully understood and met.
A WARNING denotes a hazard. It calls attention to an operating pro­cedure or practice, that, if not cor­rectly performed or adhered to, could result in personal injury or death. Do not proceed beyond a WARNING notice until the indi­cated conditions are fully under­stood and met.
Products display the following sym­bols:
Warning, risk of electric shock
Refer to manual for addi­tional safety information.
Earth Ground.
Chassis Ground.
Alternating Current (AC).
Direct Current (DC)
v
vi
Contents
1 Getting Started
Using This Chapter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Digital I/O Module Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Instrument Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Downloading the SCPI Drivers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Programming the Digital I/O Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
SCPI Command Format Used in this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Specifying SCPI Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Initial Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1 Configuring the Keysight E1458A Digital I/O Module
Using This Chapter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
WARNINGS and CAUTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Setting the Address Switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Setting the Interrupt Priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Enabling the Data Line Pull-up Network. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Combining the Flag Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Installing the Keysight E1458A Digital I/O Module in a Mainframe . . . . . . . . . 20
Connecting to Peripheral Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Configuring for Isolated Digital I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2 Using the Keysight E1458A Digital I/O Module
Using This Chapter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Port Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Data Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
The FLG Line (Input) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
The CTL Line (Output). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
The I/O Line (Output) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
The STS Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
The PIR Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
The RES Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Keysight E1458A 96-Channel Digital I/O Module User Guidel vii
The UTS Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Addressing the Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Operation Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Default & Reset States. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Setting the Polarity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Using the Handshake Modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Input/Output of Data Bytes and Bits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Multiple-Port Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Multiple-Port Handshaking. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Multiple-Port Input/Output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Using the UTS Control Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Static Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Active Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Using as an Open Collector Output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Typical Connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Program Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Checking Data Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Setting Polarity and Handshake . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Using Trace Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Trace Memory Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Trace Memory Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Trace Memory Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
3 Keysight E1458A Command Reference
Using This Chapter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Command Fundamentals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Common Command Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
SCPI Command Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
SCPI Command Reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
DISPlay Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
DISPlay:MONitor:PORT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
DISPlay:MONitor:PORT? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
DISPlay:MONitor[:STATe] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
DISPlay:MONitor[:STATe]?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
MEASure Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Subsystem Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
MEASure:DIGital:DATAn[:type][:VALue]? . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
MEASure:DIGital:DATAn[:type]:BITm?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
MEASure:DIGital:DATAn[:type]:TRACe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
viii Keysight E1458A 96-Channel Digital I/O Module User Guidel
MEASure:DIGital:FLAGn? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
MEMory Subsystem. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Subsystem Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
MEMory:DELete:MACRo. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Comments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
MEMory:VME:ADDRess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
MEMory:VME:ADDRess? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
MEMory:VME:SIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
MEMory:VME:SIZE? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
MEMory:VME:STATe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
MEMory:VME:STATe? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
[SOURce:] Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Subsystem Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
[SOURce:]DIGital:CONTroln:POLarity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
[SOURce:]DIGital:CONTroln:POLarity?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
[SOURce:]DIGital:CONTroln[:VALue] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
[SOURce:]DIGital:CONTroln[:VALue]? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
[SOURce:]DIGital:DATAn[:type]:BITm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
[SOURce:]DIGital:DATAn[:type]:BITm? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
[SOURce:]DIGital:DATAn[:type]:BITm:MONitor? . . . . . . . . . . . . . . . . . . . . . 84
[SOURce:]DIGital:DATAn[:type]:HANDshake:DELay . . . . . . . . . . . . . . . . . . 85
[SOURce:]DIGital:DATAn[:type]:HANDshake:DELay? . . . . . . . . . . . . . . . . . 86
[SOURce:]DIGital:DATAn[:type]:HANDshake[:MODE] . . . . . . . . . . . . . . . . . 87
[SOURce:]DIGital:DATAn[:type]:HANDshake[:MODE]? . . . . . . . . . . . . . . . . 88
[SOURce:]DIGital:DATAn[:type]:MONitor? . . . . . . . . . . . . . . . . . . . . . . . . . . 90
[SOURce:]DIGital:DATAn[:type]:POLarity . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
[SOURce:]DIGital:DATAn[:type]:POLarity? . . . . . . . . . . . . . . . . . . . . . . . . . . 92
[SOURce:]DIGital:DATAn[:type]:TRACe . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
[SOURce:]DIGital:DATAn[:type][:VALue]. . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
[SOURce:]DIGital:DATAn[:type][:VALue]?. . . . . . . . . . . . . . . . . . . . . . . . . . . 94
[SOURce:]DIGital:FLAGn:POLarity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
[SOURce:]DIGital:FLAGn:POLarity? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
[SOURce:]DIGital:HANDshaken:DELay . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
[SOURce:]DIGital:HANDshaken:DELay? . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
[SOURce:]DIGital:HANDshaken[:MODE] . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
[SOURce:]DIGital:HANDshaken[:MODE]? . . . . . . . . . . . . . . . . . . . . . . . . . 100
[SOURce:]DIGital:IOn? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
[SOURce:]DIGital:TRACe:CATalog? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
[SOURce:]DIGital:TRACe[:DATA]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
[SOURce:]DIGital:TRACe[:DATA]?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
[SOURce:]DIGital:TRACe:DEFine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
[SOURce:]DIGital:TRACe:DEFine? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
[SOURce:]DIGital:TRACe:DELete[:NAME] . . . . . . . . . . . . . . . . . . . . . . . . . 104
Keysight E1458A 96-Channel Digital I/O Module User Guidel ix
[SOURce:]DIGital:TRACe:DELete:ALL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
STATus Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Subsystem Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
STATus:OPERation:CONDition?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
STATus:OPERation:ENABle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
STATus:OPERation:ENABle? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
STATus:OPERation[:EVENt]? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
STATus:PRESet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
STATus:QUEStionable:CONDition? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
STATus:QUEStionable:ENABle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
STATus:QUEStionable:ENABle? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
STATus:QUEStionable[:EVENt]? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
SYSTem Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Subsystem Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
SYSTem:CDEScription?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
SYSTem:CTYPe? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
SYSTem:ERRor?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
SYSTem:VERSion?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
IEEE 488.2 Common Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Command Quick Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
4 Specifications
5 Keysight E1458A Register Information
Using This Appendix. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Addressing the Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
The Base Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Register Offset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Reset and Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Register Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Register Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Manufacturer Identification Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Device Identification Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Card Status/Control Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Card Interrupt Status Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Port Interrupt Control Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Port Transfer Control Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Port Control/Status Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Port Data Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Port Handshake Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Port Delay Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Port Normalization Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
x Keysight E1458A 96-Channel Digital I/O Module User Guidel
Port State Sense Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
A Register-Based Output Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
A Register-Based Input Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Programming Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
System Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
6 Keysight E1458A Error Messages
Keysight E1458A 96-Channel Digital I/O Module User Guidel xi
xii Keysight E1458A 96-Channel Digital I/O Module User Guidel
Keysight E1458A 96-Channel Digital I/O Module User Guide

1 Getting Started

Using This Chapter

This chapter describes the Keysight E1458A 96-Channel Digital I/O Module and how to program the module using SCPI (Standard Commands for Programmable Instruments) commands. This chapter contains the following sections:
Digital I/O Module Description page 11 Instrument Definition page 14 Downloading the SCPI Drivers page 14 Programming the Digital I/O Module page 14 SCPI Command Format Used in this Manual page 14 Initial Operation page 17

Digital I/O Module Description

The Keysight E1458A 96-Channel Digital I/O Module (referred to as the "digital I/O module") is a 12-port digital input/output module intended for data communication and digital control in electronic environments. The digital I/O module is compatible with TTL levels (0-5V) 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.
Each port is identical and consists of seven control lines and eight data lines. There are eight registers for control and status 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 seven control lines, three (I/O, CTL, and FLG) are used with SCPI commands, three (RES, STS, and PIR) are controlled through register access and one, UTS, can be used to force all data lines into a three-state mode. Chapter 3, "Using the Keysight E1458A Digital I/O Module," contains detailed descriptions of these lines.
Each port has two hardware configuration switches. One switch allows you 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 the data lines. Chapter 2, "Configuring the Keysight E1458A Digital I/O Module," describes how to set these switches.
11
Getting Started Digital I/O Module Description
SCPI commands provided for the digital I/O module allow operation 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).

Figure 1-1 Keysight E1458A Digital I/O Module

12 Keysight E1458A 96-Channel Digital I/O Module User Guide
Digital I/O Module Description Getting Started
Table 1-1 Data Lines
8-bit (BYTE) Operations
Port 0 1 2 3 4 5 6 7 8 9 10 11
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 0 2 4 6 8 10
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 0 4 8
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
64-bit (LW64) Operations
Port 0 8 9 10 11
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 mapping of bit numbers from the 8-bit ports to the 16-, 32-, 64-, and 96-bit ports. Chapter 4, "Keysight E1458A Command Reference," describes each command in detail and Chapter 3, "Using the Keysight 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 Keysight E1458A module.
Additional cable sets and special Opto22® cables can be ordered from Keysight Technologies. (Contact your Keysight Technologies Sales office.) The cable part numbers are shown below. Additional details about these cables are given in Chapter 2, "Configuring the Keysight E1458A Digital I/O Module."
Keysight Part Number Description
E1458-61601 Four 2-meter cables, 64-pin headers to unterminated flat
ribbon cable
E1458-61604 (Keysight E1458A Option
022)
Keysight E1458A 96-Channel Digital I/O Module User Guide 13
Two 1.5-meter cables, two 64-pin headers to three 50-pin headers for Opto22® connections.
Getting Started Instrument Definition

Instrument Definition

Each Keysight E1458A Digital I/O Module installed in an Keysight mainframe is treated as an independent instrument, having a unique secondary GPIB address. Each instrument is also assigned a dedicated 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 Keysight E1458A module to operate with an Keysight E1405B or E1406 Command Module using the Standard Commands for Programmable Instruments (SCPI) command language. The driver name for the digital I/O module is “DIG_IO”.
The procedure for downloading the drivers is contained in the Downloading SCPI Device Drivers Installation Note supplied with the module. The C-Size VXIbus Systems Configuration Guide also contain the installation procedure.

Programming the Digital I/O Module

To program the digital I/O module using SCPI, you must select the controller language, interface address, and SCPI commands. Guidelines for SCPI command selection for the digital I/O module are covered in this manual. See the C-Size VXIbus Systems Configuration Guide for detailed interface addressing and controller language information.
This discussion applies only to SCPI (Standard Commands for Programmable Instruments) programming. See "Register Descriptions" 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 Keysight E1458A 96-Channel Digital I/O Module User Guide
SCPI Command Format Used in this Manual Getting Started
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 mixed within the same program code. The commands are case insensitive; either upper- or lowercase letters are accepted.
In the command examples shown 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: 0, 1, OFF, or ON. The allowable values of the parameters are given in Chapter 4,
"Keysight E1458A Command Reference" You must be sure to include a space between the SCPI keyword and any parameters.
Some commands are shown with items enclosed in square brackets ( [ ] ). These are implied or optional items that do not have to be included. For example, the complete command syntax listing for the first example is:
DISPlay:MONitor[:STATe] <0|1 or OFF|ON>
The item enclosed in brackets, [:STATe], does not have to be 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 Keysight E1458A Digital I/O Module use three types of parameters to specify a port number, a bit number, or a multiple- port combining operation. Each type is briefly described here; descriptions and examples of usage can be found in Chapter 3 of this manual.
Specifying the Port
The digital I/O module has twelve identical ports numbered 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 the DATA parameter. Replace the n with the port number, making the number 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 commands and operations. A description of multiple-port commands follows later in this chapter.
Keysight E1458A 96-Channel Digital I/O Module User Guide 15
Getting Started SCPI Command Format Used in this Manual
Specifying a Bit
Each of the twelve ports on the digital I/O module has eight bi-directional data bits. Some SCPI commands allow you to manipulate or read these bits individually. For example:
MEASure:DIGital:DATAn:BITm?
This command reads the state of a bit, specified by m, on port n. The result of the command will be either 0 or 1, indicating the current state of the bit. Replace m with the desired bit number, and n with the desired port number, making each number the last characters of the DATA and BIT keywords without spaces. For example, to read the state of bit 7 on port 0, use the following command:
MEASure:DIGital:DATA0:BIT7?
For single ports, the value of m can range from 0 to 7. Some multiple port operations and commands may allow bit numbers to range from 0 to 95.
Specifying Multiple- Port Operations
The digital I/O module allows you to set or read multiple ports or bits with a single command. For example:
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 ports is described in more detail in Chapter 3 of this manual.
16 Keysight E1458A 96-Channel Digital I/O Module User Guide
Initial Operation Getting Started

Initial Operation

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

Using This Chapter

This chapter shows how to configure the Keysight E1458A Digital I/O Module 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:
WARNINGS and CAUTIONS page 11 Setting the Address Switch page 12 Setting the Interrupt Priority page 14 Enabling the Data Line Pull-up Network page 16 Combining the Flag Lines page 18 Installing the Keysight E1458A Digital I/O Module in a
Mainframe page 20 Connecting to Peripheral Devices page 22 Configuring for Isolated Digital I/O page 25

WARNINGS and CAUTIONS

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.
11
Configuring the Keysight E1458A Digital I/O Module Setting the Address Switch
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 electricity is a major cause of component failure. To prevent damage to the electrical components in the module, observe anti-static techniques whenever removing a module from the mainframe or whenever working on a module.

Setting the Address Switch

Figure 2-1 shows the location and factory default setting of the logical address switch (LADDR). The factory setting is decimal 144; switch positions 4 and 7 are closed, all others are open. The factory setting of decimal 144 results in a GPIB secondary address of 18 (144 divided by 8). You can set the address of the digital I/O module to any number in the range of 0 to 255 (decimal).
For the digital I/O module to be recognized as an instrument when you are using it with an Keysight E1405/E1406 Command Module and using SCPI commands, the logical address should be set to an integer multiple of 8.
12 Keysight E1458A 96-Channel Digital I/O Module User Guide
Setting the Address Switch Configuring the Keysight E1458A Digital I/O Module

Figure 2-1 Logical Address Switch

Keysight E1458A 96-Channel Digital I/O Module User Guide 13
Configuring the Keysight E1458A Digital I/O Module Setting the Interrupt Priority

Setting the Interrupt Priority

The VXIbus peripheral interrupt uses seven lines to carry the interrupt signal to the commander. The most common 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 Keysight E1405/E1406 has an interrupt line allocation table). When doing direct register-based programming (instead 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 number, the higher the priority. Figure 2-2 shows the location and factory default setting of the interrupt priority jumper. Setting Level X disables the interrupt capability.
The interrupt priority MUST be set to a line handled by the command module when using and Keysight E1405 or Keysight E1406 Command Module. Level X priority should not be used under normal operating conditions. Changing the interrupt priority level is not recommended. Do not change the default setting (level
1) unless specifically instructed to do so.
The interrupt circuitry for the Keysight E1458A Digital I/O Module is implemented as release on interrupt acknowledge (ROAK). The digital I/O module will de-assert (or release) the interrupt request line during an interrupt acknowledge cycle.
14 Keysight E1458A 96-Channel Digital I/O Module User Guide
Setting the Interrupt Priority Configuring the Keysight E1458A Digital I/O Module

Figure 2-2 Interrupt Priority Jumper

Keysight E1458A 96-Channel Digital I/O Module User Guide 15
Configuring the Keysight E1458A Digital I/O Module Enabling the Data Line Pull-up Network

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 terminating 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 resistive network that is shown in Figure 2-3.
The resistive terminating network provides a pull-up to a logic high level. In addition to the resistive termination, an active pull-up to TTL levels for outputs may be enabled by the pull-up enable switches.
Figure 2-3 shows the location of the pull-up enable switches and a detail of a single pull-up enable switch setting. The factory-shipped default is
pull-up disabled 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 position, the outputs 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 position, the outputs will be forced high by only the 3k/6.2k resistive termination.
When the data lines are inputs, the resistive termination network is the dominating load that must be driven. This resistive termination network, 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 position of the pull-up enable switches makes no difference, as the pull-up enable is only for outputs.
16 Keysight E1458A 96-Channel Digital I/O Module User Guide
Enabling the Data Line Pull-up Network Configuring the Keysight E1458A Digital I/O Module

Figure 2-3 Pull-up Enable Switches

Keysight E1458A 96-Channel Digital I/O Module User Guide 17
Configuring the Keysight E1458A Digital I/O Module Combining the Flag Lines

Combining the Flag Lines

Each port contains a Flag Line, labeled FLG, that can be used to implement a handshake scheme with a peripheral. For single-port operations, the FLG lines can be used in the factory default setting (no flag lines combined) to handshake with a peripheral. For multi-port operations with a single handshake line, you can combine the flag line from multiple ports. The combined flag lines are physically tied together. An action on any of the combined flag lines performs that action for all combined flag lines.
Figure 2-4 shows the locations of the flag combining switches and how to set them. Before setting any flag combine switches, you may wish to read the discussion regarding allowable port combinations and handshaking in Chapter 3 of this manual.
When using the FLG and CTL for handshaking on multiple-port operations, the CTL line is set for each port sequentially beginning at the lowest- numbered port.
18 Keysight E1458A 96-Channel Digital I/O Module User Guide
Combining the Flag Lines Configuring the Keysight E1458A Digital I/O Module

Figure 2-4 Flag Combining Switches

Keysight E1458A 96-Channel Digital I/O Module User Guide 19
Configuring the Keysight E1458A Digital I/O Module Installing the Keysight E1458A Digital I/O Module in a Mainframe

Installing the Keysight E1458A Digital I/O Module in a Mainframe

The Keysight E1458A Digital I/O Module 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.
20 Keysight E1458A 96-Channel Digital I/O Module User Guide
Installing the Keysight E1458A Digital I/O Module in a Mainframe Configuring the Keysight E1458A Digital I/O Module

Figure 2-5 Installing the Module in a Mainframe

Keysight E1458A 96-Channel Digital I/O Module User Guide 21
Configuring the Keysight E1458A Digital I/O Module Connecting to Peripheral Devices

Connecting to Peripheral Devices

Each of the four Keysight E1458A Digital I/O Module peripheral connectors has 64 pins. The connectors are compatible with industry standard 64-pin.100" X .100" wire mount sockets. A compatible socket can be obtained by ordering Keysight part number 1252-1581 (3M Part Number 7964-6500EC) for compatibility with 0.050" ribbon cable. For discrete wire compatibility use 3M part number CHG-2064-J01010-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 cables (Keysight Part Number E1458-61601) and the line locations within the ribbon connector.
Not all control lines are required for every application. The use of each control line is described in Chapter 3.
22 Keysight E1458A 96-Channel Digital I/O Module User Guide
Connecting to Peripheral Devices Configuring the Keysight E1458A Digital I/O Module

Figure 2-6 Collector Pin Assignments

Keysight E1458A 96-Channel Digital I/O Module User Guide 23
Configuring the Keysight E1458A Digital I/O Module Connecting to Peripheral Devices

Figure 2-7 Connections Within the Ribbon Cable

24 Keysight E1458A 96-Channel Digital I/O Module User Guide
Configuring for Isolated Digital I/O Configuring the Keysight E1458A Digital I/O Module

Configuring for Isolated Digital I/O

An industry-standard isolated digital I/O peripheral, like the Opto 22 16-Position Single-Channel Mounting Rack, is a 50-pin connection. The connector is either a card edge or a header connector. Do not connect pins 1 and 49 on the Opto 22 rack connector.
For example, the Opto 22 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 Keysight Technologies, either as Option 022 when ordering the Keysight E1458A, or as Keysight part number E1458-61604. Figure 2-7 shows the connections from six ports to three racks.
Opto 22 is a registered trademark of Opto 22, Huntington Beach, CA 92649
Keysight E1458A 96-Channel Digital I/O Module User Guide 25
Configuring the Keysight E1458A Digital I/O Module Configuring for Isolated Digital I/O

Figure 2-8 Opto 22 Connections

26 Keysight E1458A 96-Channel Digital I/O Module User Guide
Keysight E1458A 96-Channel Digital I/O Module User Guide
3 Using the Keysight E1458A Digital
I/O Module

Using This Chapter

This chapter is divided into twelve sections and details how to use the Keysight E1458A Digital I/O Module.
Port Description page 27 Addressing the Module page 31 Operation Overview page 32 Default & Reset States page 33 Setting the Polarity page 34 Using the Handshake Modes page 35 Input/Output of Data Bytes and Bits page 42 Multiple-Port Operations page 45 Using the UTS Control Line page 49 Using as an Open Collector Output page 51 Typical Connection page 52 Program Examples page 53

Port Description

Each of the digital I/O module ports has eight data lines and seven control lines. Not all these lines are required for every application. Figure 1-1 earlier in this manual shows the data and control lines. The following subsections describe the use of these lines.

Data Lines

Each port has eight data lines, numbered from 0 to 7. The data lines can be set as an 8-bit group, as part of a larger group, or individually using SCPI commands.
The logical TRUE condition of the data lines can be controlled with SCPI commands. Positive polarity is the default. The following table shows the effect of changing the Polarity with Input and Output operations for each data line.
27
Using the Keysight E1458A Digital I/O Module Port Description
Input Operations Output Operations
POSitive Polarity
NEGative Polarity
The data lines in each port, as a group, can be set to use an internal +5 Vdc pull-up during output operations. Additionally, the UTS control line can force all the data lines in a port to the three-state condition (non-sourcing).

The FLG Line (Input)

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 effect of changing the polarity of the FLG line:
POSitive Polarity TTL High = BUSY = 1
TTL High = 1 TTL Low = 0
TTL High = 0 TTL Low = 1
TTL Low = READY = 0
1 = TTL High 0 = TTL Low
0 = TTL High 1 = TTL Low
NEGative Polarity TTL High = READY = 0

The CTL Line (Output)

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:
POSitive Polarity TTL High = TRUE = ON = 1
NEGative Polarity TTL High = FALSE = OFF = 0
TTL Low = BUSY = 1
TTL Low = FALSE = OFF = 0
TTL Low = TRUE = ON = 1
28 Keysight E1458A 96-Channel Digital I/O Module User Guide
Port Description Using the Keysight E1458A Digital I/O Module

The I/O Line (Output)

Each port has an I/O line. An I/O line is an output from the Keysight E1458A Digital I/O Module to the peripheral and has two states, TRU@E or FALSE. The state of the I/O line is not directly programmable. The I/O line polarity cannot be changed.
When the I/O line is: TTL High =TRUE = 1 = Input
the data transceiver of that port is enabled for input. The peripheral should respond to the signal by enabling itself to send data.
When the I/O line is: TTL Low = FALSE = 0 = Output
the data transceiver of that port is enabled for output. The peripheral should respond to the signal by enabling itself to receive data.
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.

The STS Line

Each 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, "Keysight E1458A Register Information," for more information about 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 module. The use of the PIR line is only at the register level and is not supported by SCPI commands. Refer to Appendix B for more information about this line.
The I/O, CTL and RES lines are true open collector output lines (see Figure 3-3). An external pull-up is required for proper operation. The FLG, PIR and STS input lines have a 3k/6.2k pull-up termination. If the PIR and STS lines are not used, then connecting them to the I/O and CTL line will provide the pull-up that the I/O and CTL lines need.
Keysight E1458A 96-Channel Digital I/O Module User Guide 29
Using the Keysight E1458A Digital I/O Module Port Description

The RES Line

Each port has a reset line labeled RES. The RES line is an output line to the peripheral. Control of the RES line is only at the register level and is not supported by SCPI commands. Refer to Appendix B for more information about this line.

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 module. A TTL Low level on the UTS line will force 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 module operation. See the section "Using the UTS Control Line" later in this chapter for a description of its use.
30 Keysight E1458A 96-Channel Digital I/O Module User Guide
Addressing the Module Using the Keysight E1458A Digital I/O Module

Addressing the Module

The examples shown in this chapter use the default addresses for the interface, command module, and digital I/O module. The address uses both GPIB primary and secondary addresses. The default address is:
7 0 9 1 8
GPIB Primary Address GPIB Secondary Address
Interface Select Code Command Module
GPIB Address
Digital I/O Module
Address Instrument
(LADDR?8)
To establish these defaults as an I/O path in BASIC, the program examples use this code:
10 ASSIGN @Dio TO 70918
Each digital I/O module in a system must 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 the Keysight E1458A Digital I/O Module".
Keysight E1458A 96-Channel Digital I/O Module User Guide 31
Using the Keysight E1458A Digital I/O Module Operation Overview

Operation Overview

The following steps illustrate general operation of the Keysight El458A Digital 1/0 Module.
32 Keysight E1458A 96-Channel Digital I/O Module User Guide
Default & Reset States Using the Keysight E1458A Digital I/O Module

Default & Reset States

At initial power-on and following the *RST command, the Keysight E1458A Digital I/O Module is set to the following states:
CTL line 0 = TTL Low I/O line TRUE = input = TTL Low Data, FLG, and CTL line Polarity POSitive Handshake mode NONE
Following power-on or *RST, the digital I/O module is set to the input mode (I/O = TRUE). If no peripheral is driving the data lines, they will float to a TTL High state.
Keysight E1458A 96-Channel Digital I/O Module User Guide 33
Using the Keysight E1458A Digital I/O Module Setting the Polarity

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 keyword as:
[SOURce:]DIGital:CONTroln:POLarity <POSitive or NEGative> to set the control line’s (CTL) polarity on port n.
[SOURce:]DIGital:FLAGn:POLarity <POSitive or NEGative> to set the flag line’s (FLG) polarity on port n.
[SOURce:]DIGital:DATAn:POLarity <POSitive or NEGative> to set the data lines polarity on port n.
Example
DIG:DATA1:POL POS
This command sets the polarity to positive on port 1 data lines, a TTL High will be input as a 1 or a bit set to 1 will output a TTL High level.
The *RST (reset) condition is positive polarity for control (CTL), flag (FLG), and data lines on all ports.
34 Keysight E1458A 96-Channel Digital I/O Module User Guide
Using the Handshake Modes Using the Keysight E1458A Digital I/O Module

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 the 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>
Handshake Modes
The operation of each handshake mode for input or output operations is described in the following subsections. In these discussions, only the FLG, CTL, and DATA lines are included. Other port control lines, controlled only through register access, are described in Appendix B of this manual.
Keysight E1458A 96-Channel Digital I/O Module User Guide 35
Using the Keysight E1458A Digital I/O Module Using the Handshake Modes
LEADing Edge
The LEADing Edge handshake makes use of both the CTL and FLG lines. The input and output operations are described below.
INPUT OUTPUT
1. The digital I/O module senses the FLG line and waits for READY.
2. The digital I/O module sets the I/O line HIGH.
3. The digital I/O module sets CTL TRUE.
4. The peripheral senses the CTL line and places data on the data lines.
5. The peripheral sets the FLG line to BUSY indicating data is valid.
6. The digital I/O module senses the FLG line and latches the data.
7. The digital I/O module returns CTL to FALSE.
1. The digital I/O module checks the state of the FLG line (must be READY).
2. The digital I/O module sets the I/O line LOW.
3. The digital I/O module places the data on the data lines.
4. After waiting the programmed delay time, Td, the digital I/O module sets CTL to TRUE.
5. The peripheral senses the CTL line and sets the FLG line to BUSY while it latches the data.
6. When the digital I/O module senses the FLG line in the BUSY state, it sets the CTL line to FALSE and monitors the FLG line.
7. When the peripheral returns the FLG line to READY (indicating it has latched the data), the next handshake can begin.
8. The peripheral senses the CTL line and returns the FLG line to READY.
36 Keysight E1458A 96-Channel Digital I/O Module User Guide
Using the Handshake Modes Using the Keysight E1458A Digital I/O Module
TRAiling Edge
The TRAiling Edge handshake makes use of both the CTL and FLG lines. The input and output operations are described below.
INPUT OUTPUT
1. The digital I/O module senses the FLG line and waits for READY.
2. The digital I/O module sets the I/O line HIGH.
3. The digital I/O module sets CTL TRUE.
4. The peripheral senses the CTL line and sets the FLG line to BUSY.
5. The digital I/O module senses the FLG BUSY and sets the CTL line FALSE.
6. The peripheral senses the CTL line change and places data on the data lines.
7. The peripheral indicates the data is valid by returning the FLG line to READY.
8. The digital I/O module senses the FLG READY and latches the data.
1. The digital I/O module checks the state of the FLG line (must be READY).
2. The digital I/O module sets the I/O line LOW.
3. The digital I/O module places the data on the data lines.
4. After waiting the programmed delay time, Td, the digital I/O module sets CTL to TRUE.
5. The peripheral senses the CTL line and sets the FLG line to BUSY while it latches the data.
6. The peripheral returns the FLG line to READY indicating the end of data transfer.
7. The digital I/O module senses the FLG line in the READY state and returns CTL to FALSE.
Keysight E1458A 96-Channel Digital I/O Module User Guide 37
Using the Keysight E1458A Digital I/O Module Using the Handshake Modes
PULSe
The PULSe handshake makes use of both the CTL and FLG lines. The input and output operations are described below.
INPUT OUTPUT
1. The digital I/O module senses the FLG line and waits for READY.
2. The digital I/O module sets the I/O line HIGH.
3. The digital I/O module sets CTL TRUE.
4. The peripheral senses the CTL line and sets the FLG line to BUSY.
5. The peripheral places the data on the data lines and indicates valid data by setting the FLG line to READY.
6. The digital I/O module senses the FLG READY, returns CTL to FALSE, and latches the input data.
1. The digital I/O module checks the state of the FLG line (must be READY).
2. The digital I/O module sets the I/O line LOW.
3. The digital I/O module places the data on the data lines.
4. After waiting the programmed delay time, Td, the digital I/O module sets CTL to TRUE.
5. The digital I/O module then waits another delay time, Td, and sets the CTL line to FALSE.
6. The peripheral senses the CTL line change, sets the FLG line to BUSY and latches the data.
7. When the data is entered, the peripheral returns the FLG line to READY.
38 Keysight E1458A 96-Channel Digital I/O Module User Guide
Using the Handshake Modes Using the Keysight E1458A Digital I/O Module
PARTial
The PARTial handshake makes use of both the CTL and FLG lines. The input and output operations are described below.
INPUT OUTPUT
1. The digital I/O module sets the I/O line HIGH.
2. The digital I/O module sets CTL TRUE.
3. The peripheral senses the CTL line and sets the data lines.
4. The peripheral holds the FLG line READY for at least 250 nsecs and then sets the FLG line BUSY to indicate the data is valid.
5. The digital I/O module senses the FLG line change to BUSY and latches the data.
6. The digital I/O module then sets the CTL line FALSE.
1. The digital I/O module sets the I/O line LOW.
2. The digital I/O module places the data on the data lines.
3. After waiting the programmed delay time, Td, the digital I/O module sets CTL to TRUE.
4. The peripheral senses the CTL line change, sets the FLG line to READY for a minimum of 250 nsecs, latches the data, and sets the FLG line to BUSY.
5. The digital I/O module senses the change of the FLG line and sets CTL to FALSE.
Keysight E1458A 96-Channel Digital I/O Module User Guide 39
Using the Keysight E1458A Digital I/O Module Using the Handshake Modes
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
1. The digital I/O module sets the I/O line HIGH.
2. The digital I/O module sets CTL TRUE.
3. The peripheral senses the CTL line and sets the data lines.
4. The digital I/O module waits the programmed time delay, Td, after setting CTL TRUE and then latches the data.
5. The digital I/O module then returns CTL to FALSE.
1. The digital I/O module sets the I/O line LOW.
2. The digital I/O module places the data on the data lines.
3. After waiting the programmed delay time, Td, the digital I/O module sets CTL to TRUE.
4. The peripheral senses the CTL line and latches the data.
5. After waiting the programmed delay time, Td, the digital I/O module sets CTL to FALSE.
NONE
When handshake is set to NONE, no control or flag lines are used. The Keysight E1458A Digital I/O Module 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 output until another command is received.
Handshake NONE can be combined with the SCPI commands MEASure:DIGital:FLAGn and [SOURce:]DIGital:CONTroln to create custom handshakes.
40 Keysight E1458A 96-Channel Digital I/O Module User Guide
Using the Handshake Modes Using the Keysight E1458A Digital I/O Module
Handshake Timing
Handshake timing is set through the SCPI 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.
Keysight E1458A 96-Channel Digital I/O Module User Guide 41
Using the Keysight E1458A Digital I/O Module Input/Output of Data Bytes and Bits

Input/Output of Data Bytes and Bits

Data input is performed using commands in the SCPI MEASure:DIGital subsystem. Data output is performed using the commands in SCPI [SOURce:]DIGital subsystem.
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 operations will attempt to complete the handshake mode set for the port and may "hang" if required handshake operations are not completed.
Input
Input operations can involve single bits, 8-bit bytes, or multiple bytes. Single-bit input operations always return a decimal value of 0 or 1. Byte or multiple-byte input operations always return numbers in decimal format.
Bit Input
The SCPI command for inputting the state of a single bit on a data port is:
MEASure:DIGital:DATAn[:type]:BITm?
This command instructs the Keysight E1458A Digital I/O Module 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 (POSitive polarity) a TTL High on the data line specified by m will return a 1. For example, the following BASIC program code will request and display 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 "Multiple-Port Operations" later in this chapter describes bit numbering for multiple-port operations. For a single port, the data lines number and 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
42 Keysight E1458A 96-Channel Digital I/O Module User Guide
Input/Output of Data Bytes and Bits Using the Keysight E1458A Digital I/O Module
In this manual the physical data lines are indicated as Dn_1. The n should be replaced with the port number for the input operation. For example, bit 3 of port 6 affects the state of data line D6_3.
Byte Input
The SCPI command requesting an 8-bit byte from a data port is:
MEASure:DIGital:DATAn[:BYTE][:VALue]?
This command instructs the Keysight E1458A Digital I/O Module to return a decimal value between 0 and 255, indicating the condition of the data lines 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 (POSitive polarity) 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 following BASIC program code will request and display the decimal value of the data lines on port 2.
120 OUTPUT @Dio;"MEAS:DIG:DATA2?"

Output

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-Port Operations" later in this chapter describes port numbering for multiple-port operations. For a single port, the returned decimal value will have the following correspondence to the port 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
Output operations can involve single bits, 8-bit bytes, or multiple bytes. Single-bit output operations always expect a value of 0 or 1. Byte or multiple-byte output operations can accept numbers in decimal, hexadecimal, octal, or binary formats.
Bit Output
The SCPI command for setting the state of a single bit on a data port is:
[SOURce:]DIGital:DATAn[:type]:BITm <value>
Keysight E1458A 96-Channel Digital I/O Module User Guide 43
Using the Keysight E1458A Digital I/O Module Input/Output of Data Bytes and Bits
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 BASIC program code will set the state of data line 2 (bit-2) on port 6 to a value of 1.
120 OUTPUT @Dio;"DIG:DATA6:BIT2 1"
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 "Multiple-Port Operations" later in this chapter describes bit numbering for multiple-port operations. For a single port, the data lines number and 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 indicated as Dn_1. The n should be replaced with the port number for the input operation. For example, bit 3 of port 6 affects the state of data line D6_3.
Byte Output
The SCPI command syntax to send an 8-bit byte to a data port is:
[SOURce:]DIGital:DATAn[:BYTE][:VALue] [<base>]<value>
This command instructs the Keysight E1458A Digital I/O Module to set the port n data lines to <value> using the output handshake. The optional parameter <base> defines the numbering system to use to implement
<value> 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 port polarity. In the default state (POSitive polarity) a TTL High level will be set for any bit set to 1. For example, the following four BASIC program lines
all perform the same function and set the same data lines on port 3:
120 OUTPUT @Dio;"DIG:DATA3 170"
120 OUTPUT @Dio;"DIG:DATA3 #HAA"
120 OUTPUT @Dio;"DIG:DATA3 #Q252"
120 OUTPUT @Dio;"DIG:DATA3 #B10101010"
44 Keysight E1458A 96-Channel Digital I/O Module User Guide
Multiple-Port Operations Using the Keysight E1458A Digital I/O Module
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
Port numbers range from 0 to 11 for single-port operations. The section "Multiple-Port Operations" later in this chapter describes port numbering and byte order for multiple-port operations. For single-port operations, the most significant bit is bit 7. The table below shows the bit numbers 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 Keysight E1458A Digital I/O Module supports multiple-port operations. You can combine operations using 2, 4, 8, or all 12 ports with a single SCPI command. Multiple-port operations are shown in the SCPI command syntax as the optional keyword [:type]. For example, this SCPI command syntax initiates a handshake and returns one or more values:
MEAS:DIG:DATAn[:type]?
The optional keyword [:type] is replaced by one of the following keywords:
:BYTE This keyword, or no keyword (default), is used for 8-bit
:WORD This keyword is used to combine 2 adjacent ports for
:LWORd or :LW32 Either keyword is used to combine 4 adjacent ports for
:LW64 This keyword is used to combine 8 adjacent ports for
:LW96 This keyword is used to combine all 12 ports for
port operations.
16-bit port operations.
32-bit operations.
64-bit operations.
96-bit operations.
The SCPI keyword :DATAn specifies the port to be used for operations by replacing n with the port number. Multiple-port operations have fixed values allowed for n. For all operations, if n is omitted, port 0 is assumed. The values allowed for n are:
Keysight E1458A 96-Channel Digital I/O Module User Guide 45
Using the Keysight E1458A Digital I/O Module Multiple-Port Operations
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
For example, the following BASIC program code will obtain a decimal 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 Handshaking

The SCPI command syntax to establish a multiple-port handshake and set handshake timing is:
[SOURce:]DIGital:DATAn[:type]:HANDshake[:MODE] <mode>
[SOURce:]DIGital:DATAn[:type]:HANDshake:DELay <time>
The optional keyword [:type], parameter DATAn, handshake <mode>, and 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-port handshaking has the following two anomalies 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 involved in the operation, from the lowest-numbered port to the highest-numbered port. A slight time delay exists between each port setting the CTL line TRUE or FALSE. When using handshaking on multiple-port operations, use the highest-numbered port CTL line to ensure correct data transfer.
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).

Multiple-Port Input/Output

Data input is performed using commands in the SCPI MEASure:DIGigital:DATAn[:type] subsystem. Data output is performed using the commands in SCPI [SOURce:]DIGital:DATAn[:type] subsystem.
46 Keysight E1458A 96-Channel Digital I/O Module User Guide
Multiple-Port Operations Using the Keysight E1458A Digital I/O Module
The returned value of an input, or the TTL levels of an output, will depend upon the POLarity programmed.
Both Input and Output operations will attempt to complete the handshake mode set and may "hang" if required handshake operations are not completed.
The sections "Byte Input" and "Byte Output" earlier in this chapter describe operations that also apply to multiple-port commands. The values used for input and output operations depend upon the [:type] used in the command. Values for multiple-port input or output operations are 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 -2147483648 to 2147483647 Decimal
#H #Q #B
1
LW64
LW96
Decimal -2147483648 to 2147483647 Decimal
1
Decimal -2147483648 to 2147483647 Decimal
#H #Q #B
#H #Q #B
-128 to 255 00 to FF 000 to 377 8-bits
-32768 to 32767 0000 to FFFF 00000 to 177777 16-bits
-2147483648 to 2147483647 00000000 to FFFFFFFF 0 to 37777777777 32-bits
-2147483648 to 2147483647 00000000 to FFFFFFFF 0 to 37777777777 32-bits
-2147483648 to 2147483647 00000000 to FFFFFFFF 0 to 37777777777 32-bits
1 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 command syntax:
SOUR:DIG:DATA0:LW96 0,0,0
Table 3-1 shows allowable port combinations for each value of [:type] and the order of the values for LW64 and LW96 operations.
You can combine multiple-port operations on the same Keysight E1458A Digital I/O Module. For example, you could define two multiple-data ports as a 64-bit port 0 and a 32-bit port 8.
Keysight E1458A 96-Channel Digital I/O Module User Guide 47
Using the Keysight E1458A Digital I/O Module Multiple-Port Operations
Table 3-1 Port Combinations
8-bit (BYTE) Operations
Port 0 1 2 3 4 5 6 7 8 9 10 11
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
Parameters <value><value> <value><value><value><value> <value><value><value><value> <value> <value>
16-bit (WORD) Operations
Port 0 2 4 6 8 10
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
Parameters <value> <value> <value> <value> <value> <value>
32-bit (LWORd) Operations
Port 0 4 8
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
Parameters <value> <value> <value>
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
Parameters 1st <value> 2nd <value>
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
D1_7 — D1_0
D1_7 — D1_0
D1_7 — D1_0
D1_7 — D1_0
D2_7 — D_0
D2_7 — D_0
D2_7 — D_0
D2_7 — D_0
D2_7 — D_0
D3_7 — D3_0
D3_7 — D3_0
D3_7 — D3_0
D3_7 — D3_0
D3_7 — D3_0
D4_7 — D4_0
D4_7 — D4_0
D4_7 — D4_0
D4_7 — D4_0
D4_7 — D4_0
D5_7 — D5_0
D5_7 — D5_0
D5_7 — D5_0
D5_7 — D5_0
D5_7 — D5_0
D6_7 — D6_0
D6_7 — D6_0
D6_7 — D6_0
D6_7 — D6_0
D6_7 — D6_0
D7_7 — D7_0
D7_7 — D7_0
D7_7 — D7_0
D7_7 — D7_0
D7_7 — D7_0
D8_7 — D8_0
D8_7 — D8_0
D8_7 — D8_0
D8_7 — D8_0
D9_7 — D9_0
D9_7 — D9_0
D9_7 — D9_0
D9_7 — D9_0
D10_7 — D10_0
D10_7 — D10_0
D10_7 — D10_0
D10_7 — D10_0
D11_7 — D11_0
D11_7 — D11_0
D11_7 — D11_0
D11_7 — D11_0
48 Keysight E1458A 96-Channel Digital I/O Module User Guide
Using the UTS Control Line Using the Keysight E1458A Digital I/O Module

Using the UTS Control Line

The UTS line can be used to prevent the Keysight E1458A Digital I/O Module from sourcing data on the data lines, independent of the programmed state 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 either a static or active configuration.
A port is set to transmit on the data lines when a SOUR:DIG:DATA command is received and the programmed handshake is completed. Use the SOUR:DIG:DATA:VAL? command to verify the programmed state of the port. The SOUR:DIG:DATA:MON? command returns the actual state of the data lines. These two commands may return different values if the UTS line is LOW.

Static Configuration

The UTS line can disable the port transmitter during program development/debugging. Tie the UTS line for each port to ground. This configuration ensures that the digital I/O module cannot transmit on the data lines, independent of the programmed state of the port. The port data receivers are not affected.

Active Configuration

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 hold the UTS line LOW when it is transmitting, and release the line when it is ready to receive. For example, two Keysight E1458A Digital I/O Modules could be connected as shown in Figure 3-1. The I/O line is set to a TTL Low when the port is programmed to transmit. By connecting the I/O lines from each port to the UTS lines, the two modules cannot transmit at the same time.
Keysight E1458A 96-Channel Digital I/O Module User Guide 49
Using the Keysight E1458A Digital I/O Module Using the UTS Control Line
Figure 3-1 UTS Line Active Configuration
50 Keysight E1458A 96-Channel Digital I/O Module User Guide
Using as an Open Collector Output Using the Keysight E1458A Digital I/O Module

Using as an Open Collector Output

The Keysight E1458A Digital I/O Module data lines can be used in an open collector configuration. Connections for open collector require the use of external power supplies and pull-up resistors. The internal pull-up mode of the digital I/O module MUST be disabled for open collector output. Figure 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:
Vcc = 5.0 Vdc
Imax = IoutLow * safety_factor = 48 mA * 0.52 = 25 mA
R = Vcc / Imax = 5 / 0.025 = 200 Ohms
The value of TTL High with the 200 ? pull-up resistor is calculated as follows:
VHigh = Vcc * 6200 / (6200 + 200) = 4.84 Vdc
Keysight E1458A 96-Channel Digital I/O Module User Guide 51
Using the Keysight E1458A Digital I/O Module Typical Connection

Typical Connection

Figure 3-3 shows a typical driver/receiver connection for data transfer. The FLG, PIR, and STS lines have a resistive pull-up network. The data lines do not have a resistive pull-up, but can use an internal pull-up in the SN75ALS160. The internal pull-up requires that the data lines sink 3.2 mA to pull the line to less than 0.4 V. The I/O, CTL, and RES lines are open collector and require external pull-up to logic high.

Figure 3-3 Typical Driver/Receiver Connections

52 Keysight E1458A 96-Channel Digital I/O Module User Guide
Program Examples Using the Keysight E1458A Digital I/O Module

Program Examples

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

Checking Data Lines

This example checks for stuck data lines on all ports. It demonstrates sending data, setting bits, and checking the result. If the programmed state of the port is not correct, the program prints a message and stops. If a fast check of the data lines reveals a stuck line, then a bit by bit check of the data lines is performed and any errors found are printed.
Hardware setup: This example assumes that all 96 data lines are connected to a peripheral device. Further, all 96 data lines must be provided with some kind of pull-up (either internal or external).
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 ! Alternating 0 and 1, 32-Bit .
70 READ Pattern(*)!
80 OUTPUT @Dio;"*RST;*OPC?"! Establish defaults.
90 ENTER @Dio;Ready! Wait for completion.
100 FOR I = 0 TO 1! Fast test of the data lines.
110OUTPUT @Dio;"SOUR:DIG:DATA0:LW96 ";Pattern(1,I);","; Pattern(2,I);
",";Pattern(3,I) ! Alternate 0 and 1.
120OUTPUT @Dio;"*OPC?"!
130ENTER @Dio;Ready! Wait for completion .
140OUTPUT @Dio;"SOUR:DIG: DATA0:LW96?"
150ENTER @DIO;Value(1),Value(2), Value(3) ! Readback of port programming. !
160FOR J=1 TO 3!
170IF Val(J) <> Pattern(J,I) THEN! Port not programmed.
180PRINT "Port not programmed" !
190STOP!
200END IF!
210NEXT J!
220OUTPUT @Dio;"SOUR:DIG :DATA0:LW96:MON?" ! Read data lines.
230ENTER @Dio;Mon(1),Mon(2),Mon(3)!
240FOR J=1 TO 3!
Keysight E1458A 96-Channel Digital I/O Module User Guide 53
Using the Keysight E1458A Digital I/O Module Program Examples
250IF Mon(J) <> Pattern(J,I) THEN! Data line error.
260PRINT "One or more! data lines stuck"
270Errflg = 1! Set error flag.
280END IF!
290NEXT J!
300 NEXT I!
310 IF Errflg = 1 THEN! Find the stuck line(s).
320OUTPUT @Dio;"*RST;*OPC?"! Restore defaults.
330ENTER @Dio;Ready! Wait for completion.
340FOR I = 0 TO 1! I is logic counter.
350FOR J = 0 TO 95! J is bit counter.
360OUTPUT @Dio;"SOUR:DIG:DATA0:LW96:BIT"&VAL$(J)& " " &VAL$(I)$";*OPC?" !
Set a bit.
370ENTER @Dio;Ready! Wait for completion.
380OUTPUT @Dio;"SOUR:DIG:DATA0:LW96:BIT"&VAL$(J)&":MON?" ! Get the state
of the bit.
390ENTER @Dio;Bits!
400IF Bits <> I THEN!
410PRINT "Logical ";I;" at bit ";J;! " error found"
420END IF!
430NEXT J!
440NEXT I!
450 ELSE!
460PRINT " Data Line test passed" !
470 END IF!
480 END!

Setting Polarity and Handshake

This example demonstrates setting the port polarity and handshake mode for a 16-bit port. Handshake mode LEADing will be set and the polarity of the FLG and CTL lines will be inverted.
Hardware setup: Port 0 and 1 data lines are connected to corresponding peripheral data lines. Port 1 CTL and FLG lines are used and are connected to the handshake lines of the peripheral. Port 0 CTL and FLG lines are not used or connected.
10 RE-SAVE "Pol_hnd!
20 ASSIGN @Dio TO 70918!
30 INTEGER Ready, Words,Bits!
40 OUTPUT @Dio;"*RST;*OPC?"!
50 ENTER @Dio;Ready! Wait for completion.
60 OUTPUT @Dio;"SOUR:DIG:CONT1:POL NEG;*OPC?" ! Set CTL polarity.
54 Keysight E1458A 96-Channel Digital I/O Module User Guide
Program Examples Using the Keysight E1458A Digital I/O Module
70 ENTER @Dio;Ready ! Wait for completion.
80 OUTPUT @Dio;"SOUR:DIG:FLAG1:POL NEG;*OPC?" !Set FLG polarity.
90 ENTER @Dio;Ready! Wait for completion.
100 OUTPUT @Dio;"SOUR:DIG:DATA0:WORD:HAND LEAD;*OPC?" !Set output
110 ENTER @Dio;Ready!Wait for completion.
120 OUTPUT @Dio;"SOUR:DIG:DATA0:WORD #H6565;*OPC?" ! Send 6565 hex using
130 ENTER @Dio;Ready!
140 OUTPUT @Dio;"SOUR:DIG:DATA:WORD #HAAAA;"*OPC?" ! Send AAAA hex using
150 ENTER @Dio;Ready
160 OUTPUT @Dio;"MEAS:DIG:DATA0:WORD?" ! Read the 16-bit port using
hardware handshake.
170 ENTER@Dio;Words!
180 PRINT "Integer value of port 0 ";Words!
190 OUTPUT @Dio;"MEAS:DIG:DATA0:WORD:BIT9?" ! Read the state of a bit using
hardware handshake.
200 ENTER @Dio;Bits!
210 PRINT "Bit 9, data line D1_1, value ";Bits!
220 END!
handshake mode.
hardware handshake.
hardware handshake.

Using Trace Memory

These examples demonstrate using trace memory in various configurations.
Hardware setup: Example 2 uses an external VME memory card. You can also use shared memory on the command module for the Keysight E1405B/E1406. The memory starting address is usually at #H200000. (Use the VXI:CONF:DLIS? query to locate the address).
Byte swapping may occur when using the :TRACE commands with Keysight 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 :TRACE commands will swap the order the of the bytes. The bytes are written or read from memory with the lowest port receiving the most significant byte and the highest port the least significant byte.
Keysight E1458A 96-Channel Digital I/O Module User Guide 55
Using the Keysight E1458A Digital I/O Module Program Examples

Trace Memory Example 1

This example writes 20 bytes 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 ! A, B, C, D, E, F, G, H, I, J
50 READ A(*)!
60 OUTPUT @Dio;"*RST;*OPC?"!
70 ENTER @Dio;Ready! Wait for completion.
80 OUTPUT @Dio;"SOUR:DIG:TRAC:DEFalpha,100;*OPC?" ! Define memory name
90 ENTER @Dio;Ready! Wait for completion.
100 OUTPUT @Dio USING "K,10(W) ";"SOUR:DIG:TRACE alpha, #220";A(*)
110 OUTPUT @Dio;"SOUR:DIG:DATA0:WORD:TRAC alpha;*OPC?" ! Fill memory alpha
with 20 bytes. ! Output the 20 bytes.
120 ENTER @Dio;Ready! Wait for completion.
130 OUTPUT @Dio;"SOUR:DIG:TRAC:DEL alpha;*OPC?" ! Remove memory block.
140 ENTER @Dio;Ready! Wait for completion.
150 END
alpha.

Trace Memory Example 2

This example writes 20 bytes 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 ! A, B, C, D, E, F, G, H, I, J
50 READ A(*)!
60 OUTPUT @Dio;"*RST;*OPC?"!
70 ENTER @Dio;Ready! Wait for completion.
80 OUTPUT @Dio;"MEM:VME:ADDR #H200000;*OPC?" ! Define memory location.
90 ENTER @Dio;Ready! Wait for completion.
100 OUTPUT @Dio;"MEM:VME:SIZE 100;*OPC?" ! Reserve 100 bytes.
110 ENTER @Dio;Ready! Wait for completion.
120 OUTPUT @Dio;"MEM:VME:STAT ON;*OPC?" ! Enable memory.
130 ENTER @Dio;Ready! Wait for completion.
140 OUTPUT @Dio;"SOUR:DIG:TRAC:DEF alpha,100;*OPC?" ! Define memory name
alpha.
150 ENTER @Dio;Ready! Wait for completion.
56 Keysight E1458A 96-Channel Digital I/O Module User Guide
Program Examples Using the Keysight E1458A Digital I/O Module
160 OUTPUT @Dio USING "K,10(W)";"SOUR:DIG:TRACE alpha,#220";A(*)
170 OUTPUT @Dio;"SOUR:DIG:DATA0:WORD:TRAC alpha;*OPC?" ! Fill memory alpha
180 ENTER @Dio;Ready! Wait for completion.
190 OUTPUT @Dio;"SOUR:DIG:TRAC:DEL alpha;*&OPC?" ! Remove memory block.
200 ENTER @Dio;Ready! Wait for completion.
210 END
with 20 bytes.
! Output the 20 bytes.

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;*OPC?"!
60 ENTER @Dio;Ready! Wait for completion.
70 OUTPUT @Dio;"SOUR:DIG:TRAC:DEF alpha,80;*OPC?"! Define memory name
alpha.
80 ENTER @Dio;Ready! Wait for completion.
90 OUTPUT @Dio;"MEAS:DIG:DATA0:WORD:TRACE alpha;*OPC?" ! Output 80 bytes.
100 ENTER @Dio;Ready! Wait for completion.
110 OUTPUT @Dio;"SOUR:DIG:TRAC:DATA? alpha"
120 ENTER @Dio USING "4A,40(W)"; Head$;A(*)
130 OUTPUT @Dio;"SOUR:DIG:TRACE:DEL alpha;*OPC?" ! Request the data.
140 ENTER @Dio;Ready! Wait for completion.
150 END
! Remove memory block.
Keysight E1458A 96-Channel Digital I/O Module User Guide 57
Using the Keysight E1458A Digital I/O Module Program Examples
58 Keysight E1458A 96-Channel Digital I/O Module User Guide
Keysight E1458A 96-Channel Digital I/O Module User Guide
4 Keysight E1458A Command
Reference

Using This Chapter

This chapter describes Standard Commands for Programmable Instruments (SCPI) and summarizes IEEE 488.2 Common (*) commands applicable to the Keysight E1458A Digital I/O Module. This chapter contains the following sections:
Command Fundamentals page 59 SCPI Command Reference page 62 DISPlay Subsystem page 63 MEASure Subsystem page 66 MEMory Subsystem page 71 [SOURce:] Subsystem page 76 STATus Subsystem page 105 SYSTem Subsystem page 108 IEEE 488.2 Common Commands page 110 Command Quick Reference page 112 Command Quick Reference page 112

Command Fundamentals

Commands are separated into two types: IEEE 488.2 Common commands and SCPI commands.

Common Command Format

The IEEE 488.2 standard defines the Common commands that 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 Common commands are:
59
Keysight E1458A Command Reference Command Fundamentals
*RST *ESR 32 *STB?

SCPI Command Format

SCPI commands perform functions like making measurements, querying instrument states, or retrieving data. The command structure is a hierarchical structure that usually consists of a top-level (or root) command, one or more lower-level commands, and their parameters. The following example shows part of a typical subsystem:
[SOURce:]
DIGital
:DATAn
[:VALue]? :BITm?
[SOURce:] is the root command, DIGital is a second-level command, :DATAn is a third-level command (where n is the port number 0 - 11), and :VALue and :BITm are fourth-level commands (where m is the queried bit location).
Command Separator
A colon (:) always separates one command from the next lower-level command. This is illustrated as follows:
MEASure:DIGital:DATAn:VALue?
Colons separate the root command from the second level (MEASure:DIGital) and the second from the third level (DIGital:DATAn), and so forth.
Abbreviated and Short Commands
The command syntax shows most commands 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 instrument will accept either the abbreviated form or the entire command.
For example, if the command reference syntax shows the command MEASure, then MEAS and MEASURE are both acceptable forms. Other forms of MEASure, such as MEASU or MEASUR will generate an error.
The instrument does not distinguish between uppercase and lowercase characters. Therefore MEASURE, measure, and MeAsUrE are all acceptable.
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.
60 Keysight E1458A 96-Channel Digital I/O Module User Guide
Command Fundamentals Keysight E1458A Command Reference
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 command but do not send the preceding implied command. In this case, the instrument assumes you intend to use the implied command and it responds as if you had sent it. Examine this excerpt from the [SOURce:] subsystem shown below:
[SOURce:]
DIGital
:DATAn
[:VALue] <parameter> :BITm <parameter>
The root command [SOURce:] is implied. To set the instrument to output a logical 1 to bit 0 of port 3, you may send either:
[SOURce:]DIGital:DATA3:BIT0 1
or
DIGital:DATA3:BIT0 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 used decimal
representations of numbers including optional signs, 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 that 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:CONTroln:POLarity <polarity> command where the parameter <polarity> can be either POS or NEG.
Keysight E1458A 96-Channel Digital I/O Module User Guide 61
Keysight E1458A Command Reference SCPI Command Reference
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>] command. If you send the command without specifying a parameter, the command returns the number of the port last addressed. If you send the MIN parameter or the DEF parameter, the command returns 0. If you send the MAX parameter, the command returns
11. Be sure to place a space between the command and the parameter.
Keyword Substitutions
Some commands indicate a keyword substitution by showing the 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:DIGital:DATAn[:type], the keyword [:type] should be replaced by one these parameters:
:BYTE :WORD :LWORd or :LW32 :LW64 :LW96
Linking Commands
Linking IEEE 488.2 Common Commands with SCPI Commands. 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:DATA2:POL NEG;:DIG:DATA2:BIT1 1

SCPI Command Reference

The following sections describe the Standard Commands for Programmable Instruments (SCPI) commands for the Keysight E1458A Digital I/O Module. Commands are listed alphabetically by subsystem and within each subsystem.
62 Keysight E1458A 96-Channel Digital I/O Module User Guide
DISPlay Subsystem Keysight E1458A Command Reference

DISPlay Subsystem

The DISPlay subsystem 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-Size VXIbus Systems Configuration Guide for supported terminal types. 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 | AUTO> :PORT? [<MAX | MIN | DEF>] [:STATe] <OFF | ON> [:STATe]?

DISPlay:MONitor:PORT

DISPlay:MONitor:PORT [<port>] sets the displayed port number.
Parameters
Parameter Name
<port> Numeric or
Comments
– In the AUTO mode of operation, the display shows the state of the port
last programmed. MIN sets port 0. MAX sets port 11. No parameter or DEF sets AUTO mode of operation.
Related Commands: DISPlay:MONitor[:STATe] DISPlay:MONitor:PORT? *RST Condition: AUTO
Parameter Type
Discrete
Range of Values Default
none, 0 through 11 MIN | MAX | AUTO | DEF
AUTO
Keysight E1458A 96-Channel Digital I/O Module User Guide 63
Keysight E1458A Command Reference DISPlay Subsystem
Example
DISP:MON:PORT 3 sets the port to be monitored to 3.

DISPlay:MONitor:PORT?

DISPlay:MONitor:PORT? [<MAX | MIN | DEF>], with no parameter, returns a decimal number indicating the port being monitored. If AUTO was selected as the port parameter in the DISP:MON:PORT AUTO command, the query returns a
-1. If DEF is specified, the query always returns -1. If MAX is specified, the query returns the maximum port (always 11). If MIN is specified, the query returns the minimum port (always 0).
Parameters
Parameter Name Parameter Type Range of Values Default
[<MAX | MIN | DEF>] Optional or
Comments
Related Commands: DISPlay:MONitor:PORT DISPlay:MONitor[:STATe] *RST Condition: Not applicable.
Example
DISP:MON:PORT? identifies the port being monitored.

DISPlay:MONitor[:STATe]

DISPlay:MONitor[:STATe] <OFF | ON> turns the monitor mode on and off.
Parameters
Parameter Name
<OFF | ON> Boolean 0 | 1, OFF | ON None
Discrete
Parameter
Type
None MAX, MIN, or DEF
Range of Values Default
None
Comments
– DISP:MON ON enables the terminal display of port parameters. The
parameters are updated to the terminal following each new command accessing a port.
64 Keysight E1458A 96-Channel Digital I/O Module User Guide
DISPlay Subsystem Keysight E1458A Command Reference
A keyboard entry at the terminal will set DISP:MON OFF. This command differs from the SOUR:DIG:DATAn[:type]:MON? command;
this command does not perform an actual readback of the port data lines. It returns the last programmed state of the data lines.
Related Commands: DISPlay:MONitor:PORT DISPlay:MONitor:PORT? *RST Condition: OFF
Example
DISP:MON ON displays the state of the last port programmed.

DISPlay:MONitor[:STATe]?

DISPlay:MONitor[:STATe]? returns the state of the monitor mode.
Parameters
None
Comments
DISPlay:MONitor[:STATe]? returns a 1 if the monitor mode is on or a 0 if the monitor mode is off.
Keysight E1458A 96-Channel Digital I/O Module User Guide 65
Keysight E1458A Command Reference MEASure Subsystem

MEASure Subsystem

The MEASure subsystem defines the command set for the Keysight E1458A Digital I/O Module input statements

Subsystem Syntax

MEASure
:DIGital
:DATAn
[:BYTE]
:BITm? :TRACe <name> [:VALue]?
:WORD
:BITm? :TRACe <name> [:VALue]?
:LWORd or :LW32
:BITm? :TRACe <name> [:VALue]?
:LW64
:BITm? :TRACe <name> [:VALue]?
:LW96
:BITm? :TRACe <name> [:VALue]?
:FLAGn?

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:DIGital:DATAn:WORD[:VALue]? reads two bytes (one word) from 16-bit port n after the completion of the handshake and returns a decimal number between
-32768 and 32767.
MEASure:DIGital:DATAn:LWORd[:VALue]? reads four bytes (one longword) from the 32-bit port n after the completion of the handshake and returns a decimal number between -231 and (231-1).
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 -231 and (231-1).
66 Keysight E1458A 96-Channel Digital I/O Module User Guide
MEASure Subsystem Keysight E1458A Command Reference
MEASure:DIGital:DATAn:LW96[:VALue]? reads 12 bytes from the 96-bit port after the completion of the handshake and returns three decimal numbers, each between
-231 and (231-1).
Parameters
Parameter Name
DATAn Numeric BYTE none, 0 through 11
Parameter Type Range of Values Default
0 WORD none, 0, 2, 4, 6, 8, or 10 LWORd none, 0, 4, or 8 LW64 none or 0 LW96 none or 0
Comments
? Input data from the digital I/O module is returned in decimal format.
Other formats are not supported for input. However, data output 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 used instead of LWORd. Chapter 3, "Using the Keysight 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 port number n must be the last character of the keyword without spaces.
? Related Commands: [SOURce:]DIGital:DATAn[:type][:VALue]
MEASure:DIGital:DATAn[:type]:BITm?
– *RST Condition: Set to input 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 -1.
Keysight E1458A 96-Channel Digital I/O Module User Guide 67
Keysight E1458A Command Reference MEASure Subsystem

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:DIGital:DATAn:LWORd:BITm? reads the state of bit m of the 32-bit port n after the completion of the handshake.
MEASure:DIGital:DATAn:LW64:BITm? reads the state of bit m of the 64-bit port after the completion of the handshake.
MEASure:DIGital:DATAn:LW96:BITm? reads the state of bit m of the 96-bit port after the completion of the handshake.
Parameters
Parameter Name
DATAn Numeric BYTE none, 0 through 11
BITm Numeric BYTE 0-7
Parameter Type Range of Values Default
0 WORD none, 0, 2, 4, 6, 8, or 10 LWORd none, 0, 4, or 8 LW64 none or 0 LW96 none or 0
0 WORD 0-15 LWORd 0-31 LW64 0-63 LW96 0-95
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 used 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 command. Like the
DATAn keyword, no space can be between the keyword BIT and the m parameter.
If n is omitted, port 0 is used. If m is omitted, bit 0 is used. Related Commands: SOURce:DIGital:DATAn:POLarity
68 Keysight E1458A 96-Channel Digital I/O Module User Guide
MEASure Subsystem Keysight E1458A Command Reference
*RST Condition: Set to input on all ports.
Example
MEAS:DIG:DATA2:BIT4? reads port 2, bit 4 (data line D2-4).
MEAS:DIG:DATA0:LW96:BIT95? reads port 0, bit 95 (data line D0-7).

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:DIGital:DATAn:WORD:TRACe <name> reads 16-bit port n after the completion of the handshake and stores the data block in <name>.
MEASure:DIGital:DATAn:LWORd:TRACe <name> reads the 32-bit port n after the completion of the handshake and stores the data block in <name>.
MEASure:DIGital:DATAn:LW64:TRACe <name> reads the 64-bit port after the completion of the handshake and stores the data block in <name>.
MEASure:DIGital:DATAn:LW96:TRACe <name> reads the 96-bit port after the completion of the handshake and stores the data block in <name>.
Parameters
Parameter Name
DATAn Numeric BYTE none, 0 through 11
<name> String previously defined block name
Parameter Type Range of Values Default
0 WORD none, 0, 2, 4, 6, 8, or 10 LWORd none, 0, 4, or 8 LW64 none or 0 LW96 none or 0
None (max 12 characters)
Comments
– :TRACe <name> is the keyword (maximum 12 characters) that specifies
the block where the data should be stored. This block must have been previously defined by the [SOURce]:DIGital:TRACe:DEFine command.
– 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 [:type] keyword used in this command. For example, valid block sizes for LWORd are 4, 8, 12, 16 etc.
Keysight E1458A 96-Channel Digital I/O Module User Guide 69
Keysight E1458A Command Reference MEASure Subsystem
– Input data is returned in decimal format. Other formats are not supported
for input, however data output may be in binary, octal, decimal or hexadecimal.
The keyword LW32 may be used 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.
– Related Commands: MEASure:DIGital:DATAn[:VALue]?
SOURce:DIGital:TRACe:DEFINE <name>
– *RST Condition: Set to input on all ports.
Example
MEAS:DIG:DATA0:WORD:TRACe first_block reads 16-bit data from port 0 and stores it in the predefined user memory location first_block.

MEASure:DIGital:FLAGn?

MEASure:DIGital: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
Parameter Name Parameter Type Range of Values Default
FLAGn Numeric none, 0 through 11 0
Comments
– MEASure:DIGital:FLAGn? is used to implement custom handshakes. 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 affected by the condition of the flag
combining jumpers. Refer to Chapter 2 for additional information.
– Related Commands: [SOURce:]DIGital:CONTroln:POLarity?
[SOURce:]DIGital:CONTroln[:VALue] [SOURce:]DIGital:FLAGn:POLarity [SOURce:]DIGital:FLAGn:POLarity?
Example
MEAS:DIG:FLAG1? reads the port1 flag line.
70 Keysight E1458A 96-Channel Digital I/O Module User Guide
MEMory Subsystem Keysight E1458A Command Reference

MEMory Subsystem

The MEMory subsystem defines the command set for enabling the use of external VME memory or memory on the command module for storing traces and macros. The addressable range is #H200000 through #HDFFFF8 in A24 space.

Subsystem Syntax

MEMory
DELete:MACRo <name> VME:
ADDRess [<base>]<address> ADDRess? [MIN | MAX] SIZE [<base>]<size> SIZE? [MIN | MAX] STATe <state> STATe?

MEMory:DELete:MACRo

MEMory:DELete:MACRo <name> deletes a single macro previously recorded using the *DMC Common command.
Parameters
Parameter Name Parameter Type Range of Values Default
<name> String Previously defined block name

Comments

– <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; the *PMC Common
command purges all macros.
Example
None
(maximum 12 characters)
MEM:DEL:MACR test_macro deletes macro named test_macro previously defined using the *DMC Common command.
Keysight E1458A 96-Channel Digital I/O Module User Guide 71
Keysight E1458A Command Reference MEMory Subsystem

MEMory:VME:ADDRess

MEMory:VME:ADDRess [<base>]<address> establishes the address of add-on VME memory in the system which can then be used to store block data in commands with the :TRACE keyword.
Parameters
Parameter Name
<base> Discrete none, #H, #Q, or #B Decimal
<address> Numeric or
Parameter Type
Discrete
Range of Values Default
20000016 - DFFFF816
MIN or MAX
None
Comments
– <base> specifies the numeric format as decimal, hexadecimal, octal, or
binary. IEEE-488.2 specifies the following values for this parameter:
– Decimal = no parameter
Hexadecimal = #H Octal = #Q Binary = #B
– Valid values for <base><address> are #H200000 (2,097,152 decimal)
through #HDFFFF8 (14,680,056 decimal).
– For this memory to actually be used it must also have a defined length and
have been turned ON using the MEMory:VME:STATe command.
– Related Commands: SOUR:DIG:TRAC:DEF <name>,<size>
MEMory:VME:ADDress? MEMory:VME:SIZE <size> MEMory:VME:STATe <ON or OFF>
– *RST Condition: #H200000.
Example
MEM:VME:ADDR #H200000 sets the starting VME address to 20000016.
72 Keysight E1458A 96-Channel Digital I/O Module User Guide
MEMory Subsystem Keysight E1458A Command Reference

MEMory:VME:ADDRess?

MEMory:VME:ADDRess? [<MIN | MAX>] queries for the current VME memory address. The optional parameter lets you query for the fixed minimum or maximum address.
Parameters
Parameter Name
<MIN | MAX> Discrete none, MIN, or MAX None
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:ADDRess <address>
MEMory:VME:STATe? MEMory:VME:SIZE?[<MIN or MAX>]

MEMory:VME:SIZE

MEMory:VME:SIZE [<base>]<size> sets the size in bytes of the external or shared command module memory.
Parameters
Parameter Name
Parameter Type
Parameter Type
Range of Values Default
Range of Values Default
<base> Discrete None, #H, #Q, or #B Decimal
<size> Numeric
or Discrete
00000016 - C0000016 or MIN or MAX
None
None
Comments
Address plus size must not exceed #HE00000. <base> specifies the numeric format as decimal, hexadecimal, octal, or
binary. IEEE-488.2 specifies the following values for this parameter:
– Decimal = no parameter
Hexadecimal = #H Octal = #Q Binary = #B
Keysight E1458A 96-Channel Digital I/O Module User Guide 73
Keysight E1458A Command Reference MEMory Subsystem
– Related Commands: MEMory:VME:ADDRess? MEMory:VME:STATe?

MEMory:VME:SIZE?

– *RST Condition: #H000000.
MEMory:VME:SIZE?
MEMory:VME:SIZE? [<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
Parameter Name Parameter Type Range of Values Default
<MIN | MAX> Discrete none, MIN or MAX None
Comments
This command always returns the memory size in decimal format.The size returned using MIN is always 0.The size returned using MAX is always 12582912Related Commands: MEMory:VME:ADDRess? [<MIN or MAX>]
MEMory:VME:STATe?, MEMory:VME:SIZE <size>

MEMory:VME:STATe

MEMory:VME:STATe <state> enables/disables VME memory for storage.
Parameters
Parameter Name Parameter Type Range of Values Default
<state> Boolean 0 or 1, OFF or ON None
Comments
– Related Commands: SOUR:DIG:TRAC:DEF <name><size>
SOUR:DIG:TRAC[:DATA] <name><block_data> MEMory:VME:ADDress <address> MEMory:VME:SIZE <size>
– *RST Condition: Set to OFF.
Example
MEM:VME:STAT ON enables access to the VME memory.
74 Keysight E1458A 96-Channel Digital I/O Module User Guide
MEMory Subsystem Keysight E1458A Command Reference

MEMory:VME:STATe?

MEMory:VME:STATe? queries the state of the external memory flag.
Parameters
None
Comments
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:SIZE?[<MIN or MAX>]
Keysight E1458A 96-Channel Digital I/O Module User Guide 75
Keysight E1458A Command Reference [SOURce:] Subsystem

[SOURce:] Subsystem

The [SOURce:] subsystem defines the command set for the Keysight E1458A Digital I/O Module output statements. It also defines the state and polarity of the control line (CTL), the polarity of the flag line (FLG), the handshaking mode, and handshake delay for both data input and output. The root command [SOURce:] is optional.

Subsystem Syntax

[SOURce:]
DIGital
:CONTroln
:POLarity <POS | NEG> :POLarity? [:VALue] <0 | 1 or ON | OFF> [:VALue]?
:DATAn
[:BYTE]
:BITm <0 | 1> :BITm? :BITm
:MONitor?
:HANDshake
:DELay <time> :DELay? [:MODE] <NONE | LEADing | TRAiling |
PULSe | PARTial | STRobe>
[:MODE]? :MONitor? :POLarity <POS | NEG> :POLarity? :TRACe <name> [:VALue] [<base>]<value> [:VALue]?
:WORD
:BITm <0 | 1> :BITm? :BITm
:MONitor? :HANDshake
:DELay <time>
:DELay?
[:MODE] <NONE | LEADing | TRAiling |
PULSe | PARTial | STRobe>
[:MODE]? :MONitor?
76 Keysight E1458A 96-Channel Digital I/O Module User Guide
[SOURce:] Subsystem Keysight E1458A Command Reference
[SOURce:]
DIGital
:POLarity <POS | NEG> :POLarity? :TRACe <name> [:VALue] [<base>]<value> [:VALue]?
DATAn
:LWORd or LW32
:BITm <0 | 1> :BITm? :BITm
:MONitor?
:HANDshake
:DELay <time> :DELay? [:MODE] <NONE | LEADing | TRAiling |
PULSe | PARTial |STRobe>
[:MODE]? :MONitor? :POLarity <POS | NEG> :POLarity? :TRACe <name> [:VALue] [<base>]<value> [:VALue]?
:LW64
:BITm <0 | 1> :BITm? :BITm
: MONitor?
:HANDshake
:DELay <time>
:DELay?
[:MODE] <NONE | LEADing | TRAiling
| PULSe | PARTial | STRobe>
[:MODE]? :MONitor? :POLarity <POS | NEG> :POLarity? :TRACe <name> [:VALue] [<base>]<value> [:VALue]?
Keysight E1458A 96-Channel Digital I/O Module User Guide 77
Keysight E1458A Command Reference [SOURce:] Subsystem
[SOURce:]
DIGital
:DATAn
:LW96
:BITm <0 | 1> :BITm? :BITm
:MONitor?
:HANDshake
:DELay <time> :DELay? [:MODE] <NONE | LEADing | TRAiling
| PULSe | PARTial | STRobe>
[:MODE]? :MONitor? :POLarity <POS | NEG> :POLarity? :TRACe <name> [:VALue] [<base>]<value> [:VALue]?
:FLAGn
:POLarity <POS | NEG> :POLarity?
:HANDshaken
:DELay <time> :DELay? [:MODE] <NONE | LEADing | TRAiling | PULSe | PARTial |
STRobe>
[:MODE]? :IOn? :TRACe
:CATalog?
[:DATA] <name><block_data>
[:DATA]? <name>
:DEFine <name><size>[<fill>]
:DEFine? <name>
:DELete
[:NAME]<name> :ALL
78 Keysight E1458A 96-Channel Digital I/O Module User Guide
[SOURce:] Subsystem Keysight E1458A Command Reference

[SOURce:]DIGital:CONTroln:POLarity

[SOURce:]DIGital:CONTroln:POLarity <polarity> sets the CTL line voltage level for logical true in port n to either TTL High for POSitive polarity or TTL Low for NEGative polarity.
Parameters
Parameter Name
CONTroln Numeric none, 0 through 11 0
<polarity> Discrete POSitive or NEGative None
Parameter Type
Range of Values Default
Comments
Control lines are always accessed by their 8-bit port number :CONTroln is the keyword used for commands relating to the control (CTL)
line 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:CONTroln[:VALue] [SOURce:]DIGital:FLAGn:POLarity [SOURce:]DIGital:FLAGn:POLarity?
– *RST Condition: POLarity = POSitive
Example
DIG:CONT0:POL POS sets logical true to TTL High on port 0 control line.

[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 Name Parameter Type Range of Values Default
CONTroln Numeric none, 0 through 11 0
Keysight E1458A 96-Channel Digital I/O Module User Guide 79
Keysight E1458A Command Reference [SOURce:] Subsystem
Example
DIG:CONT0:POL? queries the state of the logical true condition on port 0.
– :CONTroln is the keyword used for commands relating to the control (CTL)
line 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:CONTroln[:VALue] <value> sets or clears the control line on the selected port n.
Parameters
Parameter Name
CONTroln Numeric none, 0 through 11 0
<value> Boolean 0 or 1, OFF or ON None
Parameter Type
Range of Values Default
Comments
This command is used to create custom handshakes when the HANDshake is set to NONE.
:CONTroln is the keyword used for commands relating to the control (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 the flag line to handshake data to and from peripherals.
Related Commands: [SOURce:]DIGital:CONTroln:POLarity [SOURce:]DIGital:CONTroln:POLarity? [SOURce:]DIGital:CONTroln:[:VALue]? [SOURce:]DIGital:FLAGn:POLarity [SOURce:]DIGital:FLAGn:POLarity?
*RST Condition: Clears the control line; i.e., sets the control line to logical 0.
Example
DIG:CONT2 1 sets the 8-bit port 2 control line true.
80 Keysight E1458A 96-Channel Digital I/O Module User Guide
[SOURce:] Subsystem Keysight E1458A Command Reference

[SOURce:]DIGital:CONTroln[:VALue]?

[SOURce:]DIGital:CONTroln[:VALue]? reads the state of the control line on port n and returns a 0 or 1, indicating the logical condition of the CTL line.
Parameters
Parameter Name Parameter Type Range of Values Default
CONTroln Numeric none, 0 through 11 0
Comments
– 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.
Example
DIG:CONT2? 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:BITm <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.
Parameters
Parameter Name Parameter Type Range of Values Default
DATAn Numeric BYTE none, 0 through 11
BITm Numeric BYTE 0 - 7
0 WORD none, 0, 2, 4, 6, 8, or 10 LWORd none, 0, 4, or 8 LW64 none or 0 LW96 none or 0
None WORD 0 - 15 LWORd 0 - 31 LW64 0 - 63 LW96 0 - 95
<value> Numeric 0 or 1 None
Keysight E1458A 96-Channel Digital I/O Module User Guide 81
Keysight E1458A Command Reference [SOURce:] Subsystem
Comments
– :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. 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. The keyword LW32 may be used instead of LWORd. Related Commands: [SOURce:]DIGital:DATAn[:VALue]
[SOURce:]DIGital:DATAn:POLarity
– *RST Condition: All ports are set for data input.
Example
DIG:DATA3:BIT4 1 sets bit 4 (the 5th bit) of port 3 to logical 1.

[SOURce:]DIGital:DATAn[:type]:BITm?

[SOURce:]DIGital:DATAn[:BYTE]:BITm? returns a 0 or 1 indicating the current programmed state of bit m on 8-bit port n.
[SOURce:]DIGital:DATAn:WORD:BITm? returns a 0 or 1 indicating the current programmed state of bit m on 16-bit port n.
[SOURce:]DIGital:DATAn:LWORd:BITm? returns a 0 or 1 indicating the current programmed state of bit m on 32-bit port n.
[SOURce:]DIGital:DATAn:LW64:BITm? returns a 0 or 1 indicating the current programmed state of bit m on 64-bit port n.
[SOURce:]DIGital:DATAn:LW96:BITm? returns a 0 or 1 indicating the current programmed state of bit m on 96-bit port n.
Parameters
Parameter Name Parameter Type Range of Values Default
DATAn Numeric BYTE none, 0 through 11
0 WORD none, 0, 2, 4, 6, 8, or 10 LWORd none, 0, 4, or 8 LW64 none or 0 LW96 none or 0
82 Keysight E1458A 96-Channel Digital I/O Module User Guide
[SOURce:] Subsystem Keysight E1458A Command Reference
BITm Numeric BYTE 0 - 7
WORD 0 - 15 LWORd 0 - 31 LW64 0 - 63 LW96 0 - 95
None
Comments
– This command performs a readback of the data line register. the
DIG:DATAn[:type]:BITm:MON? command returns the actual condition of the data lines.
The keyword LW32 may be used 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. 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. Related Commands: [SOURce:]DIGital:DATAn[:VALue]
[SOURce:]DIGital:DATAn:POLarity
Example
DIG:DATA3:BIT4:VAL? returns a 0 or 1 indicating the last programmed state of bit 4 on port 3.
Keysight E1458A 96-Channel Digital I/O Module User Guide 83
Keysight E1458A Command Reference [SOURce:] Subsystem

[SOURce:]DIGital:DATAn[:type]:BITm:MONitor?

[SOURce:]DIGital:DATAn[:BYTE]:BITm:MONitor? 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:BITm:MONitor? returns 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:BITm:MONitor? 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:MONitor? 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:MONitor? returns a 0 or 1, indicating the current state of the data line specified by bit m on 96-bit port n.
Parameters
Parameter Name Parameter Type Range of Values Default
DATAn 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
BITm Numeric BYTE 0 - 7
WORD 0 - 15 LWORd 0 - 31 LW64 0-63 LW96 0-95
0
None
Comments
– This command performs a readback of the actual condition of the data
line. The DIG:DATAn[:type]BITm? command returns the programmed state 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.
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 :LW64 or :LW96, n must be 0. The keyword LW32 maybe used 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.
84 Keysight E1458A 96-Channel Digital I/O Module User Guide
[SOURce:] Subsystem Keysight E1458A Command Reference
– Related Commands: [SOURce:]DIGital:DATAn:BITn[:VALue]?
[SOURce:]DIGital:DATAn:POLarity
Example
DIG:DATA3:BIT4:MON? returns either a 0 or a 1 indicating the current condition of bit 4 on port 3.

[SOURce:]DIGital:DATAn[:type]:HANDshake: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:DELay <time> sets the delay between data output and the control line for data output at 16-bit port n
[SOURce:]DIGital:DATAn:LWORd:HANDshake:DELay <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:DELay <time> sets the delay between data output and the control line for data output at the 64-bit port.
[SOURce:]DIGital:DATAn:LW96:HANDshake:DELay <time> sets the delay between data output and the control line for data output at the 96-bit port.
Parameters
Parameter Name Parameter Type Range of Values Default
DATAn 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
<time> Numeric 2 ?s to 15 ?s
20 ?s to 150 ?s 200 ?s to 1.5 ms 2ms to 15ms
Discrete MIN | MAX | DEF
0
None
Comments
– This command is related to the handshake mode in use. Chapter 3
describes the handshake modes and timing.
Keysight E1458A 96-Channel Digital I/O Module User Guide 85
Keysight E1458A Command Reference [SOURce:] Subsystem
– The delay time must be set to the same value on all ports used in a
multiple-port operation.
– MAX sets a 15-ms delay. DEF sets 2-µs delay. MIN sets a delay of 0.
Because of hardware ambiguity at this delay setting, the actual delay is not guaranteed. Note that MIN is illegal for PULSe or STRobe handshakes.
– This command sets the strobe pulse width for both input and output
STRobe handshakes.
– DIGital:DATAn:HANDshake[:MODE] NONE command ignores any
programmed delay time. For all other modes of handshaking, 2 µs is the minimum.
– Specific bands of delay settings are not allowed. These are:
0 µs > <time> < 2 µs 15 µs > <time> < 20 µs 150 µs > <time> < 200 µs
1.5 ms > <time> < 2.0 ms
The controller uses a rounded-up value for <time> if these values are
specified.
The keyword LW32 may be used instead of LWORd. 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.
– Related Commands: [SOURce:]DIGital:HANDshaken[:MODE]
[SOURce:]DIGital:CONTroln:POLarity [SOURce:]DIGital:CONTroln[:VALue] [SOURce:]DIGital:FLAGn:POLarity
– *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]:HANDshake:DELay? 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:DELay? queries 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:DELay? queries for the delay between data output and the control line for data output at the 32-bit port n and returns a decimal number between 0 and .015.
86 Keysight E1458A 96-Channel Digital I/O Module User Guide
[SOURce:] Subsystem Keysight E1458A Command Reference
[SOURce:]DIGital:DATAn:LW64:HANDshake:DELay? 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:DELay? 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 Parameter Type Range of Values Default
DATAn 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
<MIN | MAX | DEF> Discrete None or MIN | MAX | DEF None
Comments
The keyword LW32 may be used 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.

[SOURce:]DIGital:DATAn[:type]:HANDshake[:MODE]

[SOURce:]DIGital:DATAn[:BYTE]:HANDshake[:MODE] <mode> selects the type of handshake and defines the timing relationship between the control (CTL) line, the flag (FLG) line, and when data is transferred in either direction between the Keysight E1458A Digital I/O Module and a peripheral on 8-bit port n.
0
[SOURce:]DIGital:DATAn:WORD:HANDshake[:MODE] <mode> selects the handshake mode used on the 16-bit port n.
[SOURce:]DIGital:DATAn:LWORd:HANDshake[:MODE] <mode> 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.
Keysight E1458A 96-Channel Digital I/O Module User Guide 87
Keysight E1458A Command Reference [SOURce:] Subsystem
Parameters
Parameter Name Parameter Type Range of Values Default
DATAn 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
<mode> Discrete NONE, LEADing, TRAiling, PULSe
PARTial, or STRobe
0
NONE
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 used instead of LWORd. DIG: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.
– NONE deletes all automatic data handshaking between the Keysight
E1458A Digital 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.
– Related Commands: [SOURce:]DIGital:HANDshaken:[DELay]
[SOURce:]DIGital:CONTroln:POLarity [SOURce:]DIGital:CONTroln[:VALue] [SOURce:]DIGital:FLAGn:POLarity
– *RST Condition: Mode 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]:HANDshake[:MODE]? returns a string indicating the type of handshake set on 8-bit port n.
[SOURce:]DIGital:DATAn:WORD:HANDshake[:MODE]? returns a string indicating the type of handshake set on the 16-bit port n.
88 Keysight E1458A 96-Channel Digital I/O Module User Guide
[SOURce:] Subsystem Keysight E1458A Command Reference
[SOURce:]DIGital:DATAn:LWORd:HANDshake[:MODE]? returns a string indicating the type of handshake set on the 32-bit 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 Parameter Type Range of Values Default
DATAn 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
0
Comments
– The handshake <mode> must be the same on all ports used in
multiple-port operations.
The keyword LW32 may be used instead of LWORd. 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:HANDshaken:[DELay]
[SOURce:]DIGital:CONTroln:POLarity [SOURce:]DIGital:CONTroln[:VALue] [SOURce:]DIGital:FLAGn:POLarity
– *RST Condition: Mode is NONE on all ports.
Example
DIG:DATA3:HAND? returns the handshake mode set on port 3.
Keysight E1458A 96-Channel Digital I/O Module User Guide 89
Keysight E1458A Command Reference [SOURce:] Subsystem

[SOURce:]DIGital:DATAn[:type]:MONitor?

[SOURce:]DIGital:DATAn[:BYTE]:MONitor? returns a decimal value indicating 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: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 of -32768 to 32767.
[SOURce:]DIGital:DATAn:LWORd: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 of -231 to (231 - 1).
[SOURce:]DIGital:DATAn:LW64:MONitor? returns two decimal values indicating the current state of the data lines on 64-bit port n. The values returned are each in the range of -231 to (231 - 1).
[SOURce:]DIGital:DATAn:LW96:MONitor? returns three decimal values
indicating the current state of the data lines on 96-bit port n. The values returned are each in the range of -231 to (231 - 1).
Parameters
Parameter Name Parameter Type Range of Values Default
DATAn 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
0
Comments
– This command performs a readback of the actual condition of the selected
data port. The DIG:DATAn[:type][:VALue]? command returns the programmed state of 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]:MON? is the sequence used for commands relating to
data lines at port n. The port number n must be the last character of the keyword without spaces.
The keyword LW32 may be used instead of LWORd. Related Commands: [SOURce:]DIGital:DATAn[:type]:POLarity *RST Condition: Mode is NONE on all ports.
90 Keysight E1458A 96-Channel Digital I/O Module User Guide
Loading...