Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
resources:tools-software:linux-software:libiio:clients:matlab_simulink [28 Oct 2015 16:10] – [Downloads] Di Puresources:tools-software:linux-software:libiio:clients:matlab_simulink [05 Feb 2021 15:02] (current) – [Next Generation System Objects] Michael Hennerich
Line 1: Line 1:
 ====== IIO System Object ====== ====== IIO System Object ======
  
-The **IIO System Object** is based on the [[http://www.mathworks.com/help/comm/gs/what-are-system-objects.html|MATLAB System Objects™]] specification. It is designed to exchange data over Ethernet with an ADI hardware system connected to a FPGA/SoC platform running the ADI Linux distribution. +<note warning>These interfaces are deprecated. Please use the [[:resources:tools-software:transceiver-toolbox|Transceiver Toolbox]] or the [[:resources:tools-software:hsx-toolbox|High Speed Converter Toolbox]]</note> 
 + 
 +The **IIO System Object** is based on the [[mw>/help/matlab/matlab_prog/what-are-system-objects.html|MATLAB System Objects™]] specification. It is designed to exchange data over Ethernet with an ADI hardware system connected to a FPGA/SoC platform running the ADI Linux distribution. 
  
 The **IIO System Object** is available in both MATLAB and Simulink: The **IIO System Object** is available in both MATLAB and Simulink:
   * By calling it from a MATLAB script, it can be used for HIL simulation of [[mw>products/matlab/|MATLAB]] targeting different ADI platforms.    * By calling it from a MATLAB script, it can be used for HIL simulation of [[mw>products/matlab/|MATLAB]] targeting different ADI platforms. 
-  * By incorporating it into a [[http://www.mathworks.com/help/simulink/ug/what-is-matlab-system-block.html|MATLAB System Block]], it can be used for HIL simulation of [[mw>products/simulink/|Simulink]] models targeting different ADI platforms. +  * By incorporating it into a [[mw>help/simulink/ug/what-is-matlab-system-block.html|MATLAB System Block]], it can be used for HIL simulation of [[mw>products/simulink/|Simulink]] models targeting different ADI platforms. 
  
 The IIO System Object is built upon the [[/resources/tools-software/linux-software/libiio|libiio library]] and enables a MATLAB or Simulink model to: The IIO System Object is built upon the [[/resources/tools-software/linux-software/libiio|libiio library]] and enables a MATLAB or Simulink model to:
Line 19: Line 21:
  
 The configuration file for a device has the .cfg extension and the name must match the device name set in the block's configuration dialog. It is a text file containing a set of fields that define the Linux drivers for the target device and the configuration channels that will be exposed by the Simulink block or MATLAB script. Entries in the configuration file can be commented by placing //#// at the begining of a line. The following entries can be found in a configuration file: The configuration file for a device has the .cfg extension and the name must match the device name set in the block's configuration dialog. It is a text file containing a set of fields that define the Linux drivers for the target device and the configuration channels that will be exposed by the Simulink block or MATLAB script. Entries in the configuration file can be commented by placing //#// at the begining of a line. The following entries can be found in a configuration file:
-  * **data_in_device** - name of the Linux driver for used for sending data to the device +  * **data_in_device** - name of the Linux driver used for sending data to the device 
-  * **data_out_device** - name of the Linux driver for used for reading data from the device +  * **data_out_device** - name of the Linux driver used for reading data from the device 
-  * **ctrl_device ** - name of the Linux driver for used for controlling and monitoring the device+  * **ctrl_device ** - name of the Linux driver used for controlling and monitoring the device
   * **channel** - defines a control/monitoring channel. A channel is defined by a sequence of parameters as follows //<channel name, channel type, Linux attribute, associated device>//   * **channel** - defines a control/monitoring channel. A channel is defined by a sequence of parameters as follows //<channel name, channel type, Linux attribute, associated device>//
       * //channel name// - represents the name of the channel to be displayed on the corresponding Simulink block port       * //channel name// - represents the name of the channel to be displayed on the corresponding Simulink block port
Line 68: Line 70:
 ====== Downloads ====== ====== Downloads ======
  
-<WRAP round info 65%>+<WRAP round info 80%>
 In order to use the IIO System Object, your [[mw>products/matlab/|MATLAB]] license needs to include the following component: In order to use the IIO System Object, your [[mw>products/matlab/|MATLAB]] license needs to include the following component:
   * MATLAB (R2015a or higher version is required)    * MATLAB (R2015a or higher version is required) 
 If you would like to use it in Simulink, your [[mw>products/matlab/|MATLAB]] license needs to include the following component: If you would like to use it in Simulink, your [[mw>products/matlab/|MATLAB]] license needs to include the following component:
-  * Simulink                                                       +  * Simulink 
 +Besides, you need to have two things ready on your PC: 
 +  * Microsoft Visual C++ 2013 Redistributable 
 +  * A proper complier for your MATLAB. (For example, Microsoft Windows SDK is a good option.) And set it up using 'mex -setup' in the MATLAB command window.                                                      
 </WRAP> </WRAP>
  
Line 91: Line 96:
     * [[https://github.com/analogdevicesinc/libiio-matlab/blob/master/iio_sys_obj.m|iio_sys_obj.m]] is for Simulink     * [[https://github.com/analogdevicesinc/libiio-matlab/blob/master/iio_sys_obj.m|iio_sys_obj.m]] is for Simulink
     * [[https://github.com/analogdevicesinc/libiio-matlab/blob/master/iio_sys_obj_matlab.m|iio_sys_obj_matab.m]] is for MATLAB     * [[https://github.com/analogdevicesinc/libiio-matlab/blob/master/iio_sys_obj_matlab.m|iio_sys_obj_matab.m]] is for MATLAB
-  * [[https://github.com/analogdevicesinc/mathworks_tools/tree/2015_R1/hil_models|Example models]]+  * [[https://github.com/analogdevicesinc/mathworks_tools/tree/master/hil_models|Example models]]
 </WRAP> </WRAP>
  
Line 102: Line 107:
  
 Target side: Target side:
-  - Get the latest libiio library by following the [[http://wiki.analog.com/resources/tools-software/linux-software/libiio#how_to_build_it|instructions]]. +  - Get the latest libiio library by following the [[/resources/tools-software/linux-software/libiio#how_to_build_it|instructions]]. 
  
 PC side: PC side:
Line 109: Line 114:
     - If used in MATLAB: Assign the IP address of the target to your object.     - If used in MATLAB: Assign the IP address of the target to your object.
     - If used in Simulink: Open the Simulink block and type the IP address of the target in the block. Please note even if the IP address in the System objects property window seems correct, it is a good idea to edit it and click 'Apply' to avoid any caching issues.     - If used in Simulink: Open the Simulink block and type the IP address of the target in the block. Please note even if the IP address in the System objects property window seems correct, it is a good idea to edit it and click 'Apply' to avoid any caching issues.
 +
 +====== Next Generation System Objects ======
 +
 +Starting with MATLAB R2018b, ADI is transitioning to a new system object infrastructure based on collaboration with MathWorks Inc. When installing the [[resources:eval:user-guides:ad-fmcomms2-ebz:software:matlab_bsp|latest board support package]], it also induces documentation.
resources/tools-software/linux-software/libiio/clients/matlab_simulink.1446045019.txt.gz · Last modified: 28 Oct 2015 16:10 by Di Pu