Block Parameters for the ActiveX Control Block

Summary of Parameters

NameDescription
Program IDName of the control
ConnectionsWhether the ActiveX Control block has ports
Input propertyName of the property that is set when the ActiveX Control block receives a signal
Initialization commandCommand that sets the initial conditions for the ActiveX Control block
Other events and handlersEvents that trigger an action by the ActiveX Control block
Update commandFunction that the Simulink engine invokes when it updates the block during the simulation
In-block controlWhether the ActiveX Control block displays a control or is connected to an ActiveX Control block somewhere else
BorderWhether a border appears around the control

Program ID

The Program ID parameter is the name of the control displayed on the block. To determine the Program ID of other controls, consult their documentation.

Connections

The Connections parameter determines whether the block has an inport only, both an inport and an outport, or no ports. If the block has both an inport and an outport, then the values at both ports are the same.

Input Property

The Input property parameter indicates the name of the block property whose value is set by the input signal. Each preconfigured Gauges Blockset block stores the block's current value in a property, as listed in the table below.

Names of Input Properties

LibraryProperty Name
Angular GaugesNeedleValue
LEDsValue
Linear Gauges
  • BandStop (Min-Max Thermometer)

  • PointerValue (other pointer linear gauges)

  • Value (bar gauges)

Numeric Displays
  • Value (Generic Numeric LED, Odometer, PlusMinus XX.XXX)

  • AlphaNumeric (others)

On Off GaugesValue
Percent IndicatorsPortionValue

Initialization Command

The Initialization command parameter is a string that sets the initial conditions of the ActiveX Control block.

The handle of the control is hActX.

Other Events and Handlers

The Other events and handlers parameter specifies actions taken by the ActiveX Control block when you perform a defined action on the ActiveX Control block. You must enter an event as an n-by-2 cell array. The first entry in each row must be the name of the event. The second entry in each row must be the MATLAB callback to be executed.

For a list and description of supported events for a control, consult the control's help.

Update Command

The Update command parameter is the name of the function that Simulink software invokes when it updates the block during a simulation. The function has these input arguments:

The function is not invoked when you update the diagram.

In-Block Control

The In-block control check box determines where the ActiveX Control block value is displayed. The control can be on the block icon, in the same model window, in a different model, in a subsystem, or in a MATLAB figure.

If checked, the control whose name is specified in the Program ID field appears on the ActiveX Control block.

If cleared, the block is connected to the control whose handle is specified in the Handle location field (this field appears when you clear the box):

Using this feature is useful in a complex model that displays signals in multiple subsystems on ActiveX Control blocks. If you feed the signals into ActiveX Control blocks but display the controls themselves in a separate system or window, it is not necessary to have the subsystems open to see the results. For more information, see Placing Controls in a Different Window.

Border

The Border check box determines whether the block displays a border around the control.

  


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