ModelingSimulationImplementationUser’s GuideVersion 1For Use with Simulink®Dials & GaugesBlockset
1 Getting Started1-4External Mode SupportThe Dials & Gauges Blockset support for external mode allows you to incorporate dials and gauges into any
Angular Gauges5-4The Block Parameters dialog box governs the interaction between Simulink and the ActiveX control embedded in the block. See “Summary
Buttons & Switches5-55Buttons & SwitchesPurpose Toggle between two statesDescription Blocks in the Buttons & Switches library are two-stat
Knobs & Selectors5-65Knobs & SelectorsPurpose Select values in a discrete or continuous set using a mouse-controlled dialDescription The Knobs
Knobs & Selectors5-7The table below lists the panels of the ActiveX Control Properties dialog box for the Generic Knob block.The Block Parameters
LEDs5-85LEDsPurpose Display input value using one or more two-state graphical elementsDescription Blocks in the LEDs library use graphical elements to
Linear Gauges5-95Linear GaugesPurpose Display input value on a lineDescription Blocks in the Linear Gauges library reflect their input value graphical
Linear Gauges5-10The Block Parameters dialog box governs the interaction between Simulink and the ActiveX control embedded in the block. See “Summary
Numeric Displays5-115Numeric DisplaysPurpose Display input value using LED digits or numbered wheelsDescription Blocks in the Numeric Displays library
Numeric Displays5-12The Block Parameters dialog box governs the interaction between Simulink and the ActiveX control embedded in the block. See “Summa
Percent Indicators5-135Percent IndicatorsPurpose Display percentages and ratios, using a linear or circular scaleDescription Blocks in the Percent Ind
Related Products1-5Real-Time Workshop SupportYou can use Real-Time Workshop® 4.0 or later to generate code from models that include Dials & Gauges
Sliders5-145SlidersPurpose Select values using a mouse-controlled knob that slides along a barDescription Blocks in the Sliders library model a knob s
Strip Chart5-155Strip ChartPurpose Display streams of data in real timeDescription The Strip Chart library contains a single block, the Strip Chart bl
Strip Chart5-16The Block Parameters dialog box governs the interaction between Simulink and the ActiveX control embedded in the block. See “Summary of
I-1IndexAactive area 1-11ActiveX Control blocksaccessing from MATLAB 1-6accessing from Simulink 1-7accessing in a different model window 4-3accessing
IndexI-2KKnobs & Selectors libraryreference for 5-6LLEDs libraryreference for 5-8Linear Gauges libraryreference for 5-9Mmodelsadding ActiveX Contr
1 Getting Started1-6Accessing the Preconfigured BlocksThe Dials & Gauges Blockset contains many preconfigured blocks, via the Global Majic ActiveX
Accessing the Preconfigured Blocks1-7Each icon represents a different library of blocks. Double-click on an icon to access the blocks in the library.
1 Getting Started1-82 Open the Global Majic ActiveX Library to display its libraries of blocks.If you click on the name of a library, then the right p
Accessing the Preconfigured Blocks1-9Configuring the Dials & Gauges BlocksetNormally, the installation process automatically registers the ActiveX
1 Getting Started1-10•Enter dng_register_ocx in the MATLAB Command Window.•See Solution Number 24876 in the Support area of the MathWorks Web site (ht
Moving and Selecting Blocks1-11Moving and Selecting BlocksThe way you move and select blocks from the Dials & Gauges Blockset is significantly dif
1 Getting Started1-12Building a Simple ModelThis section illustrates how to build and use a simple system, first using Simulink blocks alone, and then
Building a Simple Model1-13When you simulate this system, the Lower Right block displays the value of the signal at that instant. To change the value
How to Contact The MathWorks:www.mathworks.com Webcomp.soft-sys.matlab [email protected] Technical [email protected] Product
1 Getting Started1-146 Draw connection lines from the Generic Knob block to the Gain block, and from the Gain block to the Lower Right block.7 From th
Working with a Model1-15Working with a ModelThis section indicates how you can perform common tasks involving the model you built in the section “Buil
1 Getting Started1-16The files with the .ax extension describe the Dials & Gauges Blockset blocks. Note that these files are not text files. They
Modifying Properties of Blocks1-17Modifying Properties of BlocksThis section describes how to view and modify properties of a preconfigured Dials &
1 Getting Started1-18If you modify any values in this dialog box, then the block is visually updated immediately. However, the changes are not permane
Modifying Properties of Blocks1-196 Set the DeltaValue parameter to 5. This prevents the knob block from looking too crowded.The figure shows how the
1 Getting Started1-20
2Using Instrumentation in a ModelConnecting Blocks in a Model . . . . . . . . . . . . 2-3Modifying ActiveX Control Propertie
2 Using Instrumentation in a Model2-2This chapter describes how to use instrumentation in the Dials & Gauges Blockset and includes these sections:
Connecting Blocks in a Model2-3Connecting Blocks in a ModelBefore you connect a Dials & Gauges Blockset block with other blocks, you should know w
iContents1Getting StartedWhat Is the Dials & Gauges Blockset? . . . . . . . . . . . . . . . . . . . 1-2Related Products . . . . . . . . . . . .
2 Using Instrumentation in a Model2-4Modifying ActiveX Control PropertiesYou can modify many properties of a preconfigured Dials & Gauges Blockset
Modifying ActiveX Control Properties2-5•The Volume block in the Angular Gauges library uses three adjacent annular regions, each with a different colo
2 Using Instrumentation in a Model2-61 Click on the up arrow next to the value of the first property in the pair (Fonts in the figure). This value is
Modifying ActiveX Control Properties2-7Once you have located a part of the dialog box where you can apply a style you previously created, simply set t
2 Using Instrumentation in a Model2-8Caution If you decrease the value of the property named by the plural noun (for example, the Fonts property), th
Modifying ActiveX Control Properties2-9of the block, as well as the part of the ActiveX Control Properties dialog box panel that defines the text. Som
2 Using Instrumentation in a Model2-10Changing Fonts and Other Characteristics of Text Captions. To change the font of an existing text caption, you m
Modifying ActiveX Control Properties2-11Description of Mouse-Response ModesThe table below describes how a control’s value responds to mouse events un
2 Using Instrumentation in a Model2-12The table below indicates which categories of blocks and which dialog box panels have a MouseControl property.In
Modifying ActiveX Control Properties2-13Changing the ScaleClick on the Scales tab to display the scales properties page. This figure shows the default
ii Contents2Using Instrumentation in a ModelConnecting Blocks in a Model . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3Modifying ActiveX Co
2 Using Instrumentation in a Model2-14Displaying Labels Next to Tick MarksClick on the Ticks tab to display the tick mark properties page. This figure
Modifying ActiveX Control Properties2-15The Value property indicates the current pointer value. Set the initial value to 0, halfway between the maximu
2 Using Instrumentation in a Model2-16The Ticks and TickID properties, in the box labeled 1, are defined as follows:•The Ticks property specifies how
Modifying ActiveX Control Properties2-17The Position/Size properties, in the box labeled 2, are defined as follows:•The Inner property defines the edg
2 Using Instrumentation in a Model2-18The Position/Size properties, in the box labeled 2, are defined as follows:•The Inner position is 1.90 and the O
Saving and Reusing a Customized Control2-19Saving and Reusing a Customized ControlIf you have modified settings in a block’s ActiveX Control Propertie
2 Using Instrumentation in a Model2-204 Enter a description in the text area and click on OK.5 Select the directory in which to store the modified con
Saving and Reusing a Customized Control2-21The figure below shows the dialog box with fields filled in. The customized control is stored in the Linear
2 Using Instrumentation in a Model2-22
3Categories of ActiveX ControlsAngular Gauges . . . . . . . . . . . . . . . . . . 3-3Buttons & Switches .
iiiNumeric Displays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-19Customizing Numeric Displays . . . . . . . . . . . .
3 Categories of ActiveX Controls3-2This chapter discusses various categories of instrumentation that you can use in your model. Each of the sections l
Angular Gauges3-3Angular GaugesThe Angular Gauges library contains controls that reflect their input value graphically along an arc of a circle. Block
3 Categories of ActiveX Controls3-4Combining Multiple Needles in One DisplayIf you want to display multiple needles on a single block, then the custom
Angular Gauges3-5input signal controls only one needle’s value. Unless you access the control directly as an ActiveX object, the remaining needles hav
3 Categories of ActiveX Controls3-6Buttons & SwitchesThe Buttons & Switches library contains two-state controls that change their state when y
Buttons & Switches3-7Changing Output ValuesBlocks in this library output the values -1and 0. To convert these output values to conventional Simuli
3 Categories of ActiveX Controls3-8Knobs & SelectorsThe Knobs & Selectors library contains two dial blocks that you can control using the mous
Knobs & Selectors3-9Customizing the Generic Knob BlockThe table below lists some common customizations involving the ActiveX Control Properties di
3 Categories of ActiveX Controls3-10Customizing the Frequency Selector BlockThe table below lists some simple customizations involving the ActiveX Con
Knobs & Selectors3-11Creating a New Set of SelectionsIf you want to vary the selections on the Frequency Selector block, then it might be easier t
iv ContentsPlacing ActiveX Controls in a Figure Window . . . . . . . . . . 4-10Saving and Reopening the Model . . . . . . . . . . . . . . . . . .
3 Categories of ActiveX Controls3-121 Copy the Frequency Selector block from the library into a new model.2 From the model window, open the block’s Ac
Knobs & Selectors3-139 Change the color of the currently chosen value to red by setting HighlightColor to red.Manually Adjusting the SelectionsIt
3 Categories of ActiveX Controls3-14LEDsThe LEDs library contains controls that use graphical elements to imitate light-emitting diodes (LEDs). Each b
LEDs3-15Display a binary representation of the (rounded) inputSet the Mode property on the LEDs/General panel to Bitwise. The first LED corresponds to
3 Categories of ActiveX Controls3-16Linear GaugesThe Linear Gauges library contains controls that reflect their input value graphically along a linear
Linear Gauges3-17Customizing Linear GaugesThe table below lists some common customizations involving the ActiveX Control Properties dialog box that ar
3 Categories of ActiveX Controls3-18Combining Multiple Pointers in One DisplayIf you want to display multiple pointers on a single block, then the cus
Numeric Displays3-19Numeric DisplaysThe Numeric Displays library contains controls that display the numerical value of their input signal. The Generic
3 Categories of ActiveX Controls3-20Customizing the Odometer BlockThe table below lists some common ways to customize the Odometer block, using the Ge
Percent Indicators3-21Percent IndicatorsThe Percent Indicators library contains controls that are designed to display percentages and ratios. The Gene
1Getting StartedWhat Is the Dials & Gauges Blockset? . . . . . . . . 1-2Related Products . . . . . . . . . .
3 Categories of ActiveX Controls3-22Combining Multiple Regions in One DisplayIf you want to display multiple regions on a single block, then the custo
Percent Indicators3-23input signal controls only one region. Unless you access the control directly as an ActiveX object, the remaining portions have
3 Categories of ActiveX Controls3-24SlidersThe Sliders library contains controls that model a knob sliding along a bar and that output the numerical v
Sliders3-25Change the size or position of the barOn the Bar panel, use the BarInner and BarOuter properties to define the width and position of the ba
3 Categories of ActiveX Controls3-26Move the knob label to a fixed positionOn the Digital panel, uncheck the Attach check box. Then use X Position and
Strip Chart3-27Strip ChartThe interface to the Strip Chart block is different from the interface to the other preconfigured blocks in the Dials &
3 Categories of ActiveX Controls3-28Using Your Own ActiveX ControlTo use your own ActiveX control in a Simulink model, you must associate it with the
Using Your Own ActiveX Control3-29Note Double-clicking on the border of a preconfigured block (supplied with the blockset) displays its ActiveX Contr
3 Categories of ActiveX Controls3-30•Program ID — the name of the ActiveX Control block•Connections — whether the ActiveX Control block has an inport,
Using Your Own ActiveX Control3-31block that has an input connection stores the block’s current value in a property, as listed in the table below.Outp
1 Getting Started1-2Getting Started11What Is the Dials & Gauges Blockset?The Dials & Gauges Blockset is a collection of blocks that provides g
3 Categories of ActiveX Controls3-32events. The table below lists the events associated with the preconfigured blocks that use this parameter field.In
Using Your Own ActiveX Control3-33In-Block ControlThe In-block control check box determines whether the ActiveX Control block displays an ActiveX Cont
3 Categories of ActiveX Controls3-34Note Be careful when unchecking this box because the only way to move a block is to drag it with the border. Unch
Using Your Own ActiveX Control3-35Additionally, you can choose an event on your control through which you want to open the property editor. For exampl
4Placing ActiveX Controls in a Different WindowPlacing ActiveX Controls in a Different Model . . . . 4-3Creating a Model Window Containing
4-2This chapter describes how to place Dials & Gauges Blockset blocks in their own window. By separating the controls from the computational block
4 Placing ActiveX Controls in a Different Window4-3Placing ActiveX Controls in a Different ModelThis sample model modifies the Simulink bounce demo by
Placing ActiveX Controls in a Different Model4-4•The Amp Meter block from the Angular Gauges library. Change the block’s name to Velocity.Customizing
4 Placing ActiveX Controls in a Different Window4-57 Open the ActiveX Control Properties dialog box for the Velocity (Amp Meter) block.8 From the Capt
Placing ActiveX Controls in a Different Model4-6Associating the Main Model with the GaugesIn the main model window, insert two ActiveX Control blocks
Related Products1-3Related ProductsThe MathWorks provides several products that are especially relevant to the kinds of tasks you can perform with the
4 Placing ActiveX Controls in a Different Window4-7For displaying the velocity For displaying the position
Placing ActiveX Controls in a Subsystem4-8Placing ActiveX Controls in a SubsystemThis sample model builds on the one described in “Placing ActiveX Con
4 Placing ActiveX Controls in a Different Window4-92 Double-click on the subsystem to open it.3 Copy a Generic Linear Gauge block from the Linear Gaug
Placing ActiveX Controls in a Figure Window4-10Placing ActiveX Controls in a Figure WindowIn this example, a simple model displays the simulation time
4 Placing ActiveX Controls in a Different Window4-11connected to the ActiveX Control block (the code appears below). With the fields filled in, the Bl
Placing ActiveX Controls in a Figure Window4-12Note In case you accidentally close the figure window before you are finished exploring the model, you
4 Placing ActiveX Controls in a Different Window4-13
5Library Reference
5 Library Reference5-2This chapter contains detailed descriptions of the categories of blocks in the Dials & Gauges Blockset. Each category corres
Angular Gauges5-35Angular GaugesPurpose Display input value on an arcDescription Blocks in the Angular Gauges library reflect their input value graphi
Kommentare zu diesen Handbüchern