您好,欢迎光临本网站![请登录][注册会员]  
文件名称: 54622-97038编程和语法指南.pdf
  所属分类: 嵌入式
  开发工具:
  文件大小: 1mb
  下载次数: 0
  上传时间: 2019-07-04
  提 供 者: ia***
 详细说明:安捷伦示波器54622-97038编程和语法指南Capture Once you initialize the oscilloscope, you can begin capturing data. for analysis. Remember that while the oscilloscope is responding to commands from the controller, it is not performing acquisitions. Also when you change the oscilloscope configuration, any data already captured will most likely be rendered To collect data, you use the: DIGitize command. This command clears the waveform buffers and starts the acquisition process. Acquisition continues until acquisition memory is full, then stops The acquired data is displayed by the oscilloscope, and the captured data can be measured stored in trace memory in the oscilloscope, or transferred to the controller for further analysis. any additional commands sent while DIGitize is working are buffered until: DIGitize is complete You could also put the oscilloscope into run mode, then use a wait loop in your program to ensure that the oscilloscope has completed at least one acquisition before you make a measurement. agilent does not recommend this because the needed length of the wait loop may vary causing your program to fail: DIGitize, on the other hand, ensures that data capture is complete. Also, DIGitize, when complete, stops the acquisition process so that all measurements are on displayed data, not on a constantly changing data set Analyze After the oscilloscope has completed an acquisition you can find out more about the data, either by using the oscilloscope measurements or by transferring the data to the controller for manipulation by your program. Built-in measurements include frequency, duty cycle, period and positive and negative pulse width Using the: WAVeform commands, you can transfer the data to your controller. You may want to display the data, compare it to a known good measurement, or simply check logic patterns at various time intervals in the acquisition In this book This Programmer's Guide is your introduction to programming the oscilloscope using an instrument controller. This book, with the Programmer's Reference, provides a comprehensive description of the oscilloscope's prograItullalic interface. The Progrurrmer's Reference is supplied as a Microsoft, Windows help file on a 3.5 diskette The oscilloscope has a built-in rs-232-C port for programming To program the oscilloscope over gpib, you need the n2757A GPiB interface Module. You also need an instrument controller that supports either the IEEE-488 or RS-232-C interface standards, and a programming language capable of communicating with these interface This book contains the following information Chapter 1 Introduction to Programming gives a general overview of oscilloscope prograiulling Chapter 2 Programming Getting Started, shows a simple program, explains its operation, and discusses considerations for data types Chapter 3 GPib, discusses the general considerations for programming the inistrument over all gPib interlace Chapter 4 Programming over rs-232-C, discusses the general considerations for programming the instrument over an Rs-232-C interface Chapter 5 Programming and Documentation Conventions, describes the conventions usedinrepresenlinig the syntAx ofcolmiallds throughout this book and the Programmers Reference, and gives an overview of the oscilloscope command set Chapter 6 Status Reporting, discusses the oscilloscope status registers and how to use them in your programs Chapter 7 Installing and Using the Programmer's Reference, tells how to install the Programmer's reference online help file in Microsoft Windows, and explains help file navigation Chapter 8 Programmers Quick Reference, lists all the commands and queries available for programming the oscilloscope For information on oscilloscope operation, see the User's Guide For informalion on interface conliguralioI, see the docuinlentalion lor the oscilloscope interface module and the interface card used in your controller( for example, the Agilent 82350A interface for IBM PC-compatible computers) Contents I Introduction to Programming Talking to the Instrument 1-3 Program Message Syntax 1-4 Combining Commands from the Same Subsystem 1-7 Duplicate mnemonics 1-8 Query Command 1-9 Program Header Options 1-10 Program Data Syntax Rules l-ll Program Message Te r1-13 Selecting Multiple subsystems 1-14 2 Programming Getting Started Initialization 2-3 Autoscale 2-4 Setting Up the Instrument 2-5 Example Program 2-6 Using the Digitize Command 2-7 Receiving Information from the Instrument 2-9 String variables 2-10 Numeric variables 2-11 Definite-Length Block Response Data 2-12 Multiple Queries 2-13 Instrument status 2-13 3 Programming over GPIB Interface Capabilities 3-3 Command and Data Concepts 3-3 Addressing 3-4 Communicating Over the bus 3-5 Lockout 3-6 Bus commands 3-6 4 Programming over rs-232-C Interface Operation 4-3 Cables 4-3 Minimum three-Wire interface with software protocol 4-4 Extended Interface with hardware handshake 4-5 Configuring the Interface 4-6 Interface Capabilities 4-7 Lockout command 4-8 Contents -1 5 Programming and Documentation Conventions Co d Set, Organization 5-8 The Command Tree 5-6 Obsolete and discontinued Commands 5-10 Truncation rules 5-15 Infinity representation 5-16 Sequential and overlapped commands 5-16 Response Generation 5-16 Notation conventions and definitions 5-17 Program Examples 5-18 6 Status Reporting Status Reporting Data Structures 6-5 Status Byte Register (sBr)6-8 Service Request Enable Register (SrER)6-10 Trigger Event Register (trg)6-10 Standard Event status Register(sesr)6-11 Standard event status Enable Register (seser) 6-12 Operation Status Register (OPR)6-13 Arm Event Register(arm) 6-13 Error Queue 6-14 Output queue 6-15 Message Queue 6-15 Clearing Registers and queues 6-15 7 Installing and Using the Programmers reference To install the help file under microsoft windows 7-3 To get updated help and program files via the Internet 7-4 To start the help file 7-5 To navigate through the help file 7-5 8 Programmer's Quick Reference C ntions 8-3 Suffix Multipliers 8-3 CoIlLmlands and Queries 8-4 Contents-2 Introduction to Programming Introduction to Programming Chapters l and 2 introduce the basics for remote programming of an oScilloscope. The programming instructions in this manual conform to the IEEE488.2 Standard Digital Interface for Programmable Instrumentation. The programming instructions provide the means of remote control To program the oscilloscope you must add either a GPIb (N2757A) interlace, or program over the built-in rs-232-C interlace on the rear panel You can perform the following basic operations with a controller and an oScilloscope Set up the instrument Make measurements Acquire data (waveform, measurements, configuration from the oscilloscope Send information(pixel images, configurations) to the oscilloscope Other tasks are accomplished by combining these basic functions Languages for Program Examples The programming examples for individual commands in this manual are written in HPbASIC 6.3 or C Introduction to Programming Talking to the Instrument Talking to the Instrument Computers acting as controllers communicate with the instrument by sending and receiving messages over a remote interface. Instructions for programming normally appear as ascii character strings embedded inside the output statements of a host language available on your controller. The input statements of the host language are used to read in responses from the oscilloscope For example, HPBASIC uses the OUTPUT statement for sending commands and queries. After a query is sent, the response is usually read in using the ENTER statement Messages are placed on the bus using an output command and passing the device address, program message, and terminator. Passing the device address ensures that the program message is sent to the correct interface and instrument The following HP BASIC statement sends a command which turns on label displa The s device address represents the address of the device being programmed Each of the other parts of the above statement are explained in the following pages 1-3 ntroduction to Programming Program Message Syntax Program message syntax To program the instrument remotely, you must understand the command format and structure expected by the instrument. The IeeE 488.2 syntax rules govern how individual elements such as headers, separators, program data, and terminators may be grouped together to form complete instructions. Syntax definitions are also given to show how query responses are formatted. The following figure shows the main syntactical parts of a typical program slaleinert Figure 1-1 PRCGRAM MESSAGF UNIT OUTPUT XXX CHANNEL1EWLIMT ON OUTPI OMMAND DE VICE ADDRESS S RUCTION HEADER PRCGRAM DATA Program Message Syntax Output Command The output command is entirely dependent on the programming language Throughout this manual, hPbasic is used in most examples of individual commands. If you are using other languages you will need to find the equivalents of HP baSIC commands like OUTPUT, ENtER, and clear to convert the examples. The instructions listed in this manual are always shown between quotation marks in the example programs Device address The location where the device address inust be specified is also dependent onl the programming language you are using. In some languages, this may be specified outside the output command. In HP BasIC, this is always specified after the keyword OUTPUT. The examples in this manual assume the oscilloscope is at device address 707. When writing programs, the address varies according to how Lhe bus is configured 1-4
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 输入关键字,在本站1000多万海量源码库中尽情搜索: