Getting Started
3
Keysight P9241/42/43A Oscilloscopes SCPI Programmer's Guide
51
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
myScope.IO.Timeout = 10000
' Set interface timeout to 10 seconds.
' 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"
' Vertical range
' 1.6 V full scale.
myScope.WriteString ":CHANnel1:OFFSet -0.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 -0.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.
Capturing Data with the :DIGitize Command
The :DIGitize command captures data that meets the specifications set up by the
:ACQuire subsystem. When the digitize process is complete, the acquisition is
stopped. The captured data can then be measured by the instrument or
transferred to the controller for further analysis. The captured data consists of two
parts: the waveform data record, and the preamble.
Summary of Contents for P9241
Page 1: ...Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide...
Page 6: ...6 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide...
Page 36: ...36 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 1 What s New...
Page 41: ...Setting Up 2 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 41...
Page 44: ...44 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 2 Setting Up...
Page 222: ...222 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 7 Root Commands...
Page 244: ...244 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 8 ACQuire Commands...
Page 256: ...256 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 9 CALibrate Commands...
Page 278: ...278 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 10 CHANnel n Commands...
Page 328: ...328 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 15 EXTernal Trigger Commands...
Page 386: ...386 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 17 FUNCtion m Commands...
Page 390: ...390 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 18 HCOPY Commands...
Page 416: ...416 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 20 MARKer Commands...
Page 498: ...498 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 21 MEASure Commands...
Page 532: ...532 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 22 MTESt Commands...
Page 572: ...572 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 24 SAVE Commands...
Page 900: ...900 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 28 TIMebase Commands...
Page 1080: ...1080 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 31 WGEN w Commands...
Page 1142: ...1142 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 34 Error Messages...
Page 1344: ...1344 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide Index...