setlinio - Assign I/O settings to Simulink model

Syntax

oldio=setlinio('sys',io)

Graphical Interface

As an alternative to the setlinio function, edit linearization I/Os in the Analysis I/Os pane of the Linearization Task node within the Simulink Control Design GUI. See Inspecting Analysis I/Os.

Description

oldio=setlinio('sys',io) assigns the settings in the vector of linearization I/O objects, io, to the Simulink model, sys. These settings appear as annotations on the signal lines. Use the function getlinio or linio to create the linearization I/O objects. You can save I/O objects to disk in a MAT-file and use them later to restore linearization settings in a model.

Examples

Before assigning I/O settings to a Simulink model using setlinio, you must create a vector of I/O objects representing linearization annotations, such as input points or output points, on a Simulink model.

Open the Simulink model magball by typing:

magball

at the MATLAB prompt. Right-click the signal line between the Magnetic Ball Plant and the Controller. Select Linearization Points > Output Point from the menu to place an output point on this signal line. Notice a small arrow pointing away from a small circle just above the signal line. This arrow represents the output point.

Right-click the signal line after the Magnetic Ball Plant. Select Linearization Points > Output Point from the menu to place another output point on this signal line. The model diagram should now look similar to that in the following figure:

Create an I/O object with the getlinio function:

io=getlinio('magball')

Make changes to io by editing the object or by using the set function. For example:

io(1).Type='in';
io(2).OpenLoop='on';

Assign the new settings in io to the model diagram:

oldio=setlinio('magball',io)

This assignment returns the old I/O settings (that have been replaced by the settings in io).

    Linearization IOs: 
--------------------------
Block magball/Controller, Port 1 is marked with the following 
properties:
 - An Output Measurement
 - No Loop Opening
 - No signal name. Linearization will use the block name
 
Block magball/Magnetic Ball Plant, Port 1 is marked with the 
following properties:
 - An Output Measurement
 - No Loop Opening
 - No signal name. Linearization will use the block name

The model diagram should now look similar to that in the following figure:

See Also

get, getlinio, linio, set

  


 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS