Main Content

configureChannel

Return or set specified oscilloscope control on selected channel

Description

example

value = configureChannel(myScope,channel,control) returns the value of the specified oscilloscope control control on the selected channel.

example

configureChannel(myScope,channel,Name,Value) sets the value of the specified oscilloscope control using a name-value pair argument.

Examples

collapse all

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

collapse all

Oscilloscope connection created using oscilloscope, specified as a Quick-Control Oscilloscope object.

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

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.

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

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

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

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