Home

Tektronix DG2020A Programmers Manual

image

Contents

1. DG2020A Programmer Manual Programming Examples Filename putgrp c putseq c Description The putgrp C source file The putseq C source file putsub c The putsub C source file intcom c gpiblib c QBASIC Directory Filename getbit bas The intcomC source file The GPIB library used with the above programs Description The getbit BASIC source file putbit bas makeexe bat The putbit BASIC source file The batch file used to compile these programs with Quick BASIC DATA Directory Each of the sample programs uses its own unique input or output format Several sample files with examples of those formats are stored on the floppy disk in this directory These files are all ASCII text files and can be viewed and edited with a text editor Filename patbit dat patword dat bikdef dat Description Output file for the getbit sample program or input file for putbit Output file for the getword sample program or input file for putword Input file for the putblk sample program grpdef dat Input file for the putgrp sample program seqdef dat Input file for the putseq sample program subdef dat podassig cmd poddelay cmd Input file for the put sub sample program GPIB command file that performs output pod bit allocation GPIB command file that sets the output pod delay times podinhib cmd GPIB command file for output pod high impedance control podlevel cmd DG2020A Programmer M
2. SYNCHRONIZATION Commands SYSTEM Commands DG2020A Programmer Manual The SYNCHRONIZATION commands monitor for the completion of all pending operations Table 2 13 SYNCHRONIZATION commands Header Description OPC Generate or return the operation complete message WAI Hold off all commands until all pending operations complete The SYSTEM commands are used for example to set the date and time to lock out front panel control to control the handling of headers in responses and to query for ID and setting information This group is a collection of commands that cannot be classified in any other group Table 2 14 SYSTEM commands Header DEBug Description Query all settings for debugging DEBug SNOop DEBug SNOop DELAy DEBug SNOop DELAy TIME DEBug SNOop STATe Query all settings for debugging Query delay time for debugging Set delay time for debugging Turn on or off for debugging FACTory Reset all settings to defaults HEADer Allow or suppress the return of the control header in response messages ID Query ID information about the data generator IDN Query ID information about the data generator LOCk Lock or unlock local control using the front panel controls OPT Query which options are implemented for this data generator RST Reset this data generator SYSTem DATE Set the clock date SYSTem PPAUse SYSTem SECurity IMMediate SYSTem SECurity STA
3. gt lt Common Commands and Queries lt Syntax and Data Structures gt x INTFC D C B A A B C D System Component x System Component y Specified IEEE 488 2 IEEE 488 1 IEEE 488 2 Specified by Standard Standard Standard by Device Device A Interface Function Layer B Message Communication Function Layer C Common System Function Layer D Device Function Layer Figure 1 1 Functional layers in gpib system DG2020A Programmer Manual 1 1 Getting Started Choosing an Interface The RS 232 C interface which was established by the Electronic Industries Association EJA provides a common basis of communication between devices that exchange data This interface has long been used on terminals modems printers and other devices The RS 232 C interface that the data generator provides also uses most of the same Codes Formats Protocols and Common Commands as are used with the GPIB interface ANSI TEEE Std 488 2 1987 Your system hardware may let you choose which interface to use with your system if so you should consider the comparative advantages and disadvantages of each interface For example the GPIB interface is an eight bit parallel bus and therefore it offers high speed data transfers and multiple instrument control In contrast the RS 232 C interface is a slower serial data bus for single instru
4. Remote Port System S GPIB Configure GPIB Menu Reset to Factory Address Serial Baudrate Data Bits Parity Stop Bits Handshake Security Immediate Power up Pause Date Time Figure 1 4 GPIB parameter settings DG2020A Programmer Manual 1 5 Getting Started Installing for RS 232 C Communication 1 6 Connect an RS 232 C cable from the computer terminal to the RS 232 C connector on the rear panel of the data generator Use a configuration based on the settings for the data flow control flagging The RS 232 C provides a point to point connected communication interface between devices see Figure 1 5 The data generator can transmit and receive the same message serially over the RS 232 C interface as it can in parallel over the GPIB interface Controller DG2020A Figure 1 5 RS 232 C point to point connection Several connectors are used with the RS 232 C interface a DTE device uses a standard 25 pin male D type shell connector a DCE device uses a standard 25 pin female D type shell connector Some recent computers implement the RS 232 C interface using 9 pin D type connector This data generator uses a standard 9 pin D type shell connector provided on the rear panel see Figure 1 6 along with a 9 pin male to 25 pin male conversion
5. DATA GROUp BIT Group Related Commands Syntax Arguments Responses Examples DG2020A Programmer Manual The DATA GROUp BIT command changes the bit configuration of a group The DATA GROUp BIT query returns the set bit configuration DATA DATA GROUp ADD DATA GROUp DEFine DATA GROUp DELete DATA GROUp DELete ALL DATA GROUp NAME DATA GROUp REN ame DATA GROUp BIT lt Name gt lt MSB gt lt LSB gt DATA GROUp BIT lt Name gt lt Name gt lt string gt where the name of the group to be changed or queried lt MSB gt lt NR1 gt where lt NR1 gt is the high order bit for the group lt LSB gt lt NR1 gt where lt NR1 gt is the low order bit for the group DATA GROUP BIT lt Name gt lt MSB gt lt LSB gt DATA GROUP BIT GROUP02 7 4 changes the bit configuration for the group named GROUPO2 to be DATA04 to DATAO7 2 27 Command Descriptions DATA GROUp DEFine 2 The DATA GROUp DEFine command sets up the information for the whole group definition section in ASCII The DATA GROUp DEFine query returns the information for the whole group definition section Group DATA Related Commands DATA GROUp ADD DATA GROUp BIT DATA GROUp DELete DATA GROUp DELete ALL DATA GROUp NAME DATA GROUp REN ame Syntax DATA GROUp DEFine lt Groupblock gt DATA GROUp DEFine Arguments lt Groupblock gt lt blockheader gt lt Group gt lt LF gt lt Gro
6. Causes the listen addressed device to switch from remote to local front panel control m Select Device Clear SDC Clears or initializes all listen addressed devices m Group Execute Trigger GET Triggers all applicable devices and causes them to initiate their programmed actions m Take Control TCT Allows controller in charge to pass control of the bus to another controller on the bus m Parallel Poll Configure PPC Causes the listen addressed device to respond to the secondary commands Parallel Poll Enable PPE and Parallel Poll Disable PPD which are placed on the bus following the PPC command PPE enables a device with parallel poll capability to respond on a particular data line PPD disables the device from responding to the parallel poll DG2020A Programmer Manual C 3 Appendix C Interface Specification C 4 DG2020A Programmer Manual E nd Appendix D Factory Initialization Settings The following table lists the commands affected by a factory initialization and their factory initialization settings Table D 1 Factory initialized settings DG2020A Programmer Manual Header Default settings DATA commands DATA MSIZe 1000 DIAGNOSTIC commands DIAG SELect ALL DISPLAY commands DISPlay BRIGhtness 0 7 DISPlay CLOCk 0 DISPlay DIMmer 0 DISPlay ENABle 1 DISPlay MENU NAME EDIT DISPlay MENU STATe 1 HARDCOPY commands HCOPy FORMat BMP HCOPy PORT DISK MEMORY commands
7. Command Notation The command syntax is in extended BNF Backus Naur Form notation The extended BNF symbols used in the command set are shown in the following table Table 2 1 BNF symbols and meanings Symbol Meaning lt gt Indicates a defined element Delimits Exclusive OR elements Delimits a group of elements one of which the programmer must select 1 Delimits an optional element that the programmer may omit Delimits an optional element that the programmer may omit or may repeat one or more times ye Indicates that the left member is defined as shown by the the right member Program and Response Messages Programs created or placed in an external controller are transferred to the data generator as a program message A program message is a sequence of zero or more program message units delimited by the program message unit delimiter the semicolon A program message unit is a set command or query command The data generator performs a function or changes a setting or mode when it receives a set command when it receives a query command it returns measurement data settings status codes and or status messages The data generator transfers these response messages to the external controller DG2020A Programmer Manual 2 1 Command Syntax Command and Query Structure Character Encoding Commands are either set commands or query commands usually just called commands and queries in this manual Mo
8. MMEMory CATalog ORDer NAME1 MODE commands MODE STATe REPEAT MODE UPDate AUTO TRIGger IMPedance HIGH TRIGger LEVel 1 4 TRIGger SLOPe POSITIVE D 1 Appendix Factory Initialization Settings Table D 1 Factory initialized settings Cont Header OUTPUT commands OUTPut ELEVel Default settings OUTPut ILEVel OUTPut POD lt s gt CH lt n gt DELAy OUTPut POD lt s gt CH lt n gt HIGH OUTPut POD lt s gt CH lt n gt INHibit oO oO i gt OUTPut POD lt s gt CH lt n gt LOW SOURCE commands SOURce 0SCillator EXTernal FREQuency SOURce 0SCillator INTernal FRE Quency C9 l oO Ql l ral Ka 1 0E 8 0E 8 Re SOURce 0SCillator INTernal PLLlock SOURce O0SCillator SOURce SOURce POD lt s gt EVENT ENABle STATUS amp EVENT commands DESE INTERNAL 1 1 256 ESE PSC SRE SYSTEM commands DEBug SNOop DELAy TIME DEBug SNOop STATe HEADer LOCk SYSTem PPAUse SYSTem SECurity STATe VERBose DG2020A Programmer Manual _ E E ns Glossary ASCII Acronym for the American Standard Code for Information Interchange Controllers transmit commands to the instrument using ASCII character encoding Address A 7 bit code that identifies an instrument on the communication bus The instrument must have a unique address for the controller to recognize and transmit commands to it BNF Backus Naur Form A standard notation system for command
9. MMEMory FREE Group Related Commands Syntax Arguments Responses Examples 2 76 The MMEMory DELete NAME command deletes the file or subdirectory with the specified path name However non empty subdirectories are not deleted MEMORY MMEMory DELete ALL MMEMory DELete NAME lt Path Name gt lt Path Name gt lt string gt where lt string gt is the path name of the file or subdirectory to be deleted MMEMORY DELETE NOMORE PDA deletes the file NOMORE PDA in the current directory The MMEMory FREE query returns used size and unused size of the mass memory This query is equivalent to the MMEMory FREE ALL query MEMORY MMEMory FREE None MMEMORY FREE lt Used Size gt lt Unused Size gt where lt Used Size gt lt NR1 gt and lt Unused Size gt lt NRI1 gt MMEMORY FREE might return MMEMORY FREE 104584 1352704 DG2020A Programmer Manual Command Descriptions MMEMory INITialize The MMEMory INITialize command formats a floppy disk The format type is specified by the argument Group MEMORY Related Commands Syntax MMEMory INITialize DD1 DD2 HD1 HD2 HD3 Arguments You can select from the following formats Argument Description DD 2DD 720 KB 80 tracks 9 sectors track 512 bytes sector Format for IBM PC 2DD and Toshiba J3100 2DD DD2 2DD 640 KB 80 tracks 8 sectors track 512 bytes sector Format for NEC PC 9800 2DD HD1 2HD 1 232
10. ON OFF 1 0 trigger wait on off state lt JumpE gt ON OFF 1 0 event jump on off state lt LoopE gt ON OFF 1 0 infinite loop on off DATA SEQUENCE ADD 4 BLOCK3 16 0 0 1 1 adds a sequence step that consists of the block named BLOCK3 at the sequence line number 4 position When this sequence is executed in enhanced mode BLOCK3 will be executed repeatedly since the infinite loop setting is set on However since event jump is also set on the instrument will jump to sequence line number 0 if an external event occurs In run modes other than enhanced mode BLOCK3 will be executed 16 times and then control will switch to the next line number DG2020A Programmer Manual Command Descriptions DATA SEQuence DEFine Group Related Commands Syntax Arguments Responses Examples DG2020A Programmer Manual The DATA SEQuence DEFine command sets up all of the sequence definition section information in ASCII The DATA SEQuence DEFine query returns all of the sequence definition section information DATA DATA SEQuence ADD DATA SEQuence DELete DATA SEQuence DEL et e ALL DATA SEQuence DEFine lt Sequence Block gt DATA SEQuence DEFine lt Sequence Block gt lt blockheader gt lt Step gt lt LF gt lt Step gt lt LF gt lt Step gt Arbitrary block data for the sequence definition where lt blockheader gt lt byte count digit gt lt byte count gt lt Step gt
11. Reading the status registers tells you what types of events have occurred The Standard Event Status Register SESR The SESR shown in Figure 3 1 records eight types of events that can occur within the data generator Use the ESR query to read the SESR register Reading the register clears the bits of the register so that the register can accumulate information about new events 3 1 Status and Event Reporting 7 6 5 4 3 2 1 0 PON URQ CME EXE DDE QYE RQC OPC Figure 3 1 Standard event status SESR Table 3 1 SESR bit functions Bit 7 MSB Function PON Power On Indicates that the data generator was powered on 6 URQ User Request Indicates an event occurred and because of that event the data generator needs attention from the operator CME Command Error Indicates that an error occurred while the data generator was parsing a command or query Command error messages are listed in Table 3 5 on page 3 10 EXE Execution Error Indicates that an error occurred while the data generator was executing a command or query An execution error occurs for either of the following reasons m A value designated for the argument is out of the range allowed by the data generator is not valid for the command or is incorrect in some other sense m Execution took place improperly under conditions different from those which should have been requested Execution error messages are listed in Table 3 6
12. The HCOPy PORT command sets the hard copy output port The HCOPy PORT query returns the currently specified hard copy output port Group HARDCOPY Related Commands HCOPy Syntax HCOPy PORT DISK GPIB RS232c HCOPy PORT Arguments DISK outputs to a file on the floppy disk GPIB outputs to the GPIB port RS232c outputs to the RS 232C port Responses HCOPy PORT DISK GPIB RS232c Examples HCOPY PORT DISK sets the hard copy output to be to a file on the floppy disk 2 68 DG2020A Programmer Manual Command Descriptions HCOPy STARt Group Related Commands Syntax Arguments Examples HEADer 2 Group Related Commands Syntax Arguments Responses DG2020A Programmer Manual The HCOPy STARt command starts hardcopy output HARDCOPY HCOPy ABORt HCOPy STARt None HCOPY START starts hardcopy output The HEADer command enables or disables the command header responses to all queries except IEEE Std 488 2 common commands The HEADer query returns the status indicating whether the command header responses are enabled or not SYSTEM VERBose HEADer ON OFF lt NR1 gt HEADer ON or nonzero value enables the command header responses OFF or zero value disables the command header responses 1 command header responses are currently enabled 0 command header responses are currently disabled 2 69 Command Descriptions Examples Group Related Commands
13. In case of C programs 1 You need the National Instrument GPIB library file to use the sample program source codes The library is assumed to be resided in the following default path c GPIB95 LANGINT C When you have a different environment change the default path setting defined in the project file or to make the directory as required 2 To compile the C sample source codes you need Microsoft Developer Studio Select File from the Open Workspace menu in the Microsoft Developer When the compiler environment has been installed properly you can just click the project workspace file in the Explorer window to compile the sample program source code DG2020A Programmer Manual Programming Examples For example R Double click the C DGSAMPLE 20A GETBIT GETBIT MDP file icon in the Explorer window to open the getbit sample program The Developer Studio will automatically be invoked and the project workspace will be opened m Select Build from the Build menu to compile the sample program source code 3 Execute the compiled programs in the MS DOS prompt window Type the following commands for example cd c DGSAMPLE 20A GETBIT GETBIT lt parameters gt In case of BASIC programs 1 In the MS DOS prompt window move to the directory in which you have copied the sample BASIC files from the floppy disk in the procedures described in Making Copy on page 4 4 Select a name that does not duplicate an existing name in t
14. Syntax Arguments Responses Examples 2 70 HEADER OFF disables the command header responses HEADER might return I which indicates command headers are currently enabled for return in query responses The ID query returns the ID information of the data generator SYSTEM IDN ID None ID lt Manufacturer gt lt Model gt lt Firmware Level gt where lt Manufacturer gt SONY TEK lt Model gt DG2020A lt Firmware Level gt CF lt Code and Format Version gt and FV lt Firmware Version gt ID returns SONY TEK DG2020A CF 91 1CN FV 1 00 DG2020A Programmer Manual Command Descriptions IDN Group Related Commands LOCK 2 DG2020A Programmer Manual Syntax Arguments Responses Examples The IDN common query returns the ID information of the data generator SYSTEM ID IDN None lt Manufacturer gt lt Model gt lt Serial Number gt lt Firmware Level gt where lt Manufacturer gt SONY TEK lt Model gt DG2020A lt Serial Number gt 0 lt Firmware Level gt CF lt Code and Format Version gt lt sp gt FV lt Firmware Version gt and lt sp gt Space IDN might return SONY TEK DG2020A 0 CF 91 1CN FV 1 00 The LOCk command enables or disables the knob and all front panel buttons except the ON STBY button The LOCk query returns a status indicating whether the knob and the buttons are locked or not These data genera
15. The SOURCE commands are used to select the clock signal source set the clock frequency and enable or disable the event input of the pod Table 2 11 SOURCE commands Header SOURce 0SCillator Description Query all clock signal settings SOURce 0SCillator EXTernal FREQuency Input the external clock frequency SOURce 0SCillator INTernal FREQuency SOURce 0SCillator INTernal PLLlock SOURce 0SCillator SOURce Set the internal clock frequency Set the internal clock oscillator circuit PLL operating state Set the clock signal internal external selection SOURce POD lt s gt EVENT ENAB1e Enable or disable the event input of the pod The STATUS amp EVENT commands are used to set and query the registers and queues used by the status and event reporting system to investigate the state of the instrument and to control event generation See section 3 for details on the status and event reporting system Table 2 12 STATUS amp EVENT commands Header Description ALLEv Dequeue all events from Event Queue CLS Clear SESR SBR and Event Queue DESE Set and query DESER ESE Set and query ESER ESR Query SESR EVENT Dequeue event from Event Queue EVMsg Dequeue event from Event Queue EVQty Query number of event on Event Queue PSC Set power on status clear flag SRE Set and query SRER STB Query SBR DG2020A Programmer Manual Command Groups
16. The SYSTem SECurity STATe command sets security to on or off The SYSTem SECurity STATe query returns whether the security setting is on or off When the security setting is changed from on to off the contents of internal memory are completely erased The security on off setting is not changed by executing the FACTory command SYSTEM SYSTem SECurity IMMediate SYSTem SECurity STATe ON OFF 1 0 SYSTem SECurity STATe ON or 1 sets the security state to on OFF or 0 sets the security state to off SYSTEM SECURITY STATE 1 0 SYSTEM SECURITY STATE ON sets the security state to on The SYSTem TIME command sets the internal clock time The SYSTem TIME query returns the internal clock time SYSTEM SYSTem DATE SYSTem TIME lt Hour gt lt Minute gt lt Second gt SYSTem TIME DG2020A Programmer Manual Command Descriptions Arguments lt Hour gt the hours lt Minute gt the minutes lt Second gt the seconds Responses SYSTEM TIME lt Hour gt lt Minute gt lt Second gt Examples SYSTEM TIME 11 23 58 sets the time TRG The TRG common command generates trigger event Group MODE Related Commands RUNNing STARt STOP Syntax TRG Arguments None Examples TRG generates trigger event TRIGger The TRIGger query returns all of the currently specified settings related to the trigger function Group MODE Related Commands TRIGger IMPedance TRIGger LEVel TRIGger
17. cable Figure 1 7 on page 1 8 shows both 9 pin and 25 pin connectors with their pin number assignments DG2020A Programmer Manual Getting Started DG2020A Programmer Manual S Ic S Ic 5 PODA IEEE STD 488 PORT Es km CLOCK IN CLOCK OUT el 79 9 CALIBRATION RS 232 C Connector 0 H iM j Figure 1 6 RS 232 C port This data generator is designed as DCE device You may connect it up to 15 meters 50 feet from a DTE device using a straight through male to female cable However if the other device is instead configured as a DCE device you will need a special adapter or null modem cable for local DCE to DCE communications Refer to the wiring examples in the Figure 1 8 for the proper signal connections between devices NOTE In this data generator only TxD RxD DTR CTS pins and Signal Ground are available Getting Started 9 PIN D SHELL 25 PIN D SHELL O 1 elo O 1 2 Receive Data RxD 3 O o 2 Jlo O 2 3 Transmit Data TxD 2 O o 4 slo O 3 4 Data Terminal Ready DTR 20 O O 4 wh O 4 5 Signal Ground 7 O ols O 5 8 Clearto Send CTS 5 O ol e amp a O S E O S 5 O 10 O O 11 O O 12 O 13 NOTE TxD RxD DTR CTS and Ground lines are only available in
18. 6 5 4 3 2 1 0 PON URQ CME EXE DDE QYE RQC OPC Figure 3 4 event status enable register ESER DG2020A Programmer Manual Status and Event Reporting The Service Request Enable Register SRER Shown in Figure 3 5 It controls which bits in the SBR generate a Service Request and are summarized by the Master Status Summary MSS bit Use the SRE command to set the SRER Use the SRE query to read it The RQS bit remains set to one until either the Status Byte Register is read with a Serial Poll or the MSS bit changes back to a zero 7 5 4 3 2 1 ESB MAV Figure 3 5 Service request enable register SRER Queues The status and event reporting system contains two queues the Event Queue and the Output Queue The Event Queue which is used when operating with either the GPIB and RS 232 C interface while the Output Queue is used only when operating over the GPIB interface Instead of using an output queue an output buffer buffers query response messages for immediate transfer to the data transmission line for RS 232 C operation Output Queue The Output Queue is a FIFO First In First Out queue that hold response messages while until they are requested When a message is put in the queue the MAV bit of the Status Byte Register SBR is set The Output Queue empties each time the data generator receives a new command or query Therefore the controller must read the output queue before it sends the next c
19. 9 INHIBIT O ASSIGN 5 OUTPUT PODA CHp HIGH 0 500 LOW 0 500 DELAY 0 6 OUTPUT PODA CH7 HIGH 0 500 LOW 0 500 DELAY 0 7 OUTPUT PODA CHB HIGH 0 500 LOW 0 500 DELAY 0 00E 0 9 INHIBIT O ASSIGN 8 OUTPUT PODA CH9 HIGH 0 500 LOW 0 500 DELAY 0 00E 0 9 INHIBIT O ASSIGN 9 OUTPUT PODA CH10 HIGH 0 500 LOW 0 500 DELAY 0 00E 0 9 INHIBIT O ASSIGN 10 OUTPUT PODA CH11 HIGH 0 500 LOW 0 500 DELAY 0 00E 0 9 INHIBIT O ASSIGN 11 OUTPUT PODA TYPE VAR DEFINE 2750 0 0 lt LF gt 1 1 0 lt LF gt 2 2 0 lt LF gt 3 3 0 lt LF gt 4 4 0 lt LF gt 5 5 0 lt LF gt 6 6 0 lt LF gt 7 7 0 lt LF gt 8 8 0 lt LF gt 9 9 0 lt LF gt 10 10 0 lt LF gt 11 11 0 OUTPUT ELEVEL 0 5 ILEVEL 0 5 00E 0 9 INHIBIT O ASSIGN 00E 0 9 INHIBIT O ASSIGN DG2020A Programmer Manual 2 85 Command Descriptions OUTPut ELEVel 2 Group Related Commands Syntax Arguments Responses Examples OUTPut ILEVel 2 Group Related Commands Syntax Arguments Responses 2 86 The OUTPut ELEVel command sets the pod event input threshold level An error is issued if the pod is not a variable level pod The OUTPut ELEVe1 query returns the event input threshold level setting OUTPUT OUTPut ELEVel lt Volt gt OUTPut ELEVel lt Volt gt lt NR2 gt lt Unit gt where lt Unit gt V mV with a range of 5 0 V to 5 0 V in 0 1 V steps OUTPUT ELEVEL lt Volt gt OUTPUT ELEVEL 500mV sets the event input threshold level t
20. DATA lt Message gt DISPLAY WINDOW TEXT DATA ABCD sends the text ABCD to be displayed in the message display area The ESE common command sets the bits of the ESER Event Status Enable Register used in the status and events reporting system of the data generator The ESE query returns the contents of the ESER Refer to Section 3 Status and Events for more information about the ESER If the power on status flag is TRUE the power on default for the ESER is to reset all bits to zero If this flag is set to FALSE the ESER bits do not change value during the power on cycle STATUS amp EVENT 2 61 Command Descriptions Related Commands Syntax Arguments Examples ESR Group Related Commands Syntax Arguments Examples 2 62 CLS DESE ESR EVENT EVMsg EVQty SRE STB ESE lt Bit Value gt ESE lt Bit Value gt lt NR1 gt where lt NR1 gt is a decimal integer that ranges from 0 to 255 The ESER bits will be set to the binary equivalent of the decimal integer sent ESE 177 sets the ESER to 177 binary 10110001 which sets the PON CME EXE and OPC bits ESE might return 176 which indicates that the ESER contains the binary number 11010000 The ESR common query returns the contents of SESR Standard Event Status Register used in the status and events reporting system Refer to Section 3 Status and Events for more information about ESR or SESR STATUS amp
21. Description of 1 1 Function Layers 1 1 Installation 1 3 Installation restrictions 1 4 interface functions C 1 interface messages C 2 Setting parameters for 1 5 Standard conformed to 1 1 System configurations 1 4 H Hardcopy commands HCOPy 2 65 HCOPy ABORt 2 66 HCOPy DATA 2 66 HCOPy FORMat 2 67 HCOPy PORT 2 68 HCOPy STARt 2 69 HCOPy 2 65 HCOPy ABORt 2 66 HCOPy DATA 2 66 HCOPy FORMat 2 67 HCOPy PORT 2 68 HCOPy STARt 2 69 HEAD er 2 69 ID 2 70 IDN 2 71 DG2020A Programmer Manual Index L LOCK 2 71 Memory commands MMEMory CATalog ALL 2 73 MEMory CATalog ORDer 2 73 MEMory CDIRectory 2 74 MEMory COPY 2 75 MEMory DELete ALL 2 75 MEMory DELete NAME 2 76 MEMory FREE 2 76 MEMory INITialize 2 77 MEMory LOAD 2 77 MEMory LOCK 2 78 MEMory MDIRectory 2 79 MEMory RDIRectory 2 79 MEMory REName 2 80 MEMory SAVE 2 80 Message Handling 3 1 Messages Error 3 9 Event 3 9 MEMory CATalog ALL 2 73 MEMory CATalog OR Der 2 73 MEMory CDIRectory 2 74 MEMory COPY 2 75 MEMory DELete ALL 2 75 MEMory DELete NAME 2 76 MEMory FREE 2 76 MEMory INITialize 2 77 MEMory LOAD 2 77 MEMory LOCK 2 78 MEMory MDIRectory 2 79 MEMory RDIRectory 2 79 MEMory REName 2 80 MEMory SAVE 2 80 MODE 2 81 Mode commands TRG 2 105 MODE 2 81 MODE STATe 2 81 MODE UPDate 2 82 RUNNing 2 95 STARt 2 101 STOP 2 102 TRIGger 2 105 TRIGger IMPedance 2
22. EVENT CLS DESE ESE EVENT EVMsg EVQty SRE STB ESR None ESR might return 181 which indicates that the SESR contains the binary number 10110101 DG2020A Programmer Manual Command Descriptions EVENT Group Related Commands Syntax Arguments Examples EVMsg Group Related Commands Syntax Arguments Examples DG2020A Programmer Manual The EVENT query dequeues the event code of the event that has been in the Event Queue the longest out of all available events Use the ESR query to make the events available for dequeuing using EVENT Refer to Section 3 Status and Events STATUS amp EVENT CLS DESE ESE ESR EVMsg EVQty SRE STB EVENT None EVENT might return EVENT 113 The EVMsg query dequeues the event code and event message of the event that has been in the Event Queue the longest out of all available events Use the ESR query to make the events available for dequeuing using EVMsg For more details refer to Section 3 Status and Events STATUS amp EVENT CLS DESE ESE ESR EVENT EVQty SKE STB EVMsg None EVMSG might return EVMSG 420 Query UNTERMINATED 2 63 Command Descriptions EVQty Group Related Commands Syntax Arguments Examples FACTory Group Related Commands Syntax Arguments Examples 2 64 The EVQty query returns the number of events currently in the Event Queue If no
23. MB 77 tracks 15 sectors track 1 024 bytes sector Format for NEC PC 9800 2HD HD2 2HD 1 200 MB 80 tracks 15 sectors track 512 bytes sector Format for Toshiba J3100 2HD HD3 2HD 1 440 MB 80 tracks 18 sectors track 512 bytes sector Format for IBM PC 2HD Examples MMEMORY INITIALIZE HD3 formats a floppy disk for IBM PC 2HD MMEMory LOAD The MMEMory LOAD command loads in pattern data and block group sequence and setup information in DG2020A format into the instrument s internal memory from a disk file Group MEMORY Related Commands MMEMory SAVE DG2020A Programmer Manual 2 77 Command Descriptions Syntax Arguments Examples MMEMory LOCK 2 Group Related Commands Syntax Arguments Responses Examples 2 78 MMEMory LOAD lt File Name gt lt File Name gt lt string gt where lt string gt is the name of the file to be loaded MMEMORY LOAD MYDATA PDA loads all information from the file MYDATA PDA in the current directory into the instrument s internal memory The MMEMory LOCK command sets and clears file locks When a file is locked it cannot be deleted or written to The MMEMory LOCK query returns whether or not the file is locked MEMORY MMEMory LOCK lt Path Name gt ON OFF 1 0 MMEMory LOCK lt Path Name gt lt Path Name gt lt string gt where lt string gt is the name of the file to be locked or unlocked ON or 1 locks the file OF
24. Pattern data load error 2024 Internal pattern memory full 2025 Invalid pattern size 2026 Invalid pattern data 2030 Sequence error 2032 Too much sequence data 2033 Invalid sequence repeat count Messages Table 3 10 Device dependent command execution errors Cont Code Description 2034 Invalid sequence syntax 2035 Sequence load error 2036 Internal sequence memory full 2037 No sequence 2038 Invalid sequence number 2039 Sequence incomplete 2040 Data error 2041 Invalid data syntax 2042 Invalid data value 2050 Time error 2051 Invalid time syntax 2052 Invalid time value 2060 Invalid group name 2061 Group name is empty 2062 Same name already exists 2063 Too much group 2064 Group name not found 2065 Group number is not found 2066 Invalid group data 2067 Invalid group syntax 2070 Invalid block position 2071 To much block 2072 Block already exists 2073 Block is not found 2074 Illegal block name 2075 Illegal block size 2076 Block name already exists 2077 Block is not defined 2078 Too much block data 2079 Invalid block syntax 2080 Import error 2081 Code table syntax error 2082 Too much table data 3 16 DG2020A Programmer Manual Messages Table 3 10 Device dependent command execution errors Cont Code 2100 Description Hardcopy error 2101 Hardcopy busy 2102 2200 Hardcopy timeout error Message error Table 3 11 lists dev
25. Register to select which events are reported to the Status Registers and the Event Queue Each of these Enable Registers acts as a filter to a Status Register the DESER also acts as a filter to the Event Queue and can allow or prevent information from being recorded in the register or queue Each bit in an Enable Register corresponds to a bit in the Status Register it controls In order for an event to be reported to its bit in the Status Register the corresponding bit in the Enable Register must be set to one If the bit in the Enable Register is set to zero the event is not recorded Various commands set the bits in the Enable Registers The Enable Registers and the commands used to set them are described below The Device Event Status Enable Register DESER Shown in Figure 3 3 This register controls which events of those shown are reported to the SESR and the Event Queue The bits in the DESER correspond to those in the SESR as was described earlier Use the DESE command to enable and disable the bits in the DESER Use the DESE query to read the DESER 7 6 5 4 3 2 1 0 PON URQ CME EXE DDE QYE RQC OPC Figure 3 3 Device event status enable register DESER The Event Status Enable Register ESER Shown in Figure 3 4 It controls which events of those shown are allowed to be summarized by the Event Status Bit ESB in the SBR Use the ESE command to set the bits in the ESER Use the ESE query to read it 7
26. STB query to obtain the SBR bit 6 is the MSS bit Reading the SBR does not clear the bits including the MSS bit 6 RQS 5 4 2 ESB MAV Figure 3 2 Status byte register SBR 7 Table 3 2 SBR bit functions Bit Function 7 MSB Not used Must be set to zero for data generator operation 6 The RQS Request Service bit when obtained from a serial poll Shows that the data generator requests service from the GPIB controller that is the SRQ line is asserted on the GPIB This bit is cleared when the serial poll completes 6 The MSS Master Status Summary bit when obtained from STB query Summarizes the ESB and MAV bits in the SBR In other words that status is present and enabled in the SESR or a message is available at the Output Queue or both 5 The ESB Event Status Bit Shows that status is enabled and present in the SESR 4 The MAV Message Available bit Shows that output is available in the Output Queue 3 0 Not used Must be set to zero for data generator operation 1 When operating over the RS 232 C interface you can read the contents of the SBR using the STB query However this bit ESB is the only SBR bit of any signifi cance to RS 232 C operation DG2020A Programmer Manual 3 3 Status and Event Reporting Enable Registers You use the DESER Device Event Status Enable Register the ESER Event Status Enable Register and the SRER Service Request Enable
27. TIME query returns the display time for commands in a sequence of commands connected by semicolons SYSTEM DEBug DEBug SNOop DEBug SNOop DELAy DEBug SNOop STATe DEBug SNOop DELAy TIME lt Time gt DEBug SNOop DELAy TIME lt Time gt lt NR2 gt lt unit gt where lt NR2 gt combined with lt unit gt specifies a time in the range 0 0 s to 10 0 s in steps of 0 1 s and lt unit gt s ms us for seconds milliseconds or microseconds DEBUG SNOOP DELAY TIME 0 5 sets the command display time to 0 5 seconds DG2020A Programmer Manual Command Descriptions DEBug SNOop STATe The DEBug SNOop STATe command sets and clears the remote command debugging function The DEBug SNOop STATe query returns the currently specified state of the remote command debugging function The debugging function displays messages input from the remote interface in the CRT screen message area If commands are connected by semicolons each message is displayed for the time specified with the DEBug SNOop DELAy TIME command The display format is as follows Control codes lt code decimal display gt e g LF is displayed as lt 10 gt Alphanumerics and symbols lt code ASCII display gt e g A is displayed as A Message termination lt PMT gt Interface messages lt DCL gt and lt GET gt Others are displayed as lt code decimal display gt Block data 0 A
28. bit 2 gt lt bit 128 gt Number of digits lt bit N gt 110 Number of bits The value of the data bit at the specified address is specified with the ASCII character for 0 or 1 Data bits for the specified data length are stored in address order with all bits expressed similarly in ASCII The number of bytes in the block header will be equal to the length of the specified data DATA PATTERN BIT lt Bit Position gt lt Address gt lt Length gt lt Data gt DG2020A Programmer Manual Command Descriptions DATA PATTern WORD 2 The DATA PATTern WORD command sets the data memory bit pattern section The data is given in word units The DATA PATTern WORD query returns the contents of the data memory bit pattern section Group DATA Related Commands DATA PATTern BIT Syntax DATA PATTern WORD lt Address gt lt Length gt lt Data gt DATA PATTern WORD lt Address gt lt Length gt Arguments lt Address gt lt NR1 gt where lt NR1 gt is a start address 0 to 65535 lt Length gt lt NR1 gt data length 1 to 65536 lt Data gt lt block gt arbitrary block data for the bit pattern section Example where the data length is 50 3 250 lt byte 1 gt lt byte 2 gt lt byte 250 gt Number of digits lt byte 1 gt lt byte 2 gt lt byte 3 gt lt byte 4 gt lt byte 5 gt Number of bytes bit 23 16 bit 7 0 bit 31 24 bit 15 8 bit 35 32 Each word 36 bits
29. command clears the data bit assignment for the specified channel of the specified pod OUTPUT OUTPut POD lt s gt CH lt n gt ASSIGn OUTPut POD lt s gt DEFine OUTPut POD lt s gt CH lt n gt RELEase lt s gt A B C lt n gt 0to 11 None OUTPUT PODA CH3 RELEASE clears data bit assignment for pod channel 3 OUTPut POD lt s gt DEFine Group Related Commands Syntax Arguments DG2020A Programmer Manual The OUTPut POD lt s gt DEFine command assigns data bits to all the channels of the pod specified in the header The data bit assignment is cleared for any data bit not specified in the argument The OUTPut POD lt s gt DEFine query returns the data bits assigned to the channels of the pod specified in the header OUTPUT OUTPut POD lt s gt CH lt n gt ASSIGn OUTPut POD lt s gt CH lt n gt RELEase OUTPut POD lt s gt DEFine lt Assigninfo gt OUTPut POD lt s gt DEFine lt s gt A B C lt Assigninfo gt lt blockheader gt lt Assign gt lt LF gt lt Assign lt LF gt lt As sign arbitrary block data that defines the pod channel assignments where lt blockheader gt lt byte count digit gt lt byte count gt lt Assign gt lt AChannel gt lt ABit gt lt AHoldE gt 2 91 Command Descriptions The lt AChannel gt lt ABit gt and lt AHoldE gt items are ASCII character strings that express the following information lt AChannel g
30. header m Common query header Figure 2 1 on page 2 2 shows the syntax for all possible structures and each of the six basic forms are explained below DG2020A Programmer Manual Command Syntax Simple Command Header A command that contains only one header mnemonic It may also contain one or more arguments Its message format is lt Header Mnemonic gt lt Argument gt lt Argument gt such as START or STOP Simple Query Header A command that contains only one header mnemonic followed by a question mark Its message format is lt Header Mnemonic gt lt Argument gt lt Argument gt such as HCOPY or TRIGGER Compound Command Header A command that contains multiple header mnemonics plus argument s Its message format is lt Header Mnemonic gt lt Header Mnemonic gt lt Argument gt lt Argument gt such as MMEMORY INITIALIZE HD1 or SYSTEM SECURITY STATE ON Compound Query Header A command that contains multiple header mnemonics followed by a question mark Its message format is lt Header Mnemonic gt lt Header Mnemonic gt lt Argument gt lt Argument gt such as DIAGNOSTIC RESULT or DATA BLOCK SIZE BLOCK1 DG2020A Programmer Manual 2 7 Command Syntax Common Command Header A command that precedes its header mnemonic with an asterisk Its message format is lt Header Mnemonic gt lt Argument gt lt A
31. lt AName gt lt ARepeat gt lt ATo gt lt AWaitE gt lt AJumpE gt lt ALoopE gt The items in lt Step gt are ASCII character strings that express the following information lt AName gt the block name with no quotation marks lt ARepeat gt repeat count 1 to 65536 lt ATo gt event jump destination line number lt AWaitE gt trigger wait on off state JON 1 ON OFF 0 OFF lt AJumpE gt event jump on off state ON 1 ON OFF 0 OFF lt ALoopE gt infinite loop on off ON 1 ON OFF 0 OFF lt LF gt lt ASCII line feed code 10 gt DATA SEQUENCE DEFINE lt Sequence Block gt where lt Sequence Block gt is a data block with the same format as the argument However note that rather than the ON and OFF keywords only 0 and I are used for the lt AWaitE gt lt AJumpE gt and lt ALoopE gt items DATA SEQuence DEFine 235BLOCK1 16 0 1 0 0 lt LF gt BLOCK2 32 0 0 1 1 defines a two step sequence that consists of the two blocks BLOCK and BLOCK2 2 35 Command Descriptions DATA SEQuence DELete The DATA SEQuence DELete command deletes the specified sequence step Group DATA Related Commands _ DATA SEQuence ADD DATA SEQuence DEFine DATA SEQuence DELete ALL Syntax DATA SEQuence DELete lt Line Number gt Arguments lt Line Number gt lt NR1 gt where lt NR1 gt is the line number of the sequence step to be deleted Examples DATA SEQUENCE DELETE 3 deletes the li
32. name of the group after it is renamed DATA GROUP RENAME GROUPO3 GROUPO4 changes the name of the group GROUPO3 to be GROUP04 DG2020A Programmer Manual Command Descriptions DATA MSIZe Group Related Commands Syntax Arguments Responses DATA PATTern BIT Group Related Commands Syntax DG2020A Programmer Manual The DATA MSIZe command sets the bit pattern section memory area size The DATA MSIZe query returns the bit pattern section memory area setting DATA DATA MSIZe lt Memory Size gt DATA MSIZe lt Memory Size gt lt NR1 gt where lt NR1 gt is the number that expresses the memory size in words DATA MSIZE lt Memory Size gt The DATA PATTern BIT command sets the data memory bit pattern section Data is given in bit units The DATA PATTern BIT query returns the contents of the data memory bit pattern section DATA DATA PATTern WORD DATA PATTern BIT lt Bit Position gt lt Address gt lt Length gt lt Data gt DATA PATTern BIT lt Bit Position gt lt Address gt lt Length gt 2 31 Command Descriptions 2 32 Arguments Responses lt Bit Position gt lt NR1 gt bit position 0 to 35 lt Address gt lt NR1 gt start address 0 to 65535 lt Length gt lt NR1 gt data length 1 to 65536 lt Data gt lt block gt arbitrary block data for the bit pattern section Example where the data length is 128 3128 lt bit 1 gt lt
33. of the bit pattern data is expressed as a group of 5 bytes starting with the first byte When each byte group is seen as consisting of the bytes bytel to byte5 as shown in the figure the bits correspond to the bits in the bit pattern data starting with the MSB in order starting with bytel Although all 8 bits in byte2 to byte5 are used the high order 4 bits in bytel are unused The data block is formed by iterating this packing method for each word in order starting with the start address Thus the number of bytes in the data block excluding the header will be 5 times the number of words Responses L DATA PATTERN WORD lt Address gt lt Length gt lt Data gt DG2020A Programmer Manual 2 33 Command Descriptions DATA SEQuence ADD Group Related Commands Syntax Arguments Examples 2 34 The DATA SEQuence ADD command adds a sequence step DATA DATA SEQuence DEFine DATA SEQuence DEL ete DATA SEQuence DE Lete ALL DATA SEQuence ADD lt LineN gt lt Name gt lt Re peat gt lt To gt lt WaitE gt lt JumpE gt lt LoopE gt lt LineN gt lt NR1 gt where lt NR1 gt is a sequence step number lt Name gt lt string gt where lt string gt is a block name surrounded in double or single C quotes lt Repeat gt lt NR1 gt where lt NR1 gt is a repeat count 1 to 65536 lt To gt lt NRI gt where lt NR1 gt is a event jump destination line number lt WaitE gt
34. syntax diagrams The syntax diagrams in this manual use BNF notation Controller A computer or other device that sends commands to and accepts responses from the digitizing oscilloscope EOI A mnemonic referring to the control line End or Identify on the GPIB interface bus One of the two possible end of message terminators EOM A generic acronym referring to the end of message terminator The end of message terminator can be either an EOI or the ASCII code for line feed LF GPIB Acronym for General Purpose Interface Bus the common name for the communications interface system defined in IEEE Std 488 IEEE Acronym for the Institute for Electrical and Electronic Engineers QuickC A computer language distributed by Microsoft that is based on C DG2020A Programmer Manual Glossary 1 Glossary Glossary 2 DG2020A Programmer Manual Index A ABSTouch 2 19 ALLEv 2 20 ASCII code and character charts A 1 Backus Naur Form 2 1 C Characters ASCII chart A 1 CLS 2 21 Command BNF notation 2 1 Structure of 2 2 Syntax 2 1 2 19 Command errors 3 10 Commands words reserved for B 1 D DATA commands DATA 2 21 Data commands DATA BLOCKk ADD 2 22 DATA BLOCk DEFine 2 23 DATA BLOCk DELete 2 24 DATA BLOCKk DELete ALL 2 24 DATA BLOCk REName 2 25 DATA BLOCKk SIZe 2 25 DATA GROUp ADD 2 26 DATA GROUp BIT 2 27 DATA GROUp DEFine 2 28 DATA GROUp DELete 2 29 DATA GROUp DELete ALL 2
35. that the first block cannot be deleted DATA DATA BLOCK ADD DATA BLOCK DEFine DATA BLOCK DELete ALL DATA BLOCk REName DATA BLOCk SIZe DATA BLOCk DELete lt Name gt lt Name gt lt string gt where lt string gt is the name of the block to be deleted DATA BLOCK DELETE BLOCK2 deletes the block with the name BLOCK2 DATA BLOCk DELete ALL Group Related Commands Syntax Arguments 2 24 The DATA BLOCK DELete ALL command deletes all blocks After this command is executed the whole memory area consists of one block with the name NO NAME DATA DATA BLOCK ADD DATA BLOCK DEFine DATA BLOCK DELete DATA BLOCk REName DATA BLOCk SIZe DATA BLOCk DELete ALL None DG2020A Programmer Manual Command Descriptions DATA BLOCk REName The DATA BLOCK REName command changes the name of a data block Group DATA Related Commands DATA BLOCK ADD DATA BLOCK DEFine DATA BLOCK DELete DATA BLOCk DELete ALL DATA BLOCk SIZe Syntax DATA BLOCk REName lt From blockname gt lt To blockname gt Arguments lt From blockname gt lt string gt where lt string gt is the name of the block before it is renamed lt To blockname gt lt string gt where lt string gt is the name of the block after it is renamed Examples DATA BLOCK RENAME BLOCK3 BLOCK4 changes the name of BLOCK3 to BLOCK4 DATA BLOCK SIZe The DATA BLOCK SIZe command changes the size of
36. the data generator Figure 1 7 Pin assignments of 9 pin and 25 pin D type shell connector Pin Pin Pin Pin own A OND oon A OND om Qm A OND oon A OND 9 pin DCE to 9 pin DTE 9 pin DCE to 9 pin DCE Pin Pin Pin Pin 2 3 3 5 ee CO gt lt 7 Ad 20 8 7 mr 9 pin DCE to 25 pin DTE 9 pin DCE to 25 pin DCE own OND NOTE When using software flow control the CTS DTR lines do not need to be connected Figure 1 8 Typical RS 232 C cable wiring requirements 1 8 DG2020A Programmer Manual Getting Started Setting the RS 232 To set the RS 232 C parameters perform the following steps Parameters Press the UTILITY button in the MENU column to the right of the screen The UTILITY menu appears above the bottom menu buttons 2 Press the System bottom menu button to display the System menu See figure 1 9 3 Select the Baudrate item from the Serial menu using the up and down arrow buttons Here select the data transfer rate using the left and right arrow buttons The rate can be set to 300 600 1200 2400 4800 9600 or 19200 baud 4 Select the Data Bits item from the Serial menu using the up and down arrow buttons Then use the left and right arrow buttons to select the data bit length for each character The bit length can be set to either 7 or 8 bits 5 Select the Parity item from the Serial menu using the up and down arrow buttons Then use the left and right arrow butt
37. 1 SA1 161 SA17 0001 SOH DC1 1 A Q a q 1 1 11 17 24 33 31 49 41 65 51 81 61 97 71 113 2 22 42 LA2 62 LA18 102 TA2 122 TA18 142 SA2 162 SA18 0010 STX DC2 w 2 B R b r 2 2 12 18 22 34 32 50 42 66 52 82 62 98 72 114 3 23 43 LA3 63 LA19 103 TA3 123 TA19 143 SA3 163 SA19 0 0 11 ETX DC3 it 3 C S c s 3 3 13 19 23 35 33 51 43 67 53 83 63 99 73 115 4 SDC 24 DCL 44 LA4 64 LA20 104 TA4 124 TA20 164 SA20 0100 EOT DC4 4 D T t 4 4 14 20 24 36 34 52 44 68 54 84 74 116 5 PPC 25 PPU 45 LAS 65 LA21 105 TA5 125 TA21 165 SA21 01 01 ENQ NAK 5 E U U 5 5 15 21 25 37 35 53 45 69 55 85 75 117 6 26 46 LAG 66 LA22 106 Tas 126 TA22 166 SA22 0110 ACK SYN amp 6 F V V 6 6 16 22 26 38 36 54 46 70 56 86 76 118 7 27 47 LA7 67 LA23 107 TAT 127 TA23 167 SA23 0 1 11 BEL ETB 7 G W W 7 7 17 23 27 39 37 55 47 71 57 87 77 119 10 GET 30 SPE 50 Las 70 LA24 110 Tas 130 TA24 170 SA24 1000 BS CAN 8 H X X 8 8 18 24 28 40 38 56 48 72 58 88 78 120 11 TCT 31 SPD 51 Lag 71 LA25 111 Tag 131 TA25 171 SA25 1001 HT EM 9 l Y y 9 9 19 25 29 41 39 57 49 73 59 89 79 121 12 32 52 LA10 72 LA26 112 TA10 132 TA26 172 SA26 1010 LF SUB ig 2 J Z Z A 10 1A 26 2A 42 3A 58 4A 74 5A 90 7A 122 13 33 53 LA11 73 LA27 113 TAM 133 TA27 173 SA27 1011 VT ESC K B 11 18 27 2B 43 3B 59 4B 75 5B 91
38. 106 TRIGger LEVel 2 106 TRIGger SLOpe 2 107 SSSssS558S55555 SSSSSSESSESSESS8585 DG2020A Programmer Manual MODE STATe 2 81 MODE UPDate 2 82 0 OPC 2 83 OPT 2 84 OUTPUT commands OUTPut 2 84 Output commands OUTPut ELEVel 2 86 OUTPut ILEVel 2 86 OUTPut POD lt s gt CH lt n gt ASSIGn 2 87 OUTPut POD lt s gt CH lt n gt DELAy 2 87 OUTPut POD lt s gt CH lt n gt HIGH 2 88 OUTPut POD lt s gt CH lt n gt INHibit 2 89 OUTPut POD lt s gt CH lt n gt LOW 2 90 OUTPut POD lt s gt CH lt n gt RELEase 2 91 OUTPut POD lt s gt DEFine 2 91 OUTPut POD lt s gt TYPE 2 93 Output Queue 3 5 OUTPut 2 84 OUTPut ELE Vel 2 86 OUTPut ILE Vel 2 86 OUTPut POD lt s gt CH lt n gt ASSIGn 2 87 OUTPut POD lt s gt CH lt n gt DELAy 2 87 OUTPut POD lt s gt CH lt n gt HIGH 2 88 OUTPut POD lt s gt CH lt n gt INHibit 2 89 OUTPut POD lt s gt CH lt n gt LOW 2 90 OUTPut POD lt s gt CH lt n gt RELEase 2 91 OUTPut POD lt s gt DEFine 2 91 OUTPut POD lt s gt TYPE 2 93 P Programming Examples 4 1 PSC 2 94 Q Query Structure of 2 2 Queue Event 3 5 Output 3 5 R Register DESER 3 4 ESER 3 4 SESR 3 1 Index 3 Index SRER 3 5 Registers Status 3 1 Reserved words B 1 RS 232 C Cable wiring 1 8 Common connectors for 1 6 Compared to the GPIB 1 2 Connector location 1 7 Connector pin assignments 1 8 Description of 1 2 Installation 1 6 Settin
39. 2 indicates the electrical interface uses three state drivers Table C 2 lists the GPIB Universal and Addressed commands that the DG2020A Data Generator implements A brief description of each function follows the table Table C 2 GPIB interface messages Interface message Implemented Device Clear DC Yes Local Lockout LLO Yes Serial Poll Disable SPD Yes Serial Poll Enable SPE Yes Parallel Poll Unconfigure PPU No Go To Local GTL Yes Selected Device Clear SDC Yes Group Execute Trigger GET Yes C 2 DG2020A Programmer Manual Appendix C Interface Specification Table C 2 GPIB interface messages Cont Interface message Implemented Take Control TCT No Parallel Poll Configure PPC No R Device Clear DCL Clears initializes all devices on the bus that have a device clear function whether the controller has addressed them or not R Local Lockout LLO Disables the return to local function m Serial Poll Enable SPE Puts all devices on the bus that have a service request function into the serial poll enabled state In this state each device sends the controller its status byte instead of the its normal output after the device receives its talk address on the data lines This function may be used to determine which device sent a service request m Serial Poll Disable SPD Changes all devices on the bus from the serial poll state to the normal operating state R Go To Local GTL
40. 2020A Programmer Manual 4 9 Programming Examples 4 10 DG2020A on the screen The command has the following syntax in which the argument specifies the device name registered in the GPIB driver system The device dev is used as the default if the argument is omitted intcom device When this program is started it displays its own prompt and waits for input When a command is entered it executes the processing for that command and then returns to the command wait state It iterates this sequence until the termination command is entered The prompt indicates the GPIB device name as shown below dev1 gt gt The DG2020A GPIB commands the program s internal built in commands and redirection commands can be used as intcom commands These commands are described in detail below GPIB commands All commands and queries defined in this manual may be used If a question mark character appears in the input character string the command is interpreted as a query command The program waits for the DG2020A response automatically extracts that response and displays it on the screen If an error occurs the program extracts the event code and event message from the event queue and displays them on the screen m Built in commands Intcom supports the following built in commands exec filename Reads in commands from a file one line at a time and executes them through the end of the file This allows a sequence of commands to
41. 26 Parameter over range 227 Parameter rounded 230 Data corrupt or stale 231 Data questionable 240 Hardware error 241 Hardware missing 250 Mass storage error 251 Missing mass storage 252 Missing media 253 Corrupt media 254 Media full 255 Directory full 256 File name not found 257 File name error DG2020A Programmer Manual Messages DG2020A Programmer Manual Table 3 6 Execution errors EXE bit 4 Cont Code Description 258 Media protected 260 Expression error 261 Math error in expression 262 Expression syntax error 263 Expression execution error 270 Macro error 271 Macro syntax 272 Macro execution error 273 Illegal macro label 274 Macro parameter error 275 Macro definition too long 276 Macro recursion error 277 Macro redefinition not allowed 278 Macro header not found 280 Program error 281 Cannot create program 282 Illegal program name 283 Illegal variable name 284 Program currently running 285 Program syntax error 286 Program run time error 3 13 Messages Table 3 7 lists the internal errors that can occur during operation of the data generator These errors may indicate that the data generator needs repair Table 3 7 Internal device errors DDE bit 3 Code 300 Description Device specific error 310 311 312 313 314 System error Memory error PUD memory lost Calibration memory lost Save recall memory lost 315 330 350 Configuration m
42. 29 DATA GROUp NAME 2 29 DATA GROUp REName 2 30 DATA MSIZe 2 31 DATA PATTern BIT 2 31 DATA PATTern WORD 2 33 DATA SEQuence ADD 2 34 DATA SEQuence DEFine 2 35 DATA SEQuence DELete 2 36 DATA SEQuence DELete ALL 2 36 DATA SEQuence EVJ 2 37 DATA SEQuence EVJTO 2 38 DATA SEQuence LOOP 2 39 DG2020A Programmer Manual DATA SEQuence REPeat 2 39 DATA SEQuence TWAIT 2 40 DATA SUBSequence ADD 2 41 DATA SUBSequence CLEAr 2 41 DATA SUBSequence DEFine 2 42 DATA SUBSequence DELete 2 43 DATA SUBSequence DELete ALL 2 43 DATA SUBSequence REPeat 2 44 DATA UPDate 2 45 DATA 2 21 DATA BLOCk ADD 2 22 DATA BLOCk DEFine 2 23 DATA BLOCk DELete 2 24 DATA BLOCk DELete ALL 2 24 DATA BLOCk REName 2 25 DATA BLOCKk SIZe 2 25 DATA GROUp ADD 2 26 DATA GROUp BIT 2 27 DATA GROUp DEFine 2 28 DATA GROUp DELete 2 29 DATA GROUp DELete ALL 2 29 DATA GROUp NAME 2 29 DATA GROUp REName 2 30 DATA MSIZe 2 31 DATA PATTern BIT 2 31 DATA PATTern WORD 2 33 DATA SEQuence ADD 2 34 DATA SEQuence DEFine 2 35 DATA SEQuence DELete 2 36 DATA SEQuence DELete ALL 2 36 DATA SEQuence EVJ 2 37 DATA SEQuence EVJTO 2 38 DATA SEQuence LOOP 2 39 DATA SEQuence REPeat 2 39 DATA SEQuence TWAIT 2 40 DATA SUBSequence ADD 2 41 DATA SUBSequence CLEAr 2 41 DATA SUBSequence DEFine 2 42 DATA SUBSequence DELete 2 43 DATA SUBSequence DELete ALL 2 43 DATA SUBSequence REPeat 2 44 DATA UPDate 2 45 DEBug 2 45 DEBug SNOop 2 4
43. 6 DEBug SNOop DELAy 2 47 DEBug SNOop DELAy TIME 2 48 DEBug SNOop STATe 2 49 Default Settings D 1 Index 1 Index Description GPIB 1 1 RS 232 C 1 2 DESE 2 50 DESE command 3 4 DESER register 3 4 Diagnostic commands TST 2 108 DIAGnostic 2 51 DIAGnostic RESUIt 2 52 DIAGnostic SELect 2 53 DIAGnostic STATe 2 53 DIAGnostic 2 51 DIAGnostic RESUIt 2 52 DIAGnostic SELect 2 53 DIAGnostic STATe 2 53 Display commands ABSTouch 2 19 DISPlay 2 54 DISPlay BRIGhtness 2 55 DISPlay CLOCk 2 55 DISPlay DIMmer 2 56 DISPlay ENABle 2 57 DISPlay MENU 2 57 DISPlay MENU NAME 2 58 DISPlay MENU NAME 2 59 DISPlay MENU STATe 2 59 DISPlay WINDow TEXT CLEar 2 60 DISPlay WINDow TEXT DATA 2 61 DISPlay 2 54 DISPlay BRIGhtness 2 55 DISPlay CLOCk 2 55 DISPlay DIMmer 2 56 DISPlay ENABle 2 57 DISPlay MENU 2 57 DISPlay MENU NAME 2 58 DISPlay MENU NAME 2 59 DISPlay MENU STATe 2 59 DISPlay WINDow TEXT CLEar 2 60 DISPlay WINDow TEXT DATA 2 61 E Enable Registers Defined 3 1 3 4 Error No events 3 10 Error Messages Listed 3 9 ESE 2 61 3 4 ESER register 3 4 ESR 2 62 ESR query 3 1 Event handling 3 1 Index 2 Event Queue 3 5 EVENT 2 63 EVMsg 2 63 EVQty 2 64 Execution Errors 3 12 3 14 Execution errors 3 15 3 17 Execution warning 3 15 F FACTory 2 64 Factory Initialization D 1 G GPIB Compared to the RS 232 C 1 2 Connector 1 3
44. 7B 123 14 34 54 LA12 74 LA28 114 TA12 134 TA28 174 SA28 1100 FF FS i lt L i C 12 1C 28 2C 44 3C 60 4C 76 5C 92 7C 124 15 35 55 LA13 75 LA29 115 TA13 135 TA29 175 SA29 1101 CR GS M D 13 1D 29 2D 45 3D 61 4D 77 5D 93 7D 125 16 36 56 LA14 76 LA30 116 TA14 136 TA30 176 SA30 1110 so RS gt N E 14 1E 30 2E 46 3E 62 4E 78 5E 94 7E 126 17 37 57 LA15 77 UNL 117 TA15 137 UNT 177 1111 SI US l 0 RUBOUT F 15 1F 31 2F 47 lar 63 4F 79 5F 95 DEL ADDRESSED UNIVERSAL LISTEN TALK SECONDARY ADDRESSES COMMANDS COMMANDS ADDRESSES ADDRESSES OR COMMANDS KEY al f5 PPZ GPIB code with ATN asserted oe ene ENQ lt ASCII character A hex gt 5 Seen IEEE STD 488 1 1987 ISO STD 646 2973 A 2 DG2020A Programmer Manual FENGER ees Appendix B Reserved Words The words in the following list are reserved words for use with the DG2020A Data Generator ABORt ENABle ABS Touch ESE ADD ESR ALL EVENT ALLEv EVJ ASSIGn EVJTO BIT EVMsg BLOCK EVQty BRIGhtness EXTernal CATalog FACTory CDIRectory FORMat CH lt n gt FREE CLEAr FREQuency CLEar GROUp CLOCk HCOPy CLS HEADer COPY HIGH DATA ID DATE IDN DEBug ILEVel DEFine IMMediate DELAy IMPedance DELete INHibit DESE INITialize DIAGnostic INTernal DiMmer LEVel DISPlay LOAD ELEVel LOCK DG2020A Programmer Manual LOCk LOOP LOW MDIRectory MENU MMEMory MODE MSIZe NAME OPC OPT ORDer OSCillator OUTPut
45. BOTTOM7 BOTTOM2 BOTTOM3 BOTTOM4 BOTTOMS SIDE1 SIDE2 SIDE3 SIDE4 SIDES CLEARMenu SETUp EDIT APPLication UTILity CURSor EXECute UParrow DOWNarrow LEFTarrow RIGHtarrow KNOBLeft KNOBRight RUN STEp ZERo ONE TWO THREe FOUR FIVe SIX SEVen EIGHt NINe POINt A MINUS B HZ S V C KHZ MS MV D MHZ US E NS F DELete ENTer HARDcopy MANual Arguments Sending any of the arguments that are shown in Figure 2 2 is the equivalent of operating a front panel control Which argument corresponds to which control is shown by in Figure 2 2 Sending an argument corresponding to a front panel button is the same as pressing that button once if the argument sent corresponds to a knob it is the same as rotating the knob clockwise or counterclockwise by 15 of a turn DG2020A Programmer Manual 2 19 Command Descriptions Tektronix DG2020A DATA GENERATOR a ay lololo olo o o Os CLEARMenu BOTTOM 1 BOTTOM 7 Hals ENTER CURSor DOWNarrow EXECute KNOBLeft sr UParrow le KNOBRight i gt RUN N L ZL HARDcopy STEp O W OL manual Ok SIDE 1 fo gt SETUp olo at SIDE 2 sie SIO 5 SIDE3 APPLication 4 olololo SET UTIL
46. CILLATOR INTERNAL PLLLOCK ON synchronizes the internal clock oscillator with the reference oscillator SOURce OSGCillator SOURce Group Related Commands Syntax 2 98 The SOURce 0SCillator SOURce command sets whether the internal clock oscillator or an external clock input signal is used as the clock signal source The SOURce 0SCillator SOURce query returns whether the internal clock oscillator or an external clock input signal is used as the clock signal source SOURCE SOURce 0SCillator SOURce 0SCillator EXTernal FREQuency SOURce 0SCillator INTernal FREQuency SOURce 0SCillator INTernal PLLlock SOURce 0SCillator SOURce INTernal EXTernal SOURce 0SCil lator SOURce DG2020A Programmer Manual Command Descriptions Arguments Responses Examples INTernal use the internal clock source EXTernal use an external clock source connected to the external clock input SOURCE OSCILLATOR SOURCE INTERNAL EXTERNAL SOURCE OSCILLATOR SOURCE INTERNAL sets the internal clock oscillator to be used as the clock signal source SOURce POD lt s gt EVENT ENABle Group Related Commands Syntax Arguments Responses Examples DG2020A Programmer Manual The SOURce POD lt s gt EVENT ENAB1e command enables or disables the EVENT input of the pod specified in the header The SOURce POD lt s gt EVENT ENAB1e query returns whether or not the EVENT input of the specified pod is en
47. DEBug SNOop DEBug SNOop DELAy TIME DEBug SNOop STATe DEBug None See Examples DEBUG might return DEBUG SNOOP STATE 0 DELAY TIME 0 2 2 45 Command Descriptions DEBug SNOop The DEBug SNOop query returns all current settings for the remote command debugging function This query is equivalent to the DEBug query Group SYSTEM Related Commands DEBug DEBug SNOop DELAY TIME DEBug SNOop STATe Syntax DEBug SNOop Arguments None Responses See Examples Examples DEBUG SNOOP might return DEBUG SNOOP STATE 0 DELAY TIME 0 2 2 46 DG2020A Programmer Manual Command Descriptions DEBug SNOop DELAy The DEBug SNOop DELAy query returns the display time for commands in a sequence of commands connected by semicolons This query is equivalent to the DEBug SNOop DELAy TIME query Group SYSTEM Related Commands DEBug DEBug SNOop DEBug SNOop DELAy TIME DEBug SNOop STATe Syntax DEBug SNOop DELAy Arguments None Responses DEBUG SNOOP DELAY lt Delay Time gt where lt Delay Time gt lt NR2 gt Examples DEBUG SNOOP DELAY might return DEBUG SNOOP DELAY TIME 0 2 DG2020A Programmer Manual 2 47 Command Descriptions DEBug SNOop DELAy TIME 2 2 48 Group Related Commands Syntax Arguments Examples The DEBug SNOop DELAy TIME command sets the display time for commands in a sequence of commands that are connected by semicolons The DEBug SNOop DELAy
48. Descriptions PSC 2 Group Related Commands Syntax Arguments Responses Examples 2 94 The PSC common command controls the automatic power on clearing of the ESER Event Status Enable Register the SRER Service Request Enable Register and DESER Device Event Status Enable Register These registers are used in the status and event reporting system The PSC common query returns status of the power on status clear flag STATUS amp EVENT DESE ESE FACTory SRE PSC lt Power On Status Clear gt PSC lt Power On Status Clear gt lt NR1 gt where lt NR1 gt is a decimal integer that must range from 32767 to 32767 the value of which determines whether power on clearing occurs as follows Zero value sets the power on status clear flag to FALSE When this flag is set FALSE the values of the DESER the SESR and the ESER are restored at power on With these values restored the instrument can assert SRQ after powering on Nonzero value sets the power on status clear flag to TRUE When this flag is set TRUE all the bits in the DESER are set and are reset in the SESR and ESER This action prevents the instrument from asserting any SRQs after powering on 1 the power on status clear flag is currently set to TRUE 0 the power on status clear flag is currently set to FALSE Pot 1 sets the power on status flag to TRUE PSC might return 0 to indicate that the power on status clear flag is curr
49. F or 0 unlocks the file 0 the file is not locked 1 the file is locked MMEMORY LOCK COUNT1 PDA ON locks the file COUNT1 PDA in the current directory DG2020A Programmer Manual Command Descriptions MMEMory MDIRectory The MMEMory MDIRectory command creates a new subdirectory The command is invalid if a directory with the specified name already exists Group MEMORY Related Commands MMEMory CDI Rectory Syntax MMEMory MDIRectory lt Directory Path gt Arguments lt Directory Path gt lt string gt where lt string gt is the name or path of the new directory Examples MMEMORY MDIRECTORY WORK4 creates the new directory WORK4 in the current working directory MMEMory RDIRectory The MMEMory RDIRectory command removes a subdirectory If a file exist in the subderectory this command will not be performed Group MEMORY Related Commands MMEMory CDIRectory MMEMory MDIRectory Syntax MMEMory RDIRectory lt Directory Path gt Arguments lt Directory Path gt lt string gt where lt string gt is the name of the directory to be removed Examples MMEMORY RDIRECTORY WORK4 removes the directory WORK4 in the current working directory DG2020A Programmer Manual 2 79 Command Descriptions MMEMory REName Group Related Commands Syntax Arguments Examples MMEMory SAVE Group Related Commands Syntax Arguments Examples 2 80 The MMEMory REName command changes the name of the spec
50. FF or 0 Menus are displayed Menus are not displayed DISPLAY MENU STATE 1 0 DISPLAY MENU STATE ON sets the instrument to display menus on the screen 2 59 Command Descriptions DISPlay WINDow TEXT CLEar Group Related Commands Syntax Arguments Examples 2 60 The DISPlay WINDow TEXT CLEar command clears the message display area on the screen DISPLAY DISPlay DISPlay WINDow TEST L DATA DISPlay WINDow TEXT CLEar None DISPLAY WINDOW TEXT CLEAR clears the message display area DG2020A Programmer Manual Command Descriptions DISPIay WINDow TEXT DATA Group Related Commands ESE 2 DG2020A Programmer Manual Syntax Arguments Responses Examples Group The DISPlay WINDow TEXT L DATA command sends a message to be displayed in the screen message display area The sent message is displayed immediately The DISPlay WINDow TEXT T DATA query returns the contents of the input screen message NOTE The contents of the message display area scrolls automatically To fully update the display contents first clear the message display area using the DISPlay WINDow TEXT CLEar command DISPLAY DISPlay DISPlay WINDow TEXT CLEar DISPlay WINDow TEXT DATA lt Message gt DISPlay WINDow TEXT DATA 7 lt Message gt lt string gt where lt string gt is a message character string DISPLAY WINDOW TEXT
51. FREQuency Group Related Commands Syntax 2 96 The SOURce 0SCil lator EXT erna FREQuency command enters the frequency of the externally supplied clock signal The SOURce 0SCillator EXTer nal FREQuency query returns the externally supplied clock signal frequency setting SOURCE SOURce 0SCillator SOURce 0SCillator INTernal FREQuency SOURce 0SCillator INTernal PLLlock SOURce 0SCillator SOURce SOURce 0SCil lator EXTernal FREQuency lt Frequency gt SOURce 0SCillator EXTernal FREQuency DG2020A Programmer Manual Command Descriptions Arguments Responses Examples lt Frequency gt lt NR3 gt lt Unit gt where lt NR3 gt is a decimal number that combines with lt Unit gt to have a range of 10 00E 3 200 0E 6Hz and lt Unit gt Hz kHz MHz for hertz kilohertz or megahertz SOURCE OSCILLATOR EXTERNAL FREQUENCY lt NRf gt HZ SOURCE OSCILLATOR EXTERNAL FREQUENCY 10 0MHZ sets the external clock signal frequency input setting to 10 MHz SOURce OSGillator INTernal FREQuency Group Related Commands Syntax Arguments Responses Examples DG2020A Programmer Manual The SOURce 0SCillator INTernal FREQuency command sets the frequency of the internal clock oscillator The SOURce 0SCillator INTernal FREQuency query returns the internal clock oscillator frequency setting SOURCE SOURce 0SCillator SOURce 0SCillator EXTernal FREQu
52. Input format checking has been dispensed with to make this sample program easier to understand This program may not operate correctly if the format of the input file is not correct This program sends group definition data to the DG2020A data memory Data input is from a file in a unique format This command has the following syntax with the input data file name being specified as a parameter putgrp filename The contents of the input file must express the group name the group s highest and lowest bit numbers in ASCII with one group per line This format corre sponds to the parameter block supplied to the DATA GROUP DEFINE command with the delimiter codes replaced by the newline code used in normal text files See the grpdef dat sample data file Input format checking has been dispensed with to make this sample program easier to understand This program may not operate correctly if the format of the input file is not correct In particular note that commas are used to delimit the parameters in this input file and that spaces may not be inserted This program sends block definition data to the DG2020A data memory Data input is from a file in a unique format This command has the following syntax with the input data file name being specified as a parameter putblk filename The contents of the input file must express the block name and the block starting address in ASCII with one block per line This format corresponds to the parame
53. It describes the elements that comprise the status and events reporting system and explains how status and events are handled The status and event reporting system reports certain significant events that occur within the data generator It is made up of five registers plus two queues Four of the registers and one of the queues are compatible with IEEE Std 488 2 1987 the other register and queue are specific to Tektronix The registers fall into two functional groups m Status registers which store information about the status of data generator They include the Standard Event Status Register SESR and the Status Byte Register SBR m Enable registers which determine whether certain events are reported to the Status Registers and the Event Queue They include the Device Event Status Enable Register DESER the Event Status Enable Register ESER and the Service Request Enable Register SRER The Standard Event Status Register SESR and the Status Byte Register SBR record certain types of events that may occur while the data generator is in use IEEE Std 488 2 1987 defines these registers Each bit in a Status Register records a particular type of event such as an execution error or service request When an event of a given type occurs the data generator sets the bit that represents that type of event to a value of one You can disable bits so that they ignore events and remain at zero See the Enable Registers section on page 3 4
54. L command deletes all group definitions DATA DATA GROUp ADD DATA GROUp BIT DATA GROUp DEFine DATA GROUp DE Lete DATA GROUp NAME DATA GROUp REName DATA GROUp DELete ALL None The DATA GROUp NAME query returns the name of the group that includes the specified bit DATA 2 29 Command Descriptions Related Commands DATA GROUp ADD DATA GROUp BIT DATA GROUp DEFine DATA GROUp DE Lete DATA GROUp DELete ALL DATA GROUp REName Syntax DATA GROUp NAME lt Bit gt Arguments lt Bit gt lt NR1 gt where lt NR1 gt is the number of the bit to be queried 0 to 35 Responses DATA GROUP NAME lt Bit gt lt Name gt where lt Bit gt lt NR1 gt a bit number 0 to 35 lt Name gt lt string gt the group name Examples DATA GROUp NAME lt 6 gt might return DATA GROUP NAME 6 GROUP02 which indicates that the name of the group that includes the DATA06 bit is GROUPO2 DATA GROUp REName The DATA GROUp REName command changes the name of a group Group DATA Related Commands Syntax Arguments Examples 2 30 DATA GROUp ADD DATA GROUp BIT DATA GROUp DEFine DATA GROUp DE Lete DATA GROUp DELete ALL DATA GROUp NAME DATA GROUp REName lt From groupname gt lt To groupname gt lt From groupname gt lt string gt where lt string gt is the name of the group before it is renamed lt To groupname gt lt string gt where lt string gt is the
55. N 3 assigns data bit D03 to pod channel 5 OUTPut POD lt s gt CH lt n gt DELAy Group Related Commands DG2020A Programmer Manual The OUTPut POD lt s gt CH lt n gt DELAy command sets the delay time for the specified channel of the specified pod The delay time can only be set for channels 8 through 11 The OUTPut POD lt s gt CH lt n gt DELAy query returns delay time setting for the specified channel of the specified pod OUTPUT 2 87 Command Descriptions Syntax Arguments Responses Examples OUTPut POD lt s gt CH lt n gt DELAy lt Time gt OUTPut POD lt s gt CH lt n gt DELAy lt s gt A B C lt n gt 8to 11 lt Time gt lt NR2 gt lt unit gt where lt NR2 gt combined with lt unit gt specifies a time and lt unit gt s ms us ns for seconds milliseconds microseconds or nanoseconds OUTPUT POD lt s gt CH lt n gt DELAY lt Time gt OUTPUT PODB CH8 DELAY 10ns sets the delay time for pod B channel 8 to 10ns OUTPut POD lt s gt CH lt n gt HIGH Group Related Commands Syntax Arguments Responses Examples 2 88 The OUTPut POD lt s gt CH lt n gt HIGH command sets the high level output voltage for This command is only valid for variable level pods The OUT Put POD lt s gt CH lt n gt HIGH query returns the high level output voltage setting for the specified channel of the specified pod OUTPUT OUTPut POD lt s g
56. PATTern PLLlock POD lt s gt PORT PPAUse PSC RELEase REName REPeat RESUIt RST RUNNing SAVE SECurity SELect SEQuence SIZe SLOpe SNOop SOURce SRE STARt STATe STB STOP SUBSequence SYSTem TEXT TIME TRG TRIGger TST TWAIT TYPE UNLock UPDate UPTime VERBose WAI WINDow WORD B 1 Appendix B Reserved Words B 2 DG2020A Programmer Manual LL Appendix C Interface Specification Interface Functions DG2020A Programmer Manual This appendix lists and describes the GPIB functions and messages that the DG2020A Data Generator implements Table C 1 shows which GPIB interface functions are implemented in this instrument Following the table is a brief description of each function Table C 1 GPIB interface function implementation Interface function subset Capability Acceptor Handshake AH AH1 Complete Source Handshake SH SH1 Complete Listener L L4 Basic Listener Unaddress if my talk address MTA No talk only mode Talker T T5 Basic Talker Serial Poll a Unaddress if my listen address MLA Device Clear DC DC1 Complete Remote Local RL RL1 Complete Service Request SR SR1 Complete Parallel Poll PP PPO None Device Trigger DT Complete Controller C CO None Electrical Interface E2 Three state driver R Accepter Handshake AH Allows a listening device to help coordinate the the proper reception of data The AH function holds off initiation or termination of a data tra
57. Programmer Manual Tektronix 7 DG2020A Data Generator 071 0054 50 www tektronix com Copyright Tektronix Inc All rights reserved Tektronix products are covered by U S and foreign patents issued and pending Information in this publication supercedes that in all previously published material Specifications and price change privileges reserved Tektronix Inc P O Box 500 Beaverton OR 97077 TEKTRONIX and TEK are registered trademarks of Tektronix Inc EEE EEE Table of Contents Prefa KETE EA eres ed Y Getting Started Getting Started eae ssc deat rset Ens RR TER RRR RT 1 1 OVERVIEW sees tak esse bekk ie bese sag be ee s k base beats 1 1 Choosing an Interface x sn Ra R d K bre R R Rd RR cette eens 1 2 Installing for GPIB Communication 0 0 eee eee ee 1 3 Installing for RS 232 C Communication 000 0 eee eee eee 1 6 Command Syntax Command Syntax i e 5 0 5 66 iis 6 sensers ebenei ena a aia 2 1 Command Notation 23 35 0032 50ng5 eE bit bode berbar she Ehud 2 1 Program and Response Messages 0 0 0 cee cece eee eee 2 1 Command and Query Structure TRR E ER eee eee 2 2 Character Encoding asic fyret ti BE eRe eA ake Rare he bak Rare ke tae 2 2 Syntactic Dehninters ike Seabee eee ORE aker be aes 2 3 White Spaces LE en ee St 2 3 Special Characters stresse neha tenes baki nere bee bhi Maree Bed 2 3 ALSUMOCNS siteres hoard H vals ke he Pee bee ke ade abe ee aes 2 4 Header fu sige 2 tse
58. R clear with CLS Queue not empty Status Byte Register read with serial poll or Servi STB clear with CLS ervice Request Cee 35 www oh eee Generation Service Request Enable Register set with SRE clear with SRE Figure 3 6 Status and event handling process overview DG2020A Programmer Manual 3 7 Status and Event Reporting 3 8 DG2020A Programmer Manual Messages DG2020A Programmer Manual Tables 3 3 through 3 11 list the status and event messages used in the GPIB RS 232 C status and event reporting system You use the ESR query to make the messages available for dequeuing you use the EVENT EVMsg and ALLEv queries to dequeue and return the messages The messages return as follows m The EVENT query command returns the event code only When using these query commands use the ESR query to make the events available for return m The EVMsg and ALLEv queries return both the event code and event message in the following format lt event code gt lt event message secondary message gt Most messages returned have both an event message followed by a semicolon and a second message which contains more detailed information Although these secondary messages are not listed in this manual you can use the EVMsg and ALLEv queries to display them Table 3 3 lists the definition of event codes Table 3 3 Definition of e
59. S 0 7 CLOCK 0 DIMMER 1 ENABLE 1 MENU NAME SETUP STATE 1 DISPLAY WINDOW TEXT DATA DG2020A Programmer Manual Command Descriptions DISPlay BRIGhtness Group Related Commands Syntax Arguments Examples DISPlay CLOCk 2 Group Related Commands Syntax Arguments DG2020A Programmer Manual The DISPlay BRIGhtness command adjusts the brightness of the screen the DISPlay BRIGhtness query returns the current brightness setting DISPLAY DISPlay DISPlay BRIGhtness lt Value gt DISPlay BRIGhtness lt Value gt lt NRf gt where lt NRf gt is areal number ranging from 0 to 1 DISPLAY BRIGHTNESS 0 7 sets screen brightness to 70 of maximum intensity The DISPlay CLOCk command sets whether or not the data and time are displayed The DISPlay CLOCk query returns whether or not the data and time are displayed DISPLAY DISPlay DISPlay CLOCk ON OFF 1 0 DISPlay CLOCk ON or 1 sets the data generator to display the date and time OFF or 0 sets the data generator to not display the date and time 2 55 Command Descriptions Responses Examples DISPlay DIMmer 2 Group Related Commands Syntax Arguments Responses Examples 2 56 1 Date and time is currently displayed 0 Date and time is currently not displayed DISPLAY CLOCK ON sets the data generator to display the date and time The DISPlay DIMmer command sets whether or not the screen dimmer fu
60. SLOPe Syntax TRIGger Arguments None DG2020A Programmer Manual 2 105 Command Descriptions Examples TRIGGER might return TRIGGER IMPEDANCE HIGH LEVEL 1 400 SLOPE POSITIVE TRIGger IMPedance Group Related Commands Syntax Arguments Examples TRIGger LEVel Group Related Commands Syntax 2 106 The TRIGger IMPedance command selects high impedance 1 kQ or low impedance 50 Q for the external trigger input connector The TRIGger IMPedance query returns currently selected impedance MODE TRIGger LEVel TRIGger SLOPe TRIGger IMPedance HIGH LOW TRIGger IMPedance HIGH selects high impedance kQ LOW selects low impedance 50 Q TRIGGER IMPEDANCE LOW selects low impedance The TRIGger LEVel command sets the level on the external trigger at which the trigger event is generated The TRIGger LEVel query returns the level currently set MODE TRIGger IMPedance TRIGger SLOPe TRIGger LEVel lt Level gt TRIGger LEVel DG2020A Programmer Manual Command Descriptions Arguments lt Level gt lt NR2 gt lt unit gt where lt unit gt V mV with a range of 5 0 V to 5 0 V in 0 1 V steps Examples TRIGGER LEVEL 200mV sets the level to 200 mV TRIGger SLOpe The TRIGger SLOpe command selects the rising or falling edge of the external signal which generates the trigger event The TRIGger SLOPe query returns status indicating which slope
61. Sey wkd Knol s padded SEE E Me sets nbd HE MaRS 2 6 Concatenating Commands 0 0 eee eee 2 8 Query Responses ss reen ts lerke ene eke vine aN eb Mane heehee 2 9 Other General Command Conventions 20 0 0 0 eee e eee a 05 AT 5 9 2 10 Command Groups 6 5 0066 ccce 0 a R sete sees eee ete tent ees 2 11 Command Summaries 0 0 k Ra aR Ara R d AN R K N RAR NR 2 11 Command Descriptions sss ss s s x s s cece cc cece cece cece eee 2 19 Retrieving Response Messages cc cece cec eee cecececee 2 113 Status and Event Reporting Status and Event Reporting ss ss s e e x lt e cc cece cece cere renee 3 1 Rester Ses 3 1 QUEUES 205 8644 de enni eae ee APR eds Led See oo LEER Ree ties 3 5 Processing SEQUENCE X osc les adi ARE bes Se sT Shes NG EN EEEE gt 3 6 Messages vaskes eds ie oe woe Swe Bearer wate eee 3 9 Programming Examples Programming Examples x x e cece cece cece rere eeeeee 4 1 Overview of the Sample Programs 0 00 cee eee eee eee 4 1 Required Execution Environment eea SET TRET R EDEN Cer Ewes 4 2 Floppy Disk Files vag ses en G PSE SEER rede set 4 2 Installing and Compiling the Programs 0 0 0 0 00 002s raven 4 4 Sample Program Functions and Usage 00 0 0 c eee eee eee 4 6 DG2020A Programmer Manual i Table of Contents Appendices Glossary amp Index Appendix A Character Charts x s eee A 1 Appendix B Reserved Words cc cece
62. Talog ALL 7 Query disk file and directory information MMEMory CATalog ORDer Set the display order for disk file and directory information MMEMory CDIRectory Set the current working directory MMEMory COPY Copy a disk file MMEMory DELete ALL Delete all files and directories on a disk MMEMory DELete NAME Delete the specified file or directory on a disk MMEMory FREE Query disk memory usage MMEMory INITialize Format a disk MMEMory LOAD Read data from a disk file MMEMory LOCK Set the disk file lock state MMEMory MDIRectory Create a new directory on the disk MMEMory RDIRectory Remove a directory on the disk MMEMory REName Change the name of a disk file or directory MMEMory SAVE Write data to a disk file The MODE commands are used to set the run and update modes to start or stop pattern data or sequence output and to set the trigger conditions for the external trigger source Table 2 9 Header MODE MODE commands Description Query the states related to pattern generation MODE STATe MODE UPDate Set the run mode for pattern generation Set the data update mode RUNNing Query whether the instrument is currently outputting a pattern or sequence STARt Start pattern or sequence output STOP Stop pattern or sequence output TRG Generate the triggering event TRIGger Query all current trigger related settings DG2020A Programmer Manual Command Groups Table 2 9 MODE c
63. Te SYSTem TIME Set the setting for system operation when a self diagnostics detects an error Delete all settings and data Set the security on off state Set the clock time 2 17 Command Groups Table 2 14 SYSTEM commands Cont Header Description UNLock Unlock allow local control using the front panel controls UPTime Query the elapsed time since power on VERBose Select short or long response headers 2 18 DG2020A Programmer Manual EEE as Command Descriptions This subsection lists each command and query in the command set alphabetical ly Each command entry includes its command description and command group its related commands if any its syntax and its arguments Each entry also includes one or more usage examples This subsection fully spells out headers mnemonics and arguments with the minimal spelling shown in upper case For example to use the abbreviated version of the DISPlay BRIGhtness command just type DISP BRIG The symbol follows the command header of those commands that can be used as either a command or a query The symbol follows those commands that can only be a query If neither symbol follows the command it can only be used as a command ABSTouch The ABSTouch command performs the same action that actuating the correspond ing front panel key button or knob would do Group DISPLAY Related Commands Syntax ABSTouch BOTTOM1 BOTTOM6
64. UTO Here the run mode is set to repeat and the output pattern update method is set to automatic See the items on the MODE STATe and MODE UPDate commands The MODE STATe command sets the run mode for pattern generation The MODE STATe query returns the pattern generation run mode setting MODE MODE MODE STATe REPeat SINGle STEp ENHanced MODE STATe REPeat Pattern data output is repeated SINGTe Pattern data output is performed exactly once STEp Pattern data is output not according to the internal clock but rather by a clock signal created by the STEP key ENHanced Pattern data is output according to the defined sequence 2 81 Command Descriptions Responses Examples MODE UPDate Group Related Commands Syntax Arguments Responses Examples 2 82 MODE STATE REPEAT SINGLE STEP ENHANCED MODE STATE SINGLE sets the run mode to single The MODE UPDate command sets the output pattern update method used when data related to pattern generation is changed The MODE UPDate query returns the output pattern update method used when data related to pattern generation is changed MODE MODE MODE UPDate AUTO MANual MODE UPDate AUTO Pattern output reflects changes each time the data is changed in any way MANual Pattern output is not changed when data is changed until an update forcing command is received MODE UPDATE AUTO MANUAL MODE UPDATE AUTO s
65. a data block The DATA BLOCKk SIZe query returns the size of the specified block Group DATA Related Commands DATA BLOCK ADD DATA BLOCK DEFine DATA BLOCK DELete DATA BLOCk DELete ALL DATA BLOCk REName Syntax DATA BLOCk SIZe lt Name gt lt Size gt DATA BLOCk SIZe lt Name gt Arguments lt Name gt lt string gt where lt string gt is a block name lt Size gt lt NR1 gt where lt NR1 gt is a new block size Responses DATA BLOCK SIZE lt Name gt lt Size gt DG2020A Programmer Manual 2 25 Command Descriptions Examples DATA BLOCK SIZE BLOCK1 512 changes the block size of the block BLOCK1 to 512 DATA GROUp ADD The DATA GROUp ADD command adds a group Group DATA Related Commands DATA GROUp BIT DATA GROUp DEFine DATA GROUp DELete DATA GROUp DELete ALL DATA GROUp NAME DATA GROUp REN ame Syntax DATA GROUp ADD lt Name gt lt MSB gt lt LSB gt Arguments lt Name gt lt string gt where lt string gt is the name of the group to be added lt MSB gt lt NR1 gt where MSB is the Most Significant Bit where lt NR1 gt is the high order bit for the group lt LSB gt lt NR1 gt where LSB is the Least Significant bit where lt NR1 gt is the low order bit for the group Examples DATA GROUP ADD GROUPO1 3 0 adds a group that consists of 4 bits DATA00 to DATAO3 and has the name GROUPO1 2 26 DG2020A Programmer Manual Command Descriptions
66. able 3 4 Normal condition ss s s eee eee 3 10 Table 3 5 Command errors CME bit 5 cccccccceccece 3 10 Table 3 6 Execution errors EXE bit 4 lt s ss sss eee eee 3 12 Table 3 7 Internal device errors DDE bit 3 ccceeeee 3 14 Table 3 8 System event and query errors eeceeeeceees 3 14 Table 3 9 Warnings EXE bit 4 2 cc ccc ccc cece eee eens 3 15 Table 3 10 Device dependent command execution errors 3 15 Table 3 11 Extended device specific errors sss ss e x s e x e e x e 3 17 Table A 1 DG2020A character set cc ccc e ce eee ee eees A 1 Table A 2 ASCII amp GPIB code chart 0 cece eee ee eens A 2 Table C 1 GPIB interface function implementation C 1 Table C 2 GPIB interface messages ccceccececceces C 2 Table D 1 Factory initialized settings cc eee eeeees D 1 iv DG2020A Programmer Manual Preface Related Manuals DG2020A Programmer Manual This is the Programmer Manual for the DG2020A Data Generator and Pods This manual provides information on operating these instruments using General Purpose Interface Bus GPIB interface and RS 232 C interface This manual provides the following information Getting Started describes how to connect and set up for remote operation Syntax and Commands defines the command syntax and processing conventions and describes each command in the data generator command set Status
67. abled SOURCE SOURce POD lt s gt EVENT ENABle ON OFF 1 0 SOURce POD lt s gt EVENT ENAB1e lt s gt A B C ON or 1 enables the EVENT input OFF or 0 disables the EVENT input SOURCE POD lt s gt EVENT ENABLE 1 0 SOURCE PODB EVENT ENABLE ON enables the EVENT input of the pod B 2 99 Command Descriptions SRE 2 100 Group Related Commands Syntax Arguments Examples The SRE common command sets the bits of the SRER Service Request Enable Register The SRE common query returns the contents of SRER The power on default for the SRER is all bits reset if the power on status flag is TRUE If this flag is set to FALSE the SRER maintains its value through a power cycle STATUS amp EVENT CLS DESE ESE ESR EVENT EVMsg EVQty STB SRE lt Bit Value gt SRE lt Bit Value gt lt NR1 gt where the argument must be decimal number from 0 to 255 The SRER bits are set in binary bit according to the decimal number SRE 48 sets the SRER to 48 binary 00110000 which sets the ESB and MAV bits SRE might return 32 which indicates that the SRER contains the binary number 00100000 DG2020A Programmer Manual Command Descriptions STARt Group Related Commands Syntax Arguments Examples STB Group Related Commands Syntax Arguments Responses Examples DG2020A Programmer Manual The STARt command sets the inst
68. ammer Manual Command Descriptions DATA BLOCk DEFine Group Related Commands Syntax Arguments Responses Examples DG2020A Programmer Manual The DATA BLOCK DEFine command sets up the information for the whole block definition section in ASCII The DATA BLOCk DEFine query returns the whole block definition section DATA DATA BLOCK ADD DATA BLOCK DELete DATA BLOCK DELete ALL DATA BLOCk REName DATA BLOCk SIZe DATA BLOCk DEFine lt Blockinfo gt DATA BLOCk DEFine lt Blockinfo gt lt blockheader gt lt Blkdef gt lt LF gt lt B kdef gt lt LF gt lt Blkdef gt Arbitrary block data for the block definition where lt blockheader gt lt byte count digit gt lt byte count gt lt Bl kdef gt lt APosition gt lt AName gt lt Aposition gt is the block starting position specified in ASCII Note that the starting position of the first block must be zero and lt AName gt is the block name specified in ASCII lt LF gt lt ASCII line feed code dec 10 gt DATA BLOCk DEFINE lt Blockinfo gt where lt Blockinfo gt is a data block in the same format as the argument DATA BLOCk DEFine 2320 BLOCKO lt LF gt 512 BLOCK1 lt LF gt 1024 BLOCK2 defines three blocks BLOCKO BLOCK1 and BLOCK2 2 23 Command Descriptions DATA BLOCk DELete Group Related Commands Syntax Arguments Examples The DATA BLOCK DELete command deletes the specified block Note
69. and Events explains the status information and event messages reported by the data generator Appendices contains various topics of use to the programmer Glossary and Index contains a glossary of common terms and an index to this manual Other documentation for the data generator includes The User Manual that describes the operation of the Data Generator that was supplied as a standard accessory with the instrument The Service Manual optional accessory provides information for maintain ing and servicing the Data Generator Preface vi DG2020A Programmer Manual FE AE Getting Started Overview The Data Generator has two interfaces for remote operation the GPIB interface and the RS 232 C interface All menu controlled and front panel controlled functions except the ON STBY function the edit function and the GPIB and RS 232 C parameter setup functions can be controlled through the GPIB or the RS 232 C interface using the programming command set see Section 2 The GPIB interface conforms to ANSI IEEE Std 488 1 1987 which specifies the hardware interface its basic functional protocol and a set of interface messages codes that control the interface functions This instrument also conforms to ANSI IEEE Std 488 2 1987 which specifies Codes Formats Protocols and Common Commands to support the system application The functional layers of the GPIB system are shown in Figure 1 1 BUS Device specific Messages
70. anual GPIB command file that sets the output pod output voltage levels 4 3 Programming Examples Installing and Compiling the Programs Making Copy Compiling the source codes Executable programs must be created by compiling the source files provided on the floppy disk The programs are compiled after copying the source files to the hard disk To prevent any possibility of damaging the original during these operations it is recommended that you first make a copy of the floppy disk store the original in a safe place and use the copy for the following procedures Create a directory on the hard disk in which you install all of the sample programs This procedure assumes that the hard drive is drive c and the floppy drive is drive a In the DOS prompt window type the following commands mkdir c DGSAMPLE 20A Copy the folders and files in the floppy disk with the directory tree structure kept intact You can simply do this operation by drag and drop method in the Windows 95 Explorer window 1 Click Drive A floppy icon to display the files in the floppy disk 2 Select Select All from the File menu Alternatively you can make this operation by pressing Control A keys on the keyboard 3 Drag the selected files in the floppy to the new directory created in step 1 Do the following procedures to compile the sample program source code The procedures are different depending on the type of source codes C or BASIC
71. are the arguments Comma Typically delimits between multiple arguments In the above example a comma delimits the multiple arguments 1995 3 and 4 Semicolon Typically delimits between multiple commands or multiple program message units For more information about using the semicolon refer to Concatenating Commands on page 2 8 White space which is used to delimit certain syntactic elements in a command is defined in the data generator as a single ASCII encoded byte in the range ASCII 0 32 decimal This range consists of the standard ASCII characters exclusively except for ASCII 10 which is the Line Feed LF or New Line NL character The Line Feed LF character or the New Line NL character ASCII 10 and all characters in the range of ASCII 127 255 are defined as special characters These characters are used in arbitrary block arguments only using these characters in other parts of any command yields unpredictable results Command Syntax Arguments Decimal Numeric Unit and SI Prefix In a command or query one or more arguments follow the command header The argument sometimes called program data is a quantity quality restriction or limit associated with the command or query header Depending on the command or query header given the argument is one of the following types R Decimal Numeric m String R Arbitrary Block The data generator defines a decimal numeric argument as one expressed in one
72. ata from a file prepared in advance This program presents an example of the use of the subsequence definition command Supports interactive GPIB command and message exchange with the DG2020A This program allows the operator to easily confirm the actual operation of the GPIB commands This program also serves as an example of the communica tions protocols used between the DG2020A and the GPIB interface Required Execution Environment Floppy Disk Files MSVC Directory These programs run on an IBM PC AT compatible personal computer that has a National Instruments Inc GPIB interface installed The C sample programs run in the MS DOS prompt window and require a Windows 95 operating system and the National Instruments Inc GPIB95 driver software The BASIC sample programs require a MS DOS version 5 0 or later and the National Instruments Inc AT GPIB driver software In addition Microsoft Visual C Quick BASIC 4 5 or LabVIEW is required to compile and run the sample programs You should provide an environment that meets these conditions and install the respective software according to their manuals The floppy disk contains the following files The README TXT file stored in the floppy disk also provides you the detailed information Filename Description getbit c The getbit C source file putbit c The putbit C source file getword c The getword C source file putword c The ptword C source file putblk c The putb1k C source file
73. be prepared in advance and used as a batch file This differs from standard input redirection described below in that the contents of the file are first interpreted by this program s command processing routine The result is that while the built in commands and the redirection commands can be used GPIB commands that include binary data and newline codes cannot be used help Displays command descriptions on the screen resets Returns the registers used by the event and status reporting system to the standard state set up by this program If the set values of the GPIB commands registers such as DESE and ESE are changed this command should be used as soon as possible to return their values to the standard values DG2020A Programmer Manual Programming Examples DG2020A Programmer Manual view filename Outputs the contents of the file specified by filename to standard output i e displays the file on the screen Executes the immediately preceding command once again Redirection commands The following commands can be used to switch standard input or standard output to a file and thus realize communications between the DG2020A and a file or files lt filename gt filename gt gt filename Sends the contents of the file specified by filename to the DG2020A directly without modification This allows a sequence of commands to be prepared in advance and used as a batch file In particular only this command can be
74. ble and the TTL pod is connected to the POD A connector DG2020A Programmer Manual Command Descriptions OUTPUT PODA CHO INHIBIT O ASSIGN 0 OUTPUT PODA CH1 INHIBIT O ASSIGN 1 OUTPUT PODA CH2 INHIBIT O ASSIGN 2 OUTPUT PODA CH3 INHIBIT O ASSIGN 3 OUTPUT PODA CH4 INHIBIT O ASSIGN 4 OUTPUT PODA CH5 INHIBIT O ASSIGN 5 OUTPUT PODA CH6 INHIBIT O ASSIGN 6 0UTPUT PODA CH7 INHIBIT O ASSIGN 7 OUTPUT PODA CH8 DELAY 0 00E 0 9 INHIBIT O ASSIGN 8 OUTPUT PODA CH9 DELAY 0 00E 0 9 INHIBIT O ASSIGN 9 OUTPUT PODA CH10 DELAY 0 00E 0 9 INHIBIT O ASSIGN 10 OUTPUT PODA CH11 DELAY 0 00E 0 9 INHIBIT O ASSIGN 11 OUTPUT PODA TYPE TTL DEFINE 2750 0 0 lt LF gt 1 1 0 lt LF gt 2 2 0 lt LF gt 3 3 0 lt LF gt 4 4 0 lt LF gt 5 5 0 lt LF gt 6 6 0 lt LF gt 7 7 0 lt LF gt 8 8 0 lt LF gt 9 9 0 lt LF gt 10 10 0 lt LF gt 11 11 0 or might return when the POD A is only available and the Variable pod is connected to the POD A connector OUTPUT PODA CHO HIGH OUTPUT PODA CH1 HIGH OUTPUT PODA CH2 HIGH OUTPUT PODA CH3 HIGH 0 500 LOW 0 500 DELAY OUTPUT PODA CH4 HIGH 0 500 LOW 0 500 DELAY 0 500 LOW 0 500 DELAY 0 0 0 0 OUTPUT PODA CH5 HIGH 0 500 LOW 0 500 DELAY 0 0 0 0 500 LOW 0 500 DELAY 500 LOW 0 500 DELAY 0 00E 0 9 INHIBIT O ASSIGN 0 0 00E 0 9 INHIBIT O ASSIGN 1 0 00E 0 9 INHIBIT O ASSIGN 2 0 00E 0 9 INHIBIT O ASSIGN 3 0 00E 0 9 INHIBIT O ASSIGN 4 0 00E 0
75. cece ce rece ceees B 1 Appendix C Interface Specification sss s s e x x x x e e cece ee eee C 1 Appendix D Factory Initialization Settings D 1 Glossary Za dE a E TET opis TE arid kassene eee avant TAE Glossary 1 fE SENERE ERE Index 1 DG2020A Programmer Manual Table of Contents List of Figures DG2020A Programmer Manual Figure 1 1 Figure 1 2 Figure 1 3 Figure 1 4 Figure 1 5 Figure 1 6 Figure 1 7 Functional layers in gpib system 0 1 1 GPIB connector lt ces 8 9 R 9 R 0 aT R R R ieee ete s sosis 1 3 GPIB system configurations xs e s e x e e lt e lt e e e eee 1 4 GPIB parameter settings ss e x e e x e eee 1 5 RS 232 C point to point connection 4 1 6 RS 232 C por sic86085 thei ee ete seca ttees ede oeee 1 7 Pin assignments of 9 pin and 25 pin D type shell connector x x e e eee ee ee eens 1 8 Figure 1 8 Figure 1 9 Figure 2 1 Figure 2 2 Figure 2 3 Figure 2 4 Figure 3 1 Figure 3 2 Figure 3 3 Figure 3 4 Figure 3 5 Figure 3 6 Typical RS 232 C cable wiring requirements 1 8 RS 232 C parameter settings ecceeeeeeees 1 9 Command and query structure flowchart 2 2 ABSTouch arguments and associated controls 2 20 GPIB Retrieving response messages 06 2 113 RS 232 C Retrieving response messages 2 113 Standard event status SESR ccccccceceee
76. commands or queries issued during Self Test 2 51 Command Descriptions Examples DIAGnostic RESUIt Group Related Commands Syntax Arguments Responses Examples 2 52 DIAGNOSTIC might return DIAGNOSTIC SELECT ALL RESULT 0 The DIAGnostic RESUlt query returns the results of self test execution DIAGNOSTIC DIAGnostic SELect DIAGnostic STATe DIAGnostic RESUlt None DIAGNOSTIC RESULT lt Result gt lt Result gt lt Result gt lt NR1 gt where lt NR1 gt is one of following values 0 100 200 300 400 500 600 700 terminated without error detected an error in the CPU unit detected an error in the display unit detected an error in the front panel unit detected an error in the clock unit detected an error in the trigger unit detected an error in the sequence memory detected an error in the pattern memory DIAGNOSTIC RESULT might return DIAGNOSTIC RESULT 200 DG2020A Programmer Manual Command Descriptions DIAGnostic SELect The DIAGnostic SELect command selects the self test routine The DIAGnos tic SELect query returns the currently selected routine The DIAGnos tic STATe command executes the routine Group DIAGNOSTIC Related Commands DI AGnostic STATe DIAGnostic RESULt Syntax DIAGnostic SELect ALL CPU DISPlay FPANel CLOCk TRIGger SMEMory PMEMory DIAGnostic SELect Arguments ALL checks all routines that follow CPU checks the CPU un
77. day SYSTEM DATE lt Year gt lt Month gt lt Day gt SYSTEM DATE 95 5 15 sets the date DG2020A Programmer Manual Command Descriptions SYSTem PPAUse Group Related Commands Syntax Arguments Responses Examples The SYSTem PPAUse command sets whether or not the instrument goes to the operator key input wait state power up pause when an error is detected by the power up diagnostics or no output pod is connected The SYSTem PPAUse query returns the power up pause setting on or off SYSTEM SYSTem PPAUse ON OFF 1 0 SYSTem PPAUse ON or 1 enables the power up pause OFF or 0 disables the power up pause SYSTEM PPAUSE 1 0 SYSTEM PPAUSE ON turns power up pause on SYSTem SECurity IMMediate Group Related Commands Syntax DG2020A Programmer Manual The SYSTem SECurity IMMediate command sets all internal settings to the factory setting state the same state that results when the FACTory command is executed and completely erases all data Bit patterns groups blocks and sequences are included in the erased data The GPIB and RS 232 C settings and the data and time settings are not reset SYSTEM FACTory RST SYSTem SECurity IMMediate 2 103 Command Descriptions Arguments None SYSTem SECurity STATe Group Related Commands Syntax Arguments Responses Examples SYSTem TIME 2 Group Related Commands Syntax 2 104
78. derstand This program may not operate correctly if the format of the input file is not correct In particular note that commas are used to delimit the parameters in this input file and that spaces may not be inserted Putsub This program sends subsequence definition data to the DG2020A data memory Data input is from a file in a unique format This command has the following syntax with the input data file name being specified as a parameter putsub filename The contents of the input file must express the block name and the repeat count in ASCII with one step per line This format corresponds to the parameter block supplied to the DATA SUBSEQUENCE DEFINE command with the delimiter codes replaced by the newline code used in normal text files The first line in this file corresponds to subsequence line number 0 and each following line to the subsequence line number incremented by 1 See the subdef dat sample data file Input format checking has been dispensed with to make this sample program easier to understand This program may not operate correctly if the format of the input file is not correct In particular note that commas are used to delimit the parameters in this input file and that spaces may not be inserted Intcom This program implements interactive communication between an external controller and the DG2020A That is it transmits GPIB commands entered from the keyboard to the DG2020A and displays messages returned from the DG
79. e state of the DESR the following actions occur m Ifthe control bit for that event is set in the DESER the SESR bit that corresponds to this event becomes set to 1 m The set control bit lets the event be placed into the Event Queue Placing the event in the Event Queue sets the MAV bit in the SBR to one m Ifthe control bit for that event is also set in the ESER the ESB bit of SBR becomes set also 2 When either bit of SBR has been set to 1 and the corresponding control bit of SRER is also set the MSS bit of SBR becomes set and a service request is generated for use with GPIB interface operation As noted earlier the RS 232 C interface does not use the output queue therefore the MAV bit would not become set in the sequence just described Rather response messages are sent to the output buffer for immediately transfer to the external controller on the output line Message transfer is automatic and it is not necessary to use commands to retrieve these messages 3 6 DG2020A Programmer Manual Status and Event Reporting Device Events Device Event Status Enable Register set with DESE read with DESE blikket 7 6 5 4 3 2 1 0 Standard Event Status Register read and clear with ESR clear with CLS PON URQ CME EXE DDE QYE RQC OPC 8 Output T 8 Queue 7fel sl fafsfea 11 o EVTE Standard Event Status Enable Register set BYTE with ES
80. emory lost Self test failed Queue overflow does not affect the DDE bit Table 3 8 lists the system event messages These messages are generated when ever certain system conditions occur Table 3 8 System event and query errors Code Description 401 Power on 402 Operation complete 403 User request 404 Power fail 405 Request control 410 Query INTERRUPTED 420 Query UNTERMINATED 430 Query DEADLOCKED 440 Query UNTERMINATED after indefinite response 3 14 DG2020A Programmer Manual Messages DG2020A Programmer Manual Table 3 9 lists warning messages that do not interrupt the flow of com mand execution These messages warn you that you may get unexpected results Table 3 9 Warnings EXE bit 4 Code 500 Description Execution warning Table 3 10 lists status messages that are specific to the data generator These messages appear when a operation starts ends or is in process These messages have no associated SESR bit Table 3 10 Device dependent command execution errors Code Description 2000 File error 2001 Directory not empty 2002 Too many files 2003 File locked 2004 File already exists 2005 File already opened 2006 Invalid file type 2007 File type mismatch 2008 Internal memory full 2009 Invalid file format 2010 Comment error 2012 Invalid data in comment string 2020 Pattern data error 2021 To much pattern data 2022 Pattern data byte count error 2023
81. ence REPeat DATA SEQuence TWAIT Syntax DATA SEQuence EVJTO lt Line Number gt lt Target gt DATA SEQuence EVJTO lt Line Number gt Arguments lt Line Number gt lt NR1 gt where lt NR1 gt is the line number of the sequence step to be set lt Target gt lt NR1 gt where lt NR1 gt is the line number of the jump destination sequence step Responses DATA SEQUENCE EVJTO lt Line Number gt lt Target gt Examples DATA SEQUENCE EVJTO 5 0 sets the line 5 sequence step event jump destination to line 0 2 38 DG2020A Programmer Manual Command Descriptions DATA SEQuence LOOP Group Related Commands Syntax Arguments Responses Examples The DATA SEQuence LOOP command sets the sequence step infinite loop state to on or off The DATA SEQuence LOOP query returns the sequence step infinite loop on off state DATA DATA SEQuence EVJ DATA SEQuence EVJTO DATA SEQuence REPeat DATA SEQuence TWAIT DATA SEQuence LOOP lt Line Number gt ON OFF 1 0 DATA SEQuence LOOP lt Line Number gt lt Line Numbers lt NR1 gt where lt NR1 gt is the line number of the sequence step to be set ON orl sets the infinite loop state to on OFF or 0 sets the infinite loop state to off DATA SEQUENCE LOOP lt Line Number gt 1 0 DATA SEQUENCE LOOP 9 0FF sets the infinite loop state for the line 9 sequence step to off DATA SEQuence REPeat Group Related Com
82. ency SOURce 0SCillator INTernal PLLlock SOURce 0SCillator SOURce SOURce 0SCillator INTernal FREQuency lt Frequency gt SOURce 0SCillator INTernal FREQuency lt Frequency gt lt NR3 gt lt Unit gt where lt NR3 gt is a decimal number that combines with lt Unit gt to have a range of 10 00E 3 200 0E 6Hz and lt Unit gt Hz kHz MHz for hertz kilohertz or megahertz SOURCE OSCILLATOR INTERNAL FREQUENCY lt NRf gt HZ SOURCE OSCILLATOR INTERNAL FREQUENCY 100MHZ sets the internal clock oscillator frequency to 100 MHz 2 97 Command Descriptions SOURCce OSCillator INTernal PLLlock Group Related Commands Syntax Arguments Responses Examples The SOURce 0SCillator INTernal PLLlock command sets whether or not the internal clock oscillator is phase synchronized by PLL operation with the reference oscillator The SOURce 0SCillator INTernal PLLlock query returns whether or not the internal clock oscillator is phase synchronized by PLL operation with the reference oscillator SOURCE SOURce 0SCillator SOURce 0SCillator EXTernal FREQuency SOURce 0SCillator INTernal FREQuency SOURce 0SCillator SOURce SOURce 0SCillator INTernal PLLlock ON OFF 1 0 SOURce 0SCillator INTernal PLLlock ON or 1 The phase is synchronized PLL on OFF or 0 The phase is not synchronized PLL off SOURCE OSCILLATOR INTERNAL PLLLOCK 1 0 SOURCE OS
83. ent DESE 177 sets the DESER to 177 binary 10110001 which sets the PON CME EXE and OPC bits DESE might return DESE 176 which indicates that the DESER contains the binary number 10110000 DG2020A Programmer Manual Command Descriptions DIAGnostic Group Related Commands Syntax Arguments Responses DG2020A Programmer Manual The DIAGnostic query returns the selected self test routine s runs the routine and returns the results DIAGNOSTIC DIAGnostic SELect DIAGnostic STATe DIAGnostic RESU1t DIAGnostic None DIAGNOSTIC SELECT lt Self test Routine gt RESULT lt Result gt lt Result gt lt Self test Routine gt lt label gt where lt label gt is one of following routines ALL all routines CPU CPU unit check routine DISPlay display unit check routine FPANel front panel control unit check routine CLOCK clock unit check routine TRIGger trigger unit test routine PMEMory pattern memory check routine SMEMory sequence memory check routine and where lt Result gt lt NR1 gt is one of following responses 0 terminated without error 100 detected an error in the CPU unit 200 detected an error in the display unit 300 detected an error in the front panel unit 400 detected an error in the clock unit 500 detected an error in the trigger unit 600 detected an error in the sequence memory 700 detected an error in the pattern memory NOTE The does not respond to any
84. ently set to FALSE DG2020A Programmer Manual Command Descriptions RST The RST common command resets this data generator to the default state default values are listed in Appendix D Group SYSTEM Related Commands FACTory SECUre Syntax RST Arguments None Examples RST resets the instrument RUNNing The RUNNing query returns status that indicates whether or not pattern data or a sequence is being output Group MODE Related Commands STARt STOP Syntax RUNNing Arguments None Responses 1 pattern data or a sequence is being output 0 nothing is being output Examples RUNNING might return RUNNING 1 DG2020A Programmer Manual 2 95 Command Descriptions SOURce OSCillator Group Related Commands Syntax Arguments Responses Examples The SOURce 0SCillator query returns all the settings states related to clock signals SOURCE SOURce 0SCillator EXTernal FREQuency SOURce 0SCillator INTernal FREQuency SOURce 0SCillator INTernal PLLlock SOURce 0SCillator SOURce SOURce 0SCillator None SOURCE OSCILLATOR SOURCE INTERNAL EXTERNAL EXTERNAL FREQUENCY lt NR3 gt HZ L SOURCE OSCILLATOR INTERNAL FREQUENCY lt NR3 gt HZ PLLLOCK 1 0 SOURce 0SCillator might return SOURCE OSCILLATOR SOURCE INTERNAL EXTERNAL FREQUENCY 1 000E 8HZ SOURCE OSCILLATOR INTERNAL FREQUENCY 2 000E 8HZ PLLLOCK 1 SOURce OSGCillator EXTernal
85. escription Perform the function corresponding to the front panel control selected DISPlay DISPlay BRIGhtness 7 DISPlay CLOCk DISPlay DIMmer Query settings made with display group commands Set brightness of screen Set the date and time display state Set the state of the display dimmer function DISPlay ENABle Set the display on off state DISPlay MENU DISPlay MENU NAME DISPlay MENU NAME DISPlay MENU STATe Query all menu display related information Set the menu selection state Query the menu selection state Set the menu display on off state DISPlay WINDow TEXT CLEar DISPlay WINDow TEXT DATA 2 Erase the message display area Set the contents of the message display area HARDCOPY Commands The HARDCOPY commands start and stop for hardcopy operation and select port and its outputting format Table 2 7 HARDCOPY commands Header HCOPy HCOPy ABORT HCOPy DATA Description Query all hardcopy related information Stop the current hardcopy operation Create and send hardcopy data HCOPy FORMat Select output format of hardcopy HCOPy PORT HCOPy START DG2020A Programmer Manual Select output port of hardcopy Start a hardcopy operation 2 13 Command Groups MEMORY Commands MODE Commands The MEMORY commands control all floppy disk and file operations Table 2 8 MEMORY commands Header Description MMEMory CA
86. esponses Query Header on Header off DATA MSIZE DATA MSIZE 16384 16384 DIAGNOSTIC SELECT DIAGNOSTIC SELECT PMEMORY PMEMORY DG2020A Programmer Manual 2 9 Command Syntax Use the command HEADER ON when you want the header returned along with the information You can save such a response and send it back as a set command later Use HEADER OFF when you want only the information back Other General Command Conventions Upper and Lower Case The instrument accepts upper lower or mixed case alphabetic messages The following three commands are recognized as identical HEADER ON or header on or header On Abbreviation Any header argument or reserved word that is sent to the data generator can be abbreviated The minimum required spelling is shown in upper case throughout the subsection Command Groups beginning on page 2 11 The command TRIGger SLOPe POSitive can be rewritten in either of the following forms TRIGGER SLOPE POSITIVE or TRIG SLOP POS 2 10 DG2020A Programmer Manual EES EEE Command Groups Command Summaries DATA Commands DG2020A Programmer Manual This subsection describes the organization of the DG2020A Data Generator command as a number of functional groups See subsection Command Descriptions on page 2 19 for a complete description of each command in alphabetical order Throughout this section the parenthesized question symbol follows the command header to indicate that both a comma
87. ets the output pattern update method to AUTO DG2020A Programmer Manual Command Descriptions OPC 2 Group Related Commands Syntax Arguments Examples DG2020A Programmer Manual The 0PC common command causes bit 0 in the SESR Standard Event Status Register to be set and the operation complete message to be issued when all pending operations are finished The OPC query waits until all pending operations are finished and returns a 1 ASCII character SYNCHRONIZATION WAI OPC OPC None HCOPY PORT DISK HCOPY START OPC causes the SESR bit 0 to be set and the operation complete message to be issued on the completion of hardcopy 2 83 Command Descriptions OPT Group Related Commands Syntax Arguments Responses Examples OUTPut Group Related Commands Syntax Arguments Examples 2 84 The OPT common query returns the implemented options of the data generator SYSTEM None OPT None lt Option gt lt Option gt where 0 indicates no option UNIT1 indicates the option 01 12 additional output channels and UNIT1 UNIT2 indicates the option 02 24 additional output channels OPT might return UNIT1 UNIT2 to indicate that the option 02 is installed in the instrument The OUTPUT query returns all settings rerated to the channel and clock outputs OUTPUT DATA OUTPut None OUTPUT might return when the POD A is only availa
88. event is being queued 0 is returned STATUS amp EVENT CLS DESE ESE ESR EVMsg EVENT SRE STB EVQty None EVQty might return EVQTY 5 The FACTory command resets the data generator to its factory default settings and purges all stored settings See Appendix D page D 1 for a list of the factory settings SYSTEM RST SECUre FACTory None FACTORY resets the data generator to its factory default settings DG2020A Programmer Manual Command Descriptions HCOPy Group Related Commands Syntax Arguments Responses Examples DG2020A Programmer Manual The HCOPy query returns the set image data format and output port for hardcopy output HARDCOPY HCOPy FORMat HCOPy PORT HCOPy None HCOPY FORMAT BMP EPSON EPSMONO THINKJET TIFF PORT DISK GPIB RS232C where BMP the Windows monochrome file format EPSOn the format used by 9 pin and 24 pin dot matrix printers in ESC P graphics mode EPSMono the encapsulated Postscript format monochrome image file format THINkjet the format used by HP inkjet printers TIFF the TIFF format HCOPY might return HCOPY FORMAT TIFF PORT DISK In this case the instrument outputs hardcopy data to file on the floppy disk in the TIFF format 2 65 Command Descriptions HCOPy ABORt Group Related Commands Syntax Arguments Examples HCOPy DATA Group Related Commands Syntax Arg
89. g Parameters of 1 9 RST 2 95 RUNNing 2 95 S Serial poll 3 3 SESR register 3 1 Source commands SOURce OSCillator 2 96 SOURce OSCillator EXTernal FREQuency 2 96 SOURce OSCillator INTernal FREQuency 2 97 SOURce OSCillator NTernal PLLlock 2 98 SOURce OSCillator SOURce 2 98 SOURce POD lt s gt EVENT ENABIe 2 99 SOURce OSCillator 2 96 SOURce OSCillator EXTernal FREQuency 2 96 SOURce OSCillator INTernal FREQuency 2 97 SOURce OSCillator NTernal PLLlock 2 98 SOURce OSCillator SOURce 2 98 SOURce POD lt s gt EVENT ENABIe 2 99 SRE 2 100 SRE command 3 5 SRER register 3 5 STARt 2 101 Status 3 1 Status amp event commands CLS 2 21 ESE 2 61 ESR 2 62 PSC 2 94 SRE 2 100 STB 2 101 ALLEv 2 20 DESE 2 50 EVENT 2 63 EVMsg 2 63 EVQty 2 64 Status and error commands DESE 3 4 ESE 3 4 Index 4 ESR 3 1 SRE 3 5 STB 3 3 Status and events processing of 3 6 Status Registers Defined 3 1 STB 2 101 STB query 3 3 STOP 2 102 Synchronization commands OPC 2 83 WAI 2 111 System commands IDN 2 71 OPT 2 84 RST 2 95 DEBug 2 45 DEBug SNOop 2 46 DEBug SNOop DELAy 2 47 DEBug SNOop DELAy TIME 2 48 DEBug SNOop STATe 2 49 FACTory 2 64 HEADer 2 69 ID 2 70 LOCK 2 71 SYSTem DATE 2 102 SYSTem PPAUse 2 103 SYSTem SECurity IMMediate 2 103 SYSTem SECurity STATe 2 104 SYSTem TIME 2 104 UNLock 2 109 UPTime 2 109 VERBose 2 110 System even
90. ge 118 Query not allowed 120 Numeric data error 121 Invalid character in number 123 Exponent too large 124 Too many digits 128 Numeric data not allowed 130 Suffix error DG2020A Programmer Manual Messages DG2020A Programmer Manual Table 3 5 Command errors CME bit 5 Cont Code Description 131 Invalid suffix 134 Suffix too long 138 Suffix not allowed 140 Character data error 141 Invalid character data 144 Character data too long 148 Character data not allowed 150 String data error 151 Invalid string data 152 String data too long 158 String data not allowed 160 Block data error 161 Invalid block data 168 Block data not allowed 170 Expression error 171 Invalid expression 178 Expression data not allowed 180 Macro error 181 Invalid outside macro definition 183 Invalid inside macro definition 184 Macro parameter error Messages 3 12 Table 3 6 lists the execution errors that are detected during execution of a command Table 3 6 Execution errors EXE bit 4 Code Description 200 Execution error 201 Invalid while in local 202 Settings lost due to RTL 203 Command protected 210 Trigger error 211 Trigger ignored 212 Armed ignored 213 Init ignored 214 Trigger deadlock 215 ARM deadlock 220 Parameter error 221 Settings conflict 222 Data out of range 223 Too much data 224 Illegal parameter value 225 Parameter under range 2
91. gh the external controller If there is a response message queued in the output queue and another query command is sent from the external controller before a retrieval operation for the earlier message is performed the data generator will delete the queued response message and put the response message for the more recently sent query command in the output queue The SBR status byte register MAV bit can be used to check the response message queuing state See Section 3 Status and Events for more information on the output queue SBR and control methods Figure 2 4 shows the response message retrieval operation when an RS 232 C interface is used When a query command is sent from the external controller the data generator immediately sends the response message to the external controller through an output buffer As a result when either a dumb terminal or a terminal emulator program running on a PC is used as the external controller the response message will be displayed on the CRT immediately after the query command is typed in Unlike the GPIB interface if an RS 232 C interface is used response messages will never be deleted even if query commands are sent one after another DG2020A Programmer Manual eee Status and Event Reporting Registers Status Registers DG2020A Programmer Manual This section describes how the DG2020A Data Generator reports its status and internal events for both the GPIB and RS 232 C interfaces
92. he file system cd c DGSAMPLE 20A QBASIC 2 Next copy the necessary files associated with the GPIB drivers This procedure assumes that the National Instruments drivers are installed in the c at gpib directory copy c at gpib qbasic qbdecl bas copy c at gpib qbasic qbib obj 3 Compile the sample programs using the batch file makeexe bat 4 If following the above procedures did not result in the compilation complet ing correctly check that there is adequate free space on the hard disk and that the compiler is installed correctly In particular check that the path setting is correct DG2020A Programmer Manual 4 5 Programming Examples Installing the Sample Data Create an appropriate directory on the hard disk Select a name that does not duplicate an existing file or directory name in the file system This procedure uses the directory sample d This procedure assumes that the hard drive is drive c that the floppy drive is drive a and that the current directory is an appropriate directory on the hard disk mkdir sample d cd sample d copy a data Sample Program Functions and Usage Getbit 4 6 This section describes the functions of the sample programs and their use Words set in italics are abstract parameters that must be replaced with actual character strings This program reads out bit pattern data from DG2020A data memory in bit units and displays that data on the screen The bit number 0
93. ice represents one device load to the bus The total cable length cumulative must not exceed 20 meters At least two thirds of the device loads must be powered on DG2020A Programmer Manual Getting Started Setting the GPIB To set the GPIB parameters proceed as follows Parameters Press the UTILITY button in the MENU column to the right of the screen The UTILITY menu appears above the bottom menu buttons 2 Press the System bottom menu button to display the System menu See figure 1 4 3 Select the Configure item from the GPIB menu using the up and down arrow buttons Set the GPIB operating mode using the left and right arrow buttons m Talk Listen Sets the communications mode to talk listen m Talk Only Sets the communications mode to talk only which is used for hardcopy output m Off Bus Logically disconnect the data generator from GPIB system NOTE The data generator accepts as a terminator either the software LF Line Feed sent as the last data byte or the hardware EOI with the EOI line asserted concurrently with the last data byte sent 4 Select the Address item from the GPIB menu using the up and down arrow buttons Then use the rotary knob to set the primary address to a value in the range 0 to 30 5 Select the Remote Port item using the up and down arrow buttons and additionally highlight GPIB using the left and right arrow buttons This selects the GPIB as the remote interface
94. ice error messages that are specific to the device Table 3 11 Extended device specific errors Code 3001 DG2020A Programmer Manual Description RS 232 C input buffer overflow 3 17 Messages 3 18 DG2020A Programmer Manual SSS Ss Programming Examples This section presents sample programs that show specific examples of techniques for controlling the DG2020A over a GPIB interface The sample programs are stored on the floppy disk labeled Software Library included with the DG2020A Since this manual does not include a listing of these programs you may want to reference those files while reading this manual The majority of these programs are provided in C versions and thus can be used in the Microsoft Visual C environment Some of the programs are also provided in Quick BASIC or LabVIEW versions SONY Tektronix holds the copyright to the programs described in this section These programs may be copied distributed or modified for testing research and development purposes However SONY Tektronix assumes no responsibility or liability for any loss or damage that is caused due to the use of these programs in their original form or in any modified form Overview of the Sample Programs getbit Reads out bit patterns from the DG2020A data memory in bit units and displays that data on the screen Since standard output is used for data display the output can be redirected to a file for storage This is an example of a progra
95. ified file A file that is locked using the MMEMory LOCk command cannot be renamed MEMORY MMEMory COPY MMEMory REName lt From filename gt lt To filename gt lt From filename gt lt string gt where lt string gt is the name of the file to be changed lt To filename gt lt string gt where lt string gt is the name of the file after it is changed MMEMORY RENAME COUNT1 PDA COUNT2 PDA changes the name of the file COUNT1 PDA in the current working directory to COUNT2 PDA The MMEMory SAVE command saves the pattern data and block group sequence and setup information stored in the internal memory into a disk file in DG2020A format MEMORY MMEMory LOAD MMEMory SAVE lt Path Name gt lt Path Name gt lt string gt where lt string gt is the path name of the file MMEMORY SAVE NEWDATA PDA saves all the information in internal memory to the file NEWDATA PDA in the current working directory DG2020A Programmer Manual Command Descriptions MODE Group Related Commands Syntax Arguments Responses Examples MODE STATe 2 Group Related Commands Syntax Arguments DG2020A Programmer Manual The MODE query returns all the setting states related to the pattern generation mode MODE MODE STATe MODE UPDate MODE None MODE STATE REPEAT SINGLE STEP ENHANCED UPDATE AUTO MANUAL MODE might return MODE STATE REPEAT UPDATE A
96. is currently selected Group MODE Related Commands _ _TRIGger IMPedance TRIGger LEVel Syntax TRIGger SLOPe POSitive NEGative TRIGger SLOPe Arguments POSitive selects rising edge NEGative selects falling edge Examples TRIGGER SLOPE POSITIVE selects rising edge for trigger DG2020A Programmer Manual 2 107 Command Descriptions TST Group Related Commands Syntax Arguments Responses Examples 2 108 The TST common query performs the self test and returns the results If an error is detected during self test execution stop immediately This command takes up to 90 seconds to run the self test and the data generator will not respond to any commands and queries while it runs DIAGNOSTIC DIAGnostic RESUlt DIAGnostic SELect DIAGnostic STATe TST None lt Result gt where lt Result gt lt NR1 gt and lt NR1 gt is one of following arguments 0 Terminated without error 100 Detected an error in the CPU unit 200 Detected an error in the display unit 300 Detected an error in the front panel unit 400 Detected an error in the clock unit 500 Detected an error in the trigger unit 600 Detected an error in the sequence memory 700 Detected an error in the pattern memory TST might return 200 to indicate that errors were detected in the display unit DG2020A Programmer Manual Command Descriptions UNLock Group Related Commands Syntax Arguments Examples UPTi
97. it DISPlay checks the display unit FPANel checks the front panel control unit CLOCK checks the clock unit TRIGger checks the trigger unit SMEMory checks the sequence memory PMEMory checks the pattern memory Examples DIAGNOSTIC SELECT CPU STATE EXECUTE executes the CPU self test routine DIAGnostic STATe The DIAGnostic STATe command executes the self test routine s selected with the DIAGnostic SELect command If an error is detected during execution the routine that detected the error terminates If all of the self test routines are selected using the DIAGnostic SELect command self testing continues with execution of the next self test routine Group DIAGNOSTIC Related Commands DJ AGnostic SELect DIAGnostic RESU1t Syntax DIAGnostic STATe EXECute DG2020A Programmer Manual 2 53 Command Descriptions Arguments Examples DISPlay Group Related Commands Syntax Arguments Responses Examples 2 54 EXECute Performs the self test using the selected routine DIAGNOSTIC SELECT ALL STATE EXECUTE RESULT executes all of the self test routines After all self test routines finish the results of the self tests are returned The DISPlay query returns all the settings set using the display commands DISPLAY None DISPlay None Returns the settings as a sequence of commands suitable for sending as set commands later to restore a setup See Examples DISPLAY might return DISPLAY BRIGHTNES
98. ity gt EICIBRIC IR SIDE 5 F Ns MHZ US 7 8 9 sy E SEVen EIGHt NINO OD DEV 5 uk KHZ MS MV FOUR FiVe SK OO 1010 Ga 1 2 3 kHz ms I ONE TWO THREe C DIG C FUC da DELete L ZER gt VE POINt MINUs HZ S V S Oj enter Figure 2 2 ABSTouch arguments and associated controls Examples ALLEv Group Related Commands Syntax 2 20 ABSTOUCH SETUP displays the same setup menu that is displayed by pressing the front panel button SETUP in the MENU column on the front panel The ALLEv query dequeues all event codes and their corresponding event messages Use the ESR query to make events available for dequeuing using ALLEv query STATUS amp EVENT CLS DESE ESE ESR EVENT EVMsg EVQty SRE STB ALLEv DG2020A Programmer Manual Command Descriptions Arguments Responses Examples CLS Group Related Commands Syntax Examples DATA Group Related Commands Syntax DG2020A Programmer Manual None ALLEV lt event code gt lt event message second message gt lt event code gt lt event message second message gt ALLEV might return the string ALLEV 113 Undefined header unrecognized command QUT ELEV 420 Query UNTERMINATED The CLS common command clears SESR Standard Event Status Register the SBR Status Byte Register and the Event Queue which are used in the data generator status and event repo
99. m that reads out bit pattern data This program is provided in both C and BASIC versions putbit Transfers bit units pattern data stored in a file by the getbit program described above to DG2020A data memory This is an example of a program that writes bit pattern data getword Reads out bit patterns from the DG2020A memory in word units and displays that data on the screen Since standard output is used for data display the output can be redirected to a file for storage This is an example of a program that reads out bit pattern data putword Transfers word units pattern data stored in a file by the getword program described above to DG2020A data memory This is an example of a program that writes bit pattern data putblk Sets up a block definition section in the DG2020A data memory using data from a file prepared in advance This program presents an example of the use of the block definition command DG2020A Programmer Manual 4 1 Programming Examples putgrp putseq putsub intcom Sets up a group definition section in the DG2020A data memory using data from a file prepared in advance This program presents an example of the use of the group definition command Sets up a sequence definition section in the DG2020A data memory using data from a file prepared in advance This program presents an example of the use of the sequence definition command Sets up a subsequence definition section in the DG2020A data memory using d
100. mands DG2020A Programmer Manual The DATA SEQuence REPeat command sets the sequence step repeat count The DATA SEQuence REPeat query returns the repeat count set for the sequence step DATA DATA SEQuence EVJ DATA SEQuence EVJTO DATA SEQuence LOOP DATA SEQuence TWAIT 2 39 Command Descriptions Syntax Arguments Responses Examples DATA SEQuence REPeat lt Line Number gt lt Times gt DATA SEQuence REPeat lt Line Number gt lt Line Numbers lt NR1 gt where lt NR1 gt is the line number of the sequence step to be set lt Times gt lt NR1 gt where lt NR1 gt is a repeat count 1 to 65536 DATA SEQUENCE REPEAT lt Line Number gt lt Times gt DATA SEQUENCE REPEAT 5 8 sets the line 5 sequence step repeat count to 8 DATA SEQuence TWAIT 2 Group Related Commands Syntax Arguments Responses Examples 2 40 The DATA SEQuence TWAIT command sets the sequence step trigger wait state to on or off The DATA SEQuence TWAIT query returns the sequence step trigger wait on off state DATA DATA SEQuence EVJ DATA SEQuence EVJTO DATA SEQuence LOOP DATA SEQuence REPeat DATA SEQuence TWAIT lt Line Number gt ON OFF 1 0 DATA SEQuence TWAIT lt Line Number gt lt Line Numbers lt NR1 gt where lt NR1 gt is the line number of the sequence step to be set ON orl sets the trigger wait state to on OFF or 0 sets the trigger wait sta
101. me Group Related Commands Syntax Arguments Examples DG2020A Programmer Manual The UNLock command enables all front panel buttons and knob This command is equivalent to the command LOCk NONe SYSTEM LOCk UNLOCK ALL ALL enables the front panel buttons and knob UNLOCk ALL enables the front panel buttons and knob The UPTIme query returns the time elapsed since the data generator was powered on SYSTEM None UPTime None UPTIME 7 016 indicates the instrument has been powered on for 7 016 hours 2 109 Command Descriptions VERBose Group Related Commands Syntax Arguments Responses Examples 2 110 The VERBose command selects the long headers or the short headers to be returned with response messages Longer response headers enhance readability for other programmers shorter response headers provide faster bus transfer speed SYSTEM HEADer VERBose ON OFF lt NR1 gt VERBose ON or nonzero value selects long response header OFF or zero value selects short response header Responses are decimal numbers lt NR1 gt and are defined as follows 1 Long header is currently selected 0 Short header is currently selected VERBOSE ON sets long header for query responses VERBOSE might return VERBOSE 1 which indicates that the long response header is currently selected DG2020A Programmer Manual Command Descriptions WAI The WAI co
102. ment control but it is easy to connect to and can be used with a low cost controller Table 1 1 compares the GPIB and RS 232 C interface Table 1 1 GPIB and RS 232 C comparison Operating attribute GPIB RS 232 C Cable ANSI IEEE Std 488 9 wire DCE Data flow control Hardware 3 wire handshake Flagging soft XON XOFF hard DTR CTS Data format 8 bit parallel 8 bit serial Interface control Operator low level control None message Interface messages Most ANSI IEEE Std 488 Device clear via ASCII break signal Interrupts reported Message termination Receive Service requests status and event code Hardware EOI software LF or both Status and event code no service requests Software CR LF or CR and LF Message termination Hardware EOI and software Software LF Transmit LF Timing Asynchronous Asynchronous Transmission path length lt 2 meters between devices lt 15 meters lt 20 meters total cabling for GPIB system Speed 200 Kbytes sec 19 200 bits sec System environment Multiple devices lt 15 Single terminal point to point connection DG2020A Programmer Manual Getting Started Installing for GPIB Communication With the power off connect a GPIB cable from the GPIB controller to the ANSI IEEE Std 488 port GPIB connector on the rear panel of the data generator see Figure 1 2 For example when using an MS DOS compatible controller connect the GPIB cable between the Nati
103. mmands Syntax Arguments Examples The DATA SUBSequence DEL ete command deletes the specified sub sequence step DATA DATA SUBSequence ADD DATA SUBSequence CLEAr DATA SUBSequence DEFine DATA SUBSequence DELete ALL DATA SUBSequence DELete lt SName gt lt Line Number gt lt SName gt lt String gt where lt String gt is a sub sequence name surrounded in double or single C quotes lt Line Numbers lt NR1 gt where lt NR1 gt is the line number of the sequence step to be deleted DATA SUBSEQUENCE DELETE SUB2 7 deletes the line 7 sub sequence step named SUB2 DATA SUBSequence DELete ALL Group Related Commands Syntax Arguments DG2020A Programmer Manual The DATA SUBSequence DELete ALL command deletes the specified sub sequence definitions DATA DATA SUBSequence ADD DATA SUBSequence CLEAr DATA SUBSequence DEFine DATA SUBSequence DELete DATA SUBSequence DELete ALL lt SName gt lt SName gt lt String gt where lt String gt is a sub sequence name surrounded in double or single C quotes 2 43 Command Descriptions Examples DATA SUBSEQUENCE DELETE ALL SUB1 deletes the sub sequence definition named SUBI DATA SUBSequence REPeat Group Related Commands Syntax Arguments Responses Examples 2 44 The DATA SUBSequence REPeat command sets the sub sequence step repeat count The DATA SUBSequence REPeat que
104. mmon command prevents the data generator from executing any further commands or queries until all pending operations are completed Group SYNCHRONIZATION Related Commands 0PC Syntax WAI Arguments None Examples WAI prevents the execution of any commands or queries until all pending operations complete DG2020A Programmer Manual 2 111 Command Descriptions 2 112 DG2020A Programmer Manual EEE Ne SES ES Retrieving Response Messages The method used for retrieving response messages differs depending on whether a GPIB interface or an RS 232 C interface is used Figures 2 3 and 2 4 give an overview of these methods Controller DG2020A Data Generator Query Command execution controller Queuing Retrieve operation Output Output queue queue controller Response message Figure 2 3 GPIB Retrieving response messages Controller DG2020A Data Generator Query Command execution controller Output buffer Response message Figure 2 4 RS 232 C Retrieving response messages DG2020A Programmer Manual 2 113 Retrieving Response Messages 2 114 Figure 2 3 shows the response message retrieval operation when a GPIB interface is used When a query command is sent from the external controller the data generator puts the response message for the query on the output queue This response message cannot be retrieved unless the user performs a retrieval operation throu
105. nction operates The DISPlay DIMmer query returns the on off state of the screen dimmer function When the dimmer function is on if no front panel controls are used for about 10 minutes the screen brightness is lowered automatically DISPLAY DISPlay DISPlay DIMmer ON OFF 1 0 DISPlay DIMmer ON or 1 enables the dimmer function OFF or 0 clears the dimmer function DISPLAY DIMMER 1 0 DISPLAY DIMMER ON turns the dimmer function on DG2020A Programmer Manual Command Descriptions DISPlay ENABle 2 Group Related Commands Syntax Arguments Responses Examples DISPlay MENU Group Related Commands Syntax Arguments Responses DG2020A Programmer Manual The DISPlay ENABle command turns the display on or off When security is turned on once the display is set to off it cannot be turned on again The DISPlay ENABle query returns the on off state of the display DISPLAY DISPlay DISPlay MENU STATe DISPlay ENABle ON OFF 1 0 DISPlay ENABle ON or 1 turns the display on OFF or 0 turns the display off DISPLAY ENABLE 1 0 DISPLAY ENABLE OFF turns the display off The DISPlay MENU query returns the type and display state of the selected menu DISPLAY DISPlay DISPlay MENU NAME DISPlay MENU NAME DISPlay MENU None DISPLAY MENU NAME SETUP EDIT APPLICATION UTIL ITY STATE 1 0 2 57 Command Descriptions Example
106. nd and query form of the command can be used Tables 2 4 through 2 14 describe each command in each of the 11 functional groups The DATA commands are used to define blocks groups and sequences to set up pattern data and to set which sequence controls become valid when the run mode is set to Enhanced Table 2 4 DATA commands Header Description DATA Query the settings related to pattern data DATA BLOCK ADD Add a block definition DATA BLOCk DEFine Set the block definitions DATA BLOCk DELete Delete a block definition DATA BLOCk DELete ALL Delete all block definitions DATA BLOCk REName Change a block name DATA BLOCk SIZe Change the size of a block DATA GROUp ADD Add a group definition DATA GROUp BIT Change a groups bit structure DATA GROUp DEFine Sets the group definitions DATA GROUp DELete Delete a group definition DATA GROUp DELete ALL Delete all group definitions DATA GROUp NAME Query the name of a group DATA GROUp REName Change a group name DATA MSIZe Set the pattern data memory size 2 11 Command Groups DIAGNOSTIC Commands Table 2 4 DATA commands Cont Header DATA PATTern BIT Description Set individual pattern data bits DATA PATTern WORD 2 Set pattern data in word units DATA SEQuence ADD DATA SEQuence DEFine DATA SEQuence DELete DATA SEQuence DELete ALL Add a sequence step Set the sequence definitions Delete a se
107. ne 3 sequence step DATA SEQuence DELete ALL The DATA SEQuence DELete ALL command deletes all sequence definitions Group DATA Related Commands __ DATA SEQuence ADD DATA SEQuence DEFine DATA SEQuence DELete Syntax DATA SEQuence DELete ALL Arguments None 2 36 DG2020A Programmer Manual Command Descriptions DATA SEQuence EVJ 2 Group Related Commands Syntax Arguments Responses Examples DG2020A Programmer Manual The DATA SEQuence EVJ command sets the sequence step event jump to on or off The DATA SEQuence EVJ query returns the sequence step event jump on off state DATA DATA SEQuence EVJTO DATA SEQuence LOOP DATA SEQuence REPeat DATA SEQuence TWAIT DATA SEQuence EVJ lt Line Number gt ON OFF 1 0 DATA SEQuence EVJ lt Line Number gt lt Line Numbers lt NR1 gt where lt NR1 gt is the line number of the sequence step to be set ON orl sets the event jump to on OFF or 0 sets the event jump to off DATA SEQUENCE EVJ lt Line Number gt 1 0 DATA SEQUENCE EVJ 8 0N sets the event jump state for the line 8 sequence step to on 2 37 Command Descriptions DATA SEQuence EVJTO The DATA SEQuence EVJTO command sets the sequence step event jump destination The DATA SEQuence EVJTO query returns the event jump destination set for the sequence step Group DATA Related Commands DATA SEQuence EVJ DATA SEQuence LOOP DATA SEQu
108. nsfer until the listening device is ready to receive the next data byte m Source Handshake SH Allows a talking device to help coordinate the proper transfer of data The SH function controls the initiation and termina tion of the transfer of data bytes C 1 Appendix C Interface Specification Interface Messages Listener L Allows a device to receive device dependent data over the interface This capability exists only when the device is addressed to listen This function uses a one byte address Talker T Allows a device to send device dependent data over the interface This capability exists only when the device is addressed to talk The function uses a one byte address Device Clear DC Allows a device to be cleared or initialized either individually or as part of a group of devices Remote Local RL Allows a device to select between two sources for operating control This function determines whether input information from the front panel controls local or GPIB commands remote control the data generator Service Request SR Allows a device to request service from the controller Controller C Allows a device with the capability to send the device address universal commands and addressed commands to other device over the interface to do so Electrical Interface E Identifies the type of the electrical interface The notation E1 indicates the electrical interface uses open collector drivers while E
109. ny data other than one of the above lt code decimal display gt e g a code value of 80 hexadecimal would be displayed as lt 128 gt Group SYSTEM Related Commands DEBug DEBug SNOop DEBug SNOop DELAy DEBug SNOop TIME Syntax DEBug SNOop STATe ON OFF lt NR1 gt DEBug SNOop STATe Arguments ON or nonzero value enables the debugging function OFF or zero value clears the debugging function DG2020A Programmer Manual 2 49 Command Descriptions Responses Examples DESE Group Related Commands Syntax Arguments Examples 2 50 1 the debugging function is currently set 0 the debugging function is currently cleared DEBUG SNOOP STATE ON enables the debugging function The DESE command sets the bits of the DESER Device Event Status Enable Register used in the status and event reporting system of the data generator The DESE query returns the contents of the DESER Refer to Section 3 Status and Events for more information about DESE The power on default for the DESER is to set all bits to 1 if the power on status flag is TRUE If this flag is set to FALSE the DESER maintains its current value through a power cycle STATUS amp EVENT CLS ESE ESR EVENT EVMsg EVQty SRE STB DESE lt Bit Value gt DESE lt Bit Value gt lt NR1 gt where lt NR1 gt is a decimal integer which must range from 0 to 255 that sets the DESER bits to its binary equival
110. o 500 mV The OUTPut ILEVel command sets the pod high impedance control input inhibit input threshold level An error is issued if the pod is not a variable level pod The OUTPut ILEVel query returns the pod high impedance control input threshold level setting OUTPUT OUTPut ILEVel lt Volt gt OUTPut ILEVel lt Volt gt lt NR2 gt lt Unit gt where lt Unit gt V mV with a range of 5 0 V to 5 0 V in 0 1 V steps OUTPUT ILEVEL lt Volt gt DG2020A Programmer Manual Command Descriptions Examples OUTPUT ILEVEL 300mV sets the high impedance control input threshold level to 300 mV OUTPut POD lt s gt CH lt n gt ASSIGn Group Related Commands Syntax Arguments Responses Examples The OUTPut POD lt s gt CH lt n gt ASSIGn command assigns a data bit to the specified channel of the specified pod The OUTPut POD lt s gt CH lt n gt ASSIGn query returns the data bit assigned to the specified channel of the specified pod A bit number of 1 is returned if no data bit is assigned to the channel OUTPUT OUTPut POD lt s gt CH lt n gt RELEase OUTPut POD lt s gt DEFine OUTPut POD lt s gt CH lt n gt ASSIGn lt Bit gt OUTPut POD lt s gt CH lt n gt ASSIGn lt s gt A B C lt n gt 0to 11 lt Bit gt lt NR1 gt where lt NR1 gt is a data bit number 0 to 35 OUTPUT POD lt s gt CH lt n gt ASSIGN lt Bit gt OUTPUT PODA CH5 ASSIG
111. of three numeric representations NR1 NR2 or NR3 This definition complies with that found in ANSI IEEE Std 488 2 1987 Any commands that use arguments in any of the the first three notations can use a fourth notation NRf for Numerical Representation flexible The four formats are shown in Table 2 2 Table 2 2 Decimal numeric notation NR1 implicit point integer 1 8 2 10 20 explicit point unscaled 1 2 23 5 0 15 fixed point NR3 explicit point scaled floating point 1E 2 3 36E 2 1 02E 3 NRf numeric representation flexible any of 1 23 5 1 02E 3 NR1 NR2 and NR3 may be used NR2 As just implied you can use NRf notation for arguments in your programs for any commands that this manual lists as using any of NR1 NR2 or NR3 notation in its arguments Be aware however that query response will still be in the format specified in the command For example if the command description is DESE lt NR1 gt you can substitute NR2 or NR3 when using the command in a program However if you use the query DESE the data generator will respond in the format lt NR1 gt to match the command description in this manual If the decimal numeric argument refers to a voltage or frequency you can express it using SI units instead of in the scaled explicit point input value format lt NR3 gt SI units are units that conform to the Systeme International d Unites standard For example you can use the input forma
112. ommand Descriptions DATA SUBSequence DEFine The DATA SUBSequence DEE ne command sets up all of the sub sequence definition section information in ASCII The DATA SUBSquence DEFine query returns all of the sub sequence definition section information Group DATA Related Commands DATA SUBSequence ADD DATA SUBSequence CLEAr DATA SUBSequence DELete DATA SUBSequence DELete ALL Syntax DATA SUBSequence DEFine lt Subseq Block gt DATA SUBSequence DEFine Arguments lt Subseq Block gt lt blockhead er gt lt SName gt lt Step gt lt Step gt lt LF gt lt SName gt lt Step gt lt Step gt Arbitrary block data for the sequence definition where lt Step gt lt AName gt lt ARepeat gt The items in lt Step gt are ASCII character strings that express the following information lt SName gt the sub sequence name with no quotation marks lt AName gt the block name with no quotation marks lt ARepeat gt repeat count 1 to 65536 lt LF gt lt ASCII line feed code 10 gt Responses DATA SUBSEQUENCE DEFINE lt Subseq Block gt where lt Subseq Block gt is a data block with the same format as the argument Examples DATA SUBSEQUENCE DEFINE 233SUB1 B1 16 B2 32 lt LF gt SUB2 B3 2 B4 3 defines a two step sub sequence that consists of the two sub sequences SUB1 and SUB2 2 42 DG2020A Programmer Manual Command Descriptions DATA SUBSequence DELete Group Related Co
113. ommand or query command or it will lose responses to earlier queries If a command or query command is given without taking it out an error results and the Output Queue is emptied Event Queue The Event Queue is a FIFO queue which can hold up to 20 data generator gener ated events When the number of events exceeds 20 the 20 event is replaced by the event code 350 Queue overflow To read out from the Event Queue do the following steps 1 Send ESR To read out the contents of SESR When the contents of SESR are read out SESR is cleared allowing you to take out events from the Event Queue DG2020A Programmer Manual 3 5 Status and Event Reporting 2 Send one of the following queries m ALLEv To read out and returns all events made available by ESR Returns both the event code and message text EVENT To read out and return the oldest event of those made available by ESR Returns only the event code m EVMsg To read out and return the oldest event of those made available by ESR Returns both the event code and message text Reading the SESR erases any events that were made available by previous ESR reads but that were not read from the Event Queue Events that occur after an ESR read are put in the Event Queue but are not available until ESR is used again Processing Sequence Figure 3 6 shows the status and event processing flow 1 An event occurs which causes the DESR to be checked Based on th
114. ommands Cont Header TRIGger IMPedance Description Select the impedance presented to the the external trigger signal TRIGger LEVel 71 Set the level of the external trigger signal that generates the triggering event TRIGger SLOPe Select the slope of the external signal that generates a triggering event OUTPUT Commands The OUTPUT commands set all the pod related settings The lt s gt and lt n gt terms in the header mnemonic are used to specify the pod and channel in these commands Table 2 10 OUTPUT commands Header OUTPut Description Query the settings related to the output channels and clock OUTPut ELEVel 7 OUTPut ILEVel 2 OUTPut POD lt s gt CH lt n gt ASSIGn Set the event input level Set the inhibit input level Set the pod data bit assignments OUTPut POD lt s gt CH lt n gt DELAy Set the pod delay times OUTPut POD lt s gt CH lt n gt HIGH OUTPut POD lt s gt CH lt n gt INHibit OUTPut POD lt s gt CH lt n gt LOW Set the pod high level output voltage Set the pod high impedance control method Set the pod low level output voltage OUTPut POD lt s gt CH lt n gt RELEase OUTPut POD lt s gt DEFine OUTPut POD lt s gt TYPE DG2020A Programmer Manual Clear the pod data bit assignments Set pod data bit assignments Query the pod type Command Groups SOURCE Commands STATUS amp EVENT Commands 2 16
115. on page 3 12 0 LSB 3 2 DDE Device Dependent Error Indicates that a device specific error occurred Device error messages are listed in Table 3 7 on page 3 14 QYE Query Error Indicates that an error occurred upon attempting to read the output queue Such an error occurs for one of the following two reasons An attempt was made to retrieve a message from the output queue even through it is empty or pending Output queue message was cleared while it was being retrieved from the output queue RQC Request Control The data generator does not use this bit Request Control RQC is used to show that an instrument has requested to transfer bus control back to the controller This is the usage prescribed by the IEEE Std 488 1 OPC Operation Complete Indicates that the operation is complete This bit is set when all pending operations complete following a OPC command DG2020A Programmer Manual Status and Event Reporting The Status Byte Register SBR shown in Figure 3 2 records whether output is available in the Output Queue whether the data generator requests service and whether the SESR has recorded any events Use a Serial Poll or the STB query to read the contents of the SBR The bits in the SBR are set and cleared depending on the contents of the SESR the Event Status Enable Register ESER and the Output Queue When you use a Serial Poll to obtain the SBR bit 6 is the RQS bit When you use the
116. onal Instrument PC2A GPIB board and the data generator GPIB connector OI Ie lt Q S GPIB Connector LO 9 CALIBRATION Figure 1 2 GPIB connector Instruments can be connected to the GPIB in linear or star configurations or in a combination of both configurations A linear hookup is one where a GPIB cable is used to string one device to a second and then another GPIB cable is used to string from a second to a third and so on until all devices in the system are connected A star setup is one where one end of all the GPIB cables in the system are attached to one device Refer to Figure 1 3 for these GPIB system configurations DG2020A Programmer Manual 1 3 Getting Started Restrictions a Star Configuration 7 Linear Configuration igi Combination of Star and Linear Configurations EN Figure 1 3 GPIB system configurations Consider the following rules when distributing instruments on the GPIB 1 No more than 15 total devices including the controller can be included on a signal bus In order to maintain the electrical characteristics of the bus one device load must be connected for every two meters of cable most often each dev
117. ons to set the error check bit for each character The error bit can be set to None Even or Odd parity 6 Select the Stop Bits item from the Serial menu using the up and down arrow buttons Then use the left and right arrow buttons to select the number of stop bits sent after each character The number of stop bits can be set to either 1 or 2 7 Select the Handshake item from the Serial menu using the up and down arrow buttons Then use the left and right arrow buttons to select the method of controlling the flow of data between devices The data flow method can be set to Hard DTR CTS Soft XON XOFF and Off no flow control 8 Select the Remote Port item using the up and down arrow buttons and additionally highlight RS232C using the left and right arrow buttons This selects the RS 232 C interface as the remote interface Remote Port RS23 System GPIB Confiqure Address SEE Factory Serial Baudrate Data Bits 8 Parity S Security Serial Menu uge Immediate Stop Bits Handshake Power up Pause Date Time Figure 1 9 RS 232 C parameter settings DG2020A Programmer Manual 1 9 Getting Started 1 10 DG2020A Programmer Manual Fenes ny Command Syntax A large set of commands can be used to control the operations and functions of the data generator from an external controller This section describes the syntax and communication rules for using these commands to operate the data generator
118. put signal INH Responses OUTPUT POD lt s gt CH lt n gt INHIBIT 0 1 2 3 Examples OUTPUT PODA CH6 INHIBIT EXTERNAL sets the output impedance of pod A channel 6 to be controlled by an external input signal INH DG2020A Programmer Manual 2 89 Command Descriptions OUTPut POD lt s gt CH lt n gt LOW 2 90 Group Related Commands Syntax Arguments Responses Examples The OUTPut POD lt s gt CH lt n gt LOW command sets the low level output voltage for the specified channel of the specified pod This command is only valid for variable level pods The OUTPut POD lt s gt CH lt n gt LOW query returns the low level output voltage setting for the specified channel of the specified pod OUTPUT OUTPut POD lt s gt CH lt n gt HIGH OUTPut POD lt s gt CH lt n gt LOW lt Volt gt OUTPut POD lt s gt CH lt n gt LOW lt s gt A B C lt n gt 0to 11 lt Volt gt lt NR2 gt lt Unit gt where lt NR2 gt combined with lt Unit gt specifies a low level voltage and lt Unit gt V mV for volt or millivolt OUTPUT POD lt s gt CH lt n gt LOW lt Volt gt OUTPUT PODC CH7 LOW 1V sets the pod C channel 7 low level output voltage to 1 V DG2020A Programmer Manual Command Descriptions OUTPut POD lt s gt CH lt n gt RELEase Group Related Commands Syntax Arguments Examples The OUTPut POD lt s gt CH lt n gt RELEase
119. quence step Delete all sequence definitions DATA SEQuence EVJ DATA SEQuence EVJTO DATA SEQuence LOOP DATA SEQuence REPeat Set the event jump on off state Set the event jump destination Set the infinite loop on off state Set the repeat count DATA SEQuence TWAIT Set the trigger wait on off state DATA SUBSequence ADD Add a sub sequence step DATA SEBSequence CLEAr Delete all sub sequence definitions DATA SUBSequence DEFine Set or query the sub sequence definitions DATA SUBSequence DELete Delete a sub sequence step DATA SUBSequence DELete ALL Delete a sub sequence definition DATA SUBSequence REPeat Set or query the repeat count of a sub se DATA UPDate quence step Forcibly update the pattern and other data The DIAGNOSTIC commands select and execute the self test routines which are classified by function Table 2 5 DIAGNOSTIC commands Header Description DIAGnostic Query all current settings related to self test DIAGnostic RESUIt Query self test result DIAGnostic SELect Select self test routine DIAGnostic STATe TST Perform self test Perform self test DG2020A Programmer Manual Command Groups DISPLAY Commands The DISPLAY commands execute functions associated with front panel keys buttons and knobs adjust the screen brightness and perform other display related functions Table 2 6 DISPLAY commands Header ABSTouch D
120. rgument gt such as RST The common commands are defined by IEEE Std 488 2 and are common to all devices which support IEEE Std 488 2 on the GPIB bus Common Query Header A command that precedes its header mnemonic with an asterisk and follows it with a question mark Its message format is lt Header Mnemonic gt lt Argument gt lt Argument gt such as IDN The common commands are defined by IEEE Std 488 2 and are common to all devices which support the IEEE Std 488 2 on the GPIB bus Concatenating Commands BLOCK Most of the compound command headers are in a tree structure The tree structure of an example command is diagrammed below Note that the top of the structure always begins with a colon DATA GROUP MSIZE PATTERN SEQUENCE UPDATE ee a T a ac T sn nen Fl 2 8 DEFINE DELETE DEFINE WORD ADD DEFINE DELETE The following example of a compound command combines three headers delimited by semicolons DATA BLOCK ADD 512 BLOCK3 DATA BLOCK DELETE BLOCK2 DATA BLOCK SIZE BLOCK1 512 You must include the complete path in each header when there is no common complete path to the start of the tree structure the colon However note that part of each header in the above example has a common path DATA BLOCK You DG2020A Programmer Manual Command Syntax may shorten compound command structures with such headers For example the command above may be rewritten a
121. ring gt is the name of the new current working directory MMEMORY CDIRECTORY lt Directory Path gt MMEMORY CDIRECTORY DG WORK3 changes the current working directory to DG WORK3 DG2020A Programmer Manual Command Descriptions MMEMory COPY The MMEMory COPY command copies a file on the disk and creates a new file If the copy destination file already exists an error is issued and the existing file is not overwritten Group MEMORY Related Commands MMEMory DELete ALL MMEMory DELete NAME Syntax MMEMory COPY lt From path gt lt To path gt Arguments lt From path gt lt string gt where lt string gt is the path name of the source file lt To path gt lt string gt where lt string gt is the path name of the destination file Examples MMEMORY COPY MYDATA PDA MYWORK PDA copies the file MYDATA PDA in the current directory and creates a new file MYWORK PDA in the current directory MMEMory DELete ALL The MMEMory DELete ALL command deletes all files and subdirectories in the current directory However non empty subdirectories are not deleted Group MEMORY Related Commands MMEMory DELete NAME Syntax MMEMory DELete ALL Arguments None Examples MMEMORY DELETE ALL deletes all files and empty subdirectories in the current directory DG2020A Programmer Manual 2 75 Command Descriptions MMEMory DELete NAME Group Related Commands Syntax Arguments Examples
122. rom a file in a unique format This command has the following syntax with the input data file name being specified as a parameter putbit filename The contents of the input file must express the data length start address and bit number parameters as well as the bit data itself in ASCII text Each parameter must appear on a separate line and start with a number sign character Bit data is expressed as a sequence of the characters 1 and 0 representing the bit values This format is the same format as that produced by redirecting the output of the getbit program The file patbit dat is a sample data file in this format Input format checking has been dispensed with to make this sample program easier to understand This program may not operate correctly if the format of the input file is not correct Getword This program reads out bit pattern data from DG2020A data memory in word units and displays that data on the screen The start address for the read and the number of words are specified as command line arguments in decimal separated by a space This command has the following syntax getword address length The program displays the memory size and the starting address parameters and then the bit pattern data for those parameters The parameters are displayed starting with a number sign character each on its own line The bit pattern data is displayed as 36 bit words of 5 bytes each with each byte displayed in hexadecimal The byte
123. rting system For more details refer to Section 3 Status and Events STATUS amp EVENT DESE ESE ESR EVENT EVMsg EVQty SRE STB CLS CLS clears the SESR the SBR and the Event Queue The DATA query returns the setting states related to the pattern data DATA OUTPut DATA 2 21 Command Descriptions Examples DATA BLOCk ADD Group Related Commands Syntax Arguments Examples 2 22 DATA might return DATA MSIZE378 BLOCK DEFINE 2440 BLOCK_1 lt LF gt 99 BLOCK 2 lt LF gt 189 BLOCK 3 lt LF gt 288 BLOCK 4 DATA SUBSEQUENCE DEFINE 217UNNAMED 1 DATA SEQUENCE DEFINE 271BLOCK_1 1 0 1 0 0 lt LF gt BLOCK 2 1 0 0 1 0 lt LF gt BLOCK 3 1 0 0 0 0 lt LF gt BLOCK 4 1 0 0 0 DATA GROUP DEFINE 279 DATA7 7 7 lt LF gt DATA6 6 6 lt LF gt DATA5 5 5 lt LF gt DATA4 4 4 lt LF gt DATA3 3 3 lt LF gt DATA2 2 2 lt LF gt DATA1 1 1 lt LF gt DATA0 0 0 The DATA BLOCk ADD command adds a block This results in one new block being defined in the block definition section DATA DATA BLOCk DEFine DATA BLOCk DELete DATA BLOCK DEL ete ALL DATA BLOCk REName DATA BLOCk SIZe DATA BLOCK ADD lt Position gt lt Name gt lt Position gt lt NRI gt where lt NR1 gt is the start position of the added block lt Name gt lt string gt where lt string gt is the name of the added block DATA BLOCK ADD 512 BLOCK1 adds a block starting at address 512 named BLOCK1 DG2020A Progr
124. rument to the start state If the run mode is set to repeat or step pattern data or sequence output starts If the run mode is set to single then the instrument goes to the trigger wait state MODE RUNNing STOP TRG STARt None START sets the instrument to the start state The STB common query returns the value of the SBR Status Byte Register Bit 6 of the SBR is read as a MSS Master Status Summary bit Refer to Section 3 Status and Events for more details on the SBR STATUS amp EVENT CLS DESE ESE ESR EVENT EVMsg EVOtY SRE STE None lt NR1 gt which is a decimal number STB might return 96 which indicates that the SBR contains the binary number 01100000 2 101 Command Descriptions STOP Group Related Commands Syntax Arguments Examples SYSTem DATE 2 Group Related Commands Syntax Arguments Responses Examples 2 102 The STOP command stops pattern data or sequence output If the run mode is set to single the trigger wait state is cancelled MODE RUNNing STARt TRG STOP None STOP stops pattern data or sequence output The SYSTem DATE command sets the internal clock date The SYSTem DATE query returns the internal clock date SYSTEM SYSTem TIME SYSTem DATE lt Year gt lt Month gt lt Day gt SYSTem DATE lt Year gt lt NR1 gt the year lt Month gt lt NR1 gt the month lt Day gt lt NR1 gt the
125. ry returns the repeat count set for the sub sequence step DATA None DATA SUBSequence REPeat lt SName gt lt Line Number gt lt Times gt DATA SUBSequence REPeat lt SName gt lt Line Number gt lt SName gt lt String gt where lt String gt is a sub sequence name surrounded in double or single quotes lt Line Numbers lt NR1 gt where lt NR1 gt is the line number of the sequence step to be set lt Times gt lt NR1 gt where lt NR1 gt is a repeat count 1 to 65536 DATA SUBSEQUENCE REPEAT lt SName gt lt Line Number gt lt Times gt DATA SUBSEQUENCE REPEAT SUB1 5 8 sets the line 5 sequence step repeat count in the sub sequence named SUB1 to 8 DG2020A Programmer Manual Command Descriptions DATA UPDate Group Related Commands Syntax Arguments DEBug Group Related Commands Syntax Arguments Responses Examples DG2020A Programmer Manual The DATA UPDate command transfers the contents of data memory to pattern generation memory so that the output reflects the most recent data This command is only valid when the mode is set to manual mode The processing performed by this command is executed automatically if any data changes when the instrument is in automatic mode DATA DATA UPDate None The DEBug query returns all current settings for the remote command debugging function This query is equivalent to the DEBug SNOop query SYSTEM
126. s DISPlay MENU might return DISPLAY MENU NAME SETUP STATE 1 DISPIay MENU NAME The DISPlay MENU NAME command selects the menu to be displayed on the screen Group DISPLAY Related Commands DISPlay DISPlay MENU DISPlay MENU NAME Syntax DISPlay MENU NAME SETUp EDIT APPLication UTILity Arguments SETUp displays the setup menu EDIT displays the edit menu APPLication displays the application menu UTILity displays the utility menu Examples DISPLAY MENU NAME UTILITY selects the UTILITY menu 2 58 DG2020A Programmer Manual Command Descriptions DISPlay MENU NAME Group Related Commands Syntax Arguments Responses Examples The DISPlay MENU NAME query returns the type of the selected menu DISPLAY DISPlay DISPlay MENU DISPlay MENU L NAME DISPlay MENU NAME None DISPLAY MENU NAME SETUP EDIT APPLICATION UTILITY DISPlay MENU NAME might return DISPLAY MENU NAME EDIT DISPlay MENU STATe Group Related Commands Syntax Arguments Responses Examples DG2020A Programmer Manual The DISPlay MENU STATe command sets whether or not menus are displayed on the screen The DISPlay MENU STATE query returns whether or not menus are displayed on the screen This command is equivalent to the DISPlay ENABle command DISPLAY DISPlay DISPlay ENABle DISPlay MENU DISPlay MENU NAME DISPlay MENU STATe ON OFF 1 0 DISPlay MENU STATe ON or 1 O
127. s 3 2 Status byte register SBR ccc cece eee eens 3 3 Device event status enable register DESER 3 4 event status enable register ESER 3 4 Service request enable register SRER 3 5 Status and event handling process overview 3 7 Table of Contents List of Tables Table 1 1 GPIB and RS 232 C comparison eeee0 1 2 Table 2 1 BNF symbols and meanings ceceececceees 2 1 Table 2 2 Decimal numeric notation cecc eee 2 4 Table 2 3 Header in query responses eee cece cece 2 9 Table 2 4 DATA commands cece eee 2 11 Table 2 5 DIAGNOSTIC commands cecceceeceees 2 12 Table 2 6 DISPLAY commands cccceccccecscceces 2 13 Table 2 7 HARDCOPY commands c ceccecseceees 2 13 Table 2 8 MEMORY commands ccccececcscscceces 2 14 Table 2 9 MODE commands s s s e eee 2 14 Table 2 10 OUTPUT commands c e x x eee 2 15 Table 2 11 SOURCE commands c e e eee 2 16 Table 2 12 STATUS amp EVENT commands e008 2 16 Table 2 13 SYNCHRONIZATION commands 4 2 17 Table 2 14 SYSTEM commands cccceccccscscceces 2 17 Table 3 1 SESR bit functions ccc cece cece cere eens 3 2 Table 3 2 SBR bit functions cece cece ee ew ee ee eens 3 3 Table 3 3 Definition of event codes cc cece cece renee 3 9 T
128. s follows DATA BLOCK ADD 512 BLOCK3 DELETE BLOCK2 SIZE BLOCK1 512 Note that the mnemonics DATA and BLOCK are assumed from the first header by the headers that follow The following command descriptions are valid examples of commands shortened using the principle just described Note that the insertion of common command SRE between headers does not prevent the headers that follow from assuming the earlier header mnemonics DATA BLOCK ADD 512 BLOCK3 DELETE BLOCK2 DATA GROUP DELETE GROUP4 DATA MSIZE 16384 BLOCK ADD 512 BLOCK3 DELETE BLOCK2 DATA BLOCK ADD 512 BLOCK3 SRE DELETE BLOCK2 SIZE BLOCK1 512 The following examples have been shortened incorrectly and cause errors DATA BLOCK DELETE BLOCK2 DATA GROUP DELETE GROUP4 DATA BLOCK ADD 512 BLOCK3 GROUP DELETE GROUP4 DATA BLOCK DELETE BLOCK2 MSIZE 16384 Query Responses The query causes the data generator to return information about its status or settings A few queries also initiate an operation action before returning information for instance the TST query performs the self test If the programmer has enabled headers to be returned with query responses the data generator formats a query response like the equivalent set command header followed by its argument s When headers are turned off for query responses only the values are returned Table 2 3 shows the difference in query responses Table 2 3 Header in query r
129. s of each word are displayed on a single line starting with the most significant byte Only the lower 4 bits are used in the most significant byte The listing below shows the output for reading out the words from addresses 0 to 64 size 64 start 0 00 00 00 00 00 00 00 00 00 08 08 00 00 00 00 00 00 00 00 0c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Since the result is displayed on standard output the data can be saved by redirecting the output to a file This file can be used as an input to the putword program described below DG2020A Programmer Manual 4 7 Programming Examples 4 8 Putword Putgrp Putbik This program sends bit pattern data to the DG2020A data memory in word units Data input is from a file in a unique format This command has the following syntax with the input data file name being specified as a parameter putword filename The contents of the input file must express the data length and start address parameters as well as the bit pattern data itself in ASCII text Each parameter must appear on a separate line and start with a number sign character The bit pattern data is expressed as 36 bit words of 5 bytes each starting with the most significant byte with each byte expressed in hexadecimal newline character is required for each data word This format is the same format as that produced by redirecting the output of the getword program See the patword dat sample data file
130. st commands have both a set form and query form The query form of a command is the same as the set form except that the query form ends with a question mark Figure 2 1 shows a flowchart of the structure of the commands and queries The structure of the header is described in detail in Header on page 2 6 Command 2 O Head Query eader y Header Mnemonic Command Figure 2 1 Command and query structure flowchart The program can be described using the American Standard Code for Informa tion Interchange ASCII character encoding This seven bit ASCII code is used for the majority of syntactic elements and semantic definitions In special cases an eight bit ASCII Code is allowed in the arbitrary block arguments described on page 2 5 The ASCII code character set table is found in Appendix A DG2020A Programmer Manual Command Syntax Syntactic Delimiters White Space Special Characters DG2020A Programmer Manual Syntactic elements in a program message unit are delimited differentiated with colons white space commas or semicolons Colon Typically delimits the compound command header MMEMORY DELETE ALL SOURCE OSCILLATOR SOURCE White Space Typically delimits command query headers from the argument DIAGNOSTIC SELECT ALL SYSTEM DATE 1995 3 4 DIAGNOSTIC SELECT and SYSTEM DATE are the command headers and ALL and 1995 3 4
131. t NOTE A file size of 0 is returned for subdirectories MMEMory CATalog ORDer Group Related Commands Syntax Arguments DG2020A Programmer Manual The MMEMory CATalog ORDer command sets the display order for file informa tion in disk directory listings The MMEMory CATalog ORDer query returns the display order for file information in disk directory listings MEMORY MMEMory CATalog ALL 7 MMEMory CATalog ORDer NAME1 NAME2 TIME1 TIME2 MMEMory CATalog ORDer NAME1 orders the display according to the ASCII collating sequence of the file names 2 73 Command Descriptions Responses Examples NAME2 orders the display in the reverse order of the NAME1 order TIME1 orders the display with older Date and Time files first TIME2 orders the display with more recent Date and Time files first MMEMORY CATALOG ORDER NAME1 NAME2 TIME1 TIME2 MMEMORY CATALOG ORDER NAME1 sets the order of file information recorded in disk directory listings to alphabeti cal order by file name MMEMory CDIRectory Group Related Commands Syntax Arguments Responses Examples 2 74 The MMEMory CDIRectory command changes the current working directory The MMEMory CDIRectory query returns the current working directory path MEMORY MMEMory MDIRectory MMEMory CDIRectory lt Directory Path gt MMEMory CDIRectory lt Directory Path gt lt string gt where lt st
132. t CH lt n gt LOW OUTPut POD lt s gt CH lt n gt HIGH lt Volt gt OUTPut POD lt s gt CH lt n gt HIGH lt s gt A B C lt n gt 0to 11 lt Volt gt lt NR2 gt lt Unit gt where lt NR2 gt combined with lt Unit gt specifies a high level voltage and lt Unit gt V mV for volt or millivolt OUTPUT POD lt s gt CH lt n gt HIGH lt Volt gt OUTPUT PODA CH11 HIGH 1V sets the pod A channel 11 high level output voltage to 1 V DG2020A Programmer Manual Command Descriptions OUTPut POD lt s gt CH lt n gt INHibit The OUTPut POD lt s gt CH lt n gt INHibit command sets the control method for the output impedance of the specified channel of the specified pod The OUT Put POD lt s gt CH lt n gt INHibit query returns the control method currently used for the output impedance of the pod s channel specified in the header Group OUTPUT Related Commands Syntax OUTPut POD lt s gt CH lt n gt INHibit OFF INTernal EXTernal BOTH 0 1 2 3 OUTPut POD lt s gt CH lt n gt INHibit lt s gt A B C lt n gt 0to 11 Arguments OFF 0 No output impedance control INTernal 1 The output impedance is controlled by the pod s channel 0 signal EXTernal 2 The output impedance is controlled by an external input signal INH BOTH 3 The output impedance is controlled by the logical OR of the pod s channel 0 signal and an external in
133. t channel number 0 to 11 lt ABi t gt data bit number 0 to 35 lt AHoldE gt high impedance control selection 0 no control 1 channel 0 control 2 external input signal 3 logical or of the channel 0 signal and the external input signal See the OUTPut POD lt s gt CH lt n gt INHibit command lt LF gt lt ASCII line feed code 10 gt Responses OUTPUT POD lt s gt DEFINE lt Assigninfo gt where lt Assigninfo gt is an arbitrary data block with the same format as the argument Examples OUTPut PODA DEFine 2170 4 1 lt LF gt 1 5 2 lt LF gt 2 7 0 assigns the pod A channels as follows when executed Channel 0 Bit 4 high impedance state controlled by the channel 0 signal Channel 1 Bit 5 high impedance state controlled by an external input signal Channel 2 Bit 7 no high impedance control Other channels Assignments cleared 2 92 DG2020A Programmer Manual Command Descriptions OUTPut POD lt s gt TYPE The OUTPut POD lt s gt TYPE query returns the type of the pod specified in the header Group OUTPUT Related Commands Syntax OUTPut POD lt s gt TYPE lt s gt A B C Arguments None Responses OUTPut POD lt s gt TYPE NONE TTL VAR where NONE no pod TTL a TTL level pod VAR a variable level pod Examples OUTPut POD lt s gt TYPE might return OUTPUT PODA TYPE TTL which indicates that pod A is a TTL level pod DG2020A Programmer Manual 2 93 Command
134. t 200mV or 1 0MHz instead of 200 0E 3 or 1 0E 6 respectively to specify voltage or frequency DG2020A Programmer Manual Command Syntax You can omit the unit but you must include the SI unit prefix You can use either upper or lowercase units V or v for voltage Hz HZ or hz for frequency The SI prefixes which must be included are shown below Note that either lower or upper case prefixes can be used 106 Corresponding Power 103 103 1 Note that the prefix m M indicates 10 3 when the decimal numeric argument denotes voltage but 106 when it denotes frequency String String sometimes referred to as a string literal a literal or just a string is defined as a series of characters enclosed by double quotation marks as in This is a string constant or 0 127 To include a double quoted character in the string insert an additional double quote character ahead of the double quote character in the string For example the string serial number B010000 would be defined as serial number B010000 Single quotation marks can also be used instead of double quotation marks For instance serial number BO10000 String constants may be of any length up to the memory limits of the instrument in which the message is parsed Arbitrary Block An arbitrary block argument is defined as lt byte count digit gt lt byte count gt lt contiguous eight bit data byte gt or lt contig
135. te to off DATA SEQUENCE TWAIT lt Line Number gt 1 0 DATA SEQUENCE TWAIT 5 0N sets the line 5 sequence step trigger wait state to on DG2020A Programmer Manual Command Descriptions DATA SUBSequence ADD Group Related Commands Syntax Arguments Examples The DATA SUBSequence ADD command adds a sub sequence step DATA DATA SUBSequence DEFine DATA SUBSequence DELete DATA SUBSequence DELete ALL DATA SUBSequence ADD lt Sname gt lt LineN gt lt Name gt lt Repeat gt lt Sname gt lt String gt where lt string gt is a sub sequence name surrounded in double or single C quotes lt LineN gt lt NR1 gt where lt NR1 gt is a sub sequence step number lt Name gt lt String gt where lt string gt is a block name surrounded in double or single C quotes lt Repeat gt lt NR1 gt where lt NR1 gt is a repeat count 1 to 65536 DATA SUBSEQUENCE ADD SUB1 2 BLOCK3 10 adds a sub sequence step that consists of the block named BLOCK3 at the sub sequence line number 2 position in the sub sequence named SUB1 DATA SUBSequence CLEAr Group Related Commands Syntax Arguments DG2020A Programmer Manual The DATA SUBSequence CLEAr command clears all sub sequence definitions DATA DATA SUBSequence ADD DATA SUBSequence DEFine DATA SUBSequence DELete DATA SUBSequence DELete ALL DATA SUBSequence DELete CLEAr None 2 41 C
136. ter block supplied to the DATA BLOCK DEFINE command with the delimiter codes replaced by the newline code used in normal text files See the blkdef dat sample data file DG2020A Programmer Manual Programming Examples Input format checking has been dispensed with to make this sample program easier to understand This program may not operate correctly if the format of the input file is not correct In particular note that commas are used to delimit the parameters in this input file and that spaces may not be inserted Putseq This program sends sequence definition data to the DG2020A data memory Data input is from a file in a unique format This command has the following syntax with the input data file name being specified as a parameter putseq filename The contents of the input file must express the block name the repeat count the line number of the event jump destination the trigger wait on off setting the event jump on off setting and the infinite loop on off setting in ASCII with one step per line This format corresponds to the parameter block supplied to the DATA SEQUENCE DEFINE command with the delimiter codes replaced by the newline code used in normal text files The first line in this file corresponds to sequence line number 0 and each following line to the sequence line number incremented by 1 See the seqdef dat sample data file Input format checking has been dispensed with to make this sample program easier to un
137. to 35 to be read out is specified as command line arguments If multiple arguments are specified separated by spaces the bit data is displayed in the specified order This command has the following syntax getbit bit_number bit_number Bit data is read out from the whole range of memory data set up in the DG2020A that is data is read out from address 0 to the maximum address The program displays the memory size the starting address always 0 and the bit number parameters and then the bit data for those parameters The parameters are displayed starting with a number sign character each on its own line The bit data is expressed as a sequence of the characters 0 and 1 representing those bit values The listing below shows the output from reading out bits 3 and 2 when the memory size is 64 size 64 start 0 bit 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 1 1 1 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 Hbit 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 Since the result is displayed on standard output the data can be saved by redirecting the output to a file This file can be used as an input to the putbit program described below DG2020A Programmer Manual Programming Examples Putbit This program sends bit pattern data to the DG2020A data memory in bit units Data input is f
138. tors do not switch between remote control and local control modes but rather allow simultaneous setting from an external controller and from the front panel Use this command to lock the functions of the front panel buttons and knobs to disable front panel operations during operation from an external controller or during external controller software execution 2 71 Command Descriptions NOTE When the front panel control operations are locked out by the LOCk command the instrument displays the character string FP LOCKED at the upper right of the screen Group SYSTEM Related Commands UNLock Syntax LOCk ALL NONe LOCk Arguments ALL disables the front panel buttons and the knob except the ON STBY button NONe enables the front panel buttons and the knob Examples LOCK ALL disables the front panel buttons and the knob 2 72 DG2020A Programmer Manual Command Descriptions MMEMory CATalog ALL Group Related Commands Syntax Arguments Responses The MMEMory CATalog ALL query returns a list of all files and directories in the current directory on the floppy disk MEMORY MMEMory CATalog ORDer MMEMory CATalog ALL 7 None MMEMORY CATALOG ALL lt File Entry gt lt File Entry gt where lt File Entry gt lt File Name gt lt File Size gt lt Time Stamp gt lt File Name gt lt string gt lt File Size gt lt NR1 gt and lt Time Stamp gt lt string g
139. ts 3 14 SYSTem DATE 2 102 SYSTem PPAUse 2 103 SYSTem SECurity IMMediate 2 103 SYSTem SECurity STATe 2 104 SYSTem TIME 2 104 T TRG 2 105 TRIGger 2 105 TRIGger IMPedance 2 106 TRIGger LEVel 2 106 TRIGger SLOpe 2 107 TST 2 108 U UNLock 2 109 DG2020A Programmer Manual Index UPTime 2 109 W WAI 2 111 V Where to find other information v VERBose 2 110 DG2020A Programmer Manual Index 5 Index Index 6 DG2020A Programmer Manual
140. uments Responses Examples 2 66 The HCOPy ABORt command aborts hardcopy output HARDCOPY HCOPy STARt HCOPy ABORt None HCOPY ABORT aborts hardcopy output The HCOPy DATA query outputs the hard copy data to the output queue However note that this command has no effect on and is not affected by the hard copy output port setting HARDCOPY HCOPy PORT HCOPy DATA None HCOPY DATA lt Image gt where lt Image gt lt block gt the hardcopy image data block HCOPY DATA outputs hard copy data to the output queue DG2020A Programmer Manual Command Descriptions HCOPy FORMat Group Related Commands Syntax Arguments Responses Examples DG2020A Programmer Manual The HCOPy FORMat command sets the hard copy output format The HCOPy FORMat query returns the currently specified hard copy output format HARDCOPY HCOPy HCOPy FORMAT BMP EPSOn EPSMono THINkjet TIFF HCOPy FORMAT BMP the Windows monochrome file format EPSOn the format used by 9 pin and 24 pin dot matrix printers in ESC P graphics mode EPSMono the encapsulated Postscript format monochrome image file format THINkjet the format used by HP inkjet printers TIFF the TIFF format HCOPY FORMAT BMP EPSON EPSMONO THINKJET TIFF HCOPY FORMAT TIFF sets the data generator to output hard copy in the TIFF format 2 67 Command Descriptions HCOPy PORT 2
141. uous eight bit data byte lt terminator gt DG2020A Programmer Manual 2 5 Command Syntax Header 2 6 Header Mnemonic Pod and Channel Representation Header Structure where lt byte count digit gt a nonzero digit in the range ASCII 1 9 that defines the number of digits bytes in the lt byte count gt field lt byte count gt any number of digits in the range ASCII 0 9 that define how many bytes are in the lt contiguous 8 bit data byte gt field lt contiguous 8 bit data byte gt a lt byte count gt number of 8 bit bytes in the range ASCII 0 255 that define the message Each byte defines one character lt terminator gt a software LF followed by a hardware EOI For example H16AB4ZLT lt LF gt lt amp EOI gt The header mnemonic represents a header node or a header subfunction The command or query header comprises one or more header mnemonics that are delimited with the colon The pod and channel can be specified by using the OUTPut POD lt s gt CH lt n gt header mnemonic in commands and query commands The term lt s gt is either A B or C and expresses the connected pattern data output connector for the pod being specified The term lt n gt is a number between 0 and 11 that expresses the specified channel Commands and queries can be structured into six basic forms R Simple command header m Simple query header R Compound command header R Compound query header m Common command
142. up gt lt LF gt lt Group gt Arbitrary block data for the group definition where lt blockheader gt lt byte count digit gt lt byte count gt lt Group gt lt AName gt lt AMSB gt lt ALSB gt The lt AName gt lt AMSB gt and lt ALSB gt fields are ASCII character strings that specify the following information lt AName gt group name lt AMSB gt group s high order bit lt ALSB gt group s low order bit lt LF gt lt ASCII line feed code 10 gt Responses DATA GROUP DEFINE lt Groupblock gt where lt Groupblock gt is a data block with the same format as the argument Examples DATA GROUp DEF ine 238GROUP01 7 0 lt LF gt GROUP02 11 8 lt LF gt GROUP03 15 12 defines the three groups GROUPO1 GROUPO02 and GROUPO3 2 28 DG2020A Programmer Manual Command Descriptions DATA GROUp DELete Group Related Commands Syntax Arguments Examples The DATA GROUp DELete command deletes the specified group DATA DATA GROUp ADD DATA GROUp BIT DATA GROUp DEF ine DATA GROUp DELete ALL DATA GROUp NAME DATA GROUp REN ame DATA GROUp DELete lt Name gt lt Name gt lt string gt where lt string gt is the name of the group to delete DATA GROUP DELETE GROUPO2 deletes the group with the name GROUPO2 DATA GROUp DELete ALL Group Related Commands Syntax Arguments DATA GROUp NAME Group DG2020A Programmer Manual The DATA GROUp DELete AL
143. used to send GPIB commands that include binary data blocks to the DG2020A Intercepts the data output to standard output and outputs it to the file specified by filename If the file already exists it is overwritten If the file does not exist a new file is created Intercepts the data output to standard output and outputs it to the file specified by filename in the same way as the gt command However if the file already exists it does not overwrite the file but rather appends the new data at the end of the file 4 11 Programming Examples 4 12 DG2020A Programmer Manual eee AE er Appendix A Character Charts Table A 1 DG2020A character set 4 4 D T t 36 52 68 84 116 5 5 e u 21 37 53 101 117 6 u amp F V f v 22 38 70 86 102 118 7 i 7 G W g W 7 23 39 55 71 87 103 119 8 H X x 72 88 120 9 HT 9 l Y i y 9 5 41 57 73 89 105 121 A LF N J Z 10 42 74 122 B ESC K k 11 27 43 75 91 107 123 C lt L 12 60 76 92 124 D CR A M 13 29 45 77 93 125 E gt N K n 14 62 78 94 110 126 DG2020A Programmer Manual A 1 Appendix A Character Charts Table A 2 ASCII amp GPIB code chart B7 1 B6 1 B5 1 BITS NUMBERS B4 B3 B2 B1 CONTROL SYMBOLS UPPER CASE LOWER CASE 0 20 40 LAO 60 LA16 100 TAO 120 TA16 140 SA0 160 SA16 0000 NUL DLE SP 0 P p 0 0 10 16 20 32 30 48 40 64 50 80 60 96 70 112 1 GTL 21 LLO 41 LAT 61 LA17 101 TAM 121 TAI7 14
144. vent codes Event code Event class ranges Descriptions No Events 0 1 No event nor status Reserved 2 99 unused Command Errors 100 199 Command errors Execution Errors 200 299 Command execution errors Device Specific Errors 300 399 Internal device errors Hardware errors Query Errors 400 499 System event and query errors Execution Warnings 500 599 Execution warnings Reserved 600 1999 unused Extended Execution Errors 2000 2999 Device dependent command execution errors Extended 3000 3999 Device dependent device errors Device Specific Errors Reserved 4000 unused Messages 3 10 Table 3 4 lists the message when the system has no events nor status to report These have no associated SESR bit Table 3 4 Normal condition Code Description 0 No events to report queue empty 1 No events to report new events pending ESR Table 3 5 lists the error messages generated due to improper command syntax In this case check that the command is properly formed and that it follows the syntax Table 3 5 Command errors CME bit 5 Code Description 100 Command error 101 Invalid character 102 Syntax error 103 Invalid separator 104 Data type error 105 GET not allowed 106 Invalid program data separator 108 Parameter not allowed 109 Missing parameter 110 Command header error 111 Header separator error 112 Program mnemonic too long 113 Undefined header 114 Header suffix out of ran

Download Pdf Manuals

image

Related Search

Related Contents

IMPRESSA F7 – L`essentiel en bref  - Frank`s Hospital Workshop  mode d`emploi thamword  Neovo U-19 Monitor User Guide Manual Operating Instructions  Manuale Utente User Manual DIAMOND143  Directed Electronics 210P GPS Receiver User Manual    TopPonto Rep - Tecnovendas  ADOBE® DIGITAL PUBLISHING SUITE  User Manual 3-Line  

Copyright © All rights reserved.
Failed to retrieve file