Home
Acer 5670 Laptop User Manual
Contents
1. 0000000 0 oooo O Hoizontal Figure 3 2 This means that instruments of different types that performs the same functions have the same commands For exam ple a DMM an oscilloscope and a counter can all measure frequency with the same commands Introduction to SCPI Management and Maintenance of Programs SCPI simplifies maintenance and man agement of the programs Today changes and additions in a good working program are hardly possible because of the great diversity in program messages and instru ments Programs are difficult to under stand for anyone other than the original programmer After some time even the programmer may be unable to understand them A programmer with SCPI experience however will understand the meaning and reasons of a SCPI program because of his knowledge of the standard Changes extensions and additions are much easier to make in an existing appli cation program SCPI is a step towards portability of instrument programming software and as a consequence it allows the exchange of instruments Response Messages Response Messages Response Formatter Response Data GPIB Interface P Parser Message Parser Exchange Parsed Control Messages Instrument Functions Program Messages E Input Buffer Program Message
2. gt Bus Commands for the Benchtop User Default settings PARAMETER VALUE SETTING after RST Mathematics OFF Sample size in Statistics 100 PARAMETER VALUE I me Sample size in Time In 100 SETTING terval Average Input A Mathematical constants Trigger level AUTO K and M 1 Impedance 1 MQ Es 0 Manual Trigger level OV Miscellaneous Controlled by autotrigger Manual Attenuator 1X Function FREQ A Controlled by autotrigger Timeout 100 ms Coupling AC OFF Trigger slope Bos Measuring time 100 us Filter OFF Check OFF Input B Single cycle OFF Analog output control OFF Trigger seve ae Hold Off Time OFF a 1 MQ Memory Protection Not Manual Trigger level OV Memory 10 to19 changed by Controlled by autotrigger reset Manual Attenuator 1X Auxiliary functions All switched Controlled by autotrigger OFF Coupling DC Blank LSD OFF Trigger slope Pos Common OFF Arming Start OFF Stop OFF Delay Start Time OFF Channel Ext Arm Input E Statistics Statistics OFF 2 8 Default settings after RST dh Y Chapter 3 Introduction to SCPI Introduction to SCPI What is SCPI SCPI Standard Commands for Programmable Instruments is a standard ized set of commands used to remotely control programmable test and measure ment instruments The CNT 8X firmware contains the SCPI It defines the syntax and semantics that the controller must use to communicate with the instru
3. Intermediate results When totalizing you often want to read the intermediate result without stopping the totalizing process FETC ARR _ 1 outputs such a result Command Reference 9 71 4h e MEASUre TOTalize GATed PM6680B PM6681 0 1 2 415 6 0 1 21415 6 Totalize X gated by Y The counter totalizes the pulses on the primary channel The totalizing starts when the gate signal on the secondary channel goes on and stops when the gate signal goes to off The polarity of on off is controlled via the INPut SLOPe command of the gate signal Select if the counter should count positive or negative transitions with the INPut SLOPe command of the measuring channel Parameters The first lt 1 2 4 5 6 gt is the channel to measure on the second one is the gate channel 1 means input A 2 means input B 4 means input E rear panel arming input 5 means input A prescaled by 2 6 means the internal reference If you omit the channels the instrument measures on input A with input B as the gate channel MEASure TOTalize SSTop PM6680B PM6681 1214516 L G 1I2 4 5 6 Totalize X start stop by Y The counter totalizes the pulses on the primary channel The totalizing starts when the gate signal on the secondary channel goes on and stops the next time the gate signal goes on The polarity of ON is controlled via the INPut SLOPe command
4. ab Error Messages Read the Error Event Queue empty and the SYSTem ERRor l query will return You read the error queue with the SYS Tem ERRor query 0 No error Example When errors occur and you do not read SEND gt SYSTem ERRor these errors the Error Queue may over READ 100 Command Error flow Then the instrument will overwrite the last error in the queue with The query returns the error number fol a lowed by the error description 350 Queue overflow If more than one error occurred the query If Pr emer DECUIT ey CUL Gerais will return the error that occurred first ee When you read an error you will also re Read more about how to use er move it from the queue You can read the ror reporting in the Introduction to next error by repeating the query When SCPI chapter you have read all errors the queue is Command Errors Error Error Description Description Explanation Examples Number 0 No error 100 Command error This is the generic syntax error for devices that can not detect more specific errors This code indicates only that a Command Error defined in IEEE 488 2 11 5 1 1 4 has occurred 104 invalid character A syntactic element contains a character which is in valid for that type for example a header containing an ampersand SETUP amp This error might be used in place of errors 114 121 141 and perhaps some others 102 Syntax error An un
5. 9 14 Save e I n n 2 5 9 129 Scaling Factor Analog Output 6 11 9 80 SCPI ur 3 2 Compliance of instrument 9 112 SDC Se cad a a A a e a NG Ga 3 1 9 SDEV ng a a A A Oei mcm MD UE A 9 1 5 Select Mathematical Expression Essa Rum eee E AE 9 20 9 21 Selective device clear 3 19 Self Test Activate Cm 9 1 32 Select v a Rs eM Ne Im DE oe dw lm quo gere aw 9 114 Semicolon A Uer Dom qe Ro m ee dx Cm he RUE ae a 3 8 SEND Dd a a a A e A a 1 4 SENSe block a a a a Ja 5 3 Sense Command Subsystem 9 85 Sensitivity rte ree 9 45 Trigger level n n 9 45 Sequential commands 3 5 Service Request crt 3 17 Capability s n 6n 1 6 Enable Hc a TT 9 1 30 Set Lower Limit A te ae 9 1 7 Upper Limit 1777727222222 9 18 Settings Reading il a COE a AA 9 1 1 0 Short form DO e a Ga cca ae Ar set Sa la S 3 8 Signal Detection 9 109 Single TEE ay ves JR UN der ptem Ub ges a es D En Del s De dn 2 4 Measurements 9 90 On Off A DIL rr 9 92 Or Average rrt 9 92 Single quotes PIERII REPE 3 12 Slope TP 222 9 51 Arming start da eta al dub on TR emcee Se te 9 9 Stop arming a 9 11 Source Start arming 111177577252222 9 9 Stop arming cc n nn 9 11 Speed Autotrigger n n n 9 92 Individually sync meas 7 6 Resolution AA A es a 9 90 Summary otero 7 11 Voltage measurements high
6. H e es INPut 1 2 COUPling PM6680B PM6681 5 AC DC ACIDC Coupling Selects AC coupling normally used for frequency measurements or DC cou pling normally used for time measurements Returned format AC DC_ Example for Input A 1 SEND gt INP COUP DC Example for Input B 2 SEND gt INP2 COUP AC RST condition Input A 1 AC Input B 2 DC Complies to standards SCPI 1991 0 confirmed 9 44 Command Reference ah wy CS M M IT PM6680B 81 85 INPut FILTer _ Boolean Low Pass Filter Switches on or off the low pass filter on input 1 A It has a cutoff frequency of 100 kHz Parameters Boolean is 1 ON 0 OFF Returned format 1 0 RST condition OFF Complies to standards SCPI 1991 0 confirmed AAA EEE EZEIZA PM6685 INPut HYSTeresis 2 Decimal data gt MAX MIN Sensitivity The sensitivity setting on the front panel is called HYSTeresis from the bus The range is 27 12 mV to 75 4 V This setting has no effect unless autosensitivity is turned off see the following page Note that the sensitivity setting is coupled with the hysteresis setting according to the formula Trigger Level Hysteresis lt 377057 2 Parameters lt Decimal data gt is a number between 27 12E 3 and 75 4 MAX gives 75 4 V MIN gives 2 7 mV When using MAX as data the counter always tries to set the hysteresis to 75 4 V Unless the Trigger level is set to O th
7. 1 3 Mnemonics Sei Bi ra o a a ee al AG a ar Te 3 8 Mode Hold Off Selda om Ge E REENE EE 9 89 Monitor Limits eee ma we a ee eee e 6 3 9 1 6 Monitor of low limit 6 26 of high limit O A OE 6 26 MSP bit a a e a ra a 6 23 MSS Had ma a A we ee a 9 1 31 MST bit a a a a a ea a 6 23 Multiple measurements See Array Multiple queries 3 9 INI Negative slope Sr tate a UT 9 51 Non decimal data 3 12 Notation habit zu oo a a ee TS 3 9 NRf a a as a a ge el cae 3 11 Nulling a a a sa 9 20 9 21 Numeric data IP TER 3 11 Numeric expression data 3 12 O OFL bit es rs aa o a a ee a 6 24 On Off Hold Off SUN a Pu RETE CR PR glans 9 88 On time Read oe Gee See ee ee et we ee 9 110 OPC bit Below o array as va Si mt A 6 21 Operation Complete n nnn 9 124 Complete OPC 6 21 9 121 Complete Query 7777777 9 125 Operation Status Bit EREEREER FEELER ce a ee ca 9 1 30 Bits in register 77757577711 6 23 Condition Ba BN ee ae a ORDERS e E m 9 1 01 Enable 42e X Wo we ee nm ED cm EE ECL OR a 9 1 02 Event pana seed ne A Oe I Baa 9 1 03 Group Overview tc ttc 6 22 OPR E ee ee 9 130 9 131 Optional nodes 3 10 Options Identification 4 ses 9 125 Output queue cc 6 6 n6 6 6 16 Output Subsystem 141 ee 9 79 Overflow Zo JW dom AG CELA WU JS P TO STU WK Da 6 24 Message ccc n 6 6 6 6 n n 3 417 Status Kon ow Ox
8. Response Data Type Sets the format in which the result will be sent on the bus Parameters ASCii will send the measurement result in ASCii form lt sign gt lt mantissa value ES sign expo nent value sign tor mantissa value I to 12 digits depending on measuring resolution plus one decimal point exponent value 1 to 3 digits REAL will send the result in binary IEEE Double Precision floating point format in a block data element 18 lt 8 bytes real The lt 8 bytes real is a double precision binary floating point response according to IEEE488 2 IEEE754 This means that the eight bytes are sent in the following order First byte sign 7 MSB of the exponent Second byte lt 4 LSB of the exponent 4 MSB of the fraction Third through eight byte 48 LSB of the fraction Returned format ASC REAL I RST condition ASCII Complies to standards SCPI 1991 0 confirmed AAA A A A SSF FORMat PM6681 2 ASCii REAL Numeric value AUTO Response Data Type Sets the format in which the result will be sent on the bus This command is identical to the above described command for the PM6680B 85 except for the optional length parameter Parameters ASCii The length controls the number of digits in the mantissa and may be set to values from 2 to 12 or AUTO AUTO The length will be controlled by the resolution of each measurement result Auto will be ignored wh
9. 9 65 MEASure PWIDth 9 65 MEASure PDUTycycle DCYCle 9 66 MEASure NDUTyoycle 9 66 MEASure PERiod 9 67 MEASure PHASe 9 67 MEASure VOLT PTPeak 9 68 MEASure RISE TIME 9 68 MEASure TINTerval 9 69 MEASure TOTalize ACCumulated 9 70 CONFigure TOTalize CONTinuous 9 71 MEASure TOTalize GATed 9 72 MEASure TOTalize SSTop 9 72 MEASure TOTalize TIMed 9 73 Memory Subsystem 9 75 MEMory DELete MACRo 9 76 MEMory FREE SENSe 9 76 MEMory FREE MACRo 9 77 MEMory NSTates 9 77 Output Subsystem 9 79 BN PAG P 9 80 OUTPut SCALG8 Let s 9 80 Read Function 9 81 READ TD 9 82 READ ARRa94 skis s 9 83 Sense Command Subsystem 9 85 ACQuisition APERture 9 87 ACQuisition APERture 9 87 ACQuisition HOFF ECOunt 9 88 ACQuisition HOFF 9 88 ACQuisition HOFF TIME 9 89 ACQuisition HOFF MODE 9 89 ACQuisition RESolution 9 90 ACQuisition RESolution 9 90 AVERage MODE 9 91 AVERage COUNt 9 91 FREQuency RANGe LOWer 9 92 AVERage STATe 9 92 PUNGHON 2 us
10. Wait for operation complete ibwait Counter RQS Read status and event status register ibrsp Counter amp Status ibwrt Counter ESR 5 4 18 C for National Instruments PC IIA Fast Sampling S l Programming Examples bra Counter Instringy 80 printf Fetching result for i20 i 1000 i Fetch one result ibwrt Counter FETCH 6 ibrd Counter InString 80 Instring ibont X0 Write result to file fprintf oftp sd o5 1 iInString 7 ibwrt Counter DISP ENAB ON 13 Close File Fclose ofp else printf CANT OPEN FILE exit 0 C for National Instruments PC IIA Fast Sampliing 4 19 Programming Examples e 6 Statistics Only for PM6680B and PM6681 In this example the counter makes 10000 measurements and uses the statistical func tions to determine MAX MIN MEAN and Standard Deviation All four results are sent to the controller include decl h include lt stdio h gt include lt process h gt main int Counter Status i char INSCLING CU l4 Counter ibfind DEV10 ibwrt Counter CLS SBE 16 13 ibwrt Counter RST FUNC Freq 1 ACQ APER MIN 38 ibwrt Counter INP LEV AUTO OFF 17 Enable statistics on 10000 measurements ibwrt Counter CALC AVER STAT ON COUN 10000 30 ibwrt Counter TRIG COUN 10000 16 Start measurement
11. Response Messages Figure 3 4 Program and response messages The GPIB controller instructs the device through program messages The device will only send responses when explicitly requested to do so that is when the con troller sends a query Queries are recog nized by the question mark at the end of the header for example IDN requests the instrument to send identity data Syntax and Style m Syntax of Program Messages A command or query is called a program message unit A program message unit consists of a header followed by one or more parameters as shown in Figure 3 5 Header Space Parameter Figure 3 5 Syntax of a Program Message Unit One or more program message units commands may be sent within a simple program message see Fig 3 6 Program Message Unit Fig 3 6 Syntax of a terminated Program Message The is the pmt program message terminator and it must be one of the fol lowing codes E NL END This is new line code sent concur rently with the END message on the GPIB NL This is the new line code This is the END message sent concurrently with the last data byte dab dab END NL is the same as the ASCII LF line feed ASCII 10decimal The END message is sent via the EOl line of the GPIB The character stands for at the same time as Program and Response
12. 5 Status Reporting This program sets up the status reporting for Service Request on Message Available and Command Execution or Query errors The program reads a command from the controller keyboard and sends it to the coun ter then 1t checks the status byte using Serial Poll It determines the reason for Service Request and reads query responses and error messages 50 CNTNAMES DEV10 60 CALL IBFIND CNTNAMES CNTS 70 po SO CLEAR STATUS 100 WRTS cls 110 CALL IBWRT CNT WRTS L2 130 SET EVENT STATUS ENABLE 140 Enable Command Error Execution Error and Query Error 150 WRTS ese 52 160 CALL IBWRT CNT WRTS lpg 3 180 SET SERVICE REQUEST ENABLE 190 Enable Service Request on Event Status and Message Available 200 WRTS sre 48 210 CALL IBWRT CNT WRTS 220 gt 230 MAIN LOOP 240 WHILE 1 250 260 Y ENTER COMMAND STRING AND SEND TO COUNTER 210 LINE INPUT Enter command string lt CR gt to end CMDS 280 IF CMD GOTO 760 290 CMDS CMDS 300 CALL IBWRT CNT CMDS 5 0 WAIT for execution 320 FOR I 1 TO 1000 330 CALL IBRSP CNT SPR 340 IF SPR3 AND 16 THEN GOTO 380 350 NEXT I 360 370 READ STATUS BYTE 380 IF SPR lt gt O THEN PRINT Status byte SPR3 390 ELSE GOTO 750 400 i GW Basic for National Instruments PC IIA S
13. The IEEE 488 2 standard defines a set of operational states and actions to imple ment the message exchange protocol These are shown in the following table 3 4 How does SCPI Work in the Instrument Introduction to SCPI State Purpose IDLE Wait for messages READ Read and execute mes sages QUERY Store responses to be sent SEND Send responses RE Complete sending re SPONSE sponses DONE Finished sending re sponses DEADLOCK The device cannot buffer more data Action Reason Untermin The controller attempts to ated read the device without first having sent a com plete query message Interrupted The device is interrupted by a new program mes sage before it finishes sending a response mes sage Protocol Requirements In addition to the above functional ele ments which process the data the mes sage exchange protocol has the following characteristics The controller must end a program mes sage containing a query with a message terminator before reading the response from the device address the device as talker If the controller breaks this rule the device will report a query error unterminated action The controller must read the response to a query in a previously terminated program message before sending a new program message When the controller violates this rule the device will report a quer
14. 1230 Response formatter Generic error in the response formatter error 11231 Bad response for The response formatter was called when it should matter call not be active 1 232 Bad response for The response formatter was called to output an end matter call eom of message when it should not be active 1233 Invalid function The response formatter was requested to output code to response data for an unrecognized function formatter 1 234 Invalid header type The response formatter was called with bad data for to response format the response header normally empty ter 1235 Invalid data type to The response formatter was called with bad data for response formatter the response data 1240 Unrecognized error An error number was found in the error queue for number in error queue which no matching error information was found See also Error Messages in Appendix 1 of the Operators Manual Error Code 1 214 to 1 240 8 15 Error Messages 8 16 Error Code This page is intentionally left blank Chapter 9 Command Reference e This page is intentionally left blank 9 2 Command Reference ABORt Abort Command Reference 9 3 e ABORt PM6680B 81 85 Abort Measurement The ABORt command terminates a measurement The trigger subsystem state is set to idle state Type of command Aborts all previous measurements if WAI is not used Complies to standard
15. An instrument operates in local when it is not in remote mode as defined above Local Lockout In addition to the remote state an instru ment can be set to remote with local lockout This disables the return to local button In theory the state local with lo cal lockout is also possible then all local controls except the return to local key are active The Counter in Remote Operation When the Counter is in remote operation it disables all its local controls except the LOCAL key The Counter in Local Operation When the Counter is in local operation the instrument is fully programmable both from the front panel and from the bus If a bus message arrives while a change is being entered from the front panel the front panel entry is interrupted and the bus message is executed We recommend you to use Remote mode when using counters from the bus If not the counter measures continously and the initiation command INIT will have no effect 3 6 How does SCPI Work in the Instrument Introduction to SCPI Program and Response Messages The communication between the system controller and the SCPI instruments con nected to the GPIB takes place through Program and Response Messages A Pro gram Message 1s a sequence of one or more commands sent from the controller to an instrument Conversely a Response Message is the data from the instrument to the controller Controller Device Program Messages Commands
16. OFF This example switches off AUTO enabling manual sensitivity and trigger level set ting RST condition ON 9 46 Command Reference dh Wy U E a e ee PM6680B 81 85 INPut 1 2 IMPedance 2 lt Decimal data MAX MIN Input Impedance The impedance can be set to 50 Q or 1 MQ Parameters MIN or Decimal data that rounds off to 50 or less sets the input impedance to 50 MAX or Decimal data that rounds off to 1001 or more sets the impedance to 1 MQ Returned format 5 00000000000E 001 1 00000000000E 6 1 Example for Input A 1 SEND INP IMP 50 Sets the input A impedance to 50 42 Example for Input B 2 Only for PM6680B 81 SEND INP2 IMP us 50 Sets the input B impedance to 50 Q RST condition 1 MQ Complies to standards SCPI 1991 0 confirmed perrclauneeccce A ccc UL Uc PM6680B PM6681 INPut 1 2 LEVel 2 Decimal data gt MAX MIN Fixed Trigger Level Input A and input B can be individually set to autotrigger or to fixed trigger levels of between 5 V and 5 V in steps of 0 02 V 1 25mV for PM6681 If the attenuator is set to 10X the range is 50 V and 50 V in 0 2 V 12 5mV steps For autotrigger see the following page Parameters Decimal data is a number between 5 V and 5 V if att 1X and between 50 V and 50 V if att 10X MAX gives 50 V and MIN gives 50 V When using MAX and MIN as data the count
17. Parameters lower threshold upper threshold expected value and resolution are all ignored by the counter lt I1 gt is the channel to measure on i e input A Complies to standards SCPI 1991 0 confirmed PM6680B 81 85 MEASure FREQuency RATio expected value resolution T lt 1 2 3 4 5 6 gt lt 1 o EL Frequency Ratio Frequency ratio measurements between two inputs Example SEND MEAS FREQ RAT n 1 3 READ s 2 345625764333E 000 This example measures the ratio between input A and input C The channel is expression data and it must be in parentheses IG expected value and resolution are ignored lt 1 2 3 4 5 6 gt lt 1 2 3 4 5 6 gt is the channels to measure on 1 means input A 2 means input B Only PM6680B and PM6681 3 means input C HF input option 4 means input E Rear panel arming input 5 means input A prescaled by 2 6 means the internal reference If you omit the channel the instrument measures between input A and input E Complies to standards SCPI 1991 0 confirmed Command Reference 9 63 4h e FIN WF ETA o AAA AAA MEASure VOLT MAXimum PM6680B PM6681 1 2 Positive Peak Voltage This command measures the positive peak voltage with the input DC coupled Parameters I1 2 is the channel to measure on 1 means input A 2 means input B Complies
18. REAL PACKed ROSCillator SOURce INTernal EXTernal TOTalize GATE ESTATe a ON OPF VOL Tage GATed STATe ON OFF dh Command Reference 9 85 4n WP WP 6 ab y m Sense Subsystem command tree for PM6685 SENSe FUNCtion Measuring function _ Primary channel Secondary channel EVENt LEVel o lt Tr ast level in Volts gt MIN MAX AUTO ONT FF ONCE HYSTeresis Sensitivity band in Volts MIN MAX AUTO ON OFF ONCE SLOPe Es ACQuisition APERture Measurement Time MIN MAX HOFF TIME Hold off time MIN MAX AVERage STATe ON OFF ROSCillator SOURce INTemal EXTernal SDELay lt Burst sync delay MIN MAX TOTalize GATE STATe lt ON OFF INTernal FORMat REAL PACKed 1 Alias commands for commands in the Input subsystem 2 Alias commands fot the SDELay command for compatibility with the PM6680B e 9 66 Command Reference e PM6680B 85 ACQuisition APERture 2 Decimal value gt MIN MAX Set the Measurement Time Sets the gate time for one measurement Parameters decimal value is 0 8E 6 1 6E 6 3 2E 6 6 4E 6 or 12 8E 6 and 50E 6 to 400s MIN gives 800 ns and MAX gives 400 s Measurement Times of 800 ns to 12 8 us work in FREQ CW FREQ BURST FREQ PRFE FREQ RAT and PERiod If one of these short times is selected when the counter makes other measurements it
19. These simply mean that the counter can exchange data with other instruments or a controller using the bus handshake lines DAV NRFD NADC B Control Function CO The counter does not function as a con troller B Talker Function T6 The counter can send responses and the results of its measurements to other de vices or to the controller T6 means that it has the following functions Basic talker No talker only t can send out a status byte as response to a serial poll from the controller Automatic un addressing as a talker when it is addressed as a listener Interface Functions 1 5 Getting Started B Listener Function L4 The counter can receive programming in structions from the controller L4 means that it has the following functions Basic listener No listen only Automatic un addressing as listener when addressed as a talker WB Service Request SR1 The counter can call for attention from the controller e g when a measurement is completed and a result is available Remote Local RL1 You can control the counter manually lo cally from the front panel or remotely from the controller The LLO lo 1 6 Interface Functions cal lock out function can disable the LO CAL button on the front panel m Parallel Poll PPO The counter does not have any parallel poll facility B Device Clear DC1 The controller can reset the counter via interface mess
20. ibwrt Counter Init OPC 12 Wait for operation complete MAV printf Waiting for measurement to get ready n ibwait Counter RQS Read status and response ibrsp Counter amp Status ibrd Counter Instring 90 Read maximum value ibwrt Counter CALC AVER TYPE MAX CALC IMM 31 ibrd Counter InString 80 Inbtringlibont or printf Maximum s n InString 4 20 C for National Instruments PC IIA Statistics Programming Examples e Read minimum value ibwrt Counter CALC AVER TYPE MIN CALC IMM 31 ibrd Counter InString 80 I n5rrocngllbenbt 1x073 printf Minimum s n InString Read mean value ibwrt Counter CALC AVER TYPE MEAN CALC IMM 32 ibrd Counter Tnstring 90 InString ibont X0 printf Mean sin InString Read standard deviation value 1bwrt Counter CALC AVER TYPE SDEV CALC IMM 32 1brd Counter Instring 80 Ingteibo rxbont V0 printf Standard deviation s n InString Sxit 0 7 C for National Instruments PC IIA Statistics 4 21 Programming Examples This side is intentionally left blank 4 22 C for National Instruments PC IIA Chapter 5 Instrument Model Instrument Model Introduction The figure below shows how the instru ment functions are categorized This in strument model is fully compatible with the SCPI gen
21. 9 92 Standard deviation cocos 9 15 Standard Event Status Enable VL 9 1 21 Standard event status register 6 21 Standardized Device specific errors 8 11 Standardized Error numbers 3 17 8 2 Start arming Delay v e de sei Lun Te id Des ee de 9 7 9 10 Delay by events 9 7 9 10 External Events before 9 7 9 10 Slope DIDIT 9 9 Start measurement rsrsrsrs 9 42 Sync AA AA 7 2 Start source Arming a ee aca aa a a 9 9 Start stop Totalize Sree ae Sw ele eS aaa a 9 97 Start stop by Y totalize X 9 72 Statistics Da a a Xo os 2 5 Enable P 9 14 Recalculating data 1777777 9 16 Sample size a i aha d a a a 9 14 Type wo tao a ls a A 9 1 5 Status Clear vr 9 1 1 8 Clear data structures 3 20 Enable reporting cc 9 103 Enabling Standard Event Status 9 121 Event Status Register 9 122 Limit monitor 3 0 2 se mee monos 9 100 Measurement started 9 102 XII Measurement stopped 9 102 Operation event 7 7 9 103 Overflow Gcr 9 104 Preset PP 9 103 Questionable Data signal 9 104 Questionable Data signal Event A ee AA lm ee ed ee 9 105 Register structure 7777777 3 16 Subsystem 1 77 7 20 9 99 Timeout LP 9 104 Unexpected parameter 9 104 Using the reporting 3 16 6 14 Waiting for bus arming 9 102 Waiting for triggering 7 9 102 Status byte Pc 3 1 6 6 14 Bit 0 P pL 9 100 Bit 2 an MG
22. DMC command This removes all macro labels and sequences from the memory To delete only one macro in the memory use the MEMory DE Lete MACRo command You cannot overwrite a macro you must delete it before you can use the same name for a new macro 3 14 Macros Enabling and Disabling Macros B EMC Enable Macro Command When you want to execute a CNT 8X command or query with the same name as a defined macro you need to disable macro execution Disabling macros does not delete stored macros it just hides them from execution Disabling EMC 0 disables all macros Enabling EMC 1 B EMC Enable Macro Query Use this query to determine if macros are enabled Response 1 macros are enabled 0 macros are disabled How to Execute a Macro Macros are disabled after RST so to be sure start by enabling macros with EMC 1 Now macros can be executed by using the macro labels as commands B Example SEND gt DMC_ LIMITMON CALC STATION CALCSLIMSSTATI N CALC LIM LOW DATA S1 STATON CALC LIM UPP DATA S 2 ES TATLON SEND EMC _1 Now sending the command SEND gt LIMITMON_1E6 1 1E6 will switch on the limit monitoring to alarm between the limits 1 MHz and 1 1 MHz Introduction to SCPI Retrieve a Macro B GMC Get Macro Contents Query This query gives a response containing the definition of the macro you specified when sending the query Example using the above
23. EVENt PRESet m Related Common Commands CLS ESE Shit mask ESR PSC bit mask SRE Shit mask STB 3 Lay fa as CH Command Reference 9 99 4h ab wp STATus DREGister0 ll 80B 81 85 Read Device Status Event Register This query reads out the contents of the Device Event Register Reading the De vice Event Register clears the register See Figure 6 14 Returned format lt dec data gt the sum between 0 and 6 of all bits that are true See table below Bit No Weight Condition 2 4 Last measurement below low limit 1 2 Last measurement above high limit STATus DREGister0 ENABle n 80B 81 85 2 bit mask Enable Device Status Reporting This command sets the enable bit of the Device Register O Parameters lt dec data gt the sum between 0 and 6 of all bits that are true See table below Bit No Weight Condition 2 4 Enable monitoring of low limit 1 2 Enable monitoring of high limit Returned format bit mask e 9 100 Command Reference e PN wy STATus OPERation CONDition 80B 81 85 Read Operation Status Condition Register Reads out the contents of the operation status condition register This register re flects the state of the measurement process See figure below Note that bits O to 3 7 and 9 to 15 are not used Returned Format Decima
24. Error code list DOTT VIT 8 7 Expression 9 20 9 21 data a a ee ae c 3 1 2 Ext ref ao is ade a a 9 96 External Events before Start Arming crc 9 7 9 10 External reference 2 3 9 96 on off Rx a asan RR EE i m UB IM IS TE SO DOE S 2 3 Fail Limit DN wies hm ere Ee cee a c we 9 17 Fall time a a a eta ces ome ca seem OD cc we ee cay CR 9 91 Measurements T 9 63 Fast Autotrigger n n nn 9 92 Period measurements 7 9 Recall and measure 7 7 5 Fetch e n n n Ke 5 6 7 4 An Array of Results 5777777111 9 35 Array stt n n n n n nn 9 35 Calcutated Data 9 15 Description nn 6 6 10 Function A a Cou ee we We at Se eee we ae a 9 33 One Result PEDE egw es E 9 34 Several measurement results 9 35 Filter a4 9 45 On off T CPI EE 2 2 Fixed data format s 9 39 Fixed Trigger Level ccs 9 47 Format Internal data SS J eS 9 95 Response Data 9 39 Subsystem s n n n 9 37 Formula Mathematics 757777 1 9 20 9 21 Macro C 9 76 z 9 77 Freerun a UA a ce 9 42 Frequency Low limit for volt autotrig 9 92 Measurement X 4 WAS a Bae ee ew s 9 60 Ratio measurements ccc 9 63 Front panel memories 9 129 Function TT 2 4 Change fast TTE 7 5 G Gate On Off iaa Wiad ION a a 9 97 Time PPP 9 87 Gate time CETT TI IEEE EE 9 87 Gated by Y Accumulated Totalize X 9 70 VII
25. The measuring function and the channels together form one String that must be placed within quotation marks Returned format lt Measuring function Primary channel Secondary channel gt 4 Example Select a pulse period measurement on input A channel 1 Send gt FUNC PER 1 RST condition FREQuency 1 Complies to standards SCPI 1991 0 confirmed B Functions and channels in PM6685 FREQuency CW m 543 L3 HER FREQuency CW RATio la 11914 1 poe FREQuency BURSt la 1 3 4 FREQuency PRFrequency a 1 3 4 PERiod 2 1 3 4 NWIDth o 1 14 PWIDth o 114 PDUTycycle DCYCle fa 114 NDUTycycle as 114 TOTalize CONTinuous 0 1114 0 1 4 B Input channels PM6685 O means that the input is disabled 1 means input A 3 means input C HF input option 4 means input E Rear panel arming input 5 means input A prescaled by 2 6 means the internal reference Command Reference 9 93 e 6 e B Functions and channels in PM6680B and PM6681 41123 415 6 2 1121314 1 2 3 4 1 213 4 5 6 7 1 2 3 4 5 6 7 FREQuency CW FREQuency CW RATio FREQuency BURSt FREQuency PRF Fr re re E PERiod 1 2 3 4 5 6 7 TINTerval 1 12 4 112 4 6 PHASe lo f 216 11 24 6 NWIDth ou Alae PWIDth a 11214 6 DCYCle PDUTycycle 1 2 4 6 NDUTycycl 1 2 4 6 RISE TIME zx 4 2 FALL TIME a 112 VOLT MAXimum la T 2 VOLT M
26. Use this command if you want to know in seconds how long the counter has been on Returned format lt String gt Power on time For PM6680B and PM6685 this is the time elapsed since the last power on For PM6681 this is the total elapsed time since the counter was new 9 110 Command Reference 4h wy PM6680B 81 85 SYSTem TOUT _ Boolean Timeout On Off This command switches on or off the timeout When timeout is enabled the mea surement attempt will be abandoned when the time set with SYST TOUT TIME has elapsed A zero result will be sent to the controller instead of a measurement result and the timeout bit in the STATus QUEStionable register will be set Returned format O means no timeout 1 means that the timeout set by SYS Tem TOUT TIME is used Example SEND SYST TOUT L TOUT TIME 0 573 STAT QUESIENAB n 1024 SRE 9 This example turns on timeout sets the timeout to 0 5 s enables status reporting of questionable data at timeout and enables service request on questionable data SEND STB If bit 3 in the status byte is set read the questionable data status SEND STAT QUES EVEN This query reads the ques tionable data status READ lt 1024 0 1024 means timeout has occurred and 0 means no timeout RST condition O PM6680B 81 85 SYSTem TOUT TIME 2 Numeric value gt MIN MAX Timeout Set This command sets the timeout in seconds The timeout starts when
27. 4 7 5 Status Reporting sso s 4 9 o Tm 4 11 4822 872 20081 August 2000 Hl C for National Instruments PC IIA ETE TE 4 13 1 Limit Testing i5 oe hm 4 14 2 REAL Data Format 4 15 3 Frequency Profiling 4 17 4 Fast Sampling xs 068 case ee aes 4 19 6 Statistics 4 21 5 Instrument Model Introduction hoe ebb ee naaa 5 2 Measurement Function Block 5 3 Other Subsystems 5 4 Order of Execution 5 4 MEASurement Function 5 5 6 Using the Subsystems Introduction a 6 2 Calculate Subsystem 6 3 Calibration SubsysteM 6 4 Configure Function su 024 et en ice aec 6 5 Format Subsystem 6 6 Time Stamp Readout Format 6 6 Input Subsystems 6 7 Measurement Function 6 9 Output Subsystem 6 12 Sense Command Subsystems 6 14 Status Subsystem 6 15 Trigger Arming Subsystem 6 30 7 How to Measure Fast MPOQUERON PR 7 3 Rough Trigger Subsystem Description 7 4 Some Basic Commands 7 5 Basic Measurement Method 7 7 General Speed Improvements 40000 measure ments second Supervising a Process Speed Summary 8 Error Messages 9 Command Reference ABORt Lise sss ARM COUNt ccoo AR
28. Bit No Weight Condition 8 256 No measurement 6 64 Waiting for bus arming 5 32 Waiting for triggering and or external arming 4 16 Measurement Returned Format Decimal data Example SEND STAT OPER ENAB 288 In this example waiting for triggering bit 5 and Measurement stopped bit 8 will set the OPR bit of the Status Byte This method is faster than using OPC if you want to know when the measurement is ready Complies to standards SCPI 1991 0 confirmed 9 102 Command Reference ab WP STATus OPERation 80B 81 85 Read Operation Status Event Reads out the contents of the operation event status register Reading the Opera tion Event Register clears the register See figure on page 9 101 Returned Format Decimal data lt dec data gt the sum between 0 and 368 of all bits that are true See table on page 9 102 Complies to standards SCPI 1991 0 confirmed A A l a PM6680B 81 85 STATus PRESet Enable Device Status Reporting This command has an SCPI standardized effect on the status data structures The purpose is to precondition these toward reporting only device dependent status data It only affects enable registers It does not change event and condition registers The IEEE 488 2 enable registers which are handled with the common commands SRE and ESE remain unchanged The command sets or clears all other enable registers Those relevant for
29. Example Send CLS Complies to standards IEEE 488 2 1987 9 118 Command Reference ah wy PM6680B 81 85 xDMC Macro label Program messages Define Macro Allows you to assign a sequence of one or more program message units to a macro label The sequence is executed when the macro label is received as a command or query Twenty five macros can be defined at the same time and each macro can contain an average of 40 characters If a macro has the same name as a command it masks out the real command with the same name when macros are enabled If macros are disabled the original command will be executed If you define macros when macro execution is disabled the counter executes the DMC command fast but if macros are enabled the execution time for this com mand is longer Parameters Macro label 1 to 12 character macro label String data must be surrounded by or lt as in the example below Program messages the commands to be executed when the macro label is received both block data and string data formats can be used Example 1 SEND DMC AMPLITUDE FUNC FREQ 1 INP HYST AUTO ONCE INP HYST INP LEV This example defines a macro called amplitude SEND AMPLITUDE The macro makes an AUTO ONCE and reads out the hysteresis and trigger level that auto selects Macros must be enabled otherwise the AMPLITUDE query will not execute see FEMC READ s 3 46125461E
30. Log 190 ARMDELAY 0000002 GW Basic for National Instruments PC IIA Setting Up the Interface 4 5 Programming Examples 200 210 CAPTURE PROFILE 220 gt 230 PRINT Proriling 240 250 FOR I 0 TO 999 260 Set arming delay time 210 WRTS ARM DEL STRS ARMDELAY 280 CALL IBWRT CNTS WRTS 290 J 300 Measure and read result 310 WRTS READ 320 CALL IBWRT CNTS WRTS 330 MSGS SPACES 255 340 CALL IBRD CNTS MSGS 350 g 360 Write arming delay time and result to file 370 PRINT41 STRS ARMDELAY LEFTS MSGS INSTR MSGS CHRS 10 380 3 390 Increase arming delay 400 ARMDELAY ARMDELAY 0000001 410 NEXT I 420 1 430 WRTS DISP ENAB ON 440 CALL IBWRT CNTS WRTS 450 460 CLOSE 1 470 END 4 6 GW Basic for National Instruments PC IIA Setting Up the Interface Programming Examples an 4 Fast Sampling This program makes a quick array measurement and stores the results in the internal memory of the counter Then it writes the results to a file called MEAS DAT The measurement results as a function of the samples can be visualized in a spreadsheet program such as Excel o0 3 60 OPEN O 1 MEAS DAT 70 CNTNAMES DEV10 80 CALL IBFIND CNTNAMES CNT5 SQ 100 LIO lt Clear status 120 WRIS CLS 130 CALL IBWRT CNTS WRTS 140 150 Enable 1000 measurement with maximum spe
31. OPC reports when operation is com plete via the Status Subsystem described on page 6 14 Rough Trigger Subsystem Description The trigger subsystem is the functional part of the CNT 8X that controls the start and stop of measurements This is the function that the controller interacts with when it controls the measurement se quence A simplified model of the CNT 8X s trig ger subsystem is a state machine with four different states These states are as follows IDLE State The counter waits for new commands It is not measuring WAIT FOR BUS ARM State The counter is ready to receive a bus arm ing signal GET or XXTRG WAIT FOR MEASUREMENT TO START State The counter waits for the input signal trig gering to start the measurement or block of measurements If the counter uses arming it is waiting for the specified arming event MEASUREMENT State The counter measures It monitors the hardware and controls the measurement time If block measurement mode is used ARM COUN or TRIG COUN_22 the counter stays in this state until all measure ments inside the block has been made Different actions cause the trigger sub system to change between the different states The transitions are shown in The status is reflected in status byte STATus OPERation CONDition State IDLE Operation Condition register status 256 INIT CONT OFF Or all measurements completed INIT Or INIT CONT
32. Parameters Boolean 1 ON 0 OFF Returned format Boolean Example Send gt FUNC TOT 1 Selects totalizing on input A Send INIT CONT ON TOT GATE ON This will initiate totalizing reset the totalizing value to zero and start totalizing Send gt TOT GATE OFF Stop totalizing Read FETCh ARRay 1 Read the final result RST condition OFF SSS SSS 0 SS PM6680B PM6681 VOLTage GATed STATe Boolean Gated Voltage Measurement Selects the gated mode for the VOLTage MAX MIN PTPeak measuring func tions and for the Autotrigger function The gated mode is useful for removing overshoot and undershoot The gate signal is controlled by the ARM STOP SLOPe and ARM STOP SOURce commands If channel 2 B is the source for the gating signal all other characteristics of that channel can be used When Gated Voltage is selected the Stop Arming function is disabled from its normal stop arming usage When gated voltage mode is selected high enables measurement and low disables measurements Use the slope if you want it the other way around Parameters Boolean I ON 0 OFF Returned format 110 RST condition OFF Command Reference 9 97 e 6 o This page is intentionally left blank 9 98 Command Reference Status Subsystem STATus DREGister0 ENABIe Sbit mask EVENt OPERation CONDition ENABIe bit mask EVENt QUEStionable CONDition ENABle lt bit mask
33. SEND CALC MATH STAT ON CALC MATH X o 10 7E6 INIT OPC Wait for operation complete SEND CALC DATA READ Measurement result minus 10 7E6 gt Example for PM6680B 81 SEND CALC MATH STAT ON CALC MATR 1 X 2 10 TEG hafal init OPC Wait for operation complete SEND CALC DATA READ Measurement result minus 10 7E6 gt RST condition Event no RST condition Complies to standards SCPI 1991 0 Confirmed Command Reference 9 15 e 6 CALCulate IMMediate PM6680B 81 85 Recalculate Data This event causes the calculate subsystem to reprocess the statistical function on the sense data without reacquiring the data Query returns this reprocessed data This command is not very useful in PM6685 but is accepted to maintain com patibility with the other counters in the CNT 8X series of counters Returned format Decimal data Where Decimal data is the recalculated data Example SEND CALC AVER STAT ON TYPE SDEV INIT OPC Wait for operation complete SEND CALC DATA READ Value of standard deviation SEND CALC AVER TYPE MEAN SEND CALC IMM READ Mean value RST condition Event no RST condition Complies to standards SCPI 1991 0 Confirmed pU UD Msaci CALCulate LIMit PM6680B 81 85 _ lt Boolean gt Enable Monitoring of Paramete
34. See also OUTput SCALE com mand on the next page Parameters Boolean 1 ON O OFF Returned format lt 1 0 gt _ Example Send OUTP 1 Switches on the analog output RST condition OFF Complies to standards SCPI 1991 0 confirmed ar J OUTPut SCALe PM6680B 81 85 Decimal data gt Scaling Factor Analog Output This command sets the scaling factor for the analog output The measurement re sult is scaled after math if math is used If you want a full scale output for a specific readout the formula is 1 Scaling factor full scale value Parameters Decimal data is the scaling factor The range is 1020 to 1020 Returned format lt Decimal data Example If you want full scale output 5 V for a reading of 0 00359 Scaling factor m 0 000718 Send OUTP SCAL 718E 6 RST condition 1 9 80 Command Reference 4h wy Perform Measurement and Read Data READ SCALar ARRay Array Size gt MAX Command Reference 9 81 e 6 e READ PM6680B 81 85 Read one Result The read function performs new measurements and reads out a measuring result without reprogramming the counter Using the READ query in conjunction with the CONFigure command gives you a measure capability where you can fine tune the measurement If the counter is set up to do an array of measurements READ makes all the
35. WRIS Y Wait until the limit is passed PRINT Waiting for limit to be passed MASK amp H800 CALL IBWAIT CNT MASKS Read status and device status register CALL IBRSP CNT SPR Read frequency WRTS READ CALL IBWRT CNT WRTS MSGS SPACES 255 CALL IBRD CNT MSGS PRINT Frequency LEFTS MSGS IBCNTS WRTS STAT DREGO EVEN CALL IBWRT CNT WRTS MSGS SPACES 255 CALL IBRD CNT MSGS Disable continuous measurement WRTS INIT CONT OFF CALL IBWRT CNT WRTS END GW Basic for National Instruments PC IIA Setting Up the Interface b Programming Examples 4h 3 Frequency Profiling Frequency profiling visualizes frequency variations for a certain time This program gives an output file called PROFILE DAT If this file is imported to a spreadsheet program for instance Excel you can create a graph like the one in the figure below Frequency 004 Time Figure 4 1 This figure is the results of frequency profiling on a sweep generator Bi gt 60 OPEN O 1 PROFILE DAT 70 CNTNAMES DEV10 80 CALL IBFIND CNTNAMES CNT gg 1 Looe 3 110 Enable arming etc 120 WRTS TRIG COUN 1 ARM COUN 1 SOUR EXT4 130 CALL IBWRT CNT WRTS 140 WRTS INP LEV AUTO ONCE 150 CALL IBWRT CNTS WRTS 160 WRTS DISP ENAB OFF ACQ APER 1E 6 170 CALL IBWRT CNT WRTS
36. lt parameter list Block data Used to transfer any 8 bit channel list coded data This data starts with a pream An example of numeric expression data is na EN e E about the X 10 7E6 This subtracts a 10 7 MHz sU RA intermediate frequency from the mea Example sured result Z218INP IMP_50 SENS 10 An example of lt parameter list gt is 5 0 02 This is a list of two parameters the first one is 5 and the second one 0 02 An example of channel list is 3 1 This specifies channel 3 as the main channel and channel 1 as the second channel Summary Header separator Semicolon separates the Single or double separates several A question different parts of a quote indicates program messages mark indicates compound header string data in a string that a response is requested y b 4 x 4 SENS FUNC FREQ RAT 3 1 CALC MATH X 2 READ A A A nA A Space A leading colon Newline Square brackets Separates Comma separates shows that the Parenthesis andsa indicates that the headers several data fields following indicates message text inside is from data from each other command expression optional starts from the data root level of the command tree 3 12 Parameters dh Wy Introduction to SCPI Macros A macro is a single command that repre sents one or several other commands de pending on your definition You can define 25 macros of 40 characters in the counter One macro can address other
37. o FIN 4h yw y m INPUT A INPut 1 ATTenuation lt Numeric value gt MIN MAX 1 10 Not PMES8S COUPling A l Not PM6685 IMPedance lt Numeric value gt MIN MAX EVEN HYSTeresis lt Decimal data gt MAX MIN O PM6685 AUTO ONJOFF ONCE nly PM6685 LEVel lt Numeric wee AUTO POSINE pU SLOPe X FIL Ter LPASs STATe ONJOFF m INPUT B Not PM6685 INPut2 ATTenuation lt Numeric value gt MIN MAX 1 10 COUPling AC DC IMPedance lt Numeric value gt MIN MAX EVEN LEVel lt Numeric value gt MIN MAX AUTO ONIOFF ONCE SLOPe PO DET COMMon ONIOFF m INPUTE INPut4 EVENt SLOPe POS NEG dh Command Reference 9 43 4n yw yw 6 o INPut 1 2 ATTenuation PM6680B PM6881 2 Numeric value gt MAX MIN Attenuation Attenuates the input signal with 1 or 10 The attenuation is automatically set if the input level is set to AUTO Parameters Numeric values 5 and MIN gives attenuation 1 Numeric values gt 5 and MAX gives attenuation 10 Returned format 1 00000000000E 000 1 00000000000E 001 4l Example for Input A 1 SEND INP ATT _ 10 Example for Input B 2 SEND INP2 ATT 10 RST condition Input A 1 and Input B 2 1 but set by autotrigger since AUTO is on af ter RST INP LEV AUTO ON Complies to standards SCPI 1991 0 confirmed E __ __ A l LIE
38. of the Start stop channel Select if the counter should count positive or negative transitions with the IN Put SLOPe command of the measuring channel Parameters The first lt 1 2 4 5 6 gt is the channel to measure on and the second one is the start stop channel 1 means input A 2 means input B 4 means input E rear panel arming input 5 means input A prescaled by 2 6 means the internal reference If you omit the channels the instrument measures on input A with input B is the start stop channel 4h 9 72 Command Reference o ah wy PM6680B PM6681 MEASure TOTalize TIMed time for gate open 1 2 4 1 2 4 Totalize X Y During a Preset Time This is a count totalize function during a predefined time The start stop signal is generated by the counter and set by time for gate open The counter counts up for each event on the X channel and down for each event on the Y channel The result is the difference between the two channels If you only want to Totalize on X you must disable Y by setting both X and Y to the same channel or disconnecting the signal from Y Totalize Y MANUAL negative totalizing is possible if you physically disconnect the signal on the X input Select if the counter should count positive or negative transitions with the IN Put SLOPe command of the channels Parameters time for gate open is the time you want the totalizing to proce
39. 001 3 64852399E 001 Auto selects 3396 of Vpp as hysteresis so multiplying the first part of this reading by 3 will give you the signal amplitude 0 346 3 1 04 V in this example You can e Hysteresis 3 also calculate positive peak voltage Trigger Level and negative peak voltage yp Ces e Trigger Level Example 2 SEND 5 DMC AUTOELIDLT TINPSEYSTTAUTO a SISTINPTETLT a ol This example defines a macro AUTO which takes one argument i e auto ON OFF ONCE 51 SEND gt AUTOFILT OFF Turns off both the auto function and the filter Complies to standards IEEE 488 2 1987 Command Reference 9 119 e 6 e PM6680B 81 85 _ Decimal data Enable Macros This command enables and disables expansion and execution of macros If mac ros are disabled the instrument will not recognize a macro although it is defined in the instrument The Enable Macro command takes a long time to execute Parameters Decimal data is 0 or 1 A value which rounds to 0 turns off macro execution Any other value turns macro execution on Note that 1 or O is Decimal data not Boolean ONJOFF is not allowed here Returned format 0 1 J 1 indicates that macro expansion is enabled 0 indicates that macro expansion is disabled Example SEND EMC 1 Enables macro expansion and execution Complies to standards IEEE 488 2 1987 9 120 Command Reference mij mmm ESE PM
40. 5 6 7 5 76 Array ee ee ee GA AG 9 83 Function errors 9 81 One Result sc n n nnm 9 82 Scalar sow BG 3 o5 5 5 3 5 3 3 ono on 9 82 Read or Send Settings 9 110 Real XI Data format esses 7 8 9 38 9 95 Recalculate Data c 9 16 Recall ee tsatsa sess 2 5 7 5 9 58 9 127 Reference Selection TT 9 96 REMOTE CIPIT 1 5 Remote operation tc tc ts 3 6 Remote local v a ci 1 6 Remove AII macros n n n 9 1 26 One Macro ss x 9 76 9 128 Repetition n nn 123 Request Control RQC 6 21 9 121 Request Service sss r rte 9 130 Reset ee hes 2 3 3 19 9 109 9 128 Resolution as id Se Ga e Kala A 7 8 9 90 Response Data TID 3 9 Dala Format ss as s 9 39 9 43 Data Types sess st 6 7 6 8 9 38 Message cc n n 3 5 Message terminator 3 9 Messages cc o n 6 n n 3 7 Result Fetch ONG ccr rn K 9 34 Reading cetro 9 82 Retrieve Front panel setting 9 127 Measurement data 7 4 Measurement result 9 34 Rise Time Sie er ear a Sia ee ee a Ae oe c 9 91 Measurements eee 9 68 Trigger levels XT 9 49 Rmt a aa a a ae ee WA AG 3 9 Root level BS TAG a BG AL ea a LB a a Sep 3 8 Root node cis WR 4 OR OE BOR 4 R E RO RSOROR WR 4 5 3 8 RQC bit EU eue i Np we Ros es 6 21 9 1 21 RQS CLE 9 1 30 RST uu Pc 3 20 S Sample Size for Average 9 91 Sample Size for Statistics
41. 9 37 FORMAL cum 04 bo ees eot OE b a 9 38 FORMat 0 0 00 cee eee 9 38 FORMat FlXed 22er eus 9 39 FORMat SREGister 9 39 FORMat TINFormation 9 40 Initiate Subsystem 9 41 INITiate CONTinuous 9 42 INITiate 0000 9 42 Input Subsystems 9 43 INPute 1 2y COUPling 9 44 INPutx 1 2 ATTenuation 9 44 INPut HYSTeresis 9 45 INPUE FILTET samaan ama meee eae 9 45 INPut HYSTeresis AUTO 9 46 INPutx 1 2 IMPedance 9 47 INPut 1 2 LEVel 9 47 INPU LEVEL curate dh re GM bake 9 48 INPut LEVel AUTO 9 49 INPut LEVel AUTO 9 50 INPute 1 2 4y SLOPe 9 51 SINFUL COMMON 24 22 aaa kaw caras 9 51 Measurement Function 9 53 MEASure lt Measuring Function gt 9 56 MEASure ARRay Measuring Function gt 7 MEASure MEMory lt N gt 9 58 MEASure MEMory 9 58 MEASure x DCYCle PDUTycycley 9 59 EXPLANATIONS OF THE MEASURING FUNCTIONS 9 59 MEASure FREQuency 9 60 MEASure FREQuency BURS1 9 61 MEASure FREQuency PRF 9 62 MEASure FALL TIME 9 63 MEASure FREQuency RATio 9 63 MEASure VOLT MAXimum 9 64 MEASure VOLT MINimum 9 64 MEASure NWIDth
42. DDE bit uid ak OE dm dE COO ce der DE ES Dal a 6 21 9 121 Deadlock Wu ix Eur Wie JU desque a NS el Dev dE uL dd S N 3 5 Decimal data a D TIE 3 11 Declaration For GPIB interface eee mea 4 3 Default Na Se te IM 2 3 9 128 Presetting the counter 9 109 Deferred commands 777777 3 5 Define Macro reteset PE a GO tee sin ce 9 119 Delay After external start arming 9 7 9 10 After External Stop Arming 9 11 Delete one Macro 3 15 9 76 9 128 Device clear 10705777012 1 6 3 19 Device dependent Error DDE O A 6 21 9 121 Device initialization 3 19 Device Setup 9 124 Device specific errors 3 4 3 18 8 13 Standardized V iom e im Sa ae TE mede te Ud 8 11 Device Status le cas Ge cst im id cm up D sp de ud 9 1 30 Device Status Register Enable LC LEE 9 100 Event ES e VE a a T Ae 9 100 No 0 a a a EET M 9 100 Device Trigger 6n 6n 1 6 Diagnostics Subsystem 9 29 Display Enable Dd A AA 2 3 9 32 Off W hd decus 2E de JM Dar ie Cue de Vx GE EON ul de ie Do 9 32 On Wu da ly Jag CA E e ELO a et el dels rush 9 32 State Pr 9 32 Subsystem aa a E iw cone SUR E usce lcm a OE Dn 9 31 Double Precision floating point format Laa A a as a a a NG 9 38 Double quotes rr 3 12 DREGO DIDIT 9 1 31 Dumping measurement results 7 9 Duration See Pulse width Duty cycle measurements 9 59 Duty factor s sc secrete n 9 95 E BAV croce 6 1
43. Description description explanation examples Number 1150 Bad math expres Only a fixed specific math expression is recognized sion format by the counter and this was not it 1160 Measurement bro JA new bus command caused a running measure ken off ment to be broken off 11170 Instrument set to An internal setting inconsistency caused the instru default ment to go to default setting 1190 Error during calibra An error has occurred during calibration of the in tion strument 1191 Hysteresis calibra The input hysteresis values found by the calibration tion failed routine was out of range Did you remember to re move the input signal 1200 Message exchange An error occurred in the message exchange handler error generic error 1201 Reset during bus in The instrument was waiting for more bus input but put the waiting was broken by the operator 1 202 Reset during bus The instrument was waiting for more bus output to be output read but the waiting was broken by the operator 1 203 Bad message ex An internal error in the message exchange handler change control state 1204 Unexpected reason A spurious GPIB interrupt occurred not conforming for GPIB interrupt to any valid reason like an incoming byte address change etc 1205 No listener on bus This error is generated when the counter is an ac when trying to re tive talker and tries to send a byte on the bus but spond there are no active list
44. DoubleFreq while kbhit Restore ascii output format ibwrt Counter FORM ASCII 11 exit 0 C for National Instruments PC IIA Real Data Format 4 15 4h 4h Wy Wy Programming Examples 3 Frequency Profiling Frequency profiling visualizes frequency variations for a certain time This program gives an output file called PROFILE DAT If this file is imported to a spreadsheet program such as Excel you can create a graph like the one in the figure below o 200 5 gt 180 Q IL 160 140 120 100 0 0 02 0 04 Time Figure 4 2 This figure is the results of frequency profiling on a sweep generator include decl h include lt stdio h gt include lt process h gt include lt string h gt main int Counter 1 char ArmString 80 Insctring 80 double ArmDelay FILE OLD if ofp fopen PROFILE DAT w Counter ibfind DEV10 Enable arming etc ibwrt Counter TRIG COUN 1 ARM COUN 1 25 4 16 C for National Instruments PC IIA Frequency Profiling Programming Examples e ibwrt Counter INP LEV AUTO ONCE 18 ibwrt Counter DISP ENAB OFF ACQ APER 1E 6 30 ArmDelay 200e 9 CAPTURE PROFILE Pranrtti Prorrlitng s tor 1e0r 32410007 i 4 Set arming delay time sprintf ArmString ARM DEL 1e ArmDelay ibwrt Counter ArmString strlen ArmString Measure and read result i
45. Input Subsystems PM6685 INP FILT OFF INP SLOP POS Comparator A e INP IMP 1E6 INP IMP 50 INP FILT ON INP SLOP NEG INP HYST value in Volt INP LEV value in Volt Trigger points Reset points Figure 6 1 Summary of PM6685 input amplifier settings Input Subsystems 6 7 Using the Subsystems PM6680B PM6681 INP COUP AC INP COUP DC INP FILT OFF INP SLOP POS A INP FILT ON INP SLOP NEG INP IMP 1E6 INP IMP 50 INP ATT 1 i INP ATT 10 INP2 COUP AC INP2 COUP DC INP2 COMM ON INP2 SLOP POS B INP2 COMM OFF INP2 SLOP NEG INP2 IMP 1E6 INP2 IMP 50 INP2 ATT 1 INP2 ATT 10 INP4 SLOP POS IG INP4 SLOP NEG Figure 6 2 Summary of PM6680B PM6681 input amplifier settings 6 8 Input Subsystems Using the Subsystems Measurement Function The Measure function group has a differ ent level of compatibility and flexibility than other commands The parameters used with commands from the Measure group describe the signal you are going to measure This means that the Measure functions give compatibility between in struments since you don t need to know anything about the instrument you are us ing MEASure This is the most simple query to use but it does not offer much flexibility The MEA Sure query lets the instrument con figure itself for an optimal measurement starts the data acquisition and returns the
46. ON State WAIT FOR BUS ARM Operation Condition register status 320 Bustrig received or OFF immediate All ARM and TRIG loops completed State WAIT FOR EXT ARM and or INPUT TRIG Operation Condition register status 288 Arming received or l arm off immediate Single measurement and input trig ready State MEASURE Operation Condition register status 16 Figure 7 1 Trigger subsystem states Rough Trigger Subsystem Description 7 3 How to Measure Fast Some Basic Commands Here follows a description of some basic CNT 8X commands that control the mea surement sequence CONFigure The CONFigure command sets up the counter to do the measurement specified by the parameters of the command The command gives a limited number of pa rameter options such as Measurement function Measurement channel Number of measurements and sometimes also the following Measuring time Trigger level The counter sets up the rest of its func tions in the best way for the requested measurement This means that any instru ment setting may be changed by this command Examples Set up to measure frequency CONP FREO Set up to do 100 frequency measurements CONF ARRay FREQ 100 Set up to do 100 frequency measurements on the A channel CONF ARRay FREQ 100 Q1 Set up to do 100 frequency measurements on the A channel Expected frequ
47. PM6680B PM6681 INPut LEVel AUTO 2 lt Boolean gt ONCE Autotrigger If set to AUTO the counter automatically controls both the trigger level and the at tenuation If you have a stable amplitude use the AUTO ONCE and the autotrigger will determine the trigger level once and then set a fixed level From the bus input A and input B are always set to autotrigger individually ES Boolean I ON 0 OFF ONCE means that the autotrigger switches on checks the signal stores the trigger levels as manually set levels and then switches off auto This improves measuring speed Example for Input A 1 SEND INP LEV AUTO OFF Example for Input B 2 SEND INP2 LEV AUTO ON Returned format 1 0 RST condition ON 1 The autotrigger function normally sets the trigger levels to 50 of the signal ampli tude Two exceptions exists however Rise Fall time measurements Here the input 1 A trigger level is set to 10 and the Input 2 B trigger level is set to 90 of the amplitude Variable Hysteresis mode channel 7 The input 1 A trigger level is set to 75 and the Input 2 B trigger level is set to 25 of the amplitude Command Reference 9 49 ab wp INPut LEVel AUTO PM6685 2 lt Boolean gt ONCE Autotrigger INPut AUTO If auto is on the counter automatically controls the trigger level and the hyster esis If you have a stable amplitude use the AUTO ONCE and auto
48. Totalize X LU Seige i sae ae Soe me ea 9 72 Gated Voltage Measurement 9 97 GET 4555 ores 6 29 7 6 9 8 9 131 Get Macro Most eve iat cata NET Set iu Ge a Sue we Sia a eae 9 122 GPIB Address 1 4 9 108 Group Execute Trigger 9 131 H Header path a oP ar AA DES NS a CDL nm 3 1 0 Header separator s see e 3 8 High Speed Period Measurements 7 9 High Speed Voltage Measurements 9 92 Hold Off o OR 9o 5 9 5 o9 9 9 2 5 X 3 o3 01 2 3 Event Coun aaa 9 88 9 89 Event range 9 88 Events o o o o o n KK 9 88 Mode crt tt o n n n n XR 9 89 On Off o o n n n n KM 9 88 Setting time o 9 89 TIMO 9 89 Time Mode cr 9 89 Time range PI 9 89 Hysteresis KG Gana 3 9 3 n n o9 on 4 9 45 I Identification query cccc 9 123 Idle state ee 6 28 IFC R9 o9 o 5 93 on 9 3 5 3 o9 on 3 4 5 on 3 19 Immediate mode 9 8 Impedance 9 4 3 RR o9 4 9 9 3 9 oon 2 2 9 47 IKE 2 ee rand 3 19 3 20 5 6 7 4 Continuous 1117175 6 28 7 4 Continuously 7 6 9 42 Description AY 6 10 Immediate 7 7757677777r 6 28 Measurement 0 9 42 Subsystem ee ee e a a a E 9 41 Initiated state 6 28 Input AC DC co na 9 5 5 5 X 5 n 3 non n 9 44 Attenuation ss sss ss 2 2 9 44 Auto trigger coo 2 2 Common Ga Ga Kam GB GA ANG 2 2 Coupling km 9 o 9 93 o3 o9
49. UE v e C dm jw Des OE S RS CRUS CR e e 9 1 04 Override Bus Arm S Ju wj Mila ye di a TECUM ESO E a 9 8 P Packed Data format a a Ba o eh a ce 9 95 Parallel poll EE 1 6 Parameter list LLLI a M 3 12 Parenthesis ux 3 12 Parser TII 3 4 Peak to Peak Voltage dd aa dus D nu arar He ai Ge es cO Cd 9 68 Period measurements 9 67 Back to back JJ rM 7 9 Phase A 9 67 Pmt s rm II I IR 3 7 3 1 0 PON bit o 9 39 o3 4 o 9 5o on on 6 21 9 121 Positive slope 9 51 Power On ee ee 4 6 21 9 121 Status Clear Gana naaawa naan 9 126 Preset coco 2 3 9 109 Status at power on 9 126 Status registers sce 9 103 Preset Time totalize X Y During a 9 73 PREP 22211 n ee 9 62 Synchronization PM6685 9 96 Program message terminator 3 7 3 10 Program messages cccccccccv 3 7 Protected User Data ccc 9 127 Pulse Repetition Frequency c c 9 62 Width nn nn nm 9 65 9 91 Purge Macro n n n M 9 126 Q QUE o9 3 9 X o3 o3 o 3 9o o3 on on 9 130 9 131 Query Error 3 4 3 5 3 18 6 21 8 12 9 121 Multiple BG 9 5 3 5 8 9 ee o3 o3 won n 3 9 Questionable Data signal 9 130 Condition a 9 104 Enable 0 o o n n BB 9 105 Event cc o o o o n8 KK 9 105 Status group o 9 x 5 5 n RN 6 24 Quotes ilc 3 12 QYE bit coo wo wow o s 5 von on 6 21 9 121 R Ratio erro 9 63 Read cc occ cr
50. a decimal numeric data element con tained more than 255 digits excluding leading zeros see IEEE 488 2 7 7 2 4 1 128 Numeric data not al JA legal numeric data element was received but the lowed counter does not accept it in this position for the header 130 Suffix error This error as well as errors 131 through 139 is generated when parsing a suffix This particular er ror message is used when the counter cannot detect a more specific error 1314 Invalid suffix The suffix does not follow the syntax described in IEEE 488 2 7 7 3 2 or the suffix is inappropriate for this counter 134 Suffix too long The suffix contained more than 12 characters see IEEE 488 2 7 7 3 4 138 Suffix not allowed JA suffix was encountered after a numeric element that does not allow suffixes 149 Character data error This error as well as errors 141 through 149 is gener ated when parsing a character data element This par ticular error message is used when the counter cannot detect a more specific error 1441 invalid character Either the character data element contains an invalid data character or the particular element received is not valid for the header _144 Character data too The character data element contains more than 12 long characters see IEEE 488 2 7 7 1 4 148 Character data not JA legal character data element was encountered allowed where prohibited by the counter 150 String data error Th
51. command or MEASure query is issued all counter settings are set to the RST settings except those specified as parameters and channels in the CONFigure command or MEASure query You cannot use the MEASure query for TOTalize CONTinuous since this function measures without stopping continuously forever The MEASure query is a compound query identical to ABORt CONFigure sMeas func READ Parameters Measuring Function Parameters and Channels are defined on page 9 54 You may omit parameters and Channels which are then set to default Returned format data Where The format of the returned data is determined by the format commands FORMat and FORMat FIXed Example SEND MEAS FREQ 83 READ 1 78112526833E 009 This example measures the frequency on the C input and outputs the result to the controller Type of command Aborts all previous measurement commands if WAI is not used See also Explanations of the Measuring Functions starting on page 9 59 Complies to standards SCPI 1991 0 confirmed e 9 56 Command Reference e ah wy 808 8185 MEASure ARRay lt Measu ring Function a array size parameters lt channels gt Make an array of measurements The MEASure ARRay query differs from the MEASure query in that it performs the number of measurements you decide in the array size and sends all the measuring results in one string to t
52. cycle is 50 9796 Complies to standards SCPI 1991 0 confirmed Command Reference 9 59 e 6 e MEASure FREQuency expected value resolution M t 2 3 4 5 6 7 gt Frequency Traditional frequency measurements The counter uses the lt expected value gt and lt resolution gt to calculate the Measurement Time SENSe ACQuisition APER ture Example SEND gt MEAS FREQ Q3 READ lt 1 78112526833E 009 This example measures the frequency at input C PM6680B 81 85 The channel is expression data and it must be in parentheses ISS eters lt expected value gt is the expected frequency lt resolution gt is the required resolution lt 1 3 4 5 6 7 gt is the channel to measure on 1 means input A 2 means input B Only PM6680B and PM6681 3 means input C HF input option 4 means input E Rear panel arming input 5 means input A prescaled by 2 6 means the internal reference 17 means input A with the variable hysteresis mode Only PM6680B and PM6681 If you omit the channel the instrument measures on input A 1 1 The A input is always prescaled by 2 when measuring Frequency A and prescaled by 1 for all other functions Complies to standards SCPI 1991 0 confirmed 9 60 Command Reference PM6680B 81 85 MEASure FREQuency BURSt lt expected value resolution lt 1 2 3 4 5 6 7 gt Burst
53. defined macro SEND gt GMC LIMITMON READ 292 CALC STAT ON CALC LIM STAT ON CALC LIM LOW DATA S1 TAT ONY CALC LIM UPP DATA S2 gt STATUON B LMC Learn Macro Query This query gives a response containing the labels of all the macros stored in the Timer Counter Example SEND LMC READ MYINPSETTING LIMITMON Now there are two macros in memory and they have the following labels MYINPSETTING and LIMITMON Macros 3 15 Introduction to SCPI Status Reporting System Introduction Status reporting is a method to let the controller know what the counter is do ing You can ask the counter what status it is in whenever you want to know Standard Event Register Event Register PLL AE Enable Register HEEE waon O Operation Status Register Condition Register Logical OR SRQ message Figure 3 11 3 16 Status Reporting System You can select some conditions in the counter that should be reported in the Sta tus Byte Register You can also select if some bits in the Status Byte should gen erate a Service Request SRQ An SRQ is the instrument s way to call the controller for help Read more about the Status Subsystem in Chapter 6 Questionable Data Register Condition Register Device Register 0 514 3210 Status Byte Register per E Service Request Enable Logical OR CNT 8X Status register structure Introduction to SCPI E
54. done inside the measurement loop during the output of data ttakes longer time for PM6681 to determine trigger levels than for PM6680B why The reason is that PM6681 must find the correct level from 16 times as many triggerlevel setting steps than thePM6680B 85 1 25 mV steps versus 20mV steps Speed Summary 7 11 How to Measure Fast Measurements second Speed Individually sync measurements 130 120 110 100 PM6680B a es ls o ss ds lo bi AS 8E 07 1E 04 0 01 Measurement Time ASCII no ASCII all Y Real data no Real data all Speed Individually sync measurements 240 220 200 180 160 140 120 100 80 60 Measurements second 40 20 0 PM6681 8E 08 5E 05 0 005 6 4E 07 5E 04 Measurement Time 0 05 0 5 ASCII no ASCII all A Real data no Real data all Measurements second Speed Individually sync measurements 130 120 110 100 90 80 70 60 50 40 30 20 10 0 PM6685 a LULU 8 00E 07 1E 04 0 01 Measurement Time TE ASCII no ASCII all Real data no Real data all 7 12 Speed Summary How to Measure Fast ARM STARt LAYer COUNt 1 and TRIG COUNt lt N gt Block Synchronized Measurements Speed Improvement Actions TES x p LL e c O LL ga ar o 30 cr D LL CG rm ot 130 ZO E 85 dg 52 2 g ew Si A Dead Time
55. encountered while parsing the header for example no space followed the header thus GMC MACRO is an error 112 Program mnemonic The header contains more than 12 characters see too long IEEE 488 2 7 6 1 4 1 413 Undefined header The header is syntactically correct but it is unde fined for this specific counter for example XYZ is not defined for any device 114 Header suffix out of Indicates that a non header character has been en range countered in what the parser expects is a header el ement 120 Numeric data error This error as well as errors 121 through 129 are Numeric data error overflow from con version Numeric data error underflow from con version Numeric data error not a number from conversion generated when parsing a data element that ap pears to be of a numeric type This particular error message is used when the counter cannot detect a more specific error Error Code 105 to 120 8 3 Error Messages Command Errors Error Error Description Description Explanation Examples Number 4124 invalid character in An invalid character for the data type being parsed number was encountered for example an alpha in a deci mal numeric or a O in octal data 123 Exponent too large The magnitude of the exponent was larger than 32000 see IEEE 488 2 7 7 2 4 1 _124 Too many digits The mantissa of
56. gt parameter sets the trigger levels in volts If omitted the auto trigger level is set to 50 percent of the signal lt 1 2 4 6 gt is the channel to measure on 1 means input A 2 means input B Only PM6680B and PM6681 4 means input E Rear panel arming input 6 means the internal reference If you omit the channel the instrument measures on input A Complies to standards SCPI 1991 0 confirmed Command Reference 9 65 e 6 MEASure hae he edd DCYCle PM6680B 81 85 _ lt threshold gt 1 2 4 6 Positive duty cycle Duty Factor Traditional duty cycle measurement is performed That is the ratio between the on time and the off time of the input pulse is measured Parameters lt threshold gt parameter sets the trigger levels in volts If omitted the auto trigger level is set to 50 percent of the signal Q 1 2 4 6 is the channel to measure on 1 means input A 2 means input B Only PM6680B and PM6681 4 means input E Rear panel arming input 6 means the internal reference If you omit the channel the instrument measures on input A 1 Example SEND MEAS PDUT READ 75 097555E 001 In this example the duty cycle is 50 9796 Complies to standards SCPI 1991 0 confirmed pL M NI MEASure N Da bio icd PM6680B 81 85 threshold 1 2 4 6 Negative duty cycle Duty Factor Traditional dut
57. imer Counter Analyzers PM6680B PM6681 PM6681 R PM6685 PM6685R Programming Manual All rights reserved Reproduction in whole or in part is prohibited without written consent of the copyright owner TimeView is a trademark of Pendulum Instruments AB FLUKE is a trademark of Fluke Corporation TimeView uses the SPAWNO routines by Ralf Brown to minimize memory use while shelling to DOS and running other programs Pendulum Instruments AB Sweden 2000 II Table of Contents 1 Getting Started Finding Your Way Through This Manual 1 2 Manual Conventions 1 3 Setting Up the Instrument 1 4 Interface Functions 1 5 2 Bus Commands for the Benchtop User Default settings after RST 2 8 3 Introduction to SCPI What is OG PIT S ssepe xA S US oe e 3 2 How does SCPI Work in the Instrument 3 4 Program and Response Messages 3 8 Command Tree 3 11 Parameters o o ooocooooooo ooo 3 12 MacOS coc aa cides meee 3 15 Status Reporting System 3 18 Error Reporting 3 19 Initialization and Resetting 3 21 4 Programming Examples IntEO HH CUOI oa aereo i don ABA dabei xd 4 2 GW Basic for National Instruments PO P 4 3 Setting up the interface 4 3 1 Limit Testing cvs rm 4 4 3 Frequency Profiling 4 5 4 Fast Sampling
58. in the Standard Event Status Register when all pending selected device operations have been finished See also Example 4 in Chapter 4 Example Enable OPC bit SEND ESE 1 Start measurement INIT OPC will set the operation complete bit in the status register when the measurement is done SEND INIT OPC Wait 1s for the measurement to stop Read serial poll register will reset service request SPOLL Check the Operation complete bit 0 in the serial poll byte If it is true the measurement is completed and you can fetch the result SEND FETCh Then read the event status register to reset it SEND gt ESR If bit O is false abort the measurement SEND ABORt Complies to standards IEEE 488 2 1987 9 124 Command Reference PM6680B 81 85 OPC Operation Complete Query Operation Complete query The Operation Complete query places an ASCii char acter 1 into the device s Output Queue when all pending selected device opera tions have been finished Returned Format 17l See also Example 6 is Chapter 4 Complies to standards IEEE 488 2 1987 PM6680B 81 85 OPT Option Identification Response is a list of all detectable options present in the instrument with absent options represented with an ASCii 0 Returned format Bus option gt lt Prescaler option Where Bus option GPIB Prescaler option 0 10 20 0 for prescaler option means that no prescal
59. kHz for Time Interval and Pulse Width At 40 kHz the resolution is 1 400 or 2 6 digits Returned format HIGH LOW RST condition HIGH 9 90 Command Reference dh wy PM6680B PM6681 AVERage COUNt 2 Decimal data MIN MAX Average Samples Sets the number of samples to use when doing time interval averaging measure ments in AVER MODE COUN Applies to the functions PWIDTH TIME RISE and FALL TIME Parameters Decimal data is a number between land 65535 Returned format Decimal data RST condition 100 Command Reference 9 91 e 6 AVERage STATe PM6680B 81 85 _ Boolean Average or Single Switch on off the average function Parameters Boolean 1 ON 0 OFF ON means multiple period measurements for period related measurements and time interval av erage for Time Interval measurements OFF means that the counter measures on a single cycle This is the same as when pressing the SINGLE key on the front panel When Single is selected and an array measurement is done the Measurement Time set by Acquisition APERture Sets the time between the measure ments in the array This means that if you want a very high speed yo must set AVER STATE OFF and ACQ APER MIN Returned format Boolean RST condition ON FREQuency RANGe LOWer 5 Numeric value gt MIN MAX PM6680B PM6681 High Speed Voltage Measurements Use this comma
60. macros but you cannot call a macro from within itself recursion You can use variable parameters that modify the macro Use macros to do the following Provide a shorthand for complex com mands Cut down on bus traffic Macro Names You can use both commands and queries as macro labels The label cannot be the same as common commands or queries If a macro label is the same as a CNT 8X command the counter will execute the macro when macros are enabled EMC _1 and it will execute the CNT 8X command when macros are dis abled EMC 0 Data Types within Macros The commands to be performed by the macro can be sent both as block and string data String data 1s the easiest to use since you don t have to count the number of charac ters in the macro However there are some things you must keep in mind Both double quote and single quote can be used to identify the string data If you use a controller language that uses double quotation marks to define strings within the language like BASIC we rec ommend that you use block data instead and use single quotes as string identifiers within the macro When using string data for the 35 commands in a macro remem ber to use a different type of string data identifiers for strings within the macro If the macro should for instance set the input slope to positive and select the period function you must type Wr INDSSloDpecpos Funcc Pras
61. maintain the highest possible accuracy of the counter The calibration method of the PM6681 differs from the method used in PM6680B and PM6685 m PM6680B PM6685 The intepolators are automatically cali brated before each measurement This procedure takes only a fraction of a sec ond but to increase speed you can turn off the auto calibration 6 4 Calibration Subsystem Subsystem m PM6681 In PM6681 the interpolators are factory calibrated Calibration must be performed only after repair and can be performed at your local Service centers If the calibration is lost for any reason the counter will show ZL HL LUSEZ By pressing PRESET you can bypass this message and use the counter anyway however you must press the front panel key No bus command takes you past this error message This is so that you cannot bypass the message by mistake and run a test sys tem without a calibrated instrument Using the Subsystems Configure Function The CONFigure command sets up the counter to make the same measurements as the MEASure query but without initi ating the measurement and fetching the result Use configure when you want to change any parameters before making the measurement Read more about Configure under MEA Sure Configure Function 6 5 b Using the Subsystems Format Subsystem Time Stamp Readout Format It 1s not trivial to decide how time stamped measurements are to be pre sent
62. measurement ABORt bus trigger Default state RST external signal level or pulse after power on or reset pon 10 occurrences of a pulse on the external trigger input Trigger system initiated Aag other instrument ready Trigger system signal switching initiated Completed No input signal present eas eS 1 second after input signal is present Arm Layer sourcing output signal ARM conditions Completed satisfied No of TRIGger switching system ready loops Trigger Layer TRIGger conditions Instrument satisfied Actions complete Instrument Actions Figure 6 15 Generalized ARM TRIG model Trigger Arming Subsystem 6 27 ah wp Using the Subsystems This trigger configuration is sufficient for most instruments More complex instru ments such as the CNT 8X have more ARM layers The Wait for TRIG event detection layer is always the last to be crossed be fore instrument actions can take place Structure of the IDLE and INITIATED States When you turn on the power or send RST or ABORT to the instrument it sets the trigger system in the IDLE state see The trigger system will exit from the IDLE state when the instrument receives an INITiate IMMediate The in strument will pass directly through the INITIATED state downward to the next event detection layers if the instrument contains any more layers The trigger system will return to the INI TIATED s
63. memory That memory can store 6143 measure ment results When full the measurement must be stopped and the results fetched by the controller Note also that some functions are dis abled to obtain high measurement speed You cannot use external arm trig or hold off Statistics 1s also disabled Example 1000 back to back periods OSENSTSUNCAUPERALV Select period as measurement function INP COUPLDC Select DC coupling INP LEV AUTO_OFF Turn off Auto Trigger INP LEV 1 Set fixed trigger level SENS ACQ RES LOW Select low resolu tion high speed measurements SENS INT FORM_PACK Suspends the re sult calculation until the capture is ready TRIG COUN_1000 ARM COUN A Set up PM6681 for 1000 measurements INIT Start a capture FETC ARR 2 1000 Fetch the 1000 results from the internal PM6681 memory 40000 measure ments second 7 9 How to Measure Fast Supervising a Process One typical use of a counter in the indus try 1s to measure a parameter and alert the adjusting machinery when the parameter gets close to the correct value The ma chinery now slows down for an accurate final adjustment of the parameter and stops the adjustment procedure when the value is correct An example of such a procedure is when a laser adjusts the value of a resistor that is connected to an oscillator You mea sure the frequency of the oscillator and the laser cuts the resistor until the oscilla tor oscilla
64. model page 6 27 The Questionable Data Register reports when the output data from the CNT 8X may not be trusted The Device Register 0 reports when the measuring result has exceeded prepro grammed limits The Output Queue status reports if there is output data to be fetched The Error Queue status reports if there are error messages available in the error queue The Status Byte contains eight bits Each bit shows if there 1s information to be fetched in the above described registers and queues of the status structure Using the Registers Each status register monitors several con ditions at once If something happens to any one of the monitored conditions a summary bit is set true in the Status Byte Register Enable registers are available so that you can select what conditions should be re Using the Subsystems ported in the status byte and what bits in the status byte should cause SRQ A register bit is TRUE i e some thing has happened when it is set to 1 Itis FALSE when set to 0 Note that all event registers and the status byte records positive events That is when a condition changes from inactive to ac tive the bit in the event register is set true When the condition changes from active to inactive the event register bits are not affected at all When you read the contents of a register the counter answers with the decimal sum of the bits in the register St
65. omit the channel the instrument measures on input A 1 Complies to standards SCPI 1991 0 confirmed PM6680B PM6681 MEASure PHASe lt expected value gt lt resolution gt 1 2 1 2 Phase A traditional PHASe measurement is performed Parameters lt expected value gt and lt resolution gt are ignored by the counter The first 1 2 is the start channel and the second 1 2 is the stop channel 1 means input A 2 means input B If you omit the channel the instrument measures between input A and input B Complies to standards SCPI 1991 0 approved Command Reference 9 67 4h e e MEASure VOLT PTPeak 1 2 Peak to Peak Voltage PM6680B PM6681 This command make measures the peak to peak voltage with the input DC cou pled Parameters 41 25 is the channel to measure on 1 means input A 2 means input B Complies to standards SCPI 1991 0 confirmed MEASure RISE TIME PM6680B PM6681 slower threshold upper threshold expected value gt lt resolution gt 1 Rise time The transition time from 1096 to 9096 of the signal amplitude is measured The measurement is always a single measurement and the Auto trigger is always on setting the trigger levels to 10 and 90 of the amplitude If you need an aver age transition time measurement or other trigger levels use the SENSe subsy
66. passed the limit and a O if the limit testing has passed The following events reset the fail flag Power on RST A CALC LIM STAT OFF CALC LIM STAT WON transition Reading a 1 with this command Returned format 1 0 1 Example SEND SENS FUNC FREQ CALC LIM STAT n ON CALC LIM HIGH 1E3 READ WAI CALC LIM FAIL READ lt 1 if frequency ia above 1kHz otherwize O Complies to standards SCPI 1991 0 confirmed PM6680B 81 85 CALCulate LIMit LOWer 2 Decimal data MAX MIN Set Low Limit Sets the value of the Lower Limit i e the lowest measurement result allowed be fore the counter generates a 1 that can be read with CALCulate LIMit FAIL or by reading the corresponding status byte Parameters Parameter range 9 9 10 to 9 9 10 Returned format lt Decimal data RST condition 0 Complies to standards SCPI 1991 0 confirmed Command Reference 9 17 4h e CALCulate LIMit LOWer STATe PM6680B 81 85 _ Boolean Check Against Lower Limit Selects if the measured value should be checked against the lower limit Parameters Boolean 1 ON O OFF Returned format 1 O d RST condition 0 Complies to standards SCPI 1991 0 confirmed CALCulate LIMit UPPer PM6680B 81 85 2 Decimal data MAX MIN Set Upper Limit Sets the value of the Upper Limit i e the highest meas
67. reading should represent full scale As default the scaling factor is 1 1E0 This means that the full scale value is 0 999 and the analog output converts the fraction digits to the right of the decimal point to a voltage The scaling factor should be Scaling factor IEEE ZEN full scale value where full scale value is the value for which you want the analog output to out put its maximum voltage 5 V Example Take a measurement result for instance 12 34567890 E 6 Hz Represent this result without exponent 12345678 90 Hz Multiply this value with the scaling factor for instance 0 001 12345 67890 Take the fractional part of the result 67890 Output Subsystem 6 11 Using the Subsystems This 1s the value that will determine the output voltage 00 will give 0 V and 99 will give 5 V This means that the reading will give 67890 5 3 3945 V This 1s ouput as 3 38 V due to the 0 02 V resolution of the analog output Default scaling factor 1 ID Da E a a a a 6 Li NA NITA Same exponent opposite sign Scaling factor 1E 6 tI AIE C JHONG ILI TI 5 SII Lj Figure 6 4 To use the shown deci mal point as reference set the exponent of the scaling factor to the same value as the expo nent of the measurement result but with opposite sign 6 12 Output Subsystem B Resolution The analog output range is 0 to 5 V in 250 steps so one step is 0 02 V If the
68. readout All values will be separated by commas Parameters Boolean 1 ON 0 OFF Returned format 1 0 RST condition OFF 9 40 Command Reference Initiate Subsystem ate IMMediate inuous ON OFF Command Reference 9 41 INITiate PM6680B 81 85 Initiate Measurement The INITtate command initiates a measurement Executing an INITiate com mand changes the counter s trigger subsystem state from idle state to wait for bus arm state see Figure 6 15 The trigger subsystem will continue to the other states depending on programming With the RST setting the trigger subsystem will bypass all its states and make a measurement then return to idle state See also How to use the Trigger Subsystem at the end of this chapter Complies to standards SCPI 1991 0 confirmed INITiate CONTinuous PM6680B 81 85 _ Boolean Continuously Initiated The trigger system could continuously be initiated with this command When Con tinuous is OFF the trigger system remains in the idle state until Continuous is set to ON or the INITiate is received When Continuous is set to ON the comple tion of a measurement cycle immediately starts a new trigger cycle without enter ing the idle state i e the counter is continuously measuring and storing re sponse data Returned format Boolean RST condition OFF Complies to standards SCPI 1991 0 confirmed 4h 9 42 Command Reference
69. result m Example SEND MEASure FREQ This will execute a frequency measurement and the result will be sent to the controller The instrument will select a setting for this purpose by itself and will carry out the re quired measurement as well as possible moreover it will automatically start the measurement and send the result to the controller You may add parameters to give more details about the signal you are going to measure for example SEND MEASure FREQ 20_MHz 1 Where 20 MHz is the expected value which can of course also be sent as 20E6 and 1 is the required resolution 1 Hz Also the channel numbers can be speci fied for example SEND MEASure FREQ _ 3 SEND gt MEASure FREQ 20E6 1 1 CONFigure READ The CONFigure command causes the in strument to choose an optimal setting for the specified measurement CONFigure may cause any device setting to change READ starts the acquisition and returns the result This sequence operates in the same way as the MEASure command but now it 1s possible to insert commands between CONFigure and READ to fine tune the setting of a particular function For exam ple you can change the input impedance from 1 MQ to 50 Q Measurement Function 6 9 Using the Subsystems m Example SEND CONFigure FREQ 2E6 1 2E6 1s the expected value 1 is the required resolution 1Hz SEND INPut IMPedance50 OHM Sets input impedance to 50 Q SEND
70. scaling factor is 1 one such step 1s taken each time the display changes with X 004 and if the scaling factor is 4 one step is taken each time the display changes with X 001 The X in the above paragraph can be any digit and does not influence the output voltage If the display changes from 0 996 to 1 000 the voltage drops from 4 98 V to OV If the display value in creases further the output voltage starts Output voltage Scaling factor 1 V LZ 0 000 i 2 000 Displayed 0 996 1 996 value Scaling factor 4 S z S Displayed S O o K O value V O o O eU ch Figure 6 5 Output voltage versus displayed value for two different scaling factors to increase again see Using the Subsystems Sense Command Subsystems Depending on application you can select different input channels and input charac teristics B Switchbox In automatic test systems it is difficult to swap BNC cables when you need to mea sure on several measuring points With PM6680B 1 you can select from three different basic inputs A B and E on which the counter can measure directly without the need for external switching devices With PM6685 you can select from two different basic inputs A and E B Prescaling For all measuring functions except fre quency the maximum input A frequency is 160 MHz To extend the range for frequency mea surements PM6680B and PM6685 can divide scale the input A frequency b
71. shorter saving time TRIG COUNT 6143 N A 42 NA INT FORM_PACK 1 15 12 115 You cannot use limit monitoring math ematics etc in the CALC subsystem nor the Display or the Output subsys tems TRIG COUNT 1000 o N A 0 13 NA These commands all together will in E B USUS crease measurement speed the last ABM cT A LAY E SOUR step from about 4000 to over 8000 _ IMM measurements s INP LEV AUTO_OFF All together FORM TINF_OFF NA 0 NA No timestamping possible This only influences the read Time stamps are always registred internally All these time gain estimates are approximations valid for frequency A mea surements and may be changed without notice The time gain loss depends on measuring function Speed Summary 7 15 How to Measure Fast Single Speed Switch Command for PM6680B 85 since many parameters must be set to get the highest measuring speed it is simpler if you use the macro function send the following lines to turn on mac ros define one macro called FASTFREQ and one macro called SLOWFREQ SEND EMC 1 SEND DMC_ FastFreg ACO APER MIN AVER STATLOFF INP LEV AUTO OFF DISP ENABL OFF CAL INT AUTO OFF SENS ACQ RES LIOW SEND DMC SlowFreq ACQ APER 200 ms AVER STAT_ON INP LEV AUTO_LON DISP ENAB ON CAL INT AUTOLON SENS ACO RES HIGH Now you just have to send FASTFREQ to the counter to
72. this counter are as follows t sets all bits of the Device status Enable Registers to 1 It sets all bits of the Questionable Data Status Enable Registers and the Operation Status En able Registers to 0 The following registers never change in the counter but they do conform to the standard STATus PRESet values All bits in the positive transition filters of Questionable Data and Operation status registers are 1 All bits in the negative transition filters of Questionable Data and Operation status registers are O Complies to standards SCPI 1991 0 confirmed Command Reference 9 103 e 6 4h wy EAST AAA AAA ES STATus QUEStionable CONDition ERS Haa PM6680B 81 85 Read Questionable Data Signal Condition Register Reads out the contents of the status questionable condition register Returned Format lt dec data gt the sum between 0 and 17920 of all bits that are true See table below Bit No Weight Condition 14 16384 Unexpected parameter 10 1024 Timeout or no signal detected 9 512 Overflow Complies to standards SCPI 1991 0 confirmed Device status continously monitored Questionable data signal status condition register STATus QUEStionable CONDition Transition filter Fixed in the counters Questlonable data signal status event registers Latched conditions STATus QUEStionable EVENt Logical SR Questionable data signal status enable register Selects which e
73. to standards SCPI 1991 0 confirmed EA A v cr MEASure VOLT MINimum PM6680B PM6681 1 2 Negative Peak Voltage This command measures the negative peak voltage with the input DC coupled Parameters I1 2 is the channel to measure on 1 means input A 2 means input B Complies to standards SCPI 1991 0 confirmed e 9 64 Command Reference e dh Wy PM6680B 81 85 MEASure NWIDth lt threshold gt lt 1 2 4 6 gt Negative Pulse Width A negative pulse width measurement is performed This is always a single measurement If you need an average pulse width mea surement use the SENSe subsystem instead Parameters lt threshold gt parameter sets the trigger levels in volts If omitted the auto trigger level is set to 50 percent of the signal lt 1 2 4 6 gt is the channel to measure on 1 means input A 2 means input B Only PM6680B and PM6681 4 means input E Rear panel arming input 6 means the internal reference If you omit the channel the instrument measures on input A Complies to standards SCPI 1991 0 confirmed porno aaa PM6680B 81 85 MEASure PWIDth lt threshold gt lt 1 2 4 6 gt Positive Pulse Width A positive pulse width measurement is performed This is always a single measurement If you need an average pulse width mea surement use the SENSe subsystem instead Parameters lt threshold
74. will determine the trigger level once and then set fixed levels Parameters Boolean 1 ON O OFF ONCE means that AUTO first switches ON to check the signal After determining suitable sen sitivity and trigger level setting it programs these values as if they where manually set It ends by switching off AUTO Using ONCE instead of AUTO ON improves measuring speed Returned format 1 0 Example SEND INP LEV AUTO OFF This example switches off AUTO enabling the programmed trigger level setting RST condition ON 1 The autotrigger measure peak to peak level and sets the lower level of the hyster esis band to 33 and the upper level to 66 of the value for pulse and duty factor measurement both levels are set to 50 e 9 50 Command Reference e ah wy A M ZZLLLLLLLLLLLLLLLLLZLZAZAZJS EL cc paaagaaaaanaaaawwrre c PM6680B 81 85 INPut 1 2 4 SLOPe 2 POS NEG Trigger Slope Selects if the counter should trigger on a positive or a negative transition Selecting negative slope is useful when measuring negative pulse width and negative duty cycle When you select negative slope the counter always uses the non prescaled mode limiting the maximum input frequency to 160 MHz This can be useful when you want to make fast frequency measurements Using positive slope the counter needs two input cycles to make a SINGLE frequency measurement but when set to negative slope only one input cycle
75. 10 Command Error CME Code list dida ias AA a a e ar da oh a 8 2 Command tree ee ee W KG 3 8 Commands ita fa By gmc tar te oh ER pee perl daa e 3 20 CLS up p Teh ae 3 20 9 118 DMO naa emm 3 13 9 117 9 119 EMC Vou ao e dr Um uy cer des SR JE e 3 14 9 120 ESE A 9 117 9 121 ESR a ee ee ay ewe ee ee ee ap a ee US 9 122 GMC CEPI ae ee Ser 3 15 9 122 IDN a Fu uw xis m x Ux PEN ae 9 123 L MC X Cerise uer im aa me ER a AA 9 117 9 123 MC eee Ge ee wu wr ee UN UNE aio UR 3 15 RN AA 9 124 OPT go la ie a le a 9 125 PMG s ome ens 3 14 9 117 9 126 PSC apak Ms rlw O mou R AS p TES a 9 117 9 126 RCL wi Ja a ES ac ome a de ar che oe a del a e e tea e 9 127 RST II 9 117 SRE VoU wl a a os dun 6 17 9 130 STB Siko we Woo e E e a 9 117 9 131 TRG PI 6 29 9 8 9 131 TST DL Ae ete a ee ee a 9 117 9 132 WAI d ow RS E OR OE RO X R 03 5 5 rob d o 9 132 ABORt Row Vee ws oe ve a ew ee 9 4 ACQuisition APERture 9 87 Acquisition HOFF s s 44a 9 88 Acquisition HOFF ECOunt 9 88 Acquisition HOFF MODE 9 89 Acquisition HOFF TIMe 9 89 Acquisition RESolution 177771 9 90 ARM wich fy a a Eee OUR UE 9 Ux d vx UE a e x cis 9 8 ARM LAYer2 SOURCe 7 9 8 ARM SEQuence LAYer1 COUNt 9 6 ARM SEQuence LAYer1 DELay Wu m m a a del OEC E E de des wm d 9 7 9 10 ARM SEQuence LAYer1 SOURce 9 9 ARM SEQuence1 LAYer1 ECOunt gi
76. 3 9 don 2 2 9 44 Filter n n n n n n n KK 2 2 Impedance ee ee a 2 2 9 47 Selecting Co ee ee 3 KAN 6 13 Selecting channel 9 93 Slope AY 2 2 Subsystems casa 9 43 Swap TENE 2 2 Trigger level c n n n 2 2 INPut block n o n KA 5 3 Instrument model 9 2 Interface clear 3 19 Internal format 9 95 Internal reference 2 3 9 96 Interpolators Calibration of 9 24 Interrupted s n 0 8 3 5 Interval Time 0 n n n B 9 69 K K LandM ecc nene 9 20 9 21 Keywords o 9 8 o9 o3 9o d 5 4 o 5 n od n 3 11 L Leading ZeroesS o n n n 9 39 Leaf node ss n n n n n n K amp MK 3 10 Learn Device Setup 9 124 Learn Macro n n e n e 9 123 Level Fixed trigger 9 47 Set Trigger 9 48 Limit Check lower n n n n 9 18 Check Upper ee i 4 o 3 5 on 9 19 Enable ss 9 16 Enable monitoring 9 22 Example ca 4 4 4 14 Fal n n n n n n n n n X 9 17 Monitoring Bb 5 o 3 3 o 5 5 X 3 o5 on 6 26 VIII Passed cc o o e nnm 9 100 Set lower n n n n n KKI 9 17 Set ajojo a 9 18 Listener TUDCUO ox rasta 1 6 Local f f n n ee 1 5 Control co nn nasa 5 5 9 o9 4 1 5 Lockout rsrsrsr o o o o n KK 3 6 Operation 8 9 4 3 93 4 c 3 9 3 o3 9 a n o9 n 3 6 Long form co 3 9 8 o9 o9 o3 con on n 3 8 Lo
77. 4 OPC7 liess 9 125 OPT ss 9 125 PSC Lies 9 126 1 A eimi 9 126 PUDO e 9 127 PRO RR 9 127 RMC Lo eme NG ok essa 9 128 RST oo ec cece ee 9 128 SA Lees 9 129 aS s 9 130 SIDO DERE 9 131 TRG ccc cece erence 9 131 Qc ERE 9 132 WAI 0 aa 9 132 10 Index VI Chapter 1 Getting Started Getting Started Finding Your Way Through This Manual You should use this Programming Manual together with the PM6680B 1 5 Operators Manual That manual contains specifications for the counter and explanations of the possibilities and limitations of the different measuring functions Sections The chapters in this manual are di vided into three sections aimed at dif ferent levels of reader knowledge The General Section which can be disregarded by the users who know the IEEE 488 and SCPI standards Chapter 2 Bus Commands for the Benchtop User gives bus com mands for the front panel keys Chapter 3 Introduction to SCPI explains syntax data formats sta tus reporting etc The Practical Section of this manual contains Chapter 4 Programming Exam ples with examples of typical pro grams for a wide variety of appli cations These programs are writ ten in GW basic and C 1 2 The Programmers Reference Sec tion of this manual contains Chapter 5 Instrument Model ex plains how the instrument looks from the bus This instrument is not quite the same as the one used from the f
78. 4 Returned Format lt dec data gt the sum between 0 and 17920 of all bits that are true See the table on page 9 104 Complies to standards SCPI 1991 0 confirmed Command Reference 9 105 4h e e This page is intentionally left blank 9 106 Command Reference System Subsystem SYSTem COMMunicate GPIB ADDRess ERRor PRESet SYSTem SDETect ENABIe SET TIME ELAPsed TOUT STATe TIME UNPRotect VERSion m Related common command IDN OPT PUD arbitrary block program data RST Numeric value MIN MAX ON OFF pa Only PM6685 lt Block data gt ON OFF lad timeout value Command Reference 9 107 SYSTem COMMunicate GPIB ADDRess Numeric value gt MAX MIN Numeric value MAX MIN Set GPIB Address 80B 81 85 This command sets the GPIB address This selection overrides the switches on the rear panel of the counter The set address is valid until a new address is set either by bus command switch setting or via the front panel AUX MENU Parameters Numeric value is a number between O and 30 MIN sets address O MAX sets address 30 sNumeric value MAX MIN sets a secondary address This is accepted but not used in PM6681 and PM6685 PM6680B does not accept a secondary address SELF This optional parameter is accepted by PM6681 and PM6685 PM6680B does no
79. 6 9 108 9 130 9 131 Enable Analog Out 6 n 9 80 Calculation mai m sec m Mac de DES an Mc et e wore e da 9 22 Display n n 9 32 Macros Ic 9 1 20 Mathematics wen Ko DLE 9 21 Monitoring of Parameter Limits 9 16 Service Request 777 9 130 Standard Event Status 9 121 Statistics Ba dea ja Varus Wan Jw a Se ee ee n 9 1 4 Error ASCII description 9 108 Available Rein Han tan a arcane co ler DERE es el 9 1 30 Clearing queue 777777 9 118 Command wy Oe a a e A a 8 2 Device specific code list 8 13 Escape from condition 3 19 Execution ee Ste A ena 8 7 In self test LL a Ge 9 1 32 Message available cc 6 16 Query code list 1177777777 8 12 Queue n n 3 17 6 16 8 2 Reporting ss n 6 nnn 3 17 Standardized device specific list 8 11 Standardized numbers 3 17 ESB ear 9 121 9 130 9 131 Escape from erroneous conditions 3 19 Event Clearing registers 9 118 Detection DO e lm ea E a e e 6 28 Read Device Status Event Register Bt Gt ee Ue e SURE AA AA 9 100 SUS DIL EA n e e a 9 121 9 130 Status Register 9 122 Events Before Start Arming External 9 7 9 10 Hold Off u s cosa do Ge arayat del XU Sun pS NG cedar in 9 88 Example language 1 4 EXE bit du sale aa galeis O GP ees a Jun TB del ta 6 21 9 121 Execution Control acc aro aa Na uta E a tn a 3 4 EI OT 3 99 ceo ois 3 4 3 18 6 21 9 121
80. 6680B 81 85 _ Decimal data Standard Event Status Enable Sets the enable bits of the standard event enable register This enable register contains a mask value for the bits to be enabled in the standard event status regis ter A bit that is set true in the enable register enables the corresponding bit in the status register An enabled bit will set the ESB Event Status Bit in the Status Byte Register if the enabled event occurs See also status reporting on page 3 14 Parameters lt dec data gt the sum between 0 and 255 of all bits that are true Event Status Enable Register 1 enable Bit Weight Enables T 128 PON Power on occurred 6 64 URQ User Request 5 32 CME Command Error 4 16 EXE Execution Error 3 8 DDE Device Dependent Error 2 4 QYE Query Error 1 2 RQC Request Control not used 0 1 Operation Complete Returned Format Decimal data Example SEND ESE n 36 In this example command error bit 5 and query error bit 2 will set the ESB bit of the Status Byte if these errors occur PON URQ CME EXE DDE QYE RQC OPC Standard Event Status Register 7 6 5 4 3 2 1 0 ESR 32 16 8 4 2 1 128 64 Power ON User Request Command Error Execution Error Device Dependent Error Query Error Not used Request Control Operation Complete Figure 9 3 Bits in the standard event status register Complies to s
81. 88 2 standard PON URQ CME EXE DDE QYE RQC OPC Standard Event Status Register ESR ESE lt NRf gt ESE Logical OR Output Queue not empty Sonico RQS Status Byte Request 7 Gesemv 3 2 1 0 Register y Generation MS read by STB dis llli signal j Service Request Enable Mig L E T1 X 1 3 l Logical OR Figure 6 8 Standard status data structures overview 6 20 Status Subsystem Using the Subsystems m Standard Event Status Register Bit 7 weight 128 Power on PON PON URQ CME EXE DDE QYE RQC OPC Standard Event Status Register 7 6 5 4 3 2 1 0 ESR 64 32 16 8 4 2 1 128 Power ON User Request Command Error Execution Error Device Dependent Error Query Error Not used Request Control Operation Complete Bits in the standard event Status register Figure 6 9 Shows that the counter s power supply has been turned off and on since the last time the controller read or cleared this register Bit 6 weight 64 User Request URQ Shows that the user has pressed a key on the front panel of CNT 8X except LO CAL PRESET The URQ bit will be set regardless of the remote local state of the counter The purpose of this signal is for example to call for the attention of the controller by generating a service request Bit 5 weight 32 Command Error CME Shows that the instrument has detected a command error This means
82. 9 102 STATus QUEStionable CONDition su xa a ws ss IE S iE ee NR E Eo UE 9 104 STATus QUEStionable ENABle 9 105 STATus QUEStionable 9 105 SYS lem ERRO S vs oem 9 108 SYSTem PRESet coo 9 109 OY OEM OE T A e pete donne 9 110 SYSTem TIME ELAPsed 9 110 ESO TEM TOUT eds s m oar 9 111 SYSTem UNPRotect 9 111 9 112 TEST SELECL data AGA nA 9 114 TOTaliZe GATE 9 s ex tees 9 97 TRIGger SEQuence1 COUNt 9 116 TRIGger STARt COUNt 9 116 VOLTage GATed STATe 9 97 RCL Pow wk fav Be des as Rc ia 9 117 SOC ee wow XO OR x x Ew a es 9 101 SOEn V ow Hla ES ND V ed er TR CV eR RR 9 102 SOEv CE 9 103 Common Commands 3 8 9 117 Common via A saa abah A Xo UE nw 2 2 Comparator Calibration 9 30 Configure essa 5 5 5 6 7 4 9 26 Array sott n n n n n n nn 9 27 Description La aa a a a ee es 6 9 Function m 9 25 9 53 Scalar vi oa e a ie et oe ae A a a 9 26 Continuous Period measurements gt 7 9 7 15 Continuously Initiated 9 42 Control function 1 5 Controller synchronization 7 2 Conventions E A T Sc Na 123 Coupling See AC DC Cutoff frequency sns 9 45 CW Cr 9 61 D Data Recalculate PLUIE 9 1 6 Data format CUm 7 8 Internal a a a Na ee Ga 9 95 Data Format E AA Ms 9 39 Data Type MEEA a ga re NG 9 38 9 39 DC coupling See AC DC DCL Wow dM denm eS ON ec Wigs ce eed E 3 1 9
83. 97 High Speed Measurements 9 92 Negative Peak UMP EE 9 64 Peak Cr PLUIE 9 64 Peak to Peak E Oe ee ee 9 68 W WAI C 5 4 Wait for bus arming WFA 6 23 Waiting for bus arming Status CIT 9 1 02 Waiting for trigger and or ext arming WET e f e 6 23 Waiting for triggering Status inus cuo des dece Decus a Ue JR DS OM S URS ud 9 1 02 Wait to continue se som etm 9 132 Waveform compensation 9 48 WFA bit Rom m 0 dE EORR Roo UR ES i AC m ew NG 6 23 WFT bit So dak two ia Us mo dm up DEI 0 UE EO ues De Eo cw S RO n 6 23 X X PCT UTETETT 3 8 X gated by Y accumulated totalize 9 70 X gated by Y totalize 9 72 X start stop by Y totalize 9 72 X1 X10 attenuation essees 9 44 Xn 1 r m 2 5 XOLD zc now a pog qe ey ka ee a xn 9 21 X Y During a Preset Time totalize 9 73 Y Y accumulated totalize X gated by 9 70 Y totalize X gated by 7077771 9 72 Y totalize X start stop by 9 72 XIV
84. Between Measurements PM6680B PM6681 PM6685 9 ms 4 5 ms 9 ms v 2 ms 1 3 ms 2 5 ms v v 0 5 ms 0 12 ms 0 6 ms v v v 0 5 ms 0 025 ms 0 6 ms N3 N3 1 The GPIB format command will not affect the dead time for the block synchro nized mode because the counter captures all data before transferring it to the con troller 2 Switching the real time calculations on off In the block synchronized mode will significantly decrease the dead time however the time for calculations 2 ms for PM6680B 85 and 1 ms for PM6681 is added to the transfer time In PM6661 low resolution is used for Back to Back period measurements The measuring time has no effect in this mode Only the Timestamps are used Speed Summary 7 13 b How to Measure Fast Measurements second Measurements second Thousands Y O al S Co N 8E 07 1E 04 0 01 4 Speed Block sync measurements PM6680B A Block data all ia Block data no Measurement Time Speed Block sync measurements PM6681 E E Block data all am Block data no 8bE 08 5E 05 0 005 6 4E 07 5E 04 0 05 Measurement Time 14 Speed Summary Speed Block sync measurements PM6685 2000 1750 1500 pe S 1250 A 8 Block data all 72 2 1000 a o Block data no oO o oO oO 500 250 0 FLEE pt 8 00E 07 1E 04 0 01 1 Measurement Time Calculating the Measur
85. CLS Command Use this command to clear the status data structures See Status Reporting system in this chapter The following happens when you use the CLS command The instrument clears all event registers summarized in the status byte register It empties all queues which are summa rized in the status byte register except the output queue which is summarized in the MAV bit 3 20 Initialization and Resetting Chapter 4 Programming Examples Programming Examples Introduction Each program example in this chapter is written for IBM PC compatible comput ers equipped with the National Instru ments PC IIA In addition to that many of the examples are written in both GW BASIC and C Even if you do not have these interface board or use these computer languages look at the examples anyway They give you a good insight on how to program the instrument efficiently To be able to run these programs without modification the address of your counter must be set to 10 Example 1 Limit Testing Example 2 REAL Data Format Example 3 Frequency Profiling Example 4 Fast Sampling Example 5 Status Reporting Example 6 Statistics this example is only for PM6680B and PM6681 4 2 Introduction Programming Examples GW Basic for National Instruments PC IIA Setting up the interface All these programs start with a declaration containing three lines of setup information for the
86. Carrier Frequency Measures the carrier frequency of a burst The burst duration must be less than 50 of the pulse repetition frequency PRF How to measure bursts is described in detail in the Operators Manual The counter uses the expected value and resolution to select a Measurement Time SENSe ACQuisition APERture and then sets the sync delay SENSe SDELay to 1 5 Measurement Time Parameters expected value is the expected carrier frequency resolution is the required resolution e g 1 gives 1Hz resolution lt 1 2 3 4 5 6 7 gt is the channel to measure on 1 means input A 2 means input B Only PM6680B and PM6681 3 means input C HF input option 4 means input E Rear panel arming input 5 means input A prescaled by 2 6 means the internal reference 7 means input A with the variable hysteresis mode Only PM6680B 81 If you omit the channel the instrument measures on input A 1 Complies to standards SCPI 1992 0 confirmed pa Command Reference 9 61 4h MEASure FREQuency PRF PM6680B 81 85 lt exp val gt lt res gt lt O 1 21314 5 6 7 gt Pulse Repetition Frequency Measures the PRF Pulse Repetition Frequency of a burst signal The burst dura tion must be less than 50 of the pulse repetition frequency PRF It is better to set up the measurement with the SENS FUNC FREQ PRF command when measuring pul
87. EAD to adjust the setting of a par ticular function called fine tuning For instance you can set an input attenuator at a required value m CONFigure INITiate FETCh The READ command can be divided into the INITiate command which starts the measurement and the FETCh com mand which requests the instrument to return the measuring results to the con troller Versatility of Measurement Com mands MEASure Simple to use few additional possibili ties CONFigure Somewhat more READ difficult but some extra possibilities CONFigure Most difficult to INITiate use but many ex FETCh tra features 5 6 MEASurement Function Chapter 6 Using the Subsystems Using the Subsystems Introduction Although SCPI is intended to be self ex not explain each and every command planatory we feel that some hints and but only those for which we believe extra tips on how to use the different subsys explanations are necessary tems may be useful This chapter does Using the Subsystems Calculate Subsystem The calculate subsystem processes the measuring results Here you can recalcu late the result using mathematics make statistics not PM6685 and set upper and lower limits for the measuing result that the counter itself monitors and alerts you when the limits are exceeded m Mathematics The mathematic functions are the same as on the front panel B Statis
88. EGI RST condition POS Complies to standards SCPI 1991 0 confirmed PM6680B 81 85 ARM SOURce EXTernal2 EXTernal4 IMMediate External Arming Start Source Selects channel 4 Input E as arming input or switches off the start arming func tion When switched off the DELay is inactive Parameters EXTernal2 is input B Only PM6680B 81 EXTernal4 is input E IMMediate is Start arming OFF Returned format EXT2 EXTA IMM Example SEND ARM SOUR EXTA RST condition IMM Complies to standards SCPI 1991 0 confirmed Command Reference 9 9 ah ARM STOP DELa PM6680B PM6681 2 Numeric value MIN MAX Delay after External Stop Arming This command sets a delay between stop slope of the pulse on the arm input and the time when the counter stops measuring The delay is only active when the fol lowing is selected ARM STOP SOURCe n EXT2 EXT4 Range 200 ns to 1 6 s The optional node FIXed is only accepted by PM6687 B ameters Numeric value is a number between 200 10 and 1 67s MIN gives 0 which switches the delay OFF MAX gives 1 67 s Returned format Numeric value Example SEND ARM STOP DEL 0 11 RST condition O Complies to standards SCPI 1991 0 confirmed ARM STOP ECOunt PM6680B 81 85 2 Numeric value MIN MAX External Events before Stop Arming This command sets the number of stop slopes are required o
89. G TRIG A Dc 300mHz B 12Vrms 50 Q 350Vp IMQ Error Code 2 5 a Bus Commands for the Benchtop User FREQA FREQC PERA RATIO A B RATIO C B TOT A B MAN TOTAILTIB TOTAILB DUTYFA REMOTE SRQ PWIDTHA TIME A B PHASE A B RISE FALLA VOLT A MAXMIN 2 6 Error Code All commands on this page are from the SENSE subsystem Bus Commands for the Benchtop User PM6680B 0010 pl ON PRIMARY FUSE INSIDE PM9678 PM9628 0 o BATTERY 1 6AT fj f b PM9624 PM9690 PM9697 OFF gt PM9625 PM9691 PM9626 TRIG tac o EXT REF MULTIPLIER NOT INCL FAN NOT INCL 90V 265V ow IEEE 488 IEC 625 INTERFACE SH1 AH1 T5 L4 SR1 RL1 DC1 DT1 E2 OUTPUT GATE OPEN REAR PANEL INPUTS INPUT C OPTIONS O PM9621 O PM9624 Ili O PM9625 PRIMARY FUSE 1 6ATA O PM9625B O 0V 265V e INSIDE F FERENCE CLOCK OUTPUTS 10M 1z 0 6Vrms IN 50 N IEEE 48SEC OS INTEHEACE K lt L Moa SH1 AH1 T6 L4 SR o RL1 DC1 DT1 E2 e 4 o N J PROBE O COMP VIEW ANALOG E REFERENCE o e B i LR 39484 B GD A B OUT o j gt ED WE AAA ROTC 60 ly PM6681R This command is from the SENSE subsystem Error Code 2 7
90. INimum uc d 2 VOLT PTPeak les I2 TOTalize GATed lu 1 21416 11 2 4 6 TOTalize TIMed fr 1 2141 61 2 4 6b TOTalize ACCumulated fr 1 2141 61 2 4 6 TOTalize SSTop 1 2 4 6 1 2 4 6 B input channels PM6680B and PM6681 1 means input A means input B means input C HF input option means input E Rear panel arming input means input A prescaled by 2 means the internal reference N Oo OF A W N means input A with the variable hysteresis mode 9 94 Command Reference PM6680B 81 85 INTernal FORMat REAL PACKed Internal Format This command selects the internal data format of the measurement result from the SENSe block The purpose of the command is to increase the measurement speed Parameters REAL means that the result is calculated in real time after each measurement PACKed means that the raw measurement data is stored internally and the result is not calcu lated in real time between measurements The results are calculated later when they are sent to the controller Since the result is not calculated other blocks cannot use this data That means that you cannot have the DISPlay OUTPut and CALCulate blocks switched on when using PACKed format The following measuring functions in PM6680B 81 cannot be used with PACKed format Phase Duty Cycle and Volt PM6685 cannot used PACKed format with Duty Cycle The internal format affects the number measuring results that th
91. IXed Complies to standards SCPI 1991 0 confirmed 9 34 Command Reference PM6680B 81 85 FETCh ARRav 2 fetch array size MAX Fetch an Array of Results FETCh ARRa y query differs from the FETCh query by fetching several mea suring results at once An array of measurements must first be made by the commands INITiate MEASure ARRay Or CONFigure ARRay READ If the array size is set to a positive value the first measurement made is the first result to be fetched When the counter has made an array of measurements FETCh ARRay 10 fetches the first 10 measuring results from the output queue The second FETCh ARRay 10 fetches the result 11 to 20 and so on When the last mea suring result has been fetched fetch array starts over again with the first result In totalizing for instance you may want to read the last measurement result in stead of the first one This is possible if you set the array size to a negative num ber Example FETCh ARRay 5fetches the last five results The output queue pointer is not altered when the array size is negative That is the example above always gives the last five results every time the command is sent FETCh ARRay 1 is useful to fetch intermediate results in free running or ar ray measurements without interrupting the measurement Parameters ARRay means that an array of retrievals are done for each FETCh command fe
92. M SDE LAY oc 523223 BA oos ARM ECOunt 0 00 ARM LAYer2 o ooooooo oo ARM LAYer2 SOURce ARM SLOPE 2222249 Rn ARM SOURCE ce vce ie cd RR ARMS STOP DELAY 5x cem ws ARM STOP ECOunt ARM STOP SLOPe ARM STOP SOQOURcee Calculate Subsystem CALCulate AVERage COUNt CALCulate AVERage STATe CALCulate AVERage TYPE CALCulate DATA CALCulate IMMediate CALCulate LIMit CALCulate LIMit FAIL CALCulate LIMit LOWer CALCulate LIMit LOWer STATe CAL Culate LIMit UPPer CALCulate LIMit UPPer STATe CALCulate MATH CALCulate MATH CALCulate MATH STATe CALCulate STATe Calibration Subsystem CALibration INTerpolator AUTO Configure Function CONFigure Measuring Function CONFigure ARRay lt Measuring FUNCIONS oae ut rod aei Recinto ten d alin en Diagnostics Subsystem 9 29 DIAGnostic CALibration INPut 1 2 HYS Teresi p bea ee eas NG tee ee ax 9 30 Display Subsystem 9 31 DISPlay ENABle 9 32 Fetch Function 9 33 FETC awa wind ur ee he EA E betes 9 34 FETCh ARRay leeren 9 35 Format Subsystem
93. Messages 3 7 Introduction to SCPI Most controller programming languages send these terminators automatically but allow changing it So make sure that the terminator is as above Example of a terminated program mes sage INP IMP _ 1E6 ACQ APER 0 1NL END program imessage unit terminator program message unit This program message consists of two message units The unit separator semi colon separates message units Basically there are two types of com mands Common Commands The common command header starts with the asterisk character for example RST SCPI Commands SCPI command headers may consist of several keywords mnemonics separated by the colon character Root Endnode Subnodes NEM i Figure 3 7 The SCPI command tree Each keyword in a SCPI command header represents a node in the SCPI command tree The leftmost keyword INPut in the previous example is the 3 8 Program and Response Messages root level keyword representing the high est hierarchical level in the command tree The keywords following represent subnodes under the root node See COMMAND TREE on page 3 10 for more details of this subject Forgiving Listening The syntax specification of a command is as follows ACQuisition APERture numeric value gt Where ACQ and APER specify the shortform and ACQuisition and APER ture specify the longform However ACQU or APERT are not
94. Or tl1np slopeopos Func PERAJIL Define Macro Command DMC assigns a sequence of commands to a macro label Later when you use the macro label as a command the counter will execute the sequence of commands Use the following syntax DMC lt macro label gt commands m Simple Macros Example SEND DMC_ MyInputSetting 1255 INP IMP 50 HYST 1 LEV 0 55 INP HYST AUTO als This example defines a macro MyInputSetting which sets the impedance to 50 Q sets the sensitivity to 1V the trigger level to 0 55V and switches off auto sensitivity and auto trigger level Macros 3 13 Introduction to SCPI m Macros with Arguments You can pass arguments variable param eters with the macro Insert a dollar sign followed by a single digit in the range to 9 where you want to insert the pa rameter See the example below When a macro with defined arguments is used the first argument sent will replace any occurrence of 1 in the definition the second argument will replace 2 etc Example SEND gt DMC AUTO 247 INP HYST AUTO 1 INP IMP_S2 This example defines a macro AUTO which takes two arguments i e auto ON OFFIONCE 1 and impedance 50 1E6 2 SEND gt AUTO_OFF 50 Switches off both auto sensitivity and auto trigger level and sets the input im pedance to 50Q Deleting Macros Use the PMC purge macro command to delete all macros defined with the
95. PM6680B 81 85 ARM DELa 2 Numeric value MIN MAX Delay after External Start Arming This command sets a delay between the pulse on the arm input and the time when the counter starts measuring The delay is only active when the following is se lected ARM STARt SOURce 8 EXTA Range 200 ns to 1 6 s The optional node FIXed is only accepted by PM6687 ANM Numeric value is a number between 200410 and 1 67s MIN gives 0 which switches the delay OFF MAX gives 1 67 s Returned format Numeric value Example SEND ARM DEL 0 14 RST condition O Complies to standards SCPI 1991 0 confirmed Ve Cu e e Nx HELL 1 1 i ae c act d2hdh2hh CT ae 6 ii PM6680B PM6681 ARM ECOunt 2 Numeric value MIN MAX External Events before Start Arming This command sets the number of negative edges required on the B input EXT2 before the counter starts measuring Start Arming Delay by events Start Arming delay by events cannot be used at the same time as stop Arming delay by events ARM STOP ECO The delay is only active when ARM START SOUR _EXT2 EXT4 is selected Bay one of the delays ARM STAR DEL ARM STOP DEL ARM STAR ECO and ARM STOP ECO can be used at a time When you pro gram this delay the other three delays will be reset to their RST values Parameters Numeric value is a number between 2 and 16 777 215 1 switches the delay by events OFF SEND ARM ECO 254l Returned format Nu
96. ST condition IMM Complies to standards SCPI 1991 0 confirmed Command Reference 9 11 e This page is intentionally left blank 9 12 Command Reference Calculate Subsystem CALCulate STATe DATA ONJOFF IMMediate MATH EXPRession STATe Numeric expression ONJOFF AVERage STATe ONJOFF TYPE 2 MIN MAX SDEViation MEAN COUNt lt Numeric value MIN MAX LIMit STATe ONJOFF UPPer DATA lt Numeric Naia bb STATe ONIOF LOWer DATA lt Numeric GEE is STATe ONJOF FAIL Command Reference 9 13 4h e CALCulate AVERage COUNt PM6680B PM6681 No of samples Sample Size for Statistics Sets the number of samples to use in statistics sampling Parameters No of samples is a number in the range of 1 to 65535 Returned format lt No of samples RST condition 100 CAL Culate AVERage STATe PM6680B PM6681 lt boolean gt Enable Statistics Switches On Off the statistical function Note that the CALCulate subsystem is au tomatically enabled when the statistical functions are switched on This means that other enabled calculate sub blocks are indirectly switched on The statistics must be enabled before the measurements are performed When the statistical function is enabled the counter will keep the trigger subsystem initiated until the CALC AVER COUNT variable is reached This is done without any cha
97. Time 9 87 Totalize X Y During a Preset 9 73 Time out For measurement TIO 6 24 Timebase External internal 9 96 Timeout mn da ia coa ra alada la a 1 2 On Off oe ee a ws ee ee ee we ee ee we 9 111 Range e 9 111 Set EXT 9 111 Status DC 9 104 TIO bit PTT 6 24 Totalize X Y Manually Wo dar alo JE e we ME SEU es a A 9 71 Gate On Off sana AA 9 97 XIII Start stop PTT 2 3 X gated by Y 9 72 X gated by Y accumulated 9 70 X start stop Dy Y sei xx edes 9 72 Transition time 14244 Ex rmm 9 91 Trigger s e 6 29 See Also Command TRG No of on ext arm start 9 116 Slope ma b5 KAG A AA 9 51 subsystem 1177775 9 14 9 115 Trigger level Pc e a Bag Auto PME 9 49 aaa 9 45 9 47 9 48 Set TN 9 45 9 48 Truncation rules setter 1 3 Type Statistical gt gt gt 9 15 U UEP bit aaa aa S ss 6 24 9 1 04 Unexpected parameter UEP 6 24 Status GEILE 9 1 04 Unit separator scc 666 3 8 Unprotect 5 5 6 0 0 n 62442 Unterminated V wol a Bie OE Um em Sw JS e 3 5 Upper case 3 8 Upper Limit Check CA AA 9 1 9 Fall WA jog a ae war A BT ow fan dd OM ek a 9 1 7 Set wi a a A a al AA pil iat nt es 7n 9 1 8 URO bit Ds E x 6 21 9 121 User data V denim ain a desde Se El d de a s us 9 112 User request URQ 6 21 9 121 V Variable hysteresis Auto levels ca a ara aa D ar mda 9 49 Volt Gated Measurements 9
98. UTycycle 9 66 MEASure PERiod oos 9 67 MEASure PHASe 9 67 MEASure PTPeak 9 68 MEASure PWIDth 9 65 MEASure RTIMe 9 63 9 68 MEASure TINTerval 9 69 MEASure TOTalize ACCumulated DLL 9 70 MEASure TOTalize CONTinuous v v uo ene GN Bee ee ates x Se a iam 225 9 71 MEASure TOTalize GATed m 9 70 9 72 MEASure TOTalize SSTop 9 72 MEASure TOTalize TIMed 9 73 MEASure ERU a de ce 9 56 MEMory DELete MACRo 9 76 9 128 MEMory FREE MACRo 9 77 MEMory FREE SENSe 9 76 MEMory NSTates 777777 9 77 READ ARRay A AG eo 9 83 READ BG a a x im BG a a 8 cel ana qu is 9 82 BOSCillatorSOURce 9 96 SSDELay s 6 n 6 6 9 96 SENSe Acquisition APERture 9 87 SENSe Acquisition HOFF 9 88 SENSe Acquisition HOF F ECOunt IIT 9 88 SENSe Acquisition HOFF MODE o tar ccv a o epee a E KO EIE TE ea ee ee 9 89 SENSe Acquisition HOFF TIMe 9 89 SENSe Acquisition RESolution 9 90 SENSe AVERage COUNIts 9 91 SENSe AVERage MODE 9 91 SENSe AVERage STATe 9 92 SENSe FREQuency RANGe LOWer qv 9 92 OENSe FUNCTION 24 naa aa ren 9 93 SENSe ROSCillator SOURce 9 96 SENSe SDELay emm ds 9 96 SENSe TOTalize GATE 9 97 SENSe VOLTage GATed STATe 9 97 STATus DREGister0 9 100 STATus OPERation CONDition TECTUM 9 101 STATus OPERation ENABle
99. Y 1 COUN sets the number of measurements Parameters array size for FETCh gt sets the number of measuring results in the array This size must be equal or less than the number of measurements specified with CONFigure MAX means that all the results in the output buffer will be fetched Returned format lt data gt lt data gt The format of the returned data is determined by the format commands FORMat and FORMat FIXed SEND ARM COUN n 10 READ ARR 5 This example configures the counter to make an array of 10 standard measure ments The counter is triggered and data from the first five measurements are read out with the READ query Type of command Aborts all previous measurement commands if WAT is not used Complies to standards SCPI 1991 0 confirmed pa Command Reference 9 83 4h e e e This page is intentionally left blank 9 84 Command Reference gt o m Sense Subsystem command tree for PM6680B and PM6681 SENSe ACQuisition APERture meas time MIN MAX HOFF STATe a ON OFF ECOunt hold off event count value MIN MAX MODE TIME EVENt TIME hold off time value MIN MAX RESolution HIGH LOW AVERage COUNt Number of samples MIN MAX Duce OUNIS STATe ONIOFF FREQuency RANGe LOWer Minimum frequency for eps d MIN MAX FUNCtion Measuring function Primary channel SUO channel INTernal FORMat
100. a measurement starts and if no result is obtained when the set timeout has elapsed the measurement is terminated Note that you must enable timeout using SYST TOUT ON for this setting to take effect Parameters Numeric value is the timeout in seconds The range is 0 1 to 25 5 s for PM6680B and PM6685 The range is 64 ms to 400 s for PM6681 MIN gives 0 1 s 64 ms for PM6681 MAX gives 25 5 s 400 s for PM6681 Returned format Numeric value RST condition 0 1 6 4E 2 for PM6681 Complies to standards SCPI 1991 0 confirmed Command Reference 9 111 e 6 ab wp SYSTem UNPRotect PM6680B 81 85 Unprotect This command will unprotect the user data set read by PUD and front setting memories 10 19 until the next PMT Program message terminator or Device clear or Reset RST This makes it necessary to send an unprotect command in the same message as for instance PUD Example Send gt SYST UNPR PUD 240Calibrated 1992 11 17 inven tory No 1234 Where means that arbitrary block program data will follow 2 means that the two following digits will specify the length of the data block 40 is the number of characters in this example o UU 1 SYSTem VERSion PM6680B 81 85 System Version This query returns the SCPI system version that this instrument complies to Returned format lt year gt lt revision gt Where year is the year of publication of the complied sta
101. age DCL Device clear or SDC Selective Device Clear B Device Trigger DT1 You can start a new measurement from the controller via interface message GET Group Execute Trigger B Bus Drivers E2 The GPIB interface has tri state bus driv ers Chapter 2 Bus Commands for the Benchtop User ab Bus Commands for the Benchtop User FREQA FREQ TOT A B MAN REF LOCAL EXT ADJ PRESET REF SM UNLOCK STANDBY 2 2 Error Code Bus Commands for the Benchtop User FLUKE PM6681R FREQUENCY REFERENCE COUNTER CALIBRATOR Min Bb ISA E K X L M X MAX K X L M X MIN DISPLHOLD MEAN SINGLE SI DEV MEMORY AUX FREQC PERA RATIO A B RATIO C B PWIDTHA TIME A B PHASE A B ARM ARM B TOTAJLB DUTYFA RISE FALLA VOLTA MAXMIN STAT STO 1MQ l a ALB AC BURST AUTO DC 1X REF LOCAL EXT INPUT A ADJ PRESET REF FILTER 500 1M0 FSL INPUT B M L 500 1MQ COMA UNLOCK STANDBY ON These commands are from the SENSE subsystem nd 50 Q COMA CHECK HOLD OFF HOLD OFF CHECK ON Error Code 2 3 50 b M Bus Commands for the Benchtop User 50ps 300MHz PROCESS MATH These commands are from the SENSE subsystem 2 4 Error Code DATA ENTRY Bus Commands for the Benchtop User 50ps 300MHz FUNCTION MEASUREMENT gt TIME HOLD START AR C aad CJ SINGLE RESTART STOP ARM TRI
102. allowed and cause a command error In program messages either the long or the shortform may be used in upper or lower case letters You may even mix up per and lower case There is no semantic difference between upper and lower case in program messages This instrument be havior 1s called forgiving listening For example an application program may send the following characters over the bus SEND iNp ImP_1E6 The example shows the shortform used in a mix of upper and lower case SEND gt Input Imp 1E6 The example shows the a mix of long and shortform anda mixe of upper and lower case Introduction to SCPI Notation Habit in Command Syntax To clarify the difference between short and longform the shortform in a syntax specification is shown in upper case let ters and the remaining part of the longform in lower case letters Notice however that this does not specify the use of upper and lower case charac ters in the message that you actually sent Upper and lower case letters as used in syntax specifications are only a notation convention to ease the distinction be tween long and shortform m Syntax of Response Messages The response of a SCPI instrument to a query response message unit consists of one or more parameters data elements as the following syntax diagram shows There is no header returned Parameter Syntax of a Response Message Unit Figure 3 8 If there are
103. alue MIN MAX No of Triggerings on each Ext Arm start Sets how many measurements the instrument should make for each ARM STARt condition block arming These measurements are done without any additional arming conditions before the measurement This also means that stop arming is disabled for the measure ments inside a block The actual number of measurements made on each INIT equals to 35 ARM START COUN TRIG START COUNT Parameters lt Numeric value gt is a number between I and 65535 MAX gives 65535 MIN gives 1 Example SEND TRIG COUN 50 Returned format Numeric value RST condition 1 Complies to standards SCPI 1991 0 confirmed 9 116 Command Reference CLS DMC EMC ESE ESR GMC DN LMC LRN OPC OPC OPT PMC PSC PUD RCL RMC RST SAV SRE STB TRG TST WAI Common Commands ILLE Macro label Program messages Decimal data Decimal data Macro label Decimal data Arbitrary block program data Decimal data Macro name gt Decimal data Decimal data Command Reference 9 117 6 e CLS PM6680B 81 85 Clear Status Command The CLS common command clears the status data structures by clearing all event registers and the error queue It does not clear enable registers and transition fil ters It clears any pending WAI OPC and OPC
104. ams the counter to make high resolution measurements and reports each measurement result to the controller The controller stops the process when the desired result is obtained See also the limit monitoring program ming example in Chapter 4 How to Measure Fast Speed Summary The following table summarizes the time that can be gained when fine tuning the measurement process The normal dead time between frequency measurements is approximately as fol lows 48 8 ms for the PM6680B 85 ms for the PM6681 75 ms for the PM6685 If you should read out the measuring re sult to the controller add read out time to each result Consult your controller man ual Individually Synchronized Measurements Speed Improvement Actions O LL H LL mit e lo ad so Z ez ES SLI S O D 510 D Dead Time Between Measurements Including oO0 l8 S Z o Transfer to Controller SEE Ss 2 a Zn S ASCII Data Format Real Data Format PM6680B PM6681 PM6685 PM6680B PM6681 PM6685 Approx Approx Approx Approx Approx Approx v 50ms 85ms 75 ms 45ms 85ms 75 ms V 19 ms 10ms 23 ms 15 ms 9 ms 20 ms viv 12 ms 9ms 20ms 9 ms 8ms 17 ms vvwvwv 12ms 9 9mMs 12 ms 9ms 42ms 8 9ms vvwvvwv 12m 55ms 12ms 8ms 42ms 8ms Turning the real time calculations on off will not affect the dead time because the calculations are still
105. and Reference 9 87 4h e e ACQuisition HOFF boolean Hold Off On Off Switches the Hold Off function On Off Parameters Boolean 1 ON 0 OFF Returned format 1 0 RST condition OFF ACQuisition HOFF ECOunt 5 Decimal value gt MIN MAX Hold Off set event counter Sets the Hold Off event value The counter counts negative events on the B input channel 2 Parameters decimal value is a number in the range 2 to 16 777 215 Returned format Decimal value RST condition 100 9 88 Command Reference PM6680B PM6681 PM6680B PM6681 PM6680B PM6681 ACQuisition HOFF MODE 2 TIMEJEVENt Hold Off Mode Selects if triggering is going to be disabled for a preset time or for a preset number of events When set to event the counter counts negative edges on the B input channel 2 This function is coupled to the ARM START DEL ARM START ECO ARM STOP DEL and ARM STOP ECO The different delays must all be of the same type Time or Event This means that setting one of them to Event delay causes the others to be set to Event delays Parameters TIME EVENt Returned format TIME EVENt_ RST condition TIME PM6680B PM6681 ACQuisition HOFF TIME 2 Decimal value MIN MAX Hold Off Time Sets the Hold Off time value Parameters Decimal data a number between 200E 9 an
106. andard Event Register Event Register A Enable Register CITI age OR Output Queue Operation Status Register Condon Regier T Event Regeer TOOT Enable Resiser TOOT logan E SRQ message 543210 Status Byte Register MONO Service Request Enable LI talc OR Questionable Data Register Conan Resistor TOT Te Event Register TOOT Enable Register TOOTH Losical OR Error Queue Device Register 0 Event Register TOO Enable Register TOOT O laon Figure 6 6 CNT 8X Status register structure Status Subsystem 6 15 Using the Subsystems Example The counter answers 40 when you ask for the contents of the Standard Event Status Register Convert this to binary form It will give you 101000 Bit 5 1s true showing that a command error has occurred Bit 3 1s also true showing that a device de pendent error has occurred Use the same technique when you pro gram the enable registers Select which bits should be true Convert the binary expression to decimal data Send the decimal data to the instrument Clearing Setting all bits You can clear an enable register by pro gramming it to zero You can set all bits true in a 16 bit event enable register by programming it to 32767 bit 16 not used You set all bits true in 8 bit registers by programming them to 255 Service Re quest Enable an
107. arted BG 9 3o 3 o o5 3 X 4 5 3 5 o3 aon aon 192 Started MST co NG 3 o 3 9 9o 6 23 SCU Haase Ser tes 9 101 9 102 Stop I CN LLL UL 7 2 Stopped MSP 6 23 Terminate n n nm 7 4 TIMO gt 9 87 Time range cu ss 9 87 Time setting o 3 9 87 Trigger o9 9 2 9 3 3 5 3 3 9 3 5 3 3 on a o 9 131 Measurement Function 9 53 Measurement Time 11777112 9 87 Setting co 9 x No 2 nu 4 9 87 Measuring Burst CW co 9 wo o9 6 9 3 5o 5 3 3 5 n 9 61 Duty Cycle n nm 9 59 9 66 Fall Time o o o ennn 9 63 Frequency n 6 9 60 Frequency ratio tnn 9 63 Input selection s crc 6 13 Period 1075571115555 9 67 Phase co o rr 9 67 PRE 11H 9 62 Pulse width ccc 9 65 Rise Time 7 9 63 9 68 Select function 9 26 Selecting function 9 93 Terminate Dd efe m A ae ae des a Te es a cel d 9 4 Time Interval uou zo s ww won at es e de a 9 69 Totalize X gated by Y 9 72 Transition time s 9 63 9 68 Measuring time s str 2 4 Range s n amp 9 87 Memory s ssc n n e e 2 5 Fast TIE 9 58 Free for Macros 9 76 9 77 Recall and measure fast 7 5 9 58 Subsystem sss errr 6 n 9 75 Message Available TDI 9 130 Exchange Control e xac wien 3 4 exchange initialization gt 3 19 terminator Ba AA D PEDE E 3 5 MIN WI Pr 9 1 5 Mnemonic conventions
108. arted after the command is received and also sends the result to the controller This command has the highest possible degree of compatibility to other instru ments however the command reprograms the counter and often you need to set up How to Measure Fast the counter by yourself This is primarily why we recommend the READ query Block Synchronized Measurements In the block synchronized mode the con troller only starts a sequence of measure ments The counter then measures without any controller intervention at the highest possible speed It dumps the re sults into internal memory and reads them out for evaluation later This method gives the highest possible data capture speed m READ ARRay This 1s the basic method for starting up a measurement sequence and reading the data Set up the counter using CONFigure or individual programming commands before sending the READ ARRay query This method will make the mea surements with a high measurement rate The speed depends on a number of indi vidual measurement parameters see also General speed improvements below The counter stores the data in its internal memory and when it has captured all data it transfers the resulting array to the controller B INIT GET FETCH ARRay The READ ARRay method has one drawback it includes some unwanted firmware overhead between when the counter receives the command and it starts the first measurement This ca
109. atus Event register STATus DREGister0 Reads Device Event register When you read these registers you will clear the register you read and the sum mary message bit in the status byte You can also clear all event registers with the CLS Clear Status command m Status Condition Registers Two of the status register structures also have condition registers The Status Op eration and the Status Questionable regis ter The condition registers differ from the event registers in that they are not latched That is if a condition in the counter goes on and then off the condi tion register indicates true while the con dition is on and false when the condition goes off The Event register that monitors the same condition continues to indicate true until you read the register STATus OPERation CONDition Reads the Operation Status Condition reg ister STATus QUEStionable CONDi tion Reads the Questionable Status Condition register Reading the condition register will not af fect the contents of the register Why Two Types of Registers Let s say that the counter measures con tinuously and you want to monitor the measurement cycle by reading the Opera tion Status register Reading the Event Register will always show that a measurement has started that waiting for triggering and bus arming has occurred and that the measurement is stopped This information is not very use ful Reading the Conditio
110. bak Mak ack eir ds IRR NG 9 93 INTernal FORMat 9 95 ROSCillator SOURCe 9 96 DELAS radar ean AG a ah 9 96 TOTalize GATE c 9 97 VOLTage GATed STATe 9 97 Status Subsystem 9 99 STATus DREGister0 9 100 STATus DREGister0 ENABle 9 100 STATus OPERation CONDition 9 101 STATus OPERation ENABle 9 102 STATus OPERation 9 103 STATus PRESet 9 103 STATus QUEStionable CONDition 9 104 STATus QUEStionable 9 105 STATus QUEStionable ENABle 9 105 System Subsystem 9 107 SYSTem COMMunicate GPIB ADDRess T 9 108 SYSTem ERROr 2 000 cis xw 9 108 SYSTem PRESet 9 109 SYolem SDETEC ces 9 109 Or OEM Cel sorna 9 110 SYSTem TIME ELAPsed 9 110 OYSIem TOUT ix ahas de 9 111 SYSTem TOUT TIME 9 111 SYSTem UNPRotect 9 112 SYSTem VERSION 0 2077c m ms 9 112 Test Subsystem 9 113 TEST CHECk 9 114 dii 9 114 Trigger Subsystem 9 115 TRIGger COUNt iu KAT nG NG we 9 116 Common Commands 9 117 A RSS SN E 9 118 OIM oca od ae sei dice ada dea 9 119 REMOS ato bn stars ps e 9 120 A Ss ants 9 121 HESR La ad ook 9 endo be Eod Eo aa BD de 9 122 POMC ues oo qd ade dd 9 122 ds e 9 123 Q8 5 LC 9 123 19 0 mm 9 124 BIO OLLI 9 12
111. be in parentheses The default channels which the counter uses when you omit the channels in the command are printed in italics in the channel list on the following pages If you want to check what function and channels the counter is currently using send CONF This query gives the same answer as FUNC in the SENSe subsystem Command Reference 9 53 4h e e MEASure CONFigure VOLTage SCALar FREQuency CW sexpected value gt lt resolu tion 1 2 3 4 5 6 RATio exp value gt lt resol gt 1 2 3 p 3 BURSt lt exp value resol 1 02 03 04 PRF lt exp value Sresol 21 2 3 4 5 6 PERiod exp value resol Q1 12 03 n 5 6 TINTerval exp value resol 11002 NG yen PHASe exp value resol 001 Gia NWIDth exp value sresol 1 2 PWIDth Sexp value resol t1 a 4 DCYCIe PDUTycycle lt exp lll la 4 Que Q4 NDUT r cle ap value gt lt resol gt a RISE TIME lt lower thresh gt lt upper thresh gt sat 204 lt resol LEO No FALL TIMESI slower thresh gt lt upper thresh exp value gt lt resol gt 1 2 MAXimum 1102 MINimum B 11002 PTPeak B 1 02 TOTalize GATed 1 2 4 1 2 TIMed resi e for gate ae ay de Na ANS O I NANU An ing org ate Hood 4 11 2 4 O E CON inuous Ar
112. be selected by using the command SENSe ACQ RES HIGH LOW When you set the resolution to low it will be 100ns for PM6680B and PM6685 and 80ns for PM6681 Instead of the high res olution which is 0 25ns for PM6680B and PM6685 and 0 05ns for PM6681 If the counter does real time calculations and you switch to low resolution the measurement dead time decreases about 0 6 to 0 9ms If the counter does not do real time calculations then it saves only about 0 05ms per measurement cycle If the counter does real time calculations with the display switched on then you can save up to 2ms by selecting the lower resolution Automatic Interpolator Calibration PM6680B 85 The time interpolation technique achieves the high time resolution The counter au tomatically calibrates these interpolators once per measurement cycle You can control this automatic calibration by us ing the command CAL INT AUTO ON OFF ONCE When you switch calibration off the measurement cycle time decreases Disabling this calibration makes the counter more sensitive to temperature changes The measurement values may drift away which results in a larger inac curacy However when the instrument has been switched on for more than 20 minutes and the ambient temperature is stable within 5 C this is no problem You can also easily recalibrate the How to Measure Fast interpolators by using the CAL INT AUTO ONCE command Block Measurem
113. ble command sets the service request enable register bits This enable register contains a mask value for the bits to be enabled in the status byte register A bit that is set true in the enable register enables the corre sponding bit in the status byte register to generate a Service Request Parameters lt dec data gt the sum between 0 and 255 of all bits that are true See table below Service Request Enable Register 1 enable Bit Weight Enables 128 OPR Operation Status 64 RQS Request Service 32 ESB Event Status Bit 6 MAV Message Available QUE Questionable Data Signal Status EAV Error Available Not used O AN JA 40 0o Y a mnla ol Device Status Returned Format lt Integer gt Where Integer the sum of all bits that are set Example SRE 16 In this example the counter generates a service request when a message is avail able in the output queue Complies to standards IEEE 488 2 1987 4h 9 130 Command Reference e ah wy PM6680B 81 85 STB Status Byte Query Reads out the value of the Status Byte Bit 6 reports the Master Summary Status bit MSS not the Request Service RQS The MSS is set if the instrument has one or more reasons for requesting service Returned Format Integer the sum between 0 and 255 of all bits that are tr
114. bwrt Counter READ 5 ibrd Counter InString 80 InString ibent Y XO Write arming delay time and result to file fprintf ofp 1e s ArmDelay InString Increase arming delay ArmDelay 100e 9 ibwrt Counter DISP ENAB ON 13 Close file Fclose ofp else printf CANT OPEN FILE exit 0 4 17 C for National Instruments PC IIA Frequency Profiling Programming Examples 4 Fast Sampling This program makes a quick array measurement and stores the results in the internal memory of the counter Then it writes the results to a file called MEAS DAT The measurement results as a function of the samples can be visualized in a spreadsheet program such as Excel include decl h include lt stdio h gt include lt process h gt include lt string h gt main int Counter Status 1 char Ins Eering eo FILE ofp if ofp fopen MEAS DAT w Counter 1bfind DEVLO Clear status ibwrt Counter Ch9 4 Enable 1000 measurement with maximum speed ibwrt Counter TRIG COUN 1000 ARM COUN 1 28 ibwrt Counter INP LEV AUTO ONCE CAL INT AUTO OFF ibwrt Counter DISP ENAB OFF INT FORM PACKED ibwrt Counter ACQ APER MIN AVER STAT OFF Enable SRQ on operation complete lbwrt Counter ESE 1 SRE 32 Lo Start measurement printf Measuringin ibwrt Counter INIT OPC 10
115. c ters f the last character in the command is a digit then this digit is appended to the shortform Examples Longform Shortform MEASURE MEAS NEGATIVE NEG DREGISTERO DREGO EXTERNALA EXT4 The shortform 1s always printed in CAPI TALS in this manual MEASure NEG ative DREGister0 EXTernal4 etc m Example Language Small examples are given at various places in the text These examples are not in BASIC or C nor are they written for any specific controller They only contain the characters you should send to the counter and the responses that you should read with the controller Example SEND MEAS FREQ This means that you should program the controller so that it addresses the counter and outputs this string on the GPIB READ lt 1 234567890E60 This means that you should program the controller so that it can receive this data from the GPIB then address the counter and read the data 1 4 Setting Up the Instrument Setting Up the Instrument Setting the GPIB Address The address switches on the rear panel of the counter are set to 10 when it is deliv ered The address used is displayed when the instrument is turned on If you want to use another bus address you can set these switches to any address between 0 and 30 as shown in the follow ing table Switch Switch Address Sett
116. ched on This means that other enabled calculate sub blocks are indirectly switched on Switching off mathe matics however does not switch off the CALCulate subsystem Parameters Boolean 1 ON O OFF Returned syntax O 1 Example SEND CALC MATH STAT 1 This example switches on mathematics RST condition OFF Complies to standards SCPI 1991 0 confirmed Command Reference 9 21 e 6 e CALCulate STATe PM6680B 81 85 _ Boolean Enable Calculation Switches on off the complete post processing block If disabled neither mathemat ics or limit monitoring can be done Parameter Boolean 1 ON 0 OFF SEND CALC STAT 1 Switches on Post Processing Returned format 1 0 RST condition OFF Complies to standards SCPI 1991 0 Confirmed 9 22 Command Reference ah wy CALibration INTerpolator AUTO SBoolean ONCE Only PM6680B PM6685 PM6687 has factory calibrated interpolators and calibration cannot be changed by the operator Calibration of the PM6681 input hysteresis is done in the Diagnostis subsystem Command Reference 9 23 e 6 e CALibration INTerpolator AUTO 2 lt Boolean gt ONCE Calibration of Interpolator PM6680B 85 The PM6680B 85 are reciprocal counters that uses an interpolating technique to increase the resolution In time measurements for example interpolation in creases the resolution from 100 ns to 0 25 ns The
117. counter calibrates the interpolators automatically once for every measurement when this command is ON When this command is OFF the counter does no cali brations but uses the values from the last preceding calibration The intention of this command is to turn off the auto calibration for applications that dump mea surements into the internal memory This will increase the measurement speed Parameters Boolean 1 ON 0 OFF Returned format 1 0 RST condition ON See also Chapter 6 How to Measure Fast 9 24 Command Reference Configure Function Set up Instrument for Measurement CONFigure SCALar lt Measuring Function Parameters Channels ARRay lt Measuring Function Array Size Parameters lt Channels gt The array size for MEASure and CONFigure and the channels are expression 35 data that must be in parentheses Measuring Function Parameters and Channels are explained on page 9 54 The counter uses the default Parameters and Channels when you omit them in the command Command Reference 9 25 6 ab wp CONFigure Measuring Function PM6680B 81 85 lt parameters gt lt channels gt Configure the counter for a single measurement Use the configure command instead of the measure query when you want to change other settings for instance the input settings before making the measure ment and fetching the result The CONFigure command cont
118. d 1 6777215 for PM6680B and between 40E 9 and 1 34217727 for PM6681 Returned format Decimal value RST condition 10 us for PM6680B and 1 us for PM6681 Command Reference 9 89 4h e e ACQuisition RESolution PM6680B 5 HIGHILOW Resolution Selects basic measurement mode for all time related measurements Parameters HIGH The resolution is the full 0 25 ns LOW The resolution is limited to a 100 ns clock You can use this to increase the bus speed Saves about 0 6 to 0 9 ms if the counter does real time calculations otherwise only 0 05 ms Returned format HIGH LOW RST condition HIGH ACQuisition RESolution PM6681 5 HIGH LOW Resolution Turns off interpolator usage and also ignores the high resolution part of the count registers Low Resolution functions only for Frequency Period Time Interval and Pulse Width Parameters HIGH The resolution is the full 50 ps LOW The resolution is limited to 125 ns At low resolution no special arming and trig options are supported There is no handling of Abort messages from the bus after the measurement series has been started That means you cannot break off a low resolution measurement series The results are based primarily on the timestamp values with 125 ns resolution Single mode is forced on and every period of a signal is measured This mode is limited in frequency to lt 40 kHz for Frequency and Period and lt 20
119. d Standard Event Enable B Using the Queues The two queues where CNT 8X stores output data and error messages may con tain data or be empty Both these queues have their own status bit in the Status Byte If this bit is true there is data to be fetched When the controller reads data it will also remove the data from the queue The queue status bit in the status byte will re main true for as long as the queue holds 6 16 Status Subsystem one or more data bytes When the queue is empty the queue status bit is set false Status of the Output Queue MAV The MAV message available queue sta tus message appears in bit 4 of the status byte register It indicates if there are bytes ready to be read over the GPIB in the GPIB output queue of the instrument The output queue is where the formatted data appears before it 1s transferred to the controller The controller reads this queue by ad dressing the instrument as a talker The command to do this differs between dif ferent programming languages Examples are IOENTERS and IBREAD Status of the Error Message Queue EAV The EAV error message available queue status message appears in bit 2 of the status byte register Use the SYSTem ERRor query to read the er ror messages Chapter 21 explains all possible error messages B Using the Status Byte The status byte 1s an eight bit status mes sage It 1s sent to the controller as a re sponse to a serial pol
120. dicates the new line character ASCII code 10 m Specified Expressions lt gt Symbols and expressions that are further specified elsewhere in this manual are placed between the lt gt signs For example Dec data gt The following explanation is found on the same page Where Dec data is a four digit num ber between 0 1 and 8 10 9 m Alternative Expressions Giving Different Result Alternative expressions giving different results are separated by For example On Off means that the function may be switched on or off B Grouping Example FORMat_ ASCH REAL specifies the command header FORMat followed by a space character and either ASCII or REAL B Optionality An expression placed within is op tional Example VOLT FREQuency means that the command FREQuency may or may not be preceded by VOLT m Repetition An expression placed within 1 can be repeated zero or more times B Equality Equality is specified with Example lt Separator gt Mnemonic Conventions B Truncation Rules All commands can be truncated to shortforms The truncation rules are as follows The shortform is the first four characters of the command If the fourth character in the command is a vowel then the shortform is the first three characters of the command This rule is not Manual Conventions 1 3 Getting Started used if the command is only four chara
121. e measurement re sult buffer can hold Number of Results in Buffer Format Measuring Function PM6680B 85 PM6681 Real All functions 2048 7019 Packed Frequency Period Ratio Totalize 2166 6143 Pulse Width Time Interval Rise Fall time 764 4466 Phase Duty Cycle Volt N A N A Low resolution Frequency and Period N A 8191 Low Res Time Interval and Pulse Width N A 4095 You must consider this when fetching results with the FETCh ARRay query RST condition REAL Command Reference 9 95 4h e 6 ROSCillator SOURce PM6680B 81 85 2 INT EXT Select Reference Oscillator Selects the signal from the external reference input as timebase instead of the in ternal timebase oscillator Returned format INT EXT I RST condition INT Complies to standards SCPI 1991 0 confirmed SDELa PM6685 Numeric value gt MIN MAX BURST PRF Synchronization Delay Sets the synchronization delay time used in FREQuency BURSt PRF measure ments Parameter range 200 ns to 1 6777215 s RST condition 10 ms 4h 9 96 Command Reference e ah wy PM6680B 81 85 TOTalize GATE 2 Boolean Gate On Off Open closes the gate for TOTalize CONTinuous Before opening the gate with this command the counter must be in the contin uously initiated state INIT CONT ON or else the totalizing will not start
122. e reporting of device defined status in the status byte 6 26 Status Subsystem SRE 1 Enable SRQ when a limit 1s exceeded STAT DREGO Reading and clearing the event register of Device Register structure 0 If bit 1 1s true the high limit has been ex ceeded f bit 2 1s true the low limit has been ex ceeded Power on Status Clear Power on clears all event enable regis ters and the service request enable regis ter if the power on status clear flag is set TRUE see the common command PSC B Preset the Status Reporting Structure You can preset the complete status struc ture to a known state with a single com mand the STATus PRESet command which does the following Disables all bits in the Standard Event Register the Operation Status Register and the Questionable Data Register Enables all bits in Device Register 0 Leaves the Service Request Enable Regis ter unaffected Using the Subsystems Trigger Arming Subsystem The SCPI TRIGger subsystem enables syn The ARM TRIG Trigger chronization of instrument actions with Configuration specified internal or external events The l following list gives some examples Figure 6 15 gives a typical trigger config uration the ARM TRIG model The con Inst t Acti figuration contains two event detection nstrument ACTION layers the Wait for ARM and Wait for Some examples of events to synchronize TRIG states with are as follows
123. ed 160 WRTS TRIG COUN 1000 ARM COUN 1 170 CALL IBWRT CNT WRTS 180 WRTS INP LEV AUTO ONCE CAL INT AUTO OFF 190 CALL IBWRT CNT WRTS 200 WRTS DISP ENAB OFF INT FORM PACKED 210 CALL IBWRT CNT WRTS 220 WRTS ACO APER MIN AVER STAT OFF 230 CALL IBWRT CNT WRTS 240 250 Enable SRO on operation complete 260 WRTS ESE 1 SRE 32 270 CALL IBWRT CNT WRTS 280 290 Start measurement 300 PRINT Measuring 310 WRTS INIT OPC 320 CALL IBWRT CNT WRTS 330 340 Wait for operation complete 350 MASK amp H800 360 CALL IBWAIT CNT MASK sq 380 Read status and event status register 39D CALL TBROP CNTS SER 400 WRTS ESR 410 CALL IBWRT CNT WRTS 420 MSGS SPACES 255 430 CALL IBRD CNT MSGS GW Basic for National Instruments PC IIA Setting Up the Interface 4 7 Programming Examples 440 450 460 470 480 490 500 510 920 550 540 550 560 570 580 390 600 610 620 4 8 GW Basic for National Instruments PC IIA Setting Up the Interface N PRINT Fetching result X FOR I 0 TO 999 Fetch one result WRTS FETCH CALL IBWRT CNT WRTS MSGS SPACES 255 CALL IBRD CNT MSGS N Write result to file PRINT 1 I LEFTS MSGS INSTR MSGS CHR 10 NEAT I X WRTS DISP ENAB ON CALL IBWRT CNTS WRTS CLOSE 1 END Programming Examples e
124. ed The range is the same as for Measurement Time The first lt 1 2 4 gt is the channel that counts up and the second one is the channel that counts down 1 means input A 2 means input B 4 means input E rear panel arming input If you omit the channels the instrument counts up on input A and down on input B Example SEND MEAS TOT TIM 1 1 01 In this example the counter totalises the pulses on Channel 1 for one second Any signals on channel 2 and 4 are ignored RST condition Time for gate open 10 ms SENSe ACQuisition APERture Command Reference 9 73 e 6 e This page is intentionally left blank 9 74 Command Reference Memory Subsystem MEMory DELete MACRo lt Macro name gt FREE SENSe NSTates MACRo Related Common Commands DMC EMC GMC LMC LRN PMC RCL RMC SAV Command Reference 9 75 4h e MEMory DELete MACRo PM6680B 81 85 _ Macro name gt Delete one Macro This command removes an individual MACRo Parameters Macro name gt is the name of the macro you want to delete Macro name is String data that must be surrounded by quotation marks ee also PMC if you want to delete all macros 1 The proposed IEEE488 2 command RMC Remove Macro command also works on PM6685 It preforms exactly the same action as MEMory DELete MACRo Note however that this command is not yet 1993 a c
125. ed in IEEE 488 2 BINary The data is encoded as non decimal numeric base 2 pre ceded by B as specified in IEEE 488 2 Returned format ASCii BINary HEXadecimal OCTal 4l RST condition ASCII Command Reference 9 39 e 6 e FORMat TINFormation PM6681 _ Boolean Timestamping On Off Timestamping On Off This command turns on off the time stamping of measurements Time stamping is always done at the start of a measurement with a resolution of 125 ns and is saved in the measurement buffer together with the measurement result The setting of this command will affect the output format of the MEASure READ and FETCh queries For FETCh SCALar READ SCALar and MEASure SCALar the readout will con sist of two values instead of one The first will be the measured value and the next one will be the timestamp value In FORMat ASCii mode the result will be given as a floating point number NR3 format followed by the timestamp in seconds in the NR2 format ddd ddddddddd 12 digits In FORMat REAL mode the result will be given as an eight byte block containing the floating point measured value followed by a four byte block con taining the integer timestamp count where each count represents 125 nanosec onds When doing readouts in array form with FETCh ARRay READ ARRay or MEASure ARRay the response will consist of alternating measurement values and timestamp values formatted the same way as for scalar
126. ed on the bus If the ADIF format defined by SCPI is adopted it should be adopted for all data readout and switched on and off by the already standardized FORMat DINTerchange command This format covers the appropriate readout for mat for time stamped measurements well so when it is selected as output format there is not any problem But the user may still decide not to use the ADIF for mat so we need a solution to the readout problem whether or not we decide to 1m plement ADIF The chosen one is as fol lows For FETCh SCALar READ SCALar and MEASure SCALar the readout will consist of two values instead of one 6 6 Format Subsystem The first will be the measured value and the next one will be the timestamp value given in seconds in the NR2 format ddd ddddddddd 12 digits In FORMat ASCii mode the result will be given as a floating point number NR3 format followed by integers NRI for mat In FORMat REAL mode the result will be given as an eight byte block con taining the floating point measured value followed by a four byte block containing the integer timestamp count where each count represents 125 nanoseconds When doing readouts in array form with FETCh ARRay READ ARRay or MEASure ARRay the response will consist of alternating measurement values and timestamp values formatted the same way as for scalar readout All values will be separated by commas Using the Subsystems
127. eg SEP x y E ad KI SSS we we o9 SP S SS uo d NP PO dq AER gt IA o dU MEE 9 TR Y RQS Service em m coe oe Status Byte ME ti egister v ION 128 MSS 32 16 8 4 2 g SRQ i i15 7 signal sessesthesesssscccesesesccccefPesescceccesseesccccsssotoccecsssoodBececsssscsfeeessssoseetesson Figure 6 7 The status byte bits Status Subsystem 6 17 dh w Using the Subsystems as long as there is unfetched data in any of the status event registers The Requested Service bit ROS is set true when a service request has been signalled If you read the status byte via a Serial Poll bit 6 represents RQS Reading the status byte with a serial poll will set the RQS bit false showing that the status byte has been read The Master Summary Status bit MSS is set true if any of the bits that generates SRQ is true If you read the status byte us ing STB bit 6 represents MSS MSS re mains true until all event registers are cleared and all queues are empty Setting up the Counter to Report Status Include the following steps in your pro gram when you want to use the status re porting in CNT 8X CLS Clears all event registers and the er ror queue ESE bit mask Selects what condi tions in the Standard Event Status register should be reported in bit 5 of the status byte STATus OPERation ENABle bit mask Selects which conditions in the Operation Status register should be re ported in bit 7
128. ement Speed When opimizing your program for speed add the measuring time you use to the dead time and subtract the time gain for the timesaving commands you intend to use all times should be expressed in sec onds 1 Meas time DeadTime y TimeGain number of measurements second Where Meas time is the measurement time you use Deadtime is the deadtime between measurements after preset see page 7 11 Timegain is the timegain in the table on page 7 15 How to Measure Fast Timesaving Com Time Gain in ms Sacrifice mands PM6680B PM6681 PM6685 Freq Freq Freq FREQ RANG LOW_MAX 23 23 10kHz lower freq limit for AUTO This Timesaving is only possible when AUTO is on 55 50kHZz lower freq limit for AUTO This Timesaving is only possible when AUTO is on INP LEV AUTO OFF 40 70 52 You have to set trigger levels manually DISP ENAB OFF 54 3 5 77 Only the controller can read the result CAL INT AUTO_OFF 0 22 NA 0 22 You must instruct the counter to cali brate the interpolators once in a while to maintain accuracy SENS ACQ RES LOW 0 81 0 01 081 Works up to about 40kHz The resolu tion of each measurement drops to 100ns for PM6680B 85 and 80ns for PM6681 PM6681 Only Gives Back to back measurements in period i e every pe riod in a block is measured TRIG COUNT 2100 0 69 NA 0 69 No sacrifice the program loop in the counter gets
129. ems layer This delay can be programmed by using the layer DELay command B Backward Traversing an Event detection Layer The number of times a layer event has to initiate a device action can be pro grammed by using the lt layer gt COUNt command For example TRIGger COUNt 3 causes the in strument to measure three times each measurement being triggered by the spec ified events Triggering TRG Trigger Command The trigger command has the same func tion as the Group Execute Trigger com mand GET defined by IEEE 488 1 When to use TRG and GET The TRG and the GET commands have the same effect on the instrument If the Counter is in idle 1 e not parsing or exe cuting any commands GET will execute much 20 us faster than TRG 4 ms since the instrument must al ways parse TRG Trigger Arming Subsystem 6 29 Using the Subsystems Arming Start IMMediate layer Layer 2 SOURce bus trig BUS 3 lt layer gt MMediate Event detection layer Layer loo lt layer gt COUNt ade EA Yes Completed N s No of layer loop counts Select Source Select Characteristics EXTernal4 IMMediate slayer SOURce Event detection lt layer gt DELay Wait DELay Increment layer loop counter by 1 Arming Start Layer 1 External control Event detection layer Select Source Completed No of lay
130. en INTernal FORMat PACKed or DISPlay ENABled OFF is selected REAL The length parameter is ignored reals are always output in 8 byte format Returned format ASC REAL Numeric value AUTO RST condition ASCii AUTO See also FORMat TINFormation command Complies to standards SCPI 1991 0 confirmed 9 38 Command Reference an Y PM6680B 81 85 FORMat FIXed lt Boolean gt Response Data Format Sets the ASCii format to fixed This results in the following response format lt sign gt lt mantissa value gt E lt sign gt lt exponent value gt Where lt sign gt lt mantissa value gt 12 digits plus one decimal point lt exponent value gt 3 digits Parameters Boolean 1 ON 0 OFF The counter will add leading zeroes when the measurement resolution is less than 12 digits Returned format 1 0 RST condition OFF PM6681 FORMat SREGister s ASCii BlNary HEXadecimal OCTal Data Type for Status Messages This command selects the data type of the response to queries for any CONDition EVENt and ENABle register This includes the IEEE 488 2 status register queries Parameters ASCii The data is transferred as ASCii bytes in NR1 format HEXadecimal The data is encoded as non decimal numeric base 16 pre ceded by H as specified in IEEE 488 2 OCTal The data is encoded as non decimal numeric base 8 pre ceded by Q as specifi
131. ency 10 MHz that should be measured with a reso lution of 1 Hz CONF ARRay FREQ 100 10e6 1 1 7 4 Some Basic Commands INITiate The INITiate command will normally Start a measurement or measurement se quence and store the result internally in the CNT 8X However the actual action is to change the state of the trigger sub system from dle to wait for bus arming The result of changing the state of the trigger subsys tem depends on the programming of this subsystem For example it could be pro grammed to do the following Make 1000 measurements Wait for a GET TRG and then start a measurement Wait for a GET and then make 534 mea surements Wait for an arming pulse and make one measurement Wait for an arming pulse and make 234 measurements INITiate CONTinuous This command sets the counter in a mode where it continues with a new measure ment immediately after it has finished the previous one This is done by not return ing the trigger subsystem to the idle State ABORt This command stops the current measure ment if any and sets the trigger subsys tem to the idle state This means that the counter is only waiting for new com mands FETCh The FETCh query retrieves measurement data It could either be a single value SCALar or a series of values ARRay How to Measure Fast Examples Get one measurement FETCh Get 100 measure
132. eners This may occur if the controller issues the device talker address before its own listener address which some PC controller cards has been known to do 1210 Mnemonic table er An abnormal condition occurred in connection with ror the mnemonics tables generic error 1211 Wrong macro table The macro definitions have been corrupted could checksum found be loss of memory 1212 Wrong hash table The hash table has been corrupted Could be bad checksum found memory chips or address logic Contact your local service center 1213 RAM failure to hold The memory did not retain information written to it information hash Could be bad memory chips or address logic Con table tact your local service center 8 14 Error Code 1 150 to 1 213 Error Messages CNT 8X Device specific errors leading 1 only for PM6681 Error Error Description description explanation examples Number 11214 Hash table overflow The hash table was too small to hold all mnemon ics Ordinarily indicates a failure to read RAM or ROM correctly Contact your local service center 1220 Parser error Generic error in the parser 1 221 Illegal parser call The parser was called when it should not be active 1222 Unrecognized input JA character not in the valid IEEE488 2 character set character was part of a command 1 223 internal parser error The parser reached an unexpected internal state
133. ents When dumping measurement results into the internal memory it is important to program the arming and triggering coun ters in the best way For maximum mea surement rate use the block armed mode To do this set ARM STARt LAY er COUNt_1 and TRIG COUN t lt N gt where lt N gt is the number of measure ments in a block Real Time Calculation Normally the counter calculates the re sults in real time This means that for each measurement the counter 1mmedi ately calculates the result based on the raw data information in various counting registers It needs to do this in order to display the result make mathematical calculations limit testing and statistical calculations It is possible to defer the calculations until the controller requests these values The counter intermediately stores the measurement data in a packed format This is done with the command SENSe INTernal FORMat_ PACKed This is the most important com mand when you want to improve the measurement rate for block synchronized measurements Note If you want a very high speed you must set AVER STATE_OFF and ACQ APER MIN 40000 measure ments second Only PM6681 PM6681 can make measure every period of a signal with up to 40 000 Hz This is called Back to Back period measure ments and in only available via GPIB The high speed is obtained when the PM6681 measures low resolution mea surements directly to its internal
134. er loop counts lt layer gt e IMMediate SOURce Trigger Start Layer 1 Mai Number of layer loop counter by 1 measurements on each arm 6 30 Trigger Arming Subsystem Chapter 7 How to Measure Fast How to Measure Fast Introduction The CNT 8X counters can complete a measurement cycle in many different ways each with its own advantage This means that your first step 1s to select a ba sic measurement scenario based on the requirements of the measurement This chapter contains some measurement sce narios that you can choose from These counters can measure with impres sive speed if you program them correctly You will find guidelines for speed im provements in each of the described mea surement scenarios Controller Synchronization The start of measurements can either be individually or block synchronized by the controller The instrument to controller synchronization deals with how to start a measurement or sequence of measure ments and to read data in the most effi cient way You can also synchronize the measurement with the measuring object more accurately by using external control arming but this 1s not described here Measurement Cycle Synchronization It is a good practice to check that the measurement proceeds as planned when the controller has started a measurement or block of measurements B Start If the input signal fails or there is no a
135. er always tries to set the trigger level to 50 V and 50 V If the attenuator is set to 1X it is impossible to set this trigger level and the counter will return an error message Returned format Decimal data Example for Input A 1 SEND gt INP LEV 0 01 Example for Input B 2 SEND INP2 LEV 2 0 RST condition O but controlled by Autotrigger since AUTO is on after RST Command Reference 9 47 e 6 e INPut LEVel 2 Decimal data MAX MIN Waveform compensation PM6685 The three position waveform compensation on the front panel is not available from the bus Instead you can set the trigger level that is the level on which the hysteresis band is centered How to set the trigger level depends on the duty cycle and the peak to peak voltage of the signal Trigger level V 05 Duty factor This setting has no effect unless autosensitivity is turned off see the following page Parameters Decimal data is a number between approximately 37 7 V and 37 7 V MAX gives 437 7 V and MIN gives 37 7 V Note that the INP LEV command is coupled with the INP HYST command See page 9 45 Returned format Decimal data Example SEND INP LEV 3 75 LEV AUTO O This example sets the trigger level to 3 75 V and switches off auto trigger level RST condition O but controlled by Autotrigger since AUTO is on after RST 9 48 Command Reference
136. er is installed Oscillator type are not detectable and can therefore not be reported Complies to standards IEEE 488 2 1987 Command Reference 9 125 4h e PMC PM6680B 81 85 Purge Macros Removes all macro definitions Example PMC See also MEMory DELete MACRo sMacro name if you want to remove a single macro Complies to standards IEEE 488 2 1987 PSC PM6680B 81 85 _ Decimal data Power on Status Clear Enables disables automatic power on clearing The status registers listed below are cleared when the power on status clear flag is 1 Power on does not affect the registers when the flag is O Service request enable register SRE Event status enable register ESE Operation status enable register STAT OPER ENAB Questionable data signal enable register STAT QUES ENAB Device enable registers STAT DREGO ENAB RST does not affect this power on status clear flag Parameters Decimal data a number that rounds to O turns off automatic power on clearing Any other value turns it on Returned Format 1 O d 1 is enabled and 0 is disabled Example PSC _ 1 This example enables automatic power on clearing Complies to standards IEEE 488 2 1987 9 126 Command Reference PM6680B 81 85 PUD 2 lt Arbitrary block program data Protected User Data Protected user data This is a data area in which the u
137. eralized instrument model The generalized SCPI instrument model contains three major instrument catego ries as shown in the following table Function Instrument Examples type Signal ac Sense in Voltmeter Os quisition struments cilloscope Counter Signal Source in Pulse genera genera struments tor Power sup tion ply Signal Switch in Scaners de m An instrument may use a combination of the above functions The CNT 8X coun ters belong to the signal acquisition cate gory and only that category is described in this manual The instrument model in Figure 5 1 de fines where elements of the counter lan guage are assigned in the command hierarchy The major signal function ar eas are shown broken into blocks Each of these blocks are major command sub trees in the counter command lan guage The instrument model also shows how measurement data and applied signals flow through the instrument The model does not include the administrative data flow associated with queries commands performing calibrations etc routing struments ultiplexers Inputs Channels 1 2 DISPlay B 3 C E GPIB Measurement Function FORMat OUTPut Figure 5 1 CNT 8X Instrument model Note that Input B channel 2 is not avail able on PM6685 5 2 Introduction Instrument Model Measurement Function Block The measurement function block converts the inp
138. erature as the accurate measurement is to be made at Before sending these commands be sure to disconnect any signal leads from the input connector of the input you want to calibrate If error code 1191 is generated the calibration constants are out of range and you must calibrate again Check that no cables are connected to input A or input B be fore recalibrating When the input calibration procedure can be done without error codes the calibra tion is correct Example SEND DIAG CAL INP HYST ONCE This string calibrates both input A and input B Returned format OFF When queried these commands always return OFF RST condition RST does not affect these calibration data 4h 9 30 Command Reference e Display Subsystem DISPlay Command Reference 9 31 e DISPlay ENABle _ Boolean gt Display State Turns On Off the updating of the entire display section This can be used for secu rity reasons or to improve the GPIB speed since the display does not need to be PM6680B 81 85 updated Turning off the display reduces the dead time between measurements by about 7 ms When the display is turned off the information about the measurement resolution is lost That is the counter will always send a full 12 digit mantissa independent of the measurement resolution Parameters Where Boolean 1 ON 0 OFF Returned format 1 0 RST condition ON See also C
139. errors Returned Format lt Integer gt PM6680B 81 85 Where lt Integer gt a number indicating errors according to the table below PM6680B Error PM6681 PM6685 Er lt Integer gt ror 0 No error 1 RAM Failure Display Failure 2 ROM 1 Failure Logic Failure 4 Logic Failure RAM Failure 8 Display Failure Bus ROM Failure 16 Not used ROM Bank 1 Failure 32 Not used ROM Bank 2 Failure Complies to standards IEEE 488 2 1987 WAI Wait to continue PM6680B 81 85 The Wait to Continue command prevents the device from executing any further commands or queries until execution of all previous commands or queries has been completed Example SEND MEAS FREQ WAI MEAS PDUT In this example WAI makes the instrument perform both the frequency and the Duty Cycle measurement Without wAI only the Duty Cycle measurement would be performed READ s 5 1204004E 002 1 250030E 001 Complies to standards IEEE 488 2 1987 9 132 Command Reference Chapter 10 Index Index 1 Mohm Wim dp o ms Um Sle EDO a ee NO m 9 47 50 ohms a a es ar A 9 47 A Abort T a a a a aa e 7 4 Measurement T r cum 9 4 AC DC TE AA a daa an ere 2 2 9 44 Accumulated totalize X gated by Y 9 70 Address GPIB ai ae RO 9 108 Switches mee ws up UE cm meum Cus cR d m arte a ey e 1 4 Analog Filter E ee a lar Dr A Wa ic 9 45 Analog Out Enable TP 9 80 Sca
140. ertified IEEE488 2 com mand MEMory FREE SENSe PM6681 Memory Free for results This command gives information of the free memory available for sense data measuring results in the counter Returned format Data positions available Data positions in use gt 4h 9 76 Command Reference e PM6680B 81 85 MEMory FREE MACRo Memory Free for Macros This command gives information of the free memory available for MACRos in the counter If no macros are specified 1160 bytes are available Returned format Bytes available Bytes used J Complies to standards SCPI 1991 0 confirmed a Se i a Ue rr a a a QD ILI PROCNL PM6680B 81 85 MEMory NSTates Memory States The Number of States query only requests the number of SAV RCL instrument setting memory states available in the counter The counter responds with a value that is one greater than the maximum that can be sent as a parameter to the SAv and RCL commands States are numbered from O to max 1 Returned format the number of states available Complies to standards SCPI 1991 0 confirmed ah Command Reference 9 77 Ah e This page is intentionally left blank 9 78 Command Reference OUTPut STATe SCALe Output Subsystem ON OFF lt Numeric value Command Reference 9 79 OUTPut PM6680B 81 85 _ Boolean Enable Analog Out This command switches on off the analog output
141. essage is used if the counter cannot detect a more specific error Expression data er ror floating point underflow Expression data er ror floating point overflow Expression data er ror not a number The floating point operations specified in the expres sion caused a floating point error Expression data er ror different number of channels given Two channel list specifications giving primary and secondary channels for 2 channel measurements contained a different number of channels Error Code 151 to 170 8 5 ab Error Messages Command Errors Error Error Description Description Explanation Examples Number 471 invalid expression The expression data element was invalid see data IEEE 488 2 7 7 7 2 for example unmatched pa rentheses or an illegal character were used Invalid expression data bad mnemonic A mnemonic data element in the expression was not valid Invalid expression data illegal element The expression contained a hexadecimal element not permitted in expressions Invalid expression data unexpected end of message End of message occurred before the closing paren thesis Invalid expression data unrecognized expression type The expression could not be recognized as either a mathematical expression a data element list or a channel list 178 Expression data not allowed A legal expression data was encountered b
142. etting Up the Interface 4 9 Programming Examples 410 CHECK MESSAGE AVAILABLE BIT 420 WHILE SPR3 AND 16 430 PRINT Message available bit set 440 MSGS SPACES 255 450 CALL IBRD CNT MSGS 460 LFPOS INSTR MSGS CHRS 10 470 IF LFPOS lt gt 0 THEN PRINT Response LEFTS MSGS LFPOS 480 IF LFPOS 0 THEN PRINT Response MSGS 490 CALL IBRSP CNT SPR 500 WEND 51 0 3 520 CHECK EVENT STATUS BIT 530 IF NOT SPR AND 32 GOTO 750 540 PRINT Event status bit set 550 WRTS esr 560 CALL IBWRT CNT WRTS 540 ESRS SPACES 255 580 CALL IBRSP CNT SPR 590 CALL IBRD CNT ESRS 600 ESR VAL ESRS 610 IF ESR AND 32 THEN PRINT Command error 620 IF ESR AND 16 THEN PRINT Execution error 630 IF ESRS AND 4 THEN PRINT Query error 640 b 650 READ ERROR MESSAGES 660 WRIS syst err 670 ERRMESSS SPACES 255 680 CALL IBWRT CNT WRTS 690 CALL IBRD CNT ERRMESSS 700 WHILE NOT INSTR ERRMESS No error lt gt O 710 PRINT LEFTS ERRMESSS INSTR ERRMESSS CHRS 10 7120 CALL IBWRT CNT WRTS 7130 CALL IBRD CNT ERRMESSS 740 WEND 750 WEND 760 PRINT PROGRAM TERMINATED 770 END 4 10 GW Basic for National Instruments PC IIA Setting Up the Interface Programming Examples e 6 Statistics Only for PM6680B and PM6681 In this example the counter makes 10000 measurements and uses the statistical f
143. fault settings when receiving a device clear command IEEE 488 2 does not allow this When to use a Device clear Command The command is useful to escape from erroneous conditions without having to alter the current settings of the instru ment The instrument will then discard pending commands and will clear re sponses from the output queue For ex ample suppose you are using the Counter in an automated test equipment system where the controller program returns to its main loop on any error condition in the system or the tested unit To ensure that no unread query response remains in the output queue and that no unparsed message is in the input buffer it 1s wise to use device clear Such remaining re sponses and commands could influence later commands and queries B Device lnitialization The third level of initialization is on the device level This means that it concerns only the addressed instruments Initialization and Resetting 3 19 Introduction to SCPI The RST Command Use this command to reset a device It initializes the device specific functions in the Counter The following happens when you use the RST command You set the Counter specific functions to a known default state The RST condition for each command is given in the com mand reference chapters You disable macros You set the counter in an idle state outputs are disabled so that it can start new oper ations The
144. firmed AE AAA AAA EA MEASure MEMory PM6681 _ lt N gt Memory Recall Measure and Fetch Result Same as above command but somewhat slower Allows use of all memories 1 to 19 Example MEAS MEM 13 This example recalls the instrument setting in memory number 13 makes a meas urement and fetches the result Complies to standards SCPI 1991 0 confirmed e 9 58 Command Reference ab WP This sub chapter explains the various measurements that can be done with MEASure and CONFigure READ Only the queries for single measurements using the measure command are given here but all of the information is also valid for the CONFigure command and for both scalar single and array measurements HA A A E e PM6680B 81 85 MEASure DCYCle ro heh brie lt threshold gt 1 2 4 6 Positive Duty Cycle Traditional duty cycle measurement is performed That is the ratio between the on time and the off time of the input pulse is measured Parameters lt threshold gt parameter sets the trigger levels in volts If omitted the auto trigger level is set to 50 percent of the signal Q 1 2 4 6 is the channel to measure on 1 means input A 2 means input B Only PM6680B and PM6681 4 means input E Rear panel arming input 6 means the internal reference If you omit the channel the instrument measures on input A 1 Example SEND MEAS PDUT READ s 5 097555E 001 In this example the duty
145. get high measurement speed for frequency measurements and SLOWFREQ to return to normal measur ing speed Note that these macros include 35 all speed increasing commands from the table on the previous page Omit the ones you do not want to use in your application and the ones that do not apply to your counter 16 Speed Summary Single Speed Switch Command for PM6681 Since many parameters must be set to get the highest measuring speed it is simpler if you use the macro function Send the following lines to turn on mac ros define one macro called FASTFREQ and one macro called SLOWFREQ SEND EMC 1 SEND DMC_ FastFreg ACO APER MIN AVER STATLOFF INP LEV AUTOLOFF DISP ENAB OFF gt INT FORM_PACK SENS ACOS RES LOW LBEOBMSTINEEGONPBSs TRIG COUNT 6143 STAT OPER ENAB_O ARM STA LAY2 SOUR_IMM SEND DMC SlowFreq ACQ APER 200 ms AVER STAT_ON INP LEV AUTO_ON DISP ENAB ON INT FORM REAL SENS ACQ RES HIGH FORM TINF_ON TRIG COUNT 1 STAT OPER ENAB 1 ARM STA LAY2 SOUR_BUS Now you just have to send FASTFREQ to the counter to get high measurement speed for frequency measurements and SLOWFREO to return to normal measur ing speed Note that these macros include all speed increasing commands from the table on the previous page Omit the ones you do not want to use in your application Chapter 8 Error Messages
146. gt READ Starts the measurement and returns the result CONFigure INITiate FETCh The READ command can be divided into the INITiate command which starts the measurement and the FETCh com mand which requests the instrument to return the measuring results to the con troller B Example SEND CONFigure FREQ 20E6 1 6 10 Measurement Function 20E6 1s the expected signal value 1 is the required resolution SEND INPut IMPedancelE 6 Sets input impedance to 1 MQ SEND INITiate Starts measurement SEND FETCh Fetches the result Versatility of measurement com mands MEASure Simple to use few addi tional possibilities CONFigure Somewhat more difficult READ but some extra possibili ties CONFigure Most difficult to use but INITiate many extra features FETCh Using the Subsystems Output Subsystem The analog output is turned off as a de fault You turn it on off and set the scal ing factor under ANALOG OUT in the aux menu Scaling factor selects l full scale value gives 3 38V with 250 scaling factor 4 scaling factor 1 Scaling exponent move insertion ion point Analog Out ON set scaling factor and exponent The analog output func tion Figure 6 3 Scaling Factor The scaling factor has two functions ts exponent selects which digits to output on the analog output Its value sets what
147. gure 6 12 Bits in Questionable data register Bit 14 weight 16384 Unexpected Parameter UEP This bit shows that CNT 8X has received a parameter that it cannot execute al though the parameter is valid according to SCPI This means that when this bit 1s true the instrument has not performed a measurement exactly as requested 6 24 Status Subsystem Bit 10 weight 1024 Timeout for Measurement TIO The counter sets this bit true when 1t abandons the measurement because the internal timeout has elapsed or no signal has been detected See also OSLO Lio DEL Bit 8 weight 256 Overflow OFL OOT TOUT and The counter sets this bit true when 1t can not complete the measurement due to overflow m Summary Questionable Data Signal Status Reporting STAT QUES ENAB bit mask Enable reporting of Questionable data signal status in the status byte SRE 8 Enable SRQ when data signal is ques tionable STAT QUES Reading and clearing the event register of the Questionable data signal Register Structure STAT QUES COND Reading the condition register of Ques tionable data signal Register structure Using the Subsystems Device defined Status Structure CNT 8X has one device defined status status byte Its purpose is to report when structure called the Device Register 0 It the measuring result has exceeded pre summarizes this structure in bit 0 of the programmed limits fesesspe
148. hapter 6 How to Measure Fast Complies to standards SCPI 1991 0 confirmed 9 32 Command Reference o Fetch Function FETCh SCALar ARRay Array Size gt MAX Command Reference 9 33 e e FETCh PM6680B 81 85 Fetch One Result The fetch query retrieves one measuring result from the measurement result buffer of the counter without making new measurements Fetch does not work unless a measurement has been made by the INITiate MEASure Or READ com mands If the counter has made an array of measurements FETCh fetches the first measuring results first The second FETCh fetches the second result and so on When the last measuring result has been fetched fetch starts over again with the first result The same measuring result can be fetched again and again as long as the result is valid i e until the following occurs RST is received an INITiate MEASure or READ command is executed any reconfiguration is done an acquisition of a new reading is started If the measuring result in the output buffer is invalid but a new measurement has been started the fetch query completes when a new measuring result becomes valid If no new measurement has been started an error is returned Where the optional SCALar means that one result is retrieved Returned format data The format of the returned data is determined by the format commands FORMat and FORMat F
149. he controller The array size for MEASure and CONFigure and the channels are expression data that must be in parentheses The MEASure ARRay query is a compound query identical to ABORt CONFigure ARRay lt Meas func gt lt array size gt READ ARRay lt array size gt Parameters lt array size gt sets the number of measurements in the array Returned format lt Measuring result gt f lt measuring result gt Example SEND MEAS ARR FREQ 10 Ten measuring results will be returned Type of command Aborts all previous measurement commands if not WAI is used see page 9 132 Complies to standards SCPI 1991 0 confirmed Command Reference 9 57 e 6 MEASure MEMory lt N gt PM6681 Memory Recall Measure and Fetch Result Use this command when you want to measure several parameters fast MEAS MEM1 recalls the contents of memory 1 and reads out the result MEAS MEM2 recalls the contents of memory two and reads out the result etc The equivalent command sequence is RCL1 READ The allowed range for lt N gt is 1 to 9 Use the somewhat slower MEAS MEMor y N command described below if you must use memories 10 to 19 TIMING Data Format Command ASCII REAL MEAS MEM 7 9 ms 6 7 ms MEAS MEM 1 9 1 ms 8 0 ms RCL 1 READ 10 1 ms 8 9 ms Returned format measurement result Complies to standards SCPI 1991 0 con
150. he counter if you are interested in the serial number PM6681 returns the correct serial number Example SEND IDN READ lt Fluke a n PM6685 0 MAIN V1 01 19 Nov 1902 uu Y a GPIB au Vlla ux 298 a CET as 1992 Complies to standards IEEE 488 2 1987 EP CA PM6680B 81 85 LMC Learn Macro Makes the instrument send a list of string data elements containing all macro la bels defined in the instrument Returned Format String lt String gt lt String gt a Macro label String data will be surrounded by as in the example below Example SEND LMC May give the following response READ lt AUTOFILT AMPLITUDE Complies to standards IEEE 488 2 1987 Command Reference 9 123 4h e LRN PM6680B 81 85 Learn Device Setup Learn Device Setup Query Causes a response message that can be sent to the instrument to return it to the state it was in when the LRN query was made Returned Format SYST SET Block data Where Block data is 292 lt 92 data bytes for PM6680B Block data is 3104 lt 104 data bytes for PM6681 Block data is 276 lt 76 data bytes for PM6685 Example SEND LRN Complies to standards IEEE 488 2 1987 pL w n OPC PM6680B 81 85 Operation Complete The Operation Complete command causes the device to set the operation com plete bit
151. hing to report Status Subsystem 6 21 Using the Subsystems ESR SCPI defined Status Reading and clearing the event register of Registers the Standard Event structure CNT 8X has two 16 bit SCPI defined status structures The operation status and the questionable data structure These group is l6 bits wide while the status byte and the standard status groups are 8 bits wide EN Questionable Data Register Conan Register E ND haus Eme 2 Y IC lllilllil mms EE oo pinana 8 E enable Register li lib 1i 119m EM MO I o SIT mar Operation Status Register Conaion Register as DU EwnRodse ODE Enable Register DO Cae iexsOR O eo6oec00000600 00000060000000909 e99 0000900000000900090000909 9 AUD A S OM UOI CENA PURIS SRQ signal Figure 6 10 Status structure 7 Operation Status Group and Status structure 3 Questionable Data Group are SCPI defined 6 22 Status Subsystem Using the Subsystems B Operation Status Group This group reports the status of the CNT 8X measurement cycle Operation Status Group STATus OPERat i on CONDi t i on STATus OPERat i on EVENt MSP WFA WFT MST 64 32 16 Measurement stopped Waiting for arming Waiting for triggering Measurement started Figure 6 11 Bits in the Opeation Sta tus Register Bit 8 weight 256 Measurement Stopped MSP This bit shows that the counter is
152. id combination of channel and function Indicates that a legal program data element was parsed but could not be executed due to the current counter state see IEEE 488 2 6 4 5 3 and 1151 15 Error Code 200 to 221 8 7 Error Messages Execution errors Error Error Description Number 999 Data out of range description explanation examples Indicates that a legal program data element was parsed but could not be executed because the inter preted value was outside the legal range as defined by the counter see IEEE 488 2 11 5 1 1 5 Data out of range exponent too large The expression was too large for the internal float ing point format Data out of range below minimum Data below minimum for this function parameter Data out of range above maximum Data above maximum for this function parameter Data out of range Save recall mem ory number A number outside O to 19 was given for the save re call memory 293 Too much data Too much data PUD string too Indicates that a legal program data element of block expression or string type received that contained more data than the counter could handle due to memory or related counter specific requirements long Too much data String or block too long 294 lllegal parameter Used where exact value from a list of possible val value ues was expected 230 Data corrupt or Possibly invalid data ne
153. ignal detection that is the ability to show NO SIGNAL NO TRIG on the display When signal detection is enabled the measurement attempt will be abandoned when the no signal is detected A zero result will be sent to the controller instead of a measurement result and the timeout bit in the STATus QUEStionable register will be set Returned format amp O 1 1 Where 0 means no signal detection 1 means signal detection ON RST condition O Command Reference 9 109 e 6 e SYSTem SET PM6680B 81 85 _ Block data Read or Send Settings Transmits in binary form the complete current state of the instrument This data can be sent to the instrument to later restore this setting This command has the same function as the LRN common command with the exception that it returns the data only as response to SYST SET The query form of this command re turns a definite block data element Parameters Block data is the instrument setting previously retrieved via the SYSTem SET query Returned format Block data Where Block data is 292 lt 92 data bytes for PM6680B Block data is 3104 lt 104 data bytes for PM6681 Block data is 276 lt 76 data bytes for PM6685 SEND SYST SET READS 2764 m dC sacas Cis ag saga a s ee ue ux RE AERE NUS BOE a r rrr d Complies to standards SCPI 1991 0 confirmed RITE URDU UO I T T R SYSTem TIME ELAPsed PM6680B 81 85 Read On time
154. ings Address Settings 0 00000 16 10000 1 00001 17 10001 2 00010 18 10010 3 00011 19 10011 4 00100 20 10100 5 00101 21 10101 6 00110 22 10110 7 00111 23 10111 8 01000 24 11000 9 01001 25 11001 10 01010 26 11010 11 01011 27 11011 12 01100 28 11100 13 01101 29 11101 14 01110 30 11110 15 01111 Getting Started The address can also be set via a GPIB command or from the AUX MENU on the PM6680B 1 5 The set address is stored in nonvolatile memory and re mains until you change it Power on When turned on the counter starts with the setting it had when turned off m Standby When the counter is in REMOTE mode you cannot switch it off You must first enable Local control by pressing LO CAL Testing the Bus To test that the instrument is operational via the bus use IDN to identify the in strument and OPT to identify which options are installed See System Sub system IDN and OPT Interface Functions What can I do with the Bus All the capabilities of the interface for the PM6680B series are explained below Summary Description Code Source handshake SH1 Acceptor handshake AH1 Control function CO Talker Function T6 Listener function L4 Service request SR1 Remote local function RL1 Parallel poll PPO Device clear function DC1 Device trigger function DT1 Bus drivers E2 B SH1 and AH1
155. initialization Message exchange initialization Device initialization B Bus Initialization This 1s the first level of initialization The controller program should start with this which initializes the IEEE interfaces of all connected instruments It puts the complete system into remote enable REN line active and the controller sends the interface clear IFC command The command or the command sequence for this initialization is controller and lan guage dependent Refer to the user man ual of the system controller in use m Message Exchange Initialization Device clear is the second level of initial ization It initializes the bus message ex change but does not affect the device functions Device clear can be signaled either with DCL to all instruments or SDC Selective device clear only to the addressed instru ments The instrument action on receiv ing DCL and SDC is identical they will do the following Clear the input buffer Clear the output queue Reset the parser Clear any pending commands The device clear commands will not do the following Change the instrument settings or stored data in the instrument nterrupt or affect any device operation in progress Change the status byte register other than clearing the MAV bit as a result of clearing the output queue Many older IEEE instruments that are not IEEE 488 2 compati ble returned to the power on de
156. interface This declaration must be merged with the programs prior to running them The declaration 1s printed below but it is also available as a file on the diskettes delivered with your interface The file name is DECL BAS 20 CLEAR 60000 IBINIT1 60000 IBINIT2 IBINIT1 3 BLOAD bib m IBINIT1 30 CALL IBINIT1 IBFIND IBTRG IBCLR IBPCT IBSIC IBLOC IBPPC IBBNA IBONL IBRSC IBSRE IBRSV IBPAD IBSAD IBIST IBDMA IBEOS IBTMO IBEO T IBRDF IBWRTF IBTRAP IBDEV IBLN a0 CATT IBINIT2 IBGTS IBCAC IBWAIT IBPOKE IBWRT IBWRTA IBCMD IBCMDA IBRD IBRDA IBSTOP IBRPP IBRSP IBDIAG IBXTRC IBRDI IBWRTI IBRDIA IBWRTIA IBSTAS IBERR IBCNTS GW Basic for National Instruments PC IIA Setting Up the Interface 4 3 b Programming Examples 1 This program uses limit testing to check that the frequency 1s above a preset value 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 AO 240 250 260 270 280 230 300 310 320 330 340 350 360 370 380 390 400 410 4 4 Limit Testing CNTNAMES DEV10 CALL IBFIND CNTNAMES CNT5 N Set continuous frequency measurement WRTS RST CLS FUNC FREO l INIT CONT ON CALL IBWRT CNT WRTS N Enable limit monitoring limit 1 MHz WRTS CALC LIM ON LIM UPP 1E6 UPP STATE ON CALL IBWRT CNT WRIS WRTS STAT DREGO ENAB 2 SRE 1 CALL IBWRT CNT
157. is error as well as errors 151 through 159 is gen erated when parsing a string data element This partic ular error message is used when the counter cannot detect a more specific error 6 4 Error Code 121 to 150 Error Messages Command Errors Error Error Description Description Explanation Examples Number 454 invalid string data JA string data element was expected but was invalid Invalid string data for some reason see IEEE 488 2 7 7 5 2 for ex unexpected end of ample an END message was received before the message terminal quote character 158 String data not al A string data element was encountered but was not al lowed lowed by PM66895 at this point in parsing 160 Block data error This error as well as errors 161 through 169 is generated when parsing a block data element This particular error message is used when PM6685 can not detect a more specific error 161 invalid block data A block data element was expected but was invalid for some reason see IEEE 488 2 7 7 6 2 for ex ample an END message was received before the length was satisfied 168 Block data not al JA legal block data element was encountered but lowed was not allowed by the counter at this point in pars ing 170 Expression data er This error as well as errors 171 through 179 is ror generated when parsing an expression data ele ment This particular error m
158. is required Returned format POS NEG 4l Example for Input A 1 SEND INP SLOP POS Example for Input B 2 Only for PM6680B 81 SEND INP2 SLOP NEG Example for Input E 4 SEND INP4 SLOP NEG RST condition POS Complies to standards SCPI 1991 0 confirmed aaa ue PM6680B PM6681 INPut2 COMMon ONJOFF When on the signal on input A is fed both to Channel 1 and Channel 2 The inter connection is made before the filter on input A Parameters Boolean 1 ON O OFF ON means that the signal on input A is fed both to Channel 1 and Channel 2 The input signal on input B is not used in the measurement But the signal on input B is terminated by the input impedance of the counter 50 2 or 1MQ2 OFF means that inputs A and B works separated from each other Returned format 1 0 Example SEND INP2 COMM ON This example switches on common feeding the same signal to both channel 1 and channel 2 RST condition OFF Command Reference 9 51 e 6 o This page is intentionally left blank 9 52 Command Reference Measurement Function Set up the Instrument Perform Measurement and Read Data MEASure SCALar lt Measuring Function gt lt Parameters gt lt Channels gt ARRay lt Measuring Function Array Size gt lt Parameters gt lt Channels gt MEMory lt N gt MEMorysN The array size for MEASure and CONFigure and the channels are expression 33 data that must
159. is setting is impossible and the counter will return an error message Returned format Decimal data Example SEND INP HYST 0 5 HYST AUTO 0 This example sets the sensitivity to 0 5 V and switches off autosensitivity RST condition 0 65 V but controlled by Autotrigger since AUTO is on after RST Command Reference 9 45 e 6 e INPut HYSTeresis AUTO PM6685 2 lt Boolean gt ONCE Auto Sensitivity AUTO from the front panel turns on both auto sensitivity hysteresis and auto waveform compensation trigger level From the bus there are two commands one for auto hysteresis and one for auto trigger level However the function of these commands are identical Both commands turn on off the hysteresis and the trigger level simultaneously The auto sensitivity function normally sets the hysteresis to 33 of Vpp However two exceptions exists Pulse Width and Duty Cycle where the hysteresis is set to min If you have a stable amplitude use the AUTO ONCE and the autotrigger will de termine sensitivity once and then set fixed levels Parameters Boolean 1 ON O OFF ONCE means that AUTO first switches ON to check the signal After determining suitable sen sitivity and trigger level setting it programs these values as if they where manually set It ends by switching off AUTO Using ONCE instead of AUTO ON improves measuring speed Returned format 1 0 Example SEND INP HYST AUTO
160. l data the sum between 0 and 368 of all bits that are true See table below Bit No Weight Condition 8 256 Not Measurement 6 64 Waiting for bus arming 5 32 Waiting for triggering and or external arming 4 16 Measurement Complies to standards SCPI 1991 0 confirmed Device status continously monitored Operation status condition register STATus OPERation CONDition Transition filter Fixed in the counters Operation status event registers Latched conditions STATus OPERation EVENt Operation status enable register Selects which events can set the summary message STATus OPERation ENABle Summary message STATus OPERation ENABle OPR bit in status byte Command Reference 9 101 e 6 e STATus OPERation ENABle 80B 81 85 _ Decimal data Enable Operation Status Reporting Sets the enable bits of the operation status enable register This enable register contains a mask value for the bits to be enabled in the operation status event reg ister A bit that is set true in the enable register enables the corresponding bit in the status register See figure on page 9 101 An enabled bit will set bit 7 OPR Operation Status Bit in the Status Byte Regis ter if the enabled event occurs See also status reporting on page 3 14 Power on will clear this register if power on clearing is enabled via PSC Parameters lt dec data gt the sum between 0 and 368 of all bits that are true See ta ble below
161. l or a STB query see Figure 6 7 Each bit in the status byte contains a summary message from the status structure You can select what bits in the status byte should generate a ser vice request to alert the controller When a service request occurs the SRQ line of the GPIB will be activated Whether or not the controller will react on the service request depends on the controller program The controller may be interrupted on occurrence of a service gt Using the Subsystems request it may regularly test the Example SRQ line it may regularly make serial SRE 16 poll or STB or the controller may not This sets bit 4 16 2 in the service request react at all The preferred method is to enable register see Figure 6 8 This use SRQ because it presents a minimum makes the instrument signal SRQ of disturbance to the measurement pro when a message is available in the cess output queue Selecting Summary Message to Gen RQSMSS erate SRQ The original status byte of IEEE 488 1 is The counter does not generate any SRQ sent as a response to a serial poll and bit by default You must first select which 6 means requested service RQS summary message s from the status byte register should give SRQ You do that IEEE 488 2 added the e en ra with the Service Request Enable com expanded the status byte LN leony dice elm maes different bit 6 the MSS This bit 1s true Re Se SY S S n SS S N S xd O
162. ling factor see 9 80 Aperture sss ctr n 9 87 Arbitrary block data s 9 112 Arming ssc ccc ttt 9 8 Bus arm mode paa A eee 9 8 Delay by events 1077 9 7 9 10 Event count range ccc 9 7 9 10 External Events before Start 9 7 9 10 Start delay dieu Mag Sak Uu ala an e v el AG JE ei d er cn 9 7 Start slope iw SOP dedu dup cus AW des DRE ule TE ru e d 9 9 Start SQUICO ccn n n n 9 9 Stop slope ZU A oe m je CEDUE CE A Ue Js on 9 11 Stop SOUICe cco rn f n n n nnn 9 11 Subsystem DII IM E 9 5 Wait for bus ew NG A Se a A A al ar a 6 23 Arrays n n n n n n n 7 4 7 5 7 7 Fetch A Mk le Oe 9 35 ASCII Data TOrmats oae a 7 8 9 38 Fixed format P 9 39 Attenuation DOE RI AN Ue oq dc de ow Mee des da 2 2 9 44 Auto Attenuation V Jury Jed lum Jee ae lcu aa NN NA 9 44 Gated voltage mode 9 97 Levels selected by 77777 9 49 Off e n n n BB 9 45 9 48 Once Er 9 46 9 49 9 50 Power on clearing 777 9 126 Sensitivity n n 6 9 46 Speed sc n n c 9 92 Trigger n n 9 50 9 97 Trigger level nn 9 49 Trigger On Off gt 9 49 Triggering e n 2 2 Auto calibration on off 9 24 Average For a preset time esses Ro 9 91 Measurements 17 7777 9 92 Mode mca Sa sae ee a ae ink te ea ee des inne xs cn 9 91 On Off a ae a A a E E 2 4 9 92 Sample size E jk 6 m up ee NG 9 91 Samples O a A ee ee ee ee 9 91 samples in averaging 9 91 Sta
163. measurements in the array stores the results in the output buffer and fetches the first measuring result Use FETCh to fetch other measuring results from the out put buffer The READ query is identical to ABORt INITiate FETCh Returned format data The format of the returned data is determined by the format commands FORMat and FORMat FIXed Example SEND CONF FREQ INP FILT ON READ This example configures the counter to make a standard frequency measurement with the 100 kHz filter on The counter is triggered and data from the measure ment are read out with the READ query SEND READ This makes a new measurement and fetches the result without changing the pro gramming of the counter Type of command Aborts all previous measurement commands if WAT is not used Complies to standards SCPI 1991 0 confirmed 9 82 Command Reference PM6680B 81 85 READ ARRay 2 array size for FETCh gt MAX Read an array of results The READ ARRay query differs from the READ query by reading out several results at once after making the number of measurements previously set up by CONFigure ARRay Or MEASure ARRAy The READ ARRa y query is identical to ABORt INITiate FETCh ARRay array size for FETCh gt The array size for FETCh gt does not tell READ to make that many measure ments only to fetch that many results CONF ARR MEAS ARR ARM LAY1 COUN or TRIG LA
164. ment This chapter is an overview of SCPI and shows how SCPI is used in Fluke Fre quency Counters and Timer Counters SCPI is based on IEEE 488 2 to which it owes much of its structure and syntax SCPI can however be used with any of the standard interfaces such as GPIB IEC625 IEEE 488 VXI and RS 232 Reason for SCPI For each instrument function SCPI de fines a specific command set The advan tage of SCPI is that programming an instrument is only function dependent and no longer instrument dependent Sev eral different types of instruments for ex ample an oscilloscope a counter and a multimeter can carry out the same func tion such as frequency measurement If these instruments are SCPI compatible you can use the same commands to mea sure the frequency on all three instru ments although there may be differences in accuracy resolution speed etc 3 2 What is SCPI Compatibility SCPI provides two types of compatibil ity Vertical and horizontal INPut COUPling AC o 0000 H Figure 3 1 Vertical This means that all instruments of the same type have identical controls For eample oscilloscopes will have the same controls for timebase triggers and voltage settings 10 1234567890E3 MEASure FREQuency 0000000 oo0000 nnn
165. ments FETCh ARRay 100 The number of measurements is 35 defined by the setting of the ARM and TRIG counters The ARM counter can be set directly by the CONF and MEAS commands The FETCh ARRay query pa rameter only decides how many measurement results to read out READ This command simply means to start a measurement or measurement sequence and read data This query is identical to ABORt INITiate FETCh This means that the counter starts a mea surement single or array after it has aborted any previous measurements It also returns the result Examples Start one measurement and fetch result READ Start measurements and fetch 100 results READ ARRay 100 MEASure This query is identical to CONFigure READ This means that the command sets up the counter and starts a measurement mea surement sequence Examples Make a frequency measurement MEAS FREQ Make 100 frequency measurements MEAS ARRay FREQ 100 Make 100 frequency measurements on the A channel MEAS ARRay FREO 100 1 Make 100 frequency measurements on the A channel The expected frequency to be measured is 10MHz with a resolution of 1 Hz MEAS ARRay FREQ 100 10e6 1 1 MEAS MEM1 MEAS MEM 10 Memory Recall Measure and Fetch Result This command is only for PM6681 Use it when you want to measure several pa rameters fast i e switch quickly be tween measurement func
166. meric value RST condition 1 Complies to standards SCPI 1991 0 confirmed Command Reference 9 7 e ARM LAYer2 PM6680B 81 85 Bus Arming Override This command overrides the waiting for bus arm provided the source is set to bus When this command is issued the counter will immediately exit the wait for bus arm state The counter generates an error if it receives this command when the trigger sub system is not in the wait for bus arm state If the Arming source is set to Immediate this command is ignored Example SEND ARM LAY2 Complies to standards SCPI 1991 0 confirmed ARM LAYer2 SOURce PM6680B 81 85 BUS IMMediate Bus Arming On Off Switches between Bus and Immediate mode for the wait for bus arm function layer 2 GET and TRG triggers the counter if Bus is selected as source If the counter receives GET TRG when not in wait for bus arm state it ignores the trigger and generates an error It also generates an error if it receives GET TRG and bus arming is switched off set to IMMediate Returned format BUS IMM I Example SEND ARM LAY2 SOUR BUS Complies to standards SCPI 1991 0 confirmed 4h 9 8 Command Reference o PM6680B 81 85 ARM SLOPe 2 POSitive NEGative External Arming Start Slope Sets the slope for the start arming condition Returned format POSINEG Example SEND ARM SLOP N
167. mmand where INPut EVENt is the header path and HYSTeresis is the first leaf node and LEVel is the second leaf node because LEVel is also a leaf node under the header path INPut EVENt There is no colon before LEVel N3 Parameters Numeric Data Decimal data are printed as numerical values throughout this manual Numeric values may contain both a decimal point and an exponent base 10 These numerals are often represented as NRf NR NumeRic f flexible format B Keywords In addition to entering decimal data as numeric values several keywords can ex ist as special forms of numeric data such as MINimum MAXimum DEFault STEP UP DOWN NAN Not A Num ber INFinity NINF Negative INFi nity The Command Reference chapters explicitly specify which keywords are al lowed by a particular command Valid keywords for the CNT 8X counters are MAXimum and MINimum MINimum This keyword sets a parameter to its min imum value MAXimum This keyword sets a parameter to its max imum value The instrument always allows MINimum and MAXimum as a data element in com mands where the parameter is a numeric value MIN and MAX values of a param eter can always be queried Example SEND gt INP LEV _MAX This query returns the maximum range value B Suffixes You can use suffixes to express a unit or multiplier that is associated with the deci mal numeric data Valid suffixes are s seconds ms milli
168. mple of this could be to tune an oscillator by measuring the output frequency and adjust the oscillator depending on the measured frequency Of the many available ways to do this with the CNT 8X three should be men tioned READ INIT CONT and GET and MEASure 6 Basic Measurement Method B READ The READ query provides a basic mechanism for this It ensures that the measurement is started after the counter receives the command It will also send back the result The READ query should be preceded by setting up the counter by using either CONFigure or individual programming commands This command should be used if no special speed re quirements exists B INIT CONT and GET In this method the trigger function 1s con tinuously initiated by the command INI Tiate CONTinuous 1 This gives you the minimal firmware overhead if you don t change settings in the counter Set up the counter either by using CONFig ure or by using individual programming commands before starting the measuring sequence Setting up includes switching on the wait for bus trigger function with the following command ARM START LAY2 SOURceW_BUS As default the counter starts a measure ment and sends the result to the controller when receiving a GET or a TRG com mand This method is the fastest way to make individually synchronized measure ments B MEASure The MEASure query sets up the coun ter ensures that the measurement is st
169. multiple queries in a program message the instrument groups the multi ple response message units together in one response message according to the following syntax Respons Message Unit Fig 3 9 Syntax of a Terminated Response Message The response message terminator rmt 1s always NL END where NL END is new line code equal to lt line feed gt code ASCII 10 decimal sent concurrently with the END message The END message is sent by asserting the EOI line of the GPIB bus Responses A SCPI instrument always sends its re sponse data in shortform and in capitals Example You program an instrument with the fol lowing command SEND ROSCillator SOURce EX Ternal Then you send the following query to the instrument SEND ROSCillator SOURce The instrument will return READ lt EXT response in shortform and in capitals Program and Response Messages 3 9 Introduction to SCPI o Example Command Tree j SEND INPut EVENt HYSTeresis Command Trees like the one below are Where INPut is the root node and HYSTer used to document the SCPI command set esis is the leaf node in this manual The keyword mnemonic l on the root level of the command tree is Fach colon in the command header the name of the subsystem The follow moves the current path down one level ing example illustrates the Command from the root in the command tree Once Tree of the INPutl subsystem you
170. n Register on the other hand gives only the status of the measurement cycle for instance Mea surement stopped Although it is possible to read the 35 condition registers directly we recommend that you use SRQ when monitoring the measure ment cycle The measurement cycle is disturbed when you read condition registers gH Summary The way to work when writing your bus program is as follows Set up Set up the enable registers so that the events you are interested in are summa rized in the status byte Set up the enable masks so that the condi tions you want to be alerted about generate SRQ It is good practice to generate SRQ on the EAV bit So enable the EAV bit via SRE Check amp Action Check if an SRQ has been received Make a serial poll of the instruments on the bus until you find the instru ment that issued the SRQ the instru ment that has RQS bit true in the Sta tus Byte Status Subsystem 6 19 Using the Subsystems When you find it check which bits in the Status Byte Register are true Let s say that bit 7 OPR is true Then read the contents of the Opera tion Status Register In this register you can see what caused the SRQ Take appropriate actions depending on the reason for the SRQ Standard Status Registers These registers are called the standard status data structure because they are mandatory in all instruments that fulfill the IEEE 4
171. n be solved by setting up the counter to wait for a GET before it starts the measure ment sequence The default actions for GET include sending a single result the first value when the counter has com pleted the sequence This makes it possi ble to let the controller wait for the Mes sage AVailable status bit to find out when the data capture is ready You can read the complete array by using the FETCH ARRay command So if for example the array size is 4 GET gives the first result in the array and FETC ARR _3 fetches result two three and four m MEAS ARRay The MEASure ARRay query ensures that the measurement sequence is started after the command is received It will also send back the results It also includes set ting up the counter This is the command that has the highest possible degree of compatibility with other instruments however this command reprograms the counter and often you need to program the counter yourself This is why we rec ommend using the READ ARRay query General Speed Improvements The CNT 8X has many options to im prove measurement speed Here you will get a list of actions that you can use to improve the measurement speed Most of these commands decrease the average dead time The dead time is the time be tween measurements that is from stop to the next start These actions are all gen eral that 1s they affect the rate of mea surements for all measurement methods given ab
172. n in put A send INPut SLOPe NEG after the CONF TOT CONT command Parameters 1 2 4 6 is the primary adding channel 1 2 4 6 is the secondary subtracting channel 01 means input A 2 means input B not PM6685 104 means input E rear panel arming input 6 means the internal reference Selecting the same channel as both primary and secondary disables the secon dary channel This measurement cannot be done as a MEASure It must be done as a CON Figure followed by INIT CONT_ON gate control with SENS TOT GATE ON OFF and completed with a FETCh ARR array size Example SEND CONF TOT INP SLOPe neg This example sets up the counter to totalize the negative slopes on Input A and disable the secondary channel Same as 1 1 RST condition 1 2 for PM6680B and PM6681 1 1 for PM6685 Normal Program Sequence for Totalizing on A CONF TOT CONT 81 81 Set up the counter for totalize on A INIT CONT ON Initiate the counter continuously TOT GATE_ON Start totalizing FETC ARR 1 Read intermediate results without stopping the totalizing TOT GATE OFF Stop totalizing FETC ARR 1 Fetch the final result from the totalizing The FETCh ARR command can take both positive and negative data Positive data for instance 10 outputs the first 10 measurements in the counter output buffer Negative data for instance 10 outputs the last ten results
173. n the external stop arming source before the counter stop measuring Stop Arming Delay by events Stop Arming delay by events cannot be used at the same time as start Arming de lay by events ARM START ECO The delay is only active when ARM STOP SOUR EXT2 EXT4 is selected Buy one of the delays ARM STAR DEL ARM STOP DEL ARM STAR ECO and ARM STOP ECO can be used at a time When you pro gram this delay the other three delays will be reset to their RST values Parameters Numeric value is a number between 2 and 16 777 215 1 switches the delay by events OFF SEND ARM STOP ECO 25d Returned format Numeric value RST condition 1 Complies to standards SCPI 1991 0 confirmed 9 10 Command Reference PM6680B 81 85 ARM STOP SLOPe 2 POSitive NEGative External Stop Arming Slope Sets the slope for the stop arming condition Returned format POSINEG Example SEND ARM STOP SLOP NEG RST condition POS Complies to standards SCPI 1991 0 confirmed EAS PM6680B 81 85 ARM STOP SOURce 2 EXTernal2 EXTernal4 IMMediate External Stop Arming Source Selects between channel 2 Input B and channel 4 Input E as stop arming input or switches off the stop arming function Parameters EXTernal2 is input B Only PM6680B 81 EXTernal4 is input E IMMediate is Stop arming OFF Returned format EXTA IMM I Example SEND ARM STOP SOUR EXTA R
174. nd to speed up voltage measurements and Autotrigger functions when you don t need to measure on low frequencies Time to determine trigger levels Min frequency limit Default Max frequency limit Measuring function PM6680B PM6681 PM6680B PM6681 Freq A 48 ms 85 ms 26 ms 30 ms Time A B 82 ms 38 ms Parameters Numeric value for PM6680B 100 gives the lower frequency limit of 100 Hz and 10000 for a lower frequency limit of 10 kHz MIN gives 100 Hz frequency limit for PM6680B and 1Hz for PM6681 MAX gives 10 kHz frequency limit forPM6680B and 50 kHz for PM6681 Returned format Numeric value lt RST condition 100 Complies to standards SCPI 1991 0 confirmed 9 92 Command Reference FIN WF PM6680B 81 85 FUNCtion Measuring function Primary channel Secondary channel gt Select Measuring Function Selects which measuring function is to be performed and on which channel s the instrument should measure Parameters Measuring function is the function you want to select according to the SENSe subsystem command trees on page 9 85 and page 9 86 Primary channel is the channel used in all single channel measurements and the main chan nel in dual channel measurements Secondary channel is the other channel in dual channel measurements Only the primary channel may be programmed for all single channel measurements
175. ndard and revision is the number of the SCPI standard Example Send gt SYST VER Read 1991 0 Complies to standards SCPI 1991 0 confirmed e 9 112 Command Reference e o Test Subsystem TEST CHECk T E EC SELect _ RAM ROM LOGic DISPlay ALL m Related common command TST Command Reference 9 113 e 6 e TEST CHECk _ Boolean Select Check signal This command connects the internal reference signal to the measuring logic in stead of an external measuring signal This makes it possible to test all functions The frequency of the reference is 10 MHz for PM6680B and PM6685 and 100 MHz for PM6681 Parameters Boolean 1 ON 0 OFF 1 and ON means test signal connected 0 and OFF means test signal disconnected Selecting channel 6 when entering measuring channel for CONFigure MEA Sure etc also selects the reference Returned format 1 0 RST condition 0 TEST SELect _ RAM ROM LOGic DISPlay ALL Select Self tests Selects which internal self tests shall be used when self test is requested by the TST command Returned format RAM ROM LOGic DISPlay ALL RST condition ALL 9 114 Command Reference 4h wy Trigger Subsystem TRIGger STARt SEQuence 1 LAYer 1 COUNt Numeric value MIN MAX Related common command TRG Command Reference 9 115 e 6 e TRIGger COUNt PM6680B 81 85 2 Numeric v
176. nge in the trigger subsystem settings Consider that the trigger subsystem is programmed to perform 1000 measurements when initiated In such a case the counter must make 10000 measurements if the statistical function requires 9500 measurements because the number of measurements must be a multiple of the number of mea surements programmed in trigger subsystem 1000 in this example Parameters Boolean 1 ON O OFF Returned format lt 1 0_ RST condition OFF 9 14 Command Reference 4h wy PM6680B PM6681 CALCulate AVERage TYPE MAX MIN MEAN SDEViation Statistical Type Selects the statistical function to be performed You must use CALC DATA to read the result of statistical operations READ 35 FETC will only send the results that the statistical operation is based on Parameters MAX returns the maximum value of all samples taken under CALC AVER control MIN returns the minimum value of all samples taken under CALC AVER control MEAN returns the mean value of the samples taken x 1 YX n 1 pagi 1 2 1 2 SDEV Returns the standard deviation s X X Returned format MAX MIN MEAN SDEV RST condition MEAN AAA AAA ML D De AN PM6680B 81 85 CALCulate DATA Fetch calculated data Fetches data calculated in the post processing block Use this command to fetch the calculated result without making a new measurement Returned Format Decimal data Example for PM6685
177. not mea suring It is set when the measurement or sequence of measurements stops Bit 6 weight 64 Wait for Bus Arm ing WFA This bit shows that the counter is waiting for bus arming in the arm state of the trig ger model Bit 5 weight 32 Waiting for Trigger and or External Arming WFT This bit shows when the counter is ready to start a new measurement via the trigger control option 488 2 for the shortest possible trigger delay The counter is now in the wait for the trigger state of the trig ger model Bit 4 weight 14 Measurement Started MST This bit shows that the counter is measur ing It is set when the measurement or se quence of measurements start Summary Operation Status Reporting STAT OPER ENAB Enable reporting of Operation Status in the status byte SRE 128 Enable SRQ when operation status has someting to report STAT OPER Reading and clearing the event register of the Operation Status Register structure STAT OPER COND Reading the condition register of the Op eration Status Register structure Status Subsystem 6 23 Using the Subsystems Questionable Data Signal Status Group This group reports when the output data from the CNT 8X may not be trusted Questionable Data Signal Status Group STAT Quest COND STAT QUES UEP TIO OFL fo I8 lol ba nad 1024 d Unexpected Overflow parameter Time out for measurement Fi
178. o 204 01 Fase ay FREQuency CW lt Size gt lt expected value gt lt resolution gt 11 2 3 4 Josi DI RATIO Ses pata value gt lt resol gt l Gio oi BURSA lt Size gt lt exp value gt lt resol gt 3 Bi PRF lt Size gt lt exp value resol 3104 PERiod lt Size gt lt exp value resol 3 Bi TINTerval lt Size gt lt exp value resol Paen PHASe Size exp value lt resol gt 2 a PI NWIDth X Size exp value resol PWIDth Size exp E resol DCYCle PDUTycycle lt Size gt lt exp va Tr Qe 4 NDUTycycle lt Size gt lt exp T HIN gt 0 RISE TIME Sl lt lower thr pc MM Ni l O oa y FALL TIME lt Size gt Tor e roe value gt lt resol gt 01 12 MAXimum lt Size gt MiNimum Size iu Size alize GATed Size 212224 1 2 TIMed pan ime for gate oe Sa Get SS Top Sue gos ime Ol Pa en gt 01 02 04 2 4 O lt Size gt CO Tinuous Size Siler 2164 l0110204 1 4h 9 54 Command Reference dh yw yw H e PM6685 MEASure CONFigure VOLTage SCALar FREQuency ECW lt expected value gt lt resolu tion gt 1103 Y o RATio sexp valor So SiS Oa tsaa 1 3 4 BURSt KE OS e NG ERA PRF sexpected value gt r solution alo 4 PERiod lt expected va wat
179. of the status byte STATus QUEStionable ENABle bit mask Selects which conditions in the Questionable Status register should be reported in bit 3 of the status byte STATus DREGister0 ENABle bit mask Selects which conditions in Device Register 0 should be reported in bit 0 of the status byte 6 18 Status Subsystem SRE bit mask Selects which bits in the status byte should cause a Service Request A programming example using status re porting is available in the Programming Examples in chapter 4 Reading and Clearing Status m Status Byte As explained earlier you can read the sta tus byte register in two ways Using the Serial Poll IEEE 488 1 de fined Response Bit 6 RQS message shows that the counter has requested service via the SRQ signal Other bits show their summary mes sages A serial poll sets the RQS bit FALSE but does not change other bits Using the Common Query STB Response Bit 6 MSS message shows that there is a reason for service request Other bits show their summary mes sages Reading the response will not alter the status byte m Status Event Registers You read the Status Event registers with the following queries Using the Subsystems ESR Reads the Standard Event Status register STATus OPERation Reads the Operation Status Event register STATus QUEStionable Reads the Questionable St
180. ove however they are especially valuable for the block synchronized mea surements In this mode the dead time can be as low as 120us PM6681 General Speed Improvements 7 7 How to Measure Fast AUTO One of the most timesaving commands you can use with the CNT 8X is INPut LEVel AUTO OFF This will save the time it takes to determine the trigger levels About 50ms measurement in PM6680B and PM6685 and 85ms in PM6681 Display Control The display can be switched off with the command DISPlay ENABle OFF When you switch off the display the counter loses the measurement data resolution informa tion This means that the counter always sends all digits independently of whether or not they are significant This command reduces the dead time by about 7ms GPIB Data Format You can select the format of the result sent on the GPIB using the FORMat command Two options exist ASCu and REAL The REAL format saves a lot of time both in the instrument and the con troller for converting data However when the counter uses the REAL format you lose the measurement data resolution information It sends the REAL format as a block data element This means that it sends data as 18 lt 8 bytes real gt The lt 8 bytes real gt is a double precision binary floating point code according to IEEE 488 2 IEEE 754 8 General Speed Improvements Time Measurement Resolution The basic time measurement resolution can
181. protect tab on a disk was present The definition of what constitutes pro tected media is device specific 260 Expression error Indicates that an expression program data element related error occurred This error message is used when the counter cannot detect the more specific errors described for errors 261 through 269 261 Math error in ex pression Indicates that a syntactically correct expression pro gram data element could not be executed due to a math error for example a divide by zero was at tempted 270 Macro error Indicates that a macro related execution error oc curred This error message is used when the counter cannot detect the more specific error described for er rors 271 through 279 Macro error out of name space No room for any more macro names Macro error out of definition space No room for this macro definition 271 Macro syntax error Indicates that a syntactically correct macro program data sequence according to IEEE 488 2 10 7 2 could not be executed due to a syntax error within the macro definition see IEEE 488 2 10 7 6 3 272 Macro execution er ror Indicates that a syntactically correct macro program data sequence could not be executed due to some error in the macro definition see IEEE 488 2 10 7 6 3 Error Code 241 to 272 8 9 Error Messages Execution errors Error Error Desc
182. r Limits Turns On Off the limit monitoring calculations Limit monitoring makes it is possible to get a service request when the measure ment value falls below a lower limit or rises above an upper limit Two status bits are defined to support limit monitoring One is set when the results are greater than the UPPer limit the other is set when the result is less than the LOWer limit The bits are enabled using the standard SRE command and STAT DREGO ENAB Using both these bits it is possible to get a service request when a value passes out of a band UPPer is set at the upper band border and LOWer at the lower border OR when a measurement value enters a band LOWer set at the upper band border and UPPer set at the lower border Turning the limit monitoring calculations On Off will not influence the status regis ter mask bits which determine whether or not a service request will be generated when a limit is reached Note that the calculate subsystem is automatically en abled when limit monitoring is switched on This means that other enabled calcu late sub blocks are indirectly switched on Parameters Boolean 1 ON O OFF Returned format 1 0 RST condition OFF See also Example 1 in Chapter 4 deals with limit monitoring Complies to standards SCPI 1991 0 confirmed 9 16 Command Reference PM6680B 81 85 CALCulate LIMit FAIL Limit Fail Returns a 1 if the limit testing has failed the measurement result has
183. re PERiod 9 67 CONFigure PHASe 9 67 CONFigure PTPeak 9 68 CONFigure PWIDth 9 65 CONFigure RTIMe 9 63 9 68 CONFigure TINTerval 7 9 69 CONFigure TOTalize ACCumulated a EE 9 70 CONFigure TOTalize CONTinuous Be Ba lee vocet da C Pe a a aca oe HR ee SB 9 71 CONFigure TOTalize GATed 9 72 CONFigure TOTalize GATed 9 72 CONFigure TOTalize SSTop 9 72 CONFigure TOTalize TIMed 9 73 DISPlay ENABle 17755777772 9 32 FETCh ARRay 4 44 9 34 9 35 FETCh sar a KORAN NA et ae me NG 9 34 SFORMaACFIXGgd 238803 a 9 39 FREQuency RANGe LOWer 9 92 FUNCtion CCP 9 93 INI Tiate DP 9 42 NITiate CONTinuous gt see 9 42 INPut ATTenuation 9 44 INPUECQUPIing 399 oen 9 44 INPut FILTer Laa a ow ae E E 9 45 INPut IMPedance 7777 7 9 47 INPut LEVel s Wes ow v we is e 9 47 INPut LEVel AUTO 9 49 INPutSLOPe bie a Ge Se uate eh a Se 9 51 MEASure ARRay 7777777 9 57 MEASure DCYCle 9 59 9 66 MEASure FREQuency BURSt PRF mc 9 62 MEASure FREQuency BURSt CARRier ee ENGE Er 9 61 MEASure FREQuency RATio 9 63 MEASure FREQuency 9 60 MEASure FTIMe 777777 9 63 MEASure MAXimum 7 9 64 MEASure MEMory rsrsrs 9 58 MEASure MEMorysN7 9 58 MEASure MINimum 9 64 MEASure NDUTycycle 9 66 MEASure NWIDth 9 65 MEASure PD
184. reach the leaf node level in the tree you can add several leaf nodes without HEADER Eurus having to repeat the path from the root INPut yen IMPedance Numeric value gt MAX MIN Just follow the rules below FILTer Always give the full header path from the L LPASs root for the first command in a new pro L STATe Boolean ix E Figure 3 10 Example of an INPut For the following commands within the subsystem command same program message omit the header free path and send only the leaf node without colon You can only do this if the header The keywords placed in square brackets are optional nodes This path of ts is the if means that you may omit them same as that of the previous one Bom E E Geese not the full header path must be prog ge given starting with a colon Pampa Command header Header path leaf SEND INPUT1 FILTER LPASS node STATE_ON Once you send the pmt program message is the same as terminator the first command in a new SEND INPUT FILTER_ON program message must start from the root B Example Moving down the Command SEND INPut EVENt HYSTeresis Tree MIN LEVel 0 5 The command tree shows the paths you should use for the command syntax A single command header begins from the root level downward to the leaf nodes of the command tree Leaf nodes are the last keywords in the command header before the parameters 3 10 Command Tree ab WP Introduction to SCPI This is the co
185. recognized command or data type was encoun Syntax error unrec tered for example a string was received when the ognized data counter does not accept strings 103 Invalid separator The parser was expecting a separator and encoun tered an illegal character for example the semico lon was omitted after a program message unit EMC1 CH1 VOLTSS 104 Data type error The parser recognized a data element different than one allowed for example numeric or string data was expected but block data was encountered 8 2 Error Code 0 to 104 dh Y Error Messages Command Errors Error Error Description Description Explanation Examples Number 105 GET not allowed A Group Execute Trigger was received within a pro gram message see IEEE 488 2 7 7 108 Parameter not al More parameters were received than expected for lowed the header for example the EMC common com mand accepts only one parameter so receiving EMCO 1 is not allowed 109 Missing parameter Fewer parameters were received than required for the header for example the EMC common com mand requires one parameter so receiving EMC is not allowed 110 Command header An error was detected in the header This error error message is used when the counter cannot detect the more specific errors described for errors 111 though 119 111 Header separator A character that is not a legal header separator was error
186. red during a counter op gave floating point feration overflow 1 102 Device operation A floating point error occurred during a counter op gave not a number feration 1110 invalid measure The counter was requested to set a measurement ment function function it could not make 11120 Save recall memory An attempt was made to write in a protected mem protected ory 1130 Unsupported com Indicates a mismatch between bus and counter ca mand pabilities 1 131 Unsupported boolean command 1132 Unsupported deci mal command 133 Unsupported enu merated command 134 Unsupported auto command 11135 Unsupported single shot command 1436 Command queue The counter has an internal command queue with full last command room for about 100 commands A large number of discarded commands arrived fast without any intervening query 1137 Inappropriate suffix A suffix unit was not appropriate for the command unit Recognized units are Hz Hertz s seconds Ohm Q and V Volt 1138 Unexpected com JA command reached counter execution which mand to device exe should have been handled by the bus cution 1 139 Unexpected query JA query reached counter execution which should to device execution have been handled by the bus Error Code 1 100 to 1 139 8 13 Error Messages CNT 8X Device specific errors leading 1 only for PM6681 Error Error
187. rement Function In addition to the subsystems of the in strument model which controls the in strument functions SCPI has signal oriented functions to obtain mea surement results This group of MEASure functions has a different level of compati bility and flexibility The parameters used with commands from the MEASure group describe the signal you are going to measure This means that the MEASure functions give compatibility between in struments since you don t need to know anything about the instrument you are us ing See Figure 5 3 B MEASure This is the most simple command to use but it does not offer much flexibility The MEASure query lets the counter config ure itself for an optimal measurement start the data acquisition and return the result m CONFigure READ The CONFigure command makes the counter choose an optimal setting for the specified measurement CONFigure may cause any device setting to change m O D0 Z Z 5 RS ct E N A C NO NPut INPut4 Figure 5 3 DISPlay GPIB SENSe CALCulate FORMat FETch 10MHz clock OUTPut TRIGger MEMory READ MEASure CNT 8X Measurement Function Note that Input B channel 2 is not available on PM6685 MEASurement Function 5 5 Instrument Model READ starts the acquisition and returns the result This sequence does the same as the MEA Sure command but now it 1s possible to insert commands between CONFigure and R
188. removes an individual MACRO Parameters Macro name gt is the name of the macro you want to delete Macro name is String data that must be surrounded by quotation marks ee also PMC if you want to delete all macros RST PM6680B 81 85 Reset The Reset command resets the counter It is the third level of reset in a 3 level re set strategy and it primarily affects the counter functions not the IEEE 488 bus The counter settings will be set to the default settings listed on page All previous commands are discarded macros are disabled and the counter is prepared to start new operations Example RST See also Default settings on page Complies to standards IEEE 488 2 1987 e 9 128 Command Reference e PM6680B 81 85 Save SAV SDecimal data Saves the current settings of the instrument in an internal nonvolatile memory Nineteen memory locations are available Switching the power off and on does not change the settings stored in the registers Note that memory positions 10 to 19 can be protected from the front panel auxiliary menu If this has been done use the SYSTem UNPRotect command then you can alter these memory positions Parameters Decimal data a number between 1 and 19 Example SEND SAV 10 Complies to standards IEEE 488 2 1987 Command Reference 9 129 6 SRE PM6680B 81 85 _ Decimal data Service Request Enable The Service Request Ena
189. resolution ONO NWIDth lt threshold gt PWIDth threshold 1184 PDUTycycle DCYCle cthresholds 01104 j NDUTycycle reshold gt 01 04 TOTalize CONTinuous 00 01 04 0001 04 ARRay FREQuency CW rx value gt Sof or NINE JOAN RATio lt Size gt _ lt exp value lt resol gt BURSt lt Size gt _ lt expected value5 PI Glen id PRF lt meee pected e s adi 1103104 PERiod o Sa lt expected value gt lt resolution gt L WM NO NWIDth lt Size gt lt threshold gt I A PWIDth Size JS cert o PDUTycycle DCYCle Size resho wea T Size peo 11 4 TOTalize CONTinuous lt Size gt 00 01 04 00 01 04 Only for CONFigure 0 means that the input is disabled Only PM6685 01 means input A 2 means input B Not available on PM6685 3 means input C HF input option 4 means input E Rear panel arming input 5 means input A prescaled by 2 6 means the internal reference 7 means input A with the variable hysteresis mode Only PM6680B and PM6681 Ah Command Reference 9 55 4n WU Ww ab wp MEASure measuring Function PM6680B 81 85 L lt parameters gt lt channels gt Make one measurement The measure query makes a complete measurement including configuration and readout of data Use measure when you can accept the generic measurement without fine tuning When a CONFigure
190. ription description explanation examples 300 Device specific error This code indicates only that a Device Dependent Error as defined in IEEE 488 2 11 5 1 1 6 has oc curred Contact your local service center 311 Memory error Indicates that an error was detected in the counter s memory Contact your local service center 312 PUD memory lost Indicates that the protected user data saved by the PUD command has been lost Contact your local service center 314 Save recall memory Indicates that the nonvolatile calibration data used lost by the SAV command has been lost Contact your local service center 330 Self test failed Contact your local service center 350 Queue overflow A specific code entered into the queue in lieu of the code that caused the error This code indicates that there is no room in the queue and an error occurred but was not recorded Error Code 300 to 350 8 11 b Error Messages Query errors Error Error Description description explanation examples Number 400 Query error This code indicates only that a Query Error as de fined in IEEE 488 2 11 5 1 1 7 and 6 3 has oc curred 410 Query Indicates that a condition causing an INTER INTERRUPTED RUPTED Query error occurred see IEEE 488 2 6 3 2 3 for example a query was followed by DAB or GET before a response was completely sent Query INTER The addi
191. ription Number 273 Illegal macro label description explanation examples Indicates that the macro label defined in the DMC command was a legal string syntax but could not be accepted by the counter see IEEE 488 2 10 7 3 and 10 7 6 2 for example the label was too long the same as a common command header or contained invalid header syntax 274 Macro parameter error Indicates that the macro definition improperly used a macro parameter place holder see IEEE 488 2 10 7 3 275 Macro definition too long Indicates that a syntactically correct macro program data sequence could not be executed because the string or block contents were too long for the coun ter to handle see IEEE 488 2 10 7 6 1 276 Macro recursion er ror Indicates that a syntactically correct macro program data sequence could not be executed because the counter found it to be recursive see IEEE 488 2 10 7 6 6 277 Macro redefinition not allowed Indicates that a syntactically correct macro label in the DMC command could not be executed because the macro label was already defined see IEEE 488 2 10 7 6 4 278 Macro header not found Indicates that a syntactically correct macro label in the GMC query could not be executed because the header was not previously defined 8 10 Error Code 273 to 278 Error Messages Standardized Device specific errors Error Number Error Desc
192. rming etc the measurement cycle will not start 7 2 Introduction Timeout Turn on timeout and set the time longer than the expected measurement cycle Then wait for the timeout period and take actions if you got timeout If the measurement time is long you may have to wait many seconds or even min utes until timeout just to learn that the measurement never started Measurement started Before starting a measurement set up the status reporting system so that you get a Service Request on Measure ment in progress bit 4 in the Operation Status Event Register Check this with se rial poll after a reasonable time when the measurement ought to be started lets say after 100ms time dependent on input sig nal frequency If the bit is true continue If false abort the measurement and check the signals alert the operator etc m Stop You must also know when the measure ment is completed in order to read out the results Should you read results or send other commands before the measurement is completed the measurement will be in terrupted You can of course let the controller wait until you are absolutely certain that the result is ready before you fetch it But it is better to use OPC to get an Operation Complete status message or OPC to get an ASCu 1 in the output queue when the measurement is ready OPC and OPC are common com mands described on page 9 124 and 9 125 How to Measure Fast
193. rols the settings of the Input Sense and Trigger sub systems in the counter in order to make the best possible measurement lt also switches off any calculations with CALC STATE OFF READ or INITiate FETCh will make the measurement and read the resulting measured value Since you may not know exactly what settings the counter has chosen to configure itself for the measurement send an RST before doing other manual set up mea surements Parameters Measuring Function Parameters and Channels are defined on page 9 54 The optional parameter SCALar means that one measurement is to be done Returned format String String contains the current measuring function and channel The response is a String data element containing the same answer as for SENSe FUNC CION a Example SEND CONF FREQ RAT 83 1 Configures the counter for freq ratio C A See also Explanations of the Measuring Functions starting on page 9 59 Complies to standards SCPI 1991 0 confirmed e 9 26 Command Reference e ah wy 808 8185 CONFigure ARRay sMeasuring Function array size parameters lt channels gt Configure the counter for an array of measurements The CONFigure ARRay command differs from the CONFigure command in that it sets up the counter to perform the number of measurements you choose in the array size To perform the selected function you must trigger the coun
194. ront panel Chapter 6 Using the Subsystems explains more about each subsys tem Chapter 7 How to Measure Fast is a set of measuring situations which the user is often confronted with when programming a counter This chapter also contains infor mation about how to use the more complex subsystem Chapter 8 Error Messages con tains a list of all error messages that can be generated during bus control Chapter 9 Command Reference This chapter gives complete infor mation on all commands The sub systems and commands are sorted alphabetically Index You can also use the index to get an overview of the commands The in dex is also useful when looking for additional information on the com mand you are currently working with Getting Started Manual Conventions Syntax Specification Form This manual uses the EBNF Extended Backus Naur Form notation for describ ing syntax This notation uses the follow ing types of symbols B Printable Characters Printable characters such as Command headers etc are printed just as they are e g period means that you should type the word PERIOD The following printable characters have a special meaning and will only be used in that meaning Read Chapter 3 Introduction to SCPI for more information m Non printable Characters Two non printable characters are used indicates the space character ASCII code 32 _ in
195. rors occur they will be dis carded B Standardized Error Numbers The instrument reports four classes of standardized errors in the Standard Event Status and in the Error Event Queue as shown in the following table Error Class Range of Standard Error Num Event bers Register Command 100to bit 5 CME Error 199 Execution 200 to bit4 EXE Error 299 Device Spe 300 to bit 3 DDE cific Error 399 100 to 32767 Query Error 400 to bit 2 QYE 499 Command Error This error shows that the instrument de tected a syntax error Error Reporting 3 17 Introduction to SCPI B Execution Error This error shows that the instrument has received a valid program message which it cannot execute because of some device specific conditions B Device specific Error This error shows that the instrument could not properly complete some device specific operations B Query Error This error will occur when the Message Exchange Protocol is violated for exam ple when you send a query to the instru ment and then send a new command without first reading the response data from the previous query Also trying to read data from the instrument without first sending a query to the instrument will cause this error 3 18 Error Reporting Introduction to SCPI Initialization and Resetting Reset Strategy There are three levels of initialization Bus
196. rror Reporting The counter will place a detected error in its Error Queue This queue is a FIFO First In First Out buffer When you read the queue the first error will come out first the last error last If the queue overflows an overflow mes sage is placed last in the queue and fur ther errors are thrown away until there is room in the queue again B Detecting Errors in the Queue Bit 2 in the Status Byte Register shows if the instrument has detected errors It is also possible to enable this bit for Service Request on the GPIB This can then inter rupt the GPIB controller program when an error occurs B Read the Error Event Queue This is done with the SYSTem ERRor query Example SEND SYSTem ERRor READe 100 Command Error The query returns the error number fol lowed by the error description Further description of all error numbers can be found in the Er ror Messages chapter If more than one error occurred the query will return the error that occurred first When you read an error you will also re move it from the queue You can read the next error by repeating the query When you have read all errors the queue is empty and the SYSTem ERRor query will return 0 No error When errors occur and you do not read these errors the Error Queue may over flow Then the instrument will overwrite the last error in the queue with the fol lowing 350 Queue overflow If more er
197. rt Counter READ 5 ipbraiCounter Instring 30 imstemnmo bene O s printf Frequency s n InString Disable continuous measurement ibwrt Counter INIT CONT OFF 14 exit 0 4 14 C for National Instruments PC IIA Limit Testing INITECONT ON 25 38 an Programming Examples e This program uses the REAL data format to speed up the measurement IEEE 488 2 binary real format follows the little endian format with the most significant byte first and the least significant byte last Intel processors use the big endian format with the least significant byte first so we have to reverse the byte order of the incoming block when running on a PC Intel processor include decl h include lt stdio h gt include lt process h gt include lt conio h gt main int Counter i char InStroingqi90 s double DoubleFreq Counter ibfind DEV10 Make the counter output it s result in real format ibwrt Counter FORM REAL 10 Make continuous measurements until a key is hit do 4 Make a measurement and read the result ibwrt Counter READ 5 1brdiCounter Instring 80 Assign the bytes 3 10 of InString to DoubleFreq bytes Vee eile The Tormat of InmString 18 q 18 where YASAARA AR represents the value for 190 148 i unsigned char amp DoubleFreq 7 1 InString 3 1 Print the result printf Sle n
198. s Execution Control Executable Messages Figure 3 3 Overview of the firmware in a SCPI instrument What is SCPI 3 3 Introduction to SCPI How does SCPI Work in the Instrument The functions inside an instrument that control the operation provide SCPI com patibility Figure 3 3 shows a simplified logical model of the message flow inside a SCPI instrument When the controller sends a message to a SCPI instrument roughly the following happens The GPIB controller addresses the instru ment as listener The GPIB interface function places the message in the Input Buffer The Parser fetches the message from the Input Buffer parses decodes the message and checks for the correct syntax The in strument reports incorrect syntax by send ing command errors via the status system to the controller Moreover the parser will detect if the controller requires a response This 1s the case when the input message is a query command with a appended The Parser will transfer the executable messages to the Execution Control block in token form internal codes The Exe cution Control block will gather the infor mation required for a device action and will initiate the requested task at the ap propriate time The instrument reports ex ecution errors via the status system over the GPIB and places them in the Error Queue When the controller addresses the instru ment a
199. s tem and manually set trigger levels instead Parameters lower threshold upper threshold expected value and resolution are all ignored by the counter lt 1 gt is the channel to measure on i e input A Complies to standards SCPI 1991 0 confirmed 9 68 Command Reference PM6680B PM6681 MEASure TINTerval 1 2 4 1 2 4 Time Interval Traditional time interval measurements are performed The trigger levels are set automatically and positive slope is used The first channel in the channel list is the start channel and the second is the stop channel Parameters The first 1 2 4 is the start channel and the second Q 1 2 4 is the stop channel 1 means input A 2 means input B 4 means input E Rear panel arming input If you omit the channel input A is the start channel and input B is the stop chan nel Command Reference 9 69 6 ab wp MEASure TOTalize ACCumulated PmM6680B PM6e6s81 time for gate open7 41 2 4 5 65 1 2 4 5 6 Totalize X gated by Y accumulated The counter totalizes the pulses on the primary channel The totalizing starts when the gate signal on the secondary channel goes on and stops when the gate signal goes to off The polarity of on off is controlled via the INPut SLOPe command of the gate channel The result is the sum of counts in all the gate openings that oc cur during a pre
200. s SCPI 1991 0 confirmed 9 4 Command Reference FIN uy Arming Subsystem STARt SEQuence 1 LAYer2 IMMediate SOURce BUS IMMediate LAYer 1 COUNt Numeric value MIN MAX DELay Numeric value MIN MAX ECOunt Numeric value MIN MAX SLOPe Es EE SOURce EXTernal2 External4 IMMediate STOP SEQuence2 LAYer 1 DELay Numeric value MIN MAX Only PM6680B PM6681 ECOunt Numeric value MIN MAX Only PM6680B PM6681 SLOPe POSitive VERRE l SOURce EXTernal2 EXTernal4 IMMediate TIMerf Command Reference 9 5 e e ARM COUNt PM6680B 81 85 _ lt Numeric value gt MIN MAX No of Measurements on each Bus arm This count variable controls the upward exit of the wait for bus arm state ARM STARt LAY1 The counter loops the trigger subsystem downwards COUNt number of times before it exits to the idle state This means that a COUNt No of measurements can be done for each Bus arming or INITiate The actual number of measurements made on each INIT is equal to Dv ARM START COUNT TRIG START COUNT Parameters Numeric value is a number between I and 65 535 1 switches the function OFF MIN gives 1 MAX gives 65 535 Returned format Numeric value Example SEND ARM COUN_100 RST condition 1 Complies to standards SCPI 1991 0 confirmed 9 6 Command Reference ah wy
201. s talker the instrument takes data from the Output Queue and sends it over the GPIB to the controller Message Exchange Control protocol Another important function is the Mes sage Exchange Control defined by IEEE 488 2 The Message Exchange Control protocol specifies the interactions between the several functional elements that exist between the GPIB functions and the device specific functions see Figure 3 3 The Message Exchange Control protocol specifies how the instrument and control ler should exchange messages For exam ple it specifies exactly how an instrument shall handle program and re sponse messages that it receives from and returns to a controller This protocol introduces the idea of com mands and queries queries are program messages that require the device to send a response When the controller does not read this response the device will gener ate a Query Error On the other hand commands will not cause the device to generate a response When the controller tries to read a response anyway the de vice then generates a Query Error The Message Exchange Control protocol also deals with the order of execution of program messages It defines how to re spond if Command Errors Query Errors Execution Errors and Device Specific er rors occur The protocol demands that the instrument report any violation of the IEEE 488 2 rules to the controller even when it is the controller that violates these rules
202. se repetition frequency This command will allow you to set a suitable sync delay with the SENSe Sync DELay command How to measure bursts is described in detail in the Operators Manual Parameters exp val is the expected PRF lt res gt is the required resolution lt 1 3 4 5 6 gt is the channel to measure on 1 means input A 2 means input B Only PM6680B and PM6681 3 means input C HF input option 4 means input E Rear panel arming input 5 means input A prescaled by 2 6 means the internal reference 7 means input A with the variable hysteresis mode Only PM6680B 81 If you omit the channel the instrument measures on input A 1 The expected value and resolution are used to calculate the Measurement Time SENSe ACQuisition APERture The Sync Delay is always 10 us default value Complies to standards SCPI 1992 0 confirmed 4h 9 62 Command Reference e PM6680B PM6681 MEASure FALL TIME slower threshold upper threshold expected value gt lt resolution gt 1 Fall time The transition time from 9096 to 1096 of the signal amplitude is measured The measurement is always a single measurement and the Auto trigger is always on setting the trigger levels to 90 and 10 of the amplitude If you need an av erage transition time measurement or other trigger levels use the SENSe sub system and manually set trigger levels instead
203. seconds mohm megaohm kHz kilohertz mV milli volt Example SEND SENS ACQ APER 100ms Where ms is the suffix for the numeric value 100 Notice that you may also send ms as MS or mS MS does still mean milliseconds not Mega Siemens Response messages do not have suffixes The returned value is always sent using standard units such as V S Hz unless you explicitly specify a default unit by a FORMat command Boolean Data A Boolean parameter specifies a single binary condition which is either true or false Boolean parameters can be one of the fol lowing ON or 1 means condition true OFF or 0 means condition false Parameters 3 11 4h Introduction to SCPI wp m Example Other Data Types SEND SYST TOUT ON or Other data types that can be used for pa DEOS D rameters are the following This switches timeout monitoring on String data Always enclosed between sin A query for instance SYSTem TOUT gle or double quotes for example will return 1 or 0 never ON or OFF This is a string or This is a string Expression Data Character data For this data type the same rules apply as for the command header You must enclose expression program mnemonics For example POSitive NEG data in parenthesis Three possibilities ative EITHer of expression data are as follows Non decimal data For instance H3A for hexa numeric expression data gt decimal data
204. ser may write any data up to 64 characters The data can always be read but you can only write data after un protecting the data area A typical use would be to hold calibration information us age time inventory control numbers etc The content at delivery is 234 FACTORY CALIBRATED ON 19YY MM DD YY year MM month DD day Returned format lt Arbitrary block response data Where arbitrary block program data is the data last programmed with PUD Example Send gt SYST UNPR PUD 240Calibrated 1993 07 16 n inven tory a No 1234 means that arbitrary block program data will follow 2 means that the two following digits will specify the length of the data block 40 is the number of characters in this example Complies to standards IEEE 488 2 1987 PM6680B 81 85 RCL _ Decimal data Recall Recalls one of the up to 20 previously stored complete instrument settings from the internal nonvolatile memory of the instrument Memory number 0 contains the power off settings for PM6685 For PM6681 mem ory number O contains the power off settings until PRESET is pressed After pre set memory O contains the pre preset settings Parameters Decimal data a number between 0 and 19 Example SEND RCL 10 Complies to standards IEEE 488 2 1987 Command Reference 9 127 ab wp Pe RMC PM6680B 81 85 2 Macro name gt Delete one Macro This command
205. sessssssspessssssosegeesssseseogesessessssgeeecesssesqeeseeesossesessosossssosooo errr eee eee eee ee Serer rere ry Sree reer eee Pere eee ee ere reer errr reer rere reer rere reer err errr ery PEAS AA AA AA qd ttf it i So R00 Gk wesesteseceseeselescesessecdscssesessefPsssosessesdesecesescePoscescssessocososcesesceosoos Device Register 0 Event Resistor TTT Enable Register TTT Logical OR eeessslessssosossecsscoscecelevseceecesdesecessevefesceveecesdesecessoseseecososcescoseee Figure 6 13 Device defined status data structures model Status Subsystem 6 25 Using the Subsystems You set the limits with the following commands in the calculate subsystem CALCulate LIMit UPPer and CALCulate LIMit LOWer An example on how to use limit monitor ing is available in Chapter 4 Program Examples Bit Definition Device Status Register0 STAT DREGO COND STAT DREGO Monitoring of high ine Monitoring of low limit Figure 6 14 Bits in the Device Status Register number 0 STATus DREGister0 Reads out the contents of the Device Status event Register O and clears the register Bit 2 weight 4 Monitor of Low Limit This bit is set when the low limit is passed from above Bit 1 weight 2 Monitor of High Limit This bit is set when the high limit is passed from below m Summary Device defined Status Reporting STAT DREGO ENAB bit mask Enabl
206. set time time for gate open If you use the CONFigure command you can select if the counter should count positive or negative transitions with the INPut SLOPe command of the measur ing channel Parameters time for gate open is the time you want the totalizing to proceed Range PM6680B is 0 8E 6 1 6E 6 3 2E 6 6 4E 6 12 8E 6 and 50E 6 to 400 s Range PM6681 and 80E 9 160E 9 320E 9 640E 9 1 28E 6 and 20E 6 to 400 s The first lt 1 2 4 5 6 gt is the channel to measure on The second a 1 2 4 5 6 7 is the gate channel 1 means input A 2 means input B 4 means input E rear panel arming input 5 means input A prescaled by 2 6 means the internal reference If you omit the channels the instrument measures on input A with input B as the gate channel RST condition Time for gate open 10 ms SENSe ACQuisition APERture e 9 70 Command Reference e PM6680B 81 85 CONFigure TOTalize CONTinuous 1 214 6 L 1 214 6 Totalize Manually This is a count totalize function controlled from the GPIB interface using the com mand SENS TOT GATE_ONJOFF The counter counts up for each event on the primary input channel and down on the secondary channel The result is the difference between the primary and sec ondary channel In addition to selecting totalizing the CONF TOT CONT com mand also selects positive trigger slope If you want to count negative slopes o
207. sic for National Instruments PC IIA Setting Up the Interface CALL IBRD CNT3 MSGS PRINT MINIMUM LEFTS MSGS IBCNT5 Mean WRTS CALC AVER TYPE MEAN CALC IMM CALL IBWRT CNTS WRTS MSGS SPACES 255 CALL IBRD CNT MSGS PRINT MEAN LEFTS MSGS IBCNTS X Standard deviation WRITS CALC AVER TYPE SDEV CALC IMM CALL IBWRT CNTS WRTS MSGS SPACES 255 CALL IBRD CNT MSGS PRINT STANDARD DEVIATION LEFTS MSGS END IBONTIS Programming Examples 4 C for National Instruments PC IIA C for National Instruments PC IIA Programming Examples 1 Limit Testing This program uses limit testing to check that the frequency 1s above a preset value include decl h include lt stdio h gt include lt process h gt main int Counter Status i char Inetringl eU Counter ibfind DEV10 Set continuous frequency measurement ibwrt Counter RST CES FUNC Erec 1 32 4433 Enable limit monitoring limit 1 MHz ibwrt Counter CALC LIM ON LIM UPP 1E6 UPP STAT ON ibwrt Counter STAT DREGO ENAB 2 SRE 1 Wait until the limit is passed printf Waiting for limit to be passed n ibwait Counter RQS Read status and device status register ibrsp Counter amp Status ibwrt Counter STAT DREGO EVEN 17 xbrd Counrer Instring 80 Read frequency ibw
208. t accept SELF Returned format Numeric value Example SEND SYST COMM GPIB ADDR 12 This example sets the bus address to 12 Complies to standards SCPI 1991 0 confirmed SYSTem ERRor PM6680B 81 85 Queries for an ASCii text description of an error that occurred The error mes sages are placed in an error queue with a FIFO First In First Out structure This queue is summarized in the Error AVailable EAV bit in the status byte Returned format error number gt lt Error Description String gt l Where Error Description String an error description as ASCii text See also Chapter 8 error messages Complies to standards SCPI 1991 0 confirmed 4h 9 108 Command Reference o ah wy D I n AQ n PM6680B 81 85 SYSTem PRESet Preset This command sets the counter to the same default settings as when the front panel key LOCAL PRESET is pressed in local mode These are not exactly the same settings as after RST 35 SYST PRES gives 200 ms Measurement Time and signal detection ON while RST gives 10 ms Measurement Time and signal detection OFF See also Default settings on page Complies to standards SCPI 1991 0 confirmed pm lnlnlll lnllXln EIIIZZQOUON M P MR CXII PM6685 SYSTem SDETect Boolean Signal Detection This command switches on or off the s
209. tandards IEEE 488 2 1987 Command Reference 9 121 6 ESR uo Event Status Register Reads out the contents of the standard event status register Reading the Stan dard Event Status Register clears the register Returned Format lt dec data gt the sum between 0 and 255 of all bits that are true See table on page 9 121 Complies to standards IEEE 488 2 1987 GMC PM6680B 81 85 lt macro label Get Macro Definition This command makes the counter respond with the current definition of the given macro label Parameters Macro label the label of the macro for which you want to see the definition String data must be surrounded by or as in the example below Returned Format Block data Example SEND gt GMC n AMPLITUDE Gives a block data response for instance READ lt 255 FUNC FREQ 1 INP HYST AUTO ONCE INP HYST INP LEV Complies to standards IEEE 488 2 1987 9 122 Command Reference PM6680B 81 85 IDN Identification query Reads out the manufacturer model serial number Firmware level for main and GPIB program in an ASCii response data element The query must be the last query in a program message Response is Manufacturer Model Serial Number Firmware Level Serial number is not implemented in PM6680B and PM6685 and will always re turn a zero Please look at the type plate at the rear panel of t
210. tate when all events required by the detection layers have occurred and the instrument has made the intended measurement When you program the trigger system to INITiate CONTin uous ON the instrument will directly exit the INITIATED state moving down ward and will repeat the whole flow de scribed above When INITiate CONTinuous is OFF the trigger system will return to the IDLE state 6 28 Trigger Arming Subsystem IDLE RST state ABORt pon INIT IMM or INIT CONT ON AA Tp EET INITIATED state i INIT IMM or INIT CONT ON Figure 6 16 Flow diagram of IDLE and INITIADED layers B Structure of an Event detection Layer The general structure of all event detection layers is identical and is roughly depicted by the flow diagram in In each layer there are several program mable conditions which must be satisfied to pass by the layer in a downward direc tion B Forward Traversing an Event detection Layer After initiating the loop counters the in strument waits for the event to be de tected You can select the event to be detected by using the layer SOURce command For example ARM LAYer2 SOURCe BUS You can specify a more precise character istic of the event to occur For example ARM LAYer DELay 0 1 You may program a certain delay be tween the occurrence of the event and en tering into the next layer or starting the device actions when in the TRIGger Using the Subsyst
211. tch array size is the number of retrievals in the array This number must not exceed the number of measuring results in the measurement result buffer The SIZE parameter maximum limit is depending on the SENSe INTernal FORMat command as follows Array Size Format Measuring function PM6680B 85 PM6681 Real All functions 2048 7019 Packed Frequency Period Ratio Totalize 2166 6143 Pulse Width 764 4466 Time Interval Rise Fall time 4466 Phase Duty Cycle Volt 7019 Low resolution Frequency and Period 8191 Low Res Time Interval and Pulse Width 4095 MAX means that all the results in the output buffer will be fetched Command Reference 9 35 4h e e Returned format data data The format of the returned data is determined by the format commands FORMat and FORMat FIXed Example If MEAS ARR FREQ 4 gives the results 1 1000 1 2000 1 3000 1 4000 FETC ARR 2 fetches the results 1 1000 1 2000 FETC ARR 2 once more fetches the results 1 3000 1 4000 FETC ARR _ 1 always fetches the last result 1 4000 Complies to standards SCPI 1991 0 confirmed 9 36 Command Reference Format Subsystem FORMat DATA ASCii REAL Numeric value AUTO FIXed ON OFF SREGister ASCii BINary HEXadecimal OCTal TINFormation STATe Boolean Command Reference 9 37 FORMat PM6680B 85 s ASCIi REAL
212. te T rr 9 92 Average or Single 9 92 B Back to back a eee oe ee ca ce fad 5 Period e A 7 9 7 13 Block arming uL EE 9 116 Block data 5599 wa 3 12 7 8 9 38 Block measurements 7 8 Boolean PT 3 11 Burst Carrier Frequency 777777 9 61 Repetition Frequency 9 62 Synchronization PM6685 9 96 Bus Drivers rr 1 6 Bus Arm do eue dec deo hole E A e as E ces a a 9 6 Exit rra 9 8 Mode TIN LP 9 8 On Off BOR eere Ue Vit rt cue e n Ug Mo eel od dare Re Uta 9 8 Override naig du A a da ie 9 8 Bus initialization sex ren 3 19 C Calculate Block CT TI 5 3 Enable Rmi cu de dul Uer Um cdrom AN dl SUR da ow s m 9 22 Mathematics 1117771 9 20 9 21 Reading data TA A 9 1 5 Real time Bact fs A A A ois fie 7 9 Subsystem A 9 1 3 Calibration 7 8 9 112 9 127 Of Comparators 117777 9 30 Of Interpolators 111177771 9 24 Subsystem A 9 23 Change function fast MEAS MEM 1 Sa BaP uw o Je dE Es s sin ja S A daria d 1 5 Channel List CI PI 3 1 2 Selecting uL 6 13 9 93 Character data CT 3 1 2 Check aL DC 2 3 Check Against Lower Limit 9 18 Hl Check Against Upper Limit 9 19 Check signal CCCII 9 114 Clear Status C 9 118 Clearing status registers 00 9 126 CME bit Aa 6 21 9 121 Colon e I III 3 8 3 10 Command Error n n n I 3 4 3 17 9 121 Eror CME 6n 6 n 6 21 Header uar 3 10 Tree UL TUET we ANG 3
213. ter with the READ AR Ray Or INITiate FETCh ARRay queries Parameters array size sets the number of measurements in the array 1 to 2500 Measuring Function Parameters and lt Channels gt are defined on page 9 54 Example SEND CONF ARR PER 7 5E 3 1E 6 84 This example sets up the counter to make seven period measurements The ex pected result is 5 ms and the required resolution is 1 us The EXT ARM input is the measuring input To make the measurements and fetch the seven measurement results SEND gt READ ARR 7 READ lt 5 23421E 3 5 12311E 3 5 87526E 3 DesDoO45E 3S D 22990IlE 35 29DULE 2 y a DaU0257LE 3 Complies to standards SCPI 1991 0 confirmed Command Reference 9 27 e 6 e This page is intentionally left blank 9 28 Command Reference gt gt E Diagnostics Subsystem DIAGnostic CALibration INPut 1 HYSTeresis OFF ONCE INPut2 HYSTeresis OFF ONCE ah Command Reference 9 29 4n Wy Wy DIAGnostic CALibration INPut 1 2 HYSTeresis 1 OFF ONCE Input comparator hysteresis calibration These two commands measure and save the hysteresis levels of the input com parator This makes it possible to achieve a trig level accuracy of 2 5 mV which is important in measurement functions such as phase to get the best possible re sults Since the calibration compensates for the temperature drift of the input ampli fier it should be made at the same temp
214. tes at the correct frequency Obvious Method The most obvious way to do this may be as follows Let the counter measure the frequency Send the result to the controller Let the controller that controls both the la ser cutter and the counter decide when to slow down the cutting procedure and eventually switch the laser off when the correct frequency is obtained This method works fine for slow pro cesses but the bus transfer rate of the counter limits the measuring speed to around 125 measurements s for PM6680B and PM6685 and 250 mea surements s for PM6681 If all speed in creasing actions are taken and only around 10 measurements s if no speed in creasing actions taken 10 Supervising a Process Optimal Method An experienced CNT 8X programmer knows that he can increase the process speed to over 300 measurements second by letting the counter do more and the controller less of the job Set up the counter to measure continuously with low resolution without displaying or reading out any results Set up limit monitoring so that the counter issues a service request when the frequency reaches the limit where the laser should slow down Proceed with one of the following Alternative 1 The program slows down the laser and recalls new narrower limits from the internal counter memory and selects higher resolution Alternative 2 The program slows down the laser and reprogr
215. that an Execution Error as defined in IEEE 488 2 11 5 1 1 5 has occurred 210 Trigger error 211 Trigger ignored Indicates that a GET TRG or triggering signal was received and recognized by the counter but was ig nored because of counter timing considerations for example the counter was not ready to respond 212 Arm ignored Indicates that an arming signal was received and recognized by the counter but was ignored 213 Init ignored Indicates that a request for a measurement initiation was ignored because another measurement was al ready in progress 214 Trigger deadlock Indicates that the trigger source for the initiation of a measurement is set to GET and subsequent mea surement query is received The measurement can not be started until a GET is received but the GET would cause an INTERRUPTED error 215 Arm deadlock Indicates that the arm source for the initiation of a measurement is set to GET and subsequent mea surement query is received The measurement can not be started until a GET is received but the GET would cause an INTERRUPTED error 220 Parameter error Indicates that a program data element related error occurred This error message is used when the counter cannot detect the more specific errors 221 to 229 221 Settings conflict Settings conflict PUD memory is protected Settings conflict in val
216. that it has re ceived data that violates the syntax rules for program messages Bit 4 weight 16 Execution Error EXE Shows that the counter detected an error while trying to execute a command See Error reporting on page 3 17 The command is syntactically correct but the counter cannot execute it for example because a parameter is out of range Bit 3 weight 8 Device dependent Error DDE A device dependent error is any device operation that did not execute properly because of some internal condition for instance error queue overflow This bit Shows that the error was not a command query or execution error Bit 2 weight 4 Query Error QYE The output queue control detects query er rors For example the QYE bit shows the unterminated interrupted and deadlock conditions For more details see Error re porting on page 3 17 Bit 1 weight 2 Request Control RQC Shows the controller that the device wants to become the active control ler in charge Not used in the CNT 8X Bit 0 weight 1 Operation Complete OPC The counter only sets this bit TRUE in re sponse to the operation complete com mand OPC It shows that the counter has completed all previously started ac tions Summary Standard Event Status Reporting ESE bit mask Enable reporting of Standard Event Sta tus in the status byte SRE 32 Enable SRQ when the Standard Event structure has somet
217. tics The PM6680B and PM6681 can calculate and display the MIN MAX MEAN and standard deviation of a given number of samples The statistic functions are the same as on the front panel B Limit Monitoring Limit monitoring makes it is possible to get a service request when the measure ment value falls below a lower limit or rises above an upper limit Two status bits are defined to support limit monitor ing One is set when the results are greater than the UPPer limit the other is set when the result is less than the LOWer limit The bits are enabled using the standard SRE command and STAT DREGO ENAB Using both these bits it is possible to get a service request when a value passes out of a band UPPer is set at the upper band border and LOWer at the lower border OR when a measurement value enters a band LOWer set at the upper band border and UPPer set at the lower border Turning the limit monitoring calculations on off will not influence the status regis ter mask bits which determine whether or not a service request will be generated when a limit 1s reached Note that the cal culate subsystem is automatically enabled when limit monitoring is switched on This means that other enabled calculate sub blocks are indirectly switched on Calculate Subsystem 6 3 Using the Subsystems Calibration The interpolators used to increase the res olution of the measurement result in the counter must be calibrated to
218. tional information indicates the IEEE 488 2 RUPTED in send message exchange state where the error occurred state Query INTER RUPTED in query state Query INTER RUPTED in re sponse state 420 Query Indicates that a condition causing an UNTERMINATED UNTERMINATED Query error occurred see IEEE 488 2 6 3 2 2 for example the counter was addressed to talk and an incomplete program mes sage was received Query The additional information indicates the IEEE 488 2 UNTERMINATED message exchange state where the error occurred in idle state Query UNTERMINATED in read state Query UNTERMINATED in send state 430 Query Indicates that a condition causing an DEADLOCKED DEADLOCKED Query error occurred see IEEE 488 2 6 3 1 7 for example both input buffer and output buffer are full and the counter cannot continue 440 Query Indicates that a query was received in the same pro UNTERMINATED gram message after an query requesting an indefi after indefinite re nite response was executed see IEEE 488 2 sponse 6 9 7 541 8 12 Error Code 400 to 440 Error Messages CNT 8X Device specific errors leading 1 only for PM6681 Error Error Description description explanation examples Number 1100 Device operation A floating point error occurred during a counter op gave floating point feration underflow 1 101 Device operation A floating point error occur
219. tions MEAS MEM1 recalls the contents of memory 1 and reads out the result MEAS MEM2 recalls the contents of memory two and reads out the result etc The equivalent command sequence is RCL1 READ The allowed range for lt N gt is 1 to 9 Use the somewhat slower MEAS MEM ory AN command if you must use mem ories 10 to 19 TIMING Data Format Command ASCII REAL MEAS MEM1 7 9ms 6 7 ms MEAS MEM 1 9 1 ms 8 0 ms RCL 1 READ 10 1 ms 8 9 ms Some Basic Commands 7 5 How to Measure Fast Basic Measurement Method A basic measurement method for a sys tem composed of signal sources measur ing object and measuring devices will be a simple step by step procedure This procedure goes as follows Step 1 Set up signal sources Step 2 Set up measurement devices Step 3 Trigger measurement devices Step 4 Read data Step 5 Evaluate data The above procedure may be repeated as many times as required The methods described here deal with how you should do steps 3 and 4 in the best and most efficient way with the CNT 8X Individually Synchronized Measurements This is a method that you should use when you need to start each measurement externally from the controller The most probable reason that you should use indi vidually synchronized measurements is that you need to evaluate data in real time and make decisions depending on the ac quired data An exa
220. u 10 7E6 Example2 This example defines the mathematical expression enables postprocessing and mathematics make a measurement and fetches the result SEND CALC MATH X 10 7E6 MATH STATE ON READ RST condition X 10000 E 7 Complies to standards SCPI 1991 0 Confirmed 4h 9 20 Command Reference e ah wy PM6680B PM6681 CALCulate MATH 2 lt expression gt Select Mathematical Expression Defines the mathematical expression used for mathematical operations This func tion equals the nulling function from the front panel The data type expression data must be typed within parentheses ES expression is one of the following two mathematical expressions K X 4 L M or K X _ _L _ M No deviations are allowed K L and M can be any positive or negative numerical constant or use XOLD for the last previously measured value Each operand must be surrounded by space characters Example SEND CALC MATH 1 a a X a 0 a XOLD This example gives a relative result from the last measuring result RST condition 1 X 0 1 No calculation Returned format expression Complies to standards SCPI 1991 0 Confirmed Verte te to SSS SSS SG Sa MU UL MC NOR OESTE l PM6680B 81 85 CALCulate MATH STATe _ Boolean Enable Mathematics Switches on off the mathematical function Note that the CALCulate subsystem is automatically enabled when MATH operations are swit
221. ue See table below Status Byte Register 1 true Bit Weight Name Condition 7 128 OPR Enabled operation status has occurred 6 64 MSS Reason for requesting service 5 32 ESB Enabled status event condition has occurred 4 16 MAV An output message is ready 3 8 QUE The quality of the output signal is questionable 2 4 EAV Error available 1 2 Not used 0 1 DREGO Enabled status device event conditions have occurred See also f you want to read the status byte with the RQS bit use serial poll Complies to standards IEEE 488 2 1987 PM6680B 81 85 TRG Trigger The trigger command TRG starts the measurement and places the result in the output queue It is the same as ARM STARt LAYer2 1MM WAI FETCh The Trigger command is the device specific equivalent of the IEEE 488 1 defined Group Execute Trigger GET It has exactly the same effect as a GET after it has been received and parsed by the counter However GET is much faster than TRG since GET is a hardware signal that does not have to be parsed by the counter Example SEND ARM START LAY2 SOURCE BUS SEND INIT CONT ON SEND TRG READ lt 3 2770536E 004 Type of Command Aborts all previous measurement commands if not WAT is used Complies to standards IEEE 488 2 1987 Command Reference 9 131 e 6 e TST Self Test The self test query causes an internal self test and generates a response indicat ing whether or not the device completed the self test without any detected
222. unc tions to determine MAX MIN MEAN and Standard Deviation All four results are sent to the controller 50 CNTNAMES DEV10 60 CALL IBFIND CNTNAMES CNTS 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 230 260 270 280 290 300 LO 320 330 340 390 360 370 380 390 400 410 420 N CALL IBWRT CNT WRTS WRTS INP LEV AUTO Off CALL IBWRT CNT WRTS N Enable statistics on 10000 measurements WRTS CALC AVER 5TAT ON COUN 10000 CALL IBWRT CNT WRTS Y Start measurement WRTS Init OPC CALL IBWRT CNT WRTS Wait for operation complete MAV PRINT WAITING FOR MEASUREMENT TO GET READY MASK amp H800 CALL IBWAIT CNT MASKS Read status and response CALL IBRSP CNT SPR3 MSGS SPACES 255 CALL IBRD CNT MSGS X Y Maximum WRTS CALC AVER TYPE MAX CALC IMM CALL IBWRT CNTS WRTS MSGS SPACES 255 CALL IBRD CNT MSGS PRINT MAXIMUM LEFTS MSG IBCNTS x Minimum WRITS CALC AVER TYPE MIN CALC IMM CALL IBWRT CNT WRTS MSGS SPACES 255 GW Basic for National Instruments PC IIA Setting Up the Interface WRTS RST CLS SRE 16 FUNC Freq 1 ACQ APER MIN 4 11 Programming Examples 430 440 450 460 470 480 490 500 LO oral 290 540 550 560 570 580 590 4 12 GW Ba
223. urement result allowed before the counter generates a 1 that can be read with CALCu late LIMit FAIL or by reading the corresponding status byte Parameters Range 9 9 10 to 9 9 10 Returned format Decimal data RST condition O Complies to standards SCPI 1991 0 confirmed 4h 9 18 Command Reference e dh wy zer ERR RUE UE UN Ug PUENTE AAA AAA AAA CH PM6680B 81 85 CALCulate LIMit UPPer STATe Boolean Check Against Upper Limit Selects if the measured value should be checked against the upper limit Parameters Boolean 1 ON O OFF Returned format 1 O d RST condition 0 Complies to standards SCPI 1991 0 confirmed Command Reference 9 19 e 6 CALCulate MATH PM6685 lt expression gt Select Mathematical Expression Defines the mathematical expression used for mathematical operations This func tion equals the nulling function from the front panel The data type lt expression data gt must be typed within parentheses The operand must be surrounded by space characters 16 eters lt expression gt is X K No deviations are allowed from this form K can be any positive or negative numerical constant within the range 9 9E 37 to 9 9E 37 X is the measurement result Returned format expression Where expression is the expression selected Example This example subtracts 10700000 from the measurement result SEND 3 CALC MATH X a
224. ut signals into an internal data for mat that is available for formatting into GPIB bus data The measurement func tion is divided into three different blocks INPut SENSe and CaALCulate See Figure 5 3 B INPut The INPut block performs all the signal conditioning of the input signal before it is converted into data by the SENSe block The INPut block includes cou pling impedance filtering etc B SENSe The SENSe block converts the signals into internal data that can be processed by the CALCulate block The SENSe com mands control various characteristics of the measurement and acquisition process These include gate time measurement function resolution etc Bg CALCulate The CALCulate block performs all the necessary calculations to get the required data These calculations include calibra tion statistics mathematics etc TRIGger DISPlay GPIB CALCulate FORMat OUTPut MEMory Figure 5 2 available on PM6685 CNT 8X Measurement model Note that Input B channel 2 is not Measurement Function Block 5 3 Instrument Model Other Subsystems In addition to the major functions sub systems there are several other subsys tems in the instrument model The different blocks have the following functions m CALibration This subsystem controls the calibration of the interpolators used to increase the res olution of the CNT 8X counters m DISPlay Commands in this subs
225. ut was not allowed by the counter at this point in parsing 180 Macro error This error as well as errors 181 through 189 is generated when defining a macro or executing a macro This particular error message is used when the counter cannot detect a more specific error 181 Invalid outside macro definition Indicates that a macro parameter placeholder lt number was encountered outside of a macro definition 183 invalid inside macro definition Indicates that the program message unit sequence sent with a DDT or DMC command is syntacti cally invalid see IEEE 10 7 6 3 _184 Macro parameter error Indicates that a command inside the macro defini tion had the wrong number or type of parameters Macro parameter error unused pa rameter The parameter numbers given are not continuous one or more numbers have been skipped Macro parameter er ror badly formed placeholder The sign was not followed by a single digit be tween 1 and 9 Macro parameter error parameter count mismatch The macro was invoked with a different number of parameters than used in the definition 8 6 Error Code 171 to 184 Error Messages Execution errors Error Number 200 Error Description Execution error description explanation examples This is the generic syntax error for devices that can not detect more specific errors This code indicates only
226. vents can set the summary message Summary message STATus QUEStionable ENABle 5 5 QUE bit in status byte STATus QUEStionable ENABle e 9 104 Command Reference e taies emend STATus QUEStionable ENABle Decimal data Enable Questionable Data Signal Status Reporting Sets the enable bits of the status questionable enable register This enable register contains a mask value for the bits to be enabled in the status questionable event register A bit that is set true in the enable register enables the corresponding bit in the status register See figure on page 9 104 An enabled bit will set bit 43 QUE Questionable Status Bit in the Status Byte Register if the enabled event occurs See also status reporting on page 3 14 Power on will clear this register if power on clearing is enabled via PSC Parameters lt dec data gt the sum between 0 and 17920 of all bits that are true See the table on page 9 104 Returned Format Decimal data Example Send STAT QUES ENAB 16896 In this example both unexpected parameter bit 14 and overflow bit 8 will set the QUE bit of the Status Byte when a questionable status occurs Complies to standards SCPI 1991 0 confirmed vibe a STATus QUEStionable Read Questionable Data Signal Event Register Reads out the contents of the status questionable event register Reading the Status Questionable Event Register clears the register See figure on page 9 10
227. vow osos Now A uen E Ro ds 6 1 6 Bit 3 v oss wu e cm x ww e TGA 9 104 9 105 Bit 5 RP 9 121 9 122 Bit 6 kamu p aea a a A 9 1 31 Bit 7 E ds RE Bie e as JU a MU EE de 9 101 9 103 Query scree 9 131 Reading mila a ra ju 6 16 9 131 Status reporting x e 3 16 6 14 Stop Arming Slope n 9 11 Source E 9 11 Stop Measurement 777777 7 4 Sync corr 7 2 Store Front panel settings 777 9 129 String data ss 6 6 66 auo Subnodes CETT 3 8 Suffixes ANTI ERE PII E 3 11 Summary Instrument states 17707007777 7 3 Measurement commands 6 10 Of command syntax rsss 3 14 Of input amplifier settings 6 7 6 8 Speed aras E OR E E x 2 x 5 7 11 7 16 Swap A B Sox ware a Bee eee xm a oe 2 2 Synchronization 5559s aaa 7 2 7 6 Syntax and Style Bo x E E E E E E E E 3 7 Summary FREKARA A EREE 3 14 System Subsystem 1777771 9 107 System Version s rata Aerea wes 9 112 T Talker function PITE 1 5 tatus See Message Data Type Terminate Measurement c 7 4 9 4 Terminator a a a ey a ee i d 3 8 500hms 1 Mohm 000 gt 9 47 Test Activating a a a ge he 9 1 32 Selecting internal self test 9 114 signal n 6 e 9 114 Subsystem stress 9 113 Time Hold Off Vus xa cw We d cu Te ae 8 Ue DECUS TE nca 9 89 Interval kina By Gat de ts uide du ie ra 9 69 9 91 Measure Rise JT PPM E 9 68 Read Elapsed 4 E R a wp De n 9 110 Rise fall ux al 9 91 Selecting Measurement
228. w Pass Filter 9 45 Lower Case rr 3 8 Lower Limit Check a 9 18 Fall 9 17 Set a 9 17 M Macro f n amp 3 13 3 15 Data types amp o 3 on o4 5 o3 o9 4 a on on 3 13 Define P 9 119 Delete sees 3 15 9 76 9 128 Delete all eene 9 126 Description amp o o9 3 on 3 o3 on 9 a 49 on 3 13 Enable s o o o n B BA 9 120 Get so 4 4 5 3 6 o9 o5 3 3 3 3 3 on on 9 122 How to execute 3 14 Learn o rr 9 123 Memory States ccc tc 9 77 Names 0 3 13 Purge co n 4 on n 9 126 Mathematics 7 77076x 705x0777 2 5 Enable 710075777727 r 9 21 9 22 Select expression 9 20 9 21 MAV MR 3 19 9 130 9 131 MAX n n R R ee 3 11 9 1 5 MEAN n n n ng ng g u aae e c 9 15 Measure 5 5 7 5 7 6 Array st eee 9 57 Description gt 6 9 FUNC ONS corr 9 59 Once I 9 56 Scalar cn 6 8 o9 3 9 9 Poo o9 e o3 a on n 9 56 Volt neg peak 9 64 Volt peak s ttc eee 9 64 Measurement Abort 077705122252222 9 4 Basic method 1 6 Continuously initiated 9 42 Fetch Results apra as 9 35 Function scr n n n n n IB 5 5 Gated Voltage ow 9 ow 3 3 o3 3 5 n on n 9 97 High Speed Voltage 9 92 Initiate ee 9 42 No of on ext arm start 9 116 No on each bus arm ccc 9 6 Start SYNC rr n nnn 7 2 St
229. w reading started but not stale completed since last access 231 Data questionable Data questionable one or more data el ements ignored One or more data elements sent with a MEASure or CONFigure command was ignored by the counter 240 Hardware error Indicates that a legal program command or query could not be executed because of a hardware prob lem in the counter Definition of what constitutes a hardware problem is completely device specific This error message is used when the counter cannot de tect the more specific errors described for errors 241 through 249 8 8 Error Code 222 to 240 Error Messages Execution errors Error Number 241 Error Description Hardware missing Hardware missing prescaler description explanation examples Indicates that a legal program command or query could not be executed because of missing counter hardware for example an option was not installed Definition of what constitutes missing hardware is com pletely device specific 254 Media full Indicates that a legal program command or query could not be executed because the media was full for example there is no room on the disk The defi nition of what constitutes a full media is device spe Cific 258 Media protected Indicates that a legal program command or query could not be executed because the media was pro tected for example the write
230. will use 50 us If you want to switch between Average and Single measurements use the AV ERage STATe ONJOFF in the Sense Subsystem When Single is selected and an array measurement is done the Measurement Time set by Acquisition APERture Sets the time between the measure ments in the array This means that if you want a very high speed you must set AVER STATE OFF and ACQ APER MIN Returned format Decimal value gt RST condition 10 ms SYST PRESet condition 200 ms PM6681 ACQuisition APERture 2 Decimal value gt MIN MAX Set the Measurement Time Sets the gate time for one measurement Measurement Times of 80 to 1280 ns work in FREO CW FREQ BURST FREO PRF FREQ RAT and PERiod If one of these short times is selected when the counter makes other measurements it will use 5 us If you want to switch between Average and Single measurements use the AV ERage STATe ONJOFF in the Sense Subsystem When Single is selected and an array measurement is done the Measurement Time set by Acquisition APERture Sets the time between the measure ments in the array This means that if you want a very high speed you must set AVER STATE OFF and ACQ APER MIN Parameters decimal value is 80 160 320 640 1280 ns and 20 us to 400 s MIN gives 80 ns and MAX gives 400 s Returned format lt Decimal value gt al RST condition 10 ms SYST PRESet condition 200 ms Comm
231. ws wed oec e ra wu ee wa WT E 9 7 9 10 ARM SEQuence1 LAYer1 SLOPe 9 9 ARM SEQuence2 SLOPe 9 11 ARM SEQuence2 SOURce 9 11 ARM STARt Bea ARO Arao Ree a Gas J Ss a we NG 9 8 ARM STARt LAYer1 COUNt 9 6 ARM STARt LAYer1 DELay 9 7 9 10 ARM STARt LAYer1 ECO unt 9 7 9 10 ARM STARt LAYer1 SLOPe 9 9 ARM STARt LAYer1 SOURce 9 9 ARM STOP 5SLOPe 5 9 11 ARMSTOP SOURCE 9 11 AVERage COUNts cocos 9 91 AVERage MODE 9 91 AVERage STATe 77 77 9 92 CALCulate AVERage COUNt 9 14 CALCulate AVERage STATe 9 15 CALCulate AVERage TYPE 9 15 CALCulate DATA r rr 9 15 CALCulate IMMediate 9 16 CALCulate LIMit S TATe 6 3 9 16 CALCulate LIMit FAIL 9 17 CALCulate LIMit LOWer STATe 9 18 CALCulate MATH STATe gt 9 21 CALCulate STATe 9 22 CALibration INTerpolator AUTO 9 24 COMMunicate GPIB ADDRess 9 108 CONFigure AA See 9 26 CONFigure ARRay 577777711 9 27 CONFigure DCYCle 9 59 9 66 CONFigure FREQuency 9 60 IV CONFigure FREQuency BURSt PRF ma AA 9 62 CONFigure FREQuency BURSt CARRier a ELEME Eu S E UE a ar 9 61 CONFigure FREQuency RATio 9 63 CONFigure FTIMe 9 63 CONFigure MAXimum stss 9 64 CONFigure MINimum 9 64 CONFigure NDUTycycle 9 66 CONFigure NWIDth 9 65 CONFigure PDUTyoycle 9 66 CONFigu
232. y two while PM6681 scales by four When using channel 1 the counter auto matically selects this scaling factor when measuring FREQ A giving 300 MHz max frequency for PM6681 and PM6685 and 225 MHz for PM6680B For all other measuring functions and for frequency if you select negative slope the counter does not divide the signal and the max repetition rate 1s 160 MHz Sense Command Subsystem 6 13 Using the Subsystems Status Subsystem Introduction Status reporting is a method to let the controller know what the counter is do ing You can ask the counter what status it is in whenever you want to know You can select some conditions in the counter that should be reported in the Sta tus Byte Register You can also select if some bits in the Status Byte should gen erate a Service Request SRQ An SRQ is the instrument s way to call the controller for help Status Reporting Model B The Status Structure The status reporting model used by CNT 8X is standardized in IEEE 488 2 and SCPI so you will find similar status reporting in most modern instruments Figure 6 6 shows an overview of the complete CNT 8X status register struc ture It has four registers two queues and a status byte The Standard Event Register reports the standardized IEEE 488 2 errors and condi tions 6 14 Status Subsystem The Operation Status Register reports the status of the CNT 8X measurement cycle see also ARM TRIG
233. y cycle measurement is performed That is the ratio between the on time and the off time of the input pulse is measured Parameters lt threshold gt parameter sets the trigger levels in volts If omitted the auto trigger level is set to 50 percent of the signal Q 1 2 4 6 is the channel to measure on 1 means input A 2 means input B Only PM6680B and PM6681 4 means input E Rear panel arming input 6 means the internal reference If you omit the channel the instrument measures on input A 1 Example SEND MEAS PDUT READ 5 097555E 001 In this example the duty cycle is 50 9796 Complies to standards SCPI 1991 0 confirmed 9 66 Command Reference PM6680B 81 85 MEASure PERiod lt expected value lt resolution gt lt 1 2 3 4 5 6 7 gt Period A traditional period measurement is performed The expected value and resolution are used to calculate the Measurement Time SENSe ACQuisition APERture Parameters expected value is the expected Period resolution is the required resolution lt 1 2 3 4 5 6 gt is the channel to measure on 1 means input A 2 means input B Only PM6680B and PM6681 3 means input C HF input option 4 means input E Rear panel arming input 5 means input A prescaled by 2 6 means the internal reference 7 means input A with the variable hysteresis mode Only PM6680B PM6681 If you
234. y error interrupted action The instrument sends only one response message for each query message If the query message resulted in more than one answer all answers will be sent in one re sponse message B Order of Execution Deferred Commands Execution control collects commands un til the end of the message or until it finds a query or other special command that forces execution It then checks that the setting resulting from the commands is a valid one No range limits are exceeded no coupled parameters are in conflict etc If this 1s the case the commands are exe cuted in the sequence they have been re ceived otherwise an execution error 1s generated and the commands are dis carded This deferred execution guarantees the following All valid commands received before a query are executed before the query is exe cuted All queries are executed in the order they are received The order of execution of commands is never reversed B Sequential and Overlapped Commands There are two classes of commands se quential and overlapped commands AII commands in the CNT 8X counters are sequential that is one command finishes before the next command executes How does SCPI Work in the Instrument 3 5 Introduction to SCPI Remote Local Protocol B Definitions Remote Operation When an instrument operates in remote all local controls except the local key are disabled Local Operation
235. ystem control what data is to be present on the display and whether the display is on or off m FORMeat The FORMat block converts the internal data representation to the data transferred over the external GPIB interface Com mands in this block control the data type to be sent over the external interface m MEMory The MEMory block holds macro and in strument state data inside the counter B OUTPut This subsystem controls the analog out put available in the CNT 8X counters B STATus This subsystem can be used to get infor mation about what is happening in the in strument at the moment 5 4 Other Subsystems m Synchronization This subsystem can be used to synchro nize the measurements with the control ler g SYSTem This subsystem controls some system pa rameters like timeout B TEST This subsystem tests the hardware and software of the counter and reports errors m TRIGger The trigger block provides the counter with synchronization capability with ex ternal events Commands in this block control the trigger and arming functions of the Timer Counter Order of Execution All commands in CNT 8X counters are se quential i e they are executed in the same order as they are received f a new measurement command is re ceived when a measurement is already in progress the measurement in progress will be aborted unless XWATI is used before the command Instrument Model MEASu
Download Pdf Manuals
Related Search
Related Contents
Service Manual - Wholesale Restaurant Equipment JB Industries, Inc. Lenoxx HC16 User's Manual Tripp Lite SU10KRT3/1X User's Manual Keysight Technologies DSO1000 A/B Serie KEYBOARD KLAVIATŪRA Copyright © All rights reserved.
Failed to retrieve file