AnsweredAssumed Answered

How to fix the error of ad9361_sim.slx ?

Question asked by opticslee on Jan 12, 2015
Latest reply on Jan 16, 2015 by charlyelkhoury

Hi all,

   

   I hope to use matlab to display and analyze my fmcomms2 hardware (zedboard and ad9361 evaluate board) received raw data stream.

    With the help of image file and host tool, I created a SD card (12 December 2014 release (2014_R2)) firstly. In this version, libiio have been pre-installed, and the tool of "iiod" will auto-run when linux started.

    To the PC end, I installed "libiio installer for 64 bit systems" and MATLAB 2014b (version 64-bit) into my WIN 7 64-bit system. I also cloned mathworks_tools from https://github.com/analogdevicesinc by git, and copied all three files under the folder "iio_sys_obj" into folder "hil_models\fmcomms2_3_data_stream". After that, I run matlab by double clicking the program of ad9361_sim.slx, and changed default IP address to my zedboard's IP address in the dialog, and run it. In that config dialog, I didn't modify any items except IP address. However, the pragram failed.

    I checked the network between PC and Zedboard where "iiod" have been started well, It is OK. I also traced the error message, I found it comes from the function "init", which returned parameter ret is "-1", err_msg is "Index out of matrix dimension.", and msg_log is NULL.

    I found the post https://ez.analog.com/message/161171#161171 may have the same question, but it seems no good answer.

  

    Has any one can help me to fix this question or tell me what i missed ?

    Thanks!

 

Regards,

Lee

 

--------------------------------------------------------------------

Related Code is:

--------------------------------------------------------------------

           % Initialize the libiio data input device                       

            if(obj.in_ch_no ~= 0)

                [ret, err_msg, msg_log] = init(obj.libiio_data_in_dev, obj.ip_address, ...

                                               obj.iio_dev_cfg.data_in_device, 'OUT', ...

                                               obj.in_ch_no, obj.in_ch_size);

                fprintf('%s', msg_log);

                if(ret < 0)

                    msgbox(err_msg, 'Error','error');

                    return;

                end

            end

--------------------------------------------------------------------

Related error message is :

--------------------------------------------------------------------

[8 similar]  Source 'ad9361_sim/Constant1' specifies that its sample time (-1) is back-inherited. You should explicitly specify the sample time of sources. You can disable this diagnostic by setting the 'Source block specifies -1 sample time' diagnostic to 'none' in the Sample Time group on the Diagnostics pane of the Configuration Parameters dialog box.

Component: Simulink | Category: Block warning


An error occurred while running the simulation and the simulation was terminated

For output port 1 of 'ad9361_sim/MATLAB System', the 'stepImpl' method of the System object 'iio_sys_obj' returned a value whose size [0x0], does not match the value returned by the 'getOutputSizeImpl' method. Either change the size of the value returned by 'stepImpl', or change the size returned by 'getOutputSizeImpl'.

Component: Simulink | Category: Block error

Outcomes