FLUKE pm33xx_scpiumeng0200 电路图.pdf
《FLUKE pm33xx_scpiumeng0200 电路图.pdf》由会员分享,可在线阅读,更多相关《FLUKE pm33xx_scpiumeng0200 电路图.pdf(297页珍藏版)》请在收音机爱好者资料库上搜索。
1、I $XWRUDQJLQJ LEFT$(response$, IBCNT%)Prints the ident string CALL Send (0, 8, *OPT?, 1)Requests for options CALL Receive (0, 8, response$, 256)Reads the options string PRINT Options: ; LEFT$(response$, IBCNT%) Prints the options string 2.2.3How to switch between digital and analog mode After power
2、on, a CombiScope instrument can be either in the digital or analog mode. After a *RST command the digital mode is selected. The INSTrument sub- system allows you to switch between the two modes. This can be done by speci- fying a predefined name (DIGital, ANALog) or the corresponding number (1 = dig
3、ital, 2 = analog). PROGRAM EXAMPLE: * Initialize and change the operating mode of the CombiScope instrument: * CALL Send (0, 8, INSTrument ANALog, 1)Switches to analog mode CALL Send (0, 8, INSTrument:NSELect 1, 1) Switches back to digital mode GETTING STARTED WITH SCPI PROGRAMMING2 - 5 2.3Error Rep
4、orting Instrument errors are usually caused by programming or setting errors. They are reported by the instrument during the execution of each command. To make sure that a program is running properly, you must query the instrument for possible er- rors after every functional command. This is done by
5、 sending the SYSTem:ERRor? query or the STATus:QUEue? query to the instrument, followed by reading the response message. However, through this practice the same error reporting statements must be repeated after sending each SCPI command. This is not always practical. Therefore, one of the following
6、approaches is advised: 1) Send the SYSTem:ERRor? or STATus:QUEue? query and read the instrument response message after every group of commands that functionally belong to each other. 2) Program an error-reporting routine and call this routine after each command or group of commands. For an example o
7、f an error-reporting routine, refer to section 3.14.4.1. 3) Program an error-reporting routine and use the Service Request (SRQ) Generation mechanism to interrupt the execution of the program and to execute the error-reporting routine. Therefore, refer to section 3.14.4.2. PROGRAM EXAMPLE: * Read er
8、ror message: * er$ = SPACE$(60) CALL Send(0, 8, SYSTem:ERRor?, 1)Requests for error CALL Receive(0, 8, er$, 256)Reads error message PRINT Response to error query = ; PRINT LEFT$(er$, IBCNT%-1)Displays error message 2 - 6GETTING STARTED WITH SCPI PROGRAMMING 2.4Acquiring Traces Trace acquisitions are
9、 started via the INITiate commands. A single acquisition is done by sending a single INITiate command. Continuous acquisitions are done by sending the INITiate:CONTinuous ON command. The TRACe? query allows you to acquire a trace of signal samples from one of the following sources: An input channel,
10、 e.g., CH2 (input channel 2). A trace area in a memory register, e.g., M2_3 (Memory register 2, trace 3). The number of trace samples (acquisition length) can be specified using the TRACe:POINts command. If your instrument has standard memory, you can specify 512, 2048, 4096, or 8192 trace samples.
11、If your instrument has extended memory, you can specify 512, 8192, 16384, or 32768 trace samples. A TRACe:POINts command specifies the acquisition length for all channels and memory registers. Example: Send - TRACe:POINts CH1,8192 Selects 8192 sample points for all traces The number of trace sample
12、bits can be specified using the FORMat command. This gives you the possibility to define samples of 8 bits (1 byte) or 16 bits (2 bytes). A FORMat command specifies the number of sample bits for all channels and memory registers. Example: Send - FORMat INT,16Formats 16-bits samples The format of the
13、 trace response data is as follows: Note:If f=8 decimal, each trace sample is one byte (8 bits). If f=16 decimal, each trace sample is two bytes (16 bits), i.e., most significant byte (msb) + least significant byte (lsb). Example: # n x . . x f b . . . . . b s NewLine code (10 decimal) checksum byte
14、 over all trace bytes trace sample data bytes (see Note) trace data format byte (see Note) number of trace bytes (fbb.bbs) number of digits of x.x # 4 1 0 2 6 . . . trace sample 512 trace sample 1 decimal 16 number of trace bytes (N) number of digits of N GETTING STARTED WITH SCPI PROGRAMMING2 - 7 2
15、.4.1How to acquire a single shot trace In the program example, a single shot trace acquisition of 8192 8-bit samples is done with a probe connected to input channel 1. The trace sample bytes are read from the GPIB as string characters. The number of response bytes and the number of samples are print
16、ed. The TRIGger:SOURce command is used to specify input channel 1 as a trigger source. The TRIGger:LEVel command is used to reset the trigger level to e.g., 0.1 volts. PREPARATIONS: Connect a probe to channel 1. After start up of the program you will be asked to trigger the acquisition with the open
17、 end of the probe, i.e., touch the probe or strike the probe on the table. PROGRAM EXAMPLE: * Acquire a single shot trace: * DIM tracebuf AS STRING * 16500 CALL Send(0, 8, FORMat INTeger,8, 1)Formats 8-bits sample CALL Send(0, 8, TRACe:POINts CH1,8192, 1)Formats 8192 sample points CALL Send(0, 8, TR
18、IGger:SOURce INTernal1, 1) Trigger-source = channel 1 CALL Send(0, 8, TRIGger:LEVel 0.1, 1)Trigger-level = 0.1 CALL Send(0, 8, INITiate, 1)Single shot initiation PRINT Trigger the CombiScope instrument by touching the probe tip. PRINT Press any key when finished. WHILE INKEY$ = : WEND CALL Send(0, 8
19、, *WAI, 1)Waits for previous commands to finish CALL Send(0, 8, TRACe? CH1, 1)Queries for channel 1 trace CALL Receive(0, 8, tracebuf$, 256)Reads channel 1 trace The contents of the tracebuf$ string is as follows: # 4 8194 . nr.of.digits = VAL(MID$(tracebuf$, 2, 1) nr.of.bytes = VAL(MID$(tracebuf$,
20、3, nr.of.digits) - 2 sample.length = ASC(MID$(tracebuf$, 3 + nr.of.digits, 1) / 8 nr.of.samples = nr.of.bytes / sample.length PRINT Number of bytes received =; IBCNT%IBCNT% = number of bytes PRINT Number of trace samples =; nr.of.samples Note:Refer to section 3.4.3 Conversion of trace data about how
21、 to convert this string data. 2 - 8GETTING STARTED WITH SCPI PROGRAMMING 2.4.2How to acquire repetitive traces In the program example, 5 trace acquisitions of 512 16-bit samples are done via a probe connected to channel 2. The trace sample bytes are read from the GPIB as string characters and writte
22、n to the file TRACE5.DAT on the hard disk. PREPARATIONS: Connect a probe from the Probe Adjust signal to channel 2. PROGRAM EXAMPLE: * Acquire 5 sequential traces and store in file TRACE5.DAT: * DIM tracebuf AS STRING * 1050 CALL Send(0, 8, *RST, 1)Resets the instrument After *RST a trace acquisitio
23、n is defined at 512 samples of 16 bits (2 bytes). CALL Send(0, 8, CONFigure:AC (2), 1)Configures channel 2 CALL Send(0, 8, SENSe:FUNCtion XTIMe:VOLTage2, 1)Switches channel 2 on OPEN O,#1,TRACE5.DATOpens file TRACE5.DAT FOR i=1 TO 5 CALL Send(0, 8, INITiate, 1)Single initiation CALL Send(0, 8, *WAI;
24、TRACe? CH2, 1)Queries for channel 2 trace Notice the *WAI; before TRACe?. The *WAI command takes care that the TRACe? CH2 command is executed when the INITiate command is finished. CALL Receive(0, 8, tracebuf$, 256)Reads channel 2 trace PRINT #1, Trace buffer:; iWrites trace header to file PRINT #1,
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- FLUKE pm33xx_scpiumeng0200 电路图
收音机爱好者资料库所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。



Marshall-9100-62-02-Schematic电路原理图.pdf


