Agilent Technologies 6000 Series quick start Using Other Oscilloscope Setup Commands

Page 21

Getting Started

2

Using Other Oscilloscope Setup Commands

A typical oscilloscope setup would set the vertical range and offset voltage, the horizontal range, delay time, delay reference, trigger mode, trigger level, and slope. An example of the commands that might be sent to the oscilloscope are:

myScope.WriteString “:CHANNEL1:PROBE 10" myScope.WriteString “:CHANNEL1:RANGE 16" myScope.WriteString “:CHANNEL1:OFFSET 1.00" myScope.WriteString “:TIMEBASE:MODE NORMAL" myScope.WriteString “:TIMEBASE:RANGE 1E-3" myScope.WriteString “:TIMEBASE:DELAY 100E-6"

Vertical is set to 16 V full-scale (2 V/div) with center of screen at 1 V and probe attenuation set to 10. This example sets the time base at 1 ms full-scale (100 ms/div) with a delay of 100 µs.

Example Oscilloscope Setup Code

This program demonstrates the basic command structure used to program the oscilloscope.

'Initialize the instrument interface to a known state. myScope.IO.Clear

'Initialize the instrument to a preset state. myScope.WriteString "*RST"

'Set the time base mode to normal with the horizontal time at 50 ms/div

'with 0 s of delay referenced at the center of the graticule.

myScope.WriteString ":TIMEBASE:RANGE 5E-4"

' Time base to 50 us/div.

myScope.WriteString

":TIMEBASE:DELAY 0"

' Delay to zero.

myScope.WriteString

":TIMEBASE:REFERENCE CENTER" ' Display ref. at center.

'Set the vertical range to 1.6 volts full scale with center screen at

'-0.4 volts with 10:1 probe attenuation and DC coupling.

myScope.WriteString ":CHANNEL1:PROBE 10"

' Probe attenuation to 10:1.

myScope.WriteString ":CHANNEL1:RANGE 1.6"

' Vert rng1.6

V full scale.

myScope.WriteString

":CHANNEL1:OFFSET -.4"

'

Offset to -0.4.

myScope.WriteString

":CHANNEL1:COUPLING DC"

'

Coupling to

DC.

'Configure the instrument to trigger at -0.4 volts with normal

'triggering.

myScope.WriteString ":TRIGGER:SWEEP NORMAL"

' Normal triggering.

myScope.WriteString ":TRIGGER:LEVEL -.4"

' Trigger level to -0.4.

myScope.WriteString

":TRIGGER:SLOPE POSITIVE"

'

Trigger on pos. slope.

' Configure the instrument for normal acquisition.

myScope.WriteString

":ACQUIRE:TYPE NORMAL"

'

Normal acquisition.

Agilent 6000 Series Oscilloscopes Programmer’s Quick Start Guide

21

Image 21
Contents Programmer’s Quick Start Guide WA R N I N G Programming the Oscilloscope-At a Glance This Book Contents Index Setting Up Connect and set up the oscilloscope Install Agilent IO Libraries Suite softwareUsing the LAN Interface Using the USB Device InterfaceUsing the Gpib Interface Verify the oscilloscope connection Click Test Connection Setting Up Access the Programmer’s Reference To access the Programmer’s Reference help fileTo get the latest versions via the web Language for Program Examples Getting StartedInitializing Basic Oscilloscope Program StructureAnalyzing Captured Data Capturing Data Referencing the IO Library Programming the OscilloscopeOpening the Oscilloscope Connection via the IO Library Using AUToscale to Automate Oscilloscope Setup Initializing the Interface and the OscilloscopeInformation for Initializing the Instrument Example Oscilloscope Setup Code Using Other Oscilloscope Setup CommandsCapturing Data with the DIGitize Command Set TIMebaseMODE to Main or DELayed when using DIGitizeEnsure New Data is Collected Aborting a Digitize Operation Over Gpib Following program example shows a typical setupReading Query Responses from the Oscilloscope Express String Variables Using Exact Syntax Reading Query Results into String VariablesReading Query Results into Numeric Variables #8000010001000 bytes of dataterminator Reading Definite-Length Block Query Response DataChecking Instrument Status Sending Multiple Queries and Reading ResultsOther Ways of Sending Commands Sending Scpi Commands using Browser Web ControlTelnet Sockets Index Index Page Index
Related manuals
Manual 368 pages 7.71 Kb