error message: "Undefined function 'disableChannel' for input arguments of type 'char'."

조회 수: 10 (최근 30일)
I finally have been getting the oscilloscope feature working in the instrument toolbox. I am running a Tek MDO3104 and am able to manipulate some parameters:
>> get(myScope)
AcquisitionStartDelay = 0
AcquisitionTime = 1.000000e-02
ChannelNames = CH1, CH2, CH3, CH4, MATH, REF1, REF2, REF3, REF4
ChannelsEnabled = CH1, CH2, CH3
Driver = tektronix
DriverDetectionMode = auto
Resource = TCPIP0::10.20.31.58::inst0::INSTR
SingleSweepMode = off
Status = open
Timeout = 10
TriggerMode = auto
TriggerLevel = 4.000000e-02
TriggerSlope = rising
TriggerSource = CH1
WaveformLength = 1000
>> myScope.ChannelsEnabled
ans =
'CH1' 'CH2' 'CH3'
>> disableChannel('CH1') Undefined function 'disableChannel' for input arguments of type 'char'.
Any insight as to why that fails and what I can do about it?
thank you

채택된 답변

Sangeetha Jayaprakash
Sangeetha Jayaprakash 2016년 12월 14일
From my understanding, it seems like you are using the Quick-control oscilloscope object, and are able to connect to the oscilloscope.
I assume that you have looked into the pre-requisites to use the Quick-control oscilloscope in this link: http://www.mathworks.com/help/instrument/using-quick-control-oscilloscope.html#bs6b15j
To disable the channels, use one of the following syntax:
1. Pass the 'myScope' object as an argument:
>> disableChannel(myScope, {'CH1', 'CH2'});
or
2. use the dot notation:
>> myScope.disableChannel({'CH1', 'CH2'});
  댓글 수: 1
MarkSheffield
MarkSheffield 2016년 12월 14일
OK, thank you - both of these methods work. I somehow missed including the object in both cases.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by