Reading a parameter by name from SigmaStudio in MATLAB.

I am able to write parameter values to the hardware in MATLAB by running a script defined as follows, for example:


But there seems to be no way to read a parameter value in the same way because the script has only true or false as its output, and MATLAB doesn't do output parameters in the function call.

So I tried on ADAU1787 to use PARAMETER_READ_FLOAT_USING_NAME() but then found that there was no such name mapped to the compressor threshold. 

I was wondering if anyone has met this issue with MATLAB.

Also I didn't receive any confirmation of my previous request about IIR coefficient (b0,b1,b2,a0,a1) write by name in the interface - I was wondering if that can be answered.

  • Hello Peter,

    Can you upload your project so we can see what compressor you are using and other details? 

    Dave T

  • myproject.dspproj

    Hi Dave,

    I can create a script in MATLAB : 

    myscript = 'ss.ObjectSetProperties("setControlValue","SDSP-myproject.Compressor",0,0,"Threshold", -6.0);'

    which succeeds in setting the threshold.

    But I cannot find a way to read this threshold using the control name "SDSP-myproject.Compressor" and parameter name "Threshold" as I did in the write.

    Best regards


  • Hello Peter,

    Have you read the links that are on this Wiki page?

    SigmaStudio Scripting [Analog Devices Wiki]

    There are a couple of links that refer to Matlab interfacing. The answers should be there. 

    Dave T

  • Hi Dave,

    Unfortunaltely there are no examples in that Wiki that let me read a compressor property using MATLAB. I agree they should be there, but they are not.

    The problem remains as I put forward in the initial question : 

    - MATLAB cannot read a value using a scripted ss.ObjectGetProperties() because the return value is a truth value not the property in question.

    - I have tried other possible methods for this, but they do not respond to the parameter name (i.e. Threshold).

    I am a trying to be really specific, but without the specific documentation, it's all a bit too difficult. The problem I think is that the interface is not complete and not documented.

  • Peter,

    I had added some more info to the Matlab scripting page, but I forgot to approve it to expose it to the public. Please see here for info on generating a table of functions, arguments, and return values for accessing SigmaServer from Matlab.

    As shown above, GET_OBJECT_PROPERTIES() has two return values. The Matlab notation:

    [firstRetVal, secondRetVal] = Function();

    must be used to access both return values. By default, you'll only get the first, which isn't very useful in this case. If this doesn't solve your problem, please let me know and I'll write a more complete example.