KEI 194A Programming 电路图.pdf
《KEI 194A Programming 电路图.pdf》由会员分享,可在线阅读,更多相关《KEI 194A Programming 电路图.pdf(68页珍藏版)》请在收音机爱好者资料库上搜索。
1、IEEE-488 Programming Guide Model 194A High Speed Voltmeter Ql.987, Keithley Instruments, Inc. Instrument Division Cleveland, Ohio, U.S.A. Document Number: l94A-903-01 Rev. A RadioFans.CN 收音机爱 好者资料库 TABLE OF CONTENTS About This Programming Guide . ., . 1 Computer Programming Syntax . .: . ., . ; . 3
2、Single Channel Programming . I . 7 Dual Channel Programming . -_ _ . 11 Single and Continuous Trigger Arming . ., . 17 SRQandErrorHandling. . ;.: . .: . ._. . .I . ._ . 21 Binary DataTransfer . 29 Reading Buffer Operation . _. . ., . 37 Using Translator . ._._. . ._. . 41 Using External Sample Trigg
3、ering . _ . ., _ ., . 47 Generating Bus Time Information . _ . 55 Appendix A - Device-Dependent Commands . .;. :, .I. : . ., . A-1 Appendix B - Data Formats . B-l Appendix C - Status Words and SRQ Format I . .I . C-l Appendix D - Front Panel Modes and Equivalents IEEE-488 Commands . D-l Appendix E -
4、 Data Transmission and NRFD Hold-off Times . ; . E-l RadioFans.CN 收音机爱 好者资料库 ABOUT THIS PROGRAMMING GUIDE This programming guide is intended as a tt. however, there are some statements associated with IEEE-488 bus Ii0 that require discussion. The following provides a brief overview of some of the st
5、atements you will encounter in the various programs in this guide. Refer to the BASIC 4.0 Reference for more detailed information. OUTPUT OUTPUT allows you to send a variable or string over the bus, and it may take on one c$ several forms. A typical syntax is: In this instance, 7 specifies the inter
6、face select code, while 09 is the primary address of the instrument. FlX is a literal string that will be transmitted to the instruments when the state- ment is executed. ENTER ENTER performs the opposite-function, allowing the transmission of data from the instru- ment to the computer. Typical synt
7、ax for this statement is; Again, 7 specifies the interface select code, while 09 represents the primary address of the instrument. .A$ is a string variable into which incoming data is placed. Keep in mind that A$ must be dimensioned large enough to hold all Rpected characters. As an alternative, the
8、 ENTER statement-can directly input the data into a numeric variable, assuming that the proper instrument data format is used. SPOLL SPOLL serial polls the instrumentand places its status byte in a numeric variable as follows: Here again, 709 represents the interface select code and primary address
9、of the instrument. S is a numeric variable which will contain the decimal value of the status byte after the state- 3 ment is executed. The status byte-can then be checked by ANDing or BIXng S to determine the status of the required bits. These bits can yield certain information such as reading,over
10、flow and ready for a new command. BIT BIT can be used to detetie the bit status of numeric variables: In this example, the status of bit 5 of the variable S is placed into A. TRIGGER TRIGGER sends a GET (Group Execute Trigger) to a device as follows: A GET is one of many methods that can be used COU
11、KT-i00B,WIl In this instance, a total of 1000 bytes will be trmitted from the Model 194A totheinternal buffer. 4 STATUS SX4TUS allows access to certain computer status registers. Most often, this statement is used to either determine if aii SRQ has occurred, or dear an SRQ interrupt. Typical syntax
12、is: Here, 7 is the interface select code, and the second 7 is the status register being accessed. The value of the status register is placed in the variable S when the statement is executed. ON INTR and ENABLE INTR These two statements work together to enable interrupts and to tell the computer wher
13、e to go for next line execution. A typical ON INTR statement is: In this case, when the computer detects an IEEE-488 interrupt, it-begins executing the subroutine at line 4000. SRQ is the most often used type of interrupt for the IEEE-488 bus. Using BASIC 4.0, SRQ interrupts are enabled as follows:
14、Once enabled, an SRQ Wi cause the computer to branch to the line number specified by the ON INTR statement. Typically, an error handling subroutine will be incorporated at that point to determine the reason for the SRQ and to handle any other required tasks. 5/6 SINGLE CHANNEL PROGRAMMING PROGRAMMIN
15、G CONCEPTS ? Sending command strings to the Model 194A. ? Obtaining data and displaying iton the computer CRT PROGRAMMING CONSIDERATIONS At the very least, it will be necessary to send commands to the instrument to set it up as desired, and to request data back from the unit. The program below demon
16、strates the basic F recess for doing so. Note that if you have a dual-channel unit, you should proceed to rogTam 2. PROGRAM OPERATION Program 1 below demonstrates fundamental programming unit. Figure 1 is a flowchartof the program. techniques for a single-channel Before we can program the Model 194A
17、, we must place the unit in remote as follows: Next a prompt for the user to enter the desired command is displayed by the following pro- gram statements: Following execution of these two lines, the command suing resides in a string variable called Command! however, with other tri to trigger the uni
18、t before the unit will collect samples. Once t PB er modes, it will be necessary ose samples are stored and processed into a reading, the data is requested and displayed on the computer CRT as follows (see Figure 2 for ASCII data format): 80 ENTER 703; Readings YM PEItKReading8 PREFIX BUFFER EOIASSE
19、RTED (GO G-2, G3. GS) SUFFIX (G2, GS) WITH CF +-I A I N DCV * 1.2345 E + 0. CH2, 80050 TERMlNATOR N=NORMAL A 0 = OVERFLOW Z=ZEROED kdST TM, ToRicRLF NUMBER READING EXFCNENl I = INVALID MEASUREMENT RMS = TRMS A”G = AVERAGE NOTE: SUFFER LCCATDN SHOWS SAMPLE nnnni, IN WAVE +PK = +PEAK -PK = -PEAK DIF =
20、 CHI CH2 RAT = CH1ICH2 FORM MODE DEV I STANDARD DE”,AT,ON P.P = PEAK TO PEAK INT= INlEGRAL DC” = WAVEFORM RCL = RECALL Figure 2. ASCII Data Format Table 1. Commands That Disarm the A/D Converter Command Description I Recall setup Function $Pz? Number of samples Filter Range Rate Trigger w Delay Z 7m
21、v-l RUNNING THE PROGRAM 1. Enter the program into the computer. 2. Run the program by pressing the RUN key. The computer wti promptyou to type in your command: 9 3. Type in the desired command string and then press ENTER. Note that is not necessary to add the “X” character as it is automatically add
22、ed by the program. For example, to pro- gram the average function and select autoranging, type in FlRO and press ENTER. 4; Once the measurement is completed and the reading is processed, the data string will appear on the computer display. A typical example is: ACQUIRING A WAVEFORM USING ASCII DATA
23、TRANSFER The Model 194A can be used to capture a waveform and then send the data as a series of readings representing the individual samples. Each individual data string will represents the voltage of that-particular sample. To use the Model 194A in this manner, program the instrument for the wavefo
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- KEI 194A Programming 电路图 194
收音机爱好者资料库所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。



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


