IOControl
I'm trying to access some amplifier settings using the IOControl. I tried following the example from the documentation that states the following:
To get the module name of the DEWE-43 amplifier, we must call IApp.AmplInterfaces.MainInterface.ChainList.Item[0].Item[0].IOControl with the IOCodeamplGetModuleName.: the result is 43-V.
However, I don't seem to be able to get the call for the IOControl correct. I'm working in MATLAB. I've tried numerous attempts at the call signature and if I do the following I at least get through the initial input checking:
handle.AmplInterfaces.MainInterface.ChainList.Item(0).Item(0).IOControl(0,'amplGetModuleName')
This returns the error code of 0 to me but at least gets past the input parameter check. Basically any two inputs with the first being an integer gets me that far.
Can anyone provide me some guidance for how to call this properly so that I get more than just the error code back?
Technical support
Hi,
here is an example how to read the short info of first amplifier on the first channel:
h = actxserver('Dewesoft.App');
% open Dewesoft
fprintf('Initializing Dewesoft... ');
h.Init();
h.Enabled = true;
h.Visible = true;
fprintf('done.\n');
h1 = h.AmplInterfaces.
Param = 0;
[ErrCode,Res] = h1.IOControl(2, Param)