configureChannel
Return or set specified oscilloscope control on selected channel
Description
Examples
Set Vertical Range Control of Oscilloscope
Change the vertical range control on an oscilloscope using the Quick-Control Oscilloscope in Instrument Control Toolbox.
Create a connection to the oscilloscope.
myScope = oscilloscope("ASRL1::INSTR")
myScope = oscilloscope: TEKTRONIX,TDS 1002 Instrument Settings: AcquisitionStartDelay: 'Not supported' AcquisitionTime: 2.5 s ChannelNames: 'CH1', 'CH2', 'MATH', 'REFA', 'REFB' ChannelsEnabled: 'CH1' SingleSweepMode: 'off' Timeout: 10 s WaveformLength: 2500 Trigger Settings: TriggerMode: 'auto' Communication Properties: Status: 'open' Resource: 'ASRL1::INSTR' lists of methods
Get the current vertical range value for 'CH1'
.
offset = configureChannel(myScope,'CH1','VerticalRange')
offset = 5
Set the vertical range value to 2.00 V.
configureChannel(myScope,'CH1','VerticalRange',2)
You can look at the display on the oscilloscope and verify that the vertical offset value has changed to 2.00 V. Get the new vertical range value by reading the value again.
offset = configureChannel(myScope,'CH1','VerticalRange')
offset = 2
Input Arguments
myScope
— Oscilloscope connection
Quick-Control Oscilloscope object
Oscilloscope connection created using oscilloscope
,
specified as a Quick-Control Oscilloscope object.
channel
— Oscilloscope channel name
character vector | string
Oscilloscope channel name, specified as a character vector or string.
See valid channel names by viewing the ChannelNames
property of your oscilloscope object.
Data Types: char
| string
control
— Oscilloscope control
'VerticalCoupling'
| 'VerticalOffset'
| 'VerticalRange'
| 'ProbeAttenuation'
Oscilloscope control, specified as a character vector or string. Valid values are the same as the parameter names of the Name-Value Arguments:
'VerticalCoupling'
— Input signal coupling type'VerticalOffset'
— Center of signal range'VerticalRange'
— Input signal range'ProbeAttenuation'
— Probe attenuation
Example: configureChannel(myScope,'Channel1','VerticalOffset')
returns the current vertical offset value of
'Channel1
' on your oscilloscope.
Data Types: char
| string
Name-Value Arguments
Example: configureChannel(myScope,'Channel1','ProbeAttenuation',10)
sets the probe attenuation value on the channel named
'Channel1'
of the oscilloscope object
myScope
to 10.
Specify optional
comma-separated pairs of Name,Value
arguments.
Name
is the argument name and Value
is
the corresponding value. Name
must appear inside quotes. You
can specify several name and value pair arguments in any order as
Name1,Value1,...,NameN,ValueN
.
VerticalCoupling
— Input signal coupling type
'AC'
| 'DC'
| 'GND'
Input signal coupling type, specified as the comma-separated pair
consisting of 'VerticalCoupling'
and one of the
following values:
'AC'
— Alternating coupling'DC'
— Direct coupling'GND'
— Ground
Example: configureChannel(myScope,'VerticalCoupling','Channel1','AC')
sets the oscilloscope to apply alternating coupling to the input
signal.
Data Types: char
| string
VerticalOffset
— Center of signal range
numeric
Center of signal range in V, specified as the comma-separated pair
consisting of 'VerticalOffset'
and a
number.
Example: configureChannel(myScope,'Channel1','VerticalOffset',5)
sets the oscilloscope to acquire a signal that is centered at 5.0
V.
Data Types: double
VerticalRange
— Input signal range
numeric
Input signal range, specified as the comma-separated pair
consisting of 'VerticalRange'
and a
number.
Example: configureChannel(myScope,'Channel1','VerticalRange',2)
sets the oscilloscope to acquire a signal with an input range of
2.00 volts.
Data Types: double
ProbeAttenuation
— Probe attenuation
numeric
Probe attenuation, specified as the comma-separated pair
consisting of 'ProbeAttenuation'
and a number.
The value must be a multiple of 10.
Example: configureChannel(myScope,'Channel1','ProbeAttenuation',10)
sets the probe attenuation to 10.
Data Types: double
Version History
Introduced in R2011b
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)