필터 지우기
필터 지우기

Inspection error: Too many arguments

조회 수: 2 (최근 30일)
Bjarke Gårdbæk
Bjarke Gårdbæk 2020년 9월 9일
댓글: Bjarke Gårdbæk 2020년 9월 15일
I'm trying to create a class which inherits from the visa class from the Instrument Control Toolbox, such that I can define my own methods and properties.
So far I have the following code:
classdef DAQ970A < visa
methods
function obj = DAQ970A()
obj = obj@visa('keysight', 'USB0::0x2A8D::0x5101::MY58003119::0::INSTR');
end
end
end
However, when I try to inspect the class, double clicking it the the workspace tab, I get an error pop-up with the title "Inspection error" and descrption "Too many input arguments". What am I doing wrong?
If I try accessing the properties from the parent class, like so:
Daq = DAQ970A();
Daq.InputBufferSize
I get the following error:
Error using instrument/subsref (line 113)
Too many input arguments.
I suspect these are related.

답변 (1개)

Sourabh Kondapaka
Sourabh Kondapaka 2020년 9월 14일
Hi,
I believe the error, "Too many input arguments" could be for either of the following reasons:
  • The constructor of the SuperClass "visa" accepts either 0 or 1 arguments.
(or)
  • The constructor of the SuperClass "visa" calls another method in its class which accepts 0 or 1 arguments.
If the above 2 reasons does not solve the issue, please upload the code of SuperClass "visa" and also the code at the line 113.
  댓글 수: 1
Bjarke Gårdbæk
Bjarke Gårdbæk 2020년 9월 15일
Hi
I have no trouble instantiating the class, so I doubt the error is in the constructor for supreclasses provided in the Instrument Control Toolbox. The problems arrise when I want to inspect an instance of the derived class from the workspace.
However, I have changed the class, so it doesn't inherit from the visa superclass anymore. This fixed my problem.
Thank you for your time.

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

카테고리

Help CenterFile Exchange에서 Interface-Based Communication에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by