2 Simulink blocks Dimensionalized- whether the block accepts and/or generates multidimensional signal arrays. For more information, see Signal Basics Zero Crossings-whether the block detects zero-crossing events. For more information, see Zero Crossing Detection. To view a table that summarizes the data types supported by the blocks in the Simulink and Fixed-Point block libraries, execute the following command at the matlab command line showblockdatatypetable 2-2
2 Simulink Blocks 2-2 - Dimensionalized– whether the block accepts and/or generates multidimensional signal arrays. For more information, see Signal Basics. - Zero Crossings – whether the block detects zero-crossing events. For more information, see Zero Crossing Detection. To view a table that summarizes the data types supported by the blocks in the Simulink and Fixed-Point block libraries, execute the following command at the MATLAB command line: showblockdatatypetable slref.book Page 2 Friday, June 21, 2002 5:58 PM
Ab Purp。se Output the absolute value of the input Simulink Math Operations and Fixed- Point Blockset Math Descripti。n The Abs block outputs the absolute value of the input For signed data types, the absolute value of the most negative value is problematic since it is not representable by the data type. In this case, the behavior of the block is controlled by the Saturate on integer overflow check box. If checked, the absolute value of the data type saturates to the most positive representable value. If not checked, the absolute value of the most negative value represented by the data type has no effect For example, suppose the block input is an 8-bit signed integer. The range of this data type is from- 128 to 127, and the absolute value of- 128 is not presentable. If the Saturate on integer overflow check box is selected, then the absolute value of-128 is 127. Ifit is not selected then the absolute value of 128 remains at -128 Data Type An Abs block accepts a real- or complex-valued input of any data type except Support int64 and uint64 and outputs a real value of the same data type as the input Dialog B。x Block Par V Saude on integer overflow v Enable zero cossing detecto E OF Saturate on integer overflow When selected, the block maps signed integer input elements corresponding to the most negative value of that data type to the most positive value of that data type For 8-bit integers, -128 is mapped to 127 ·For16- bit integers,-32768 maps to3276″ 2-3
Abs 2-3 2Abs Purpose Output the absolute value of the input Library Simulink Math Operations and Fixed-Point Blockset Math Description The Abs block outputs the absolute value of the input. For signed data types, the absolute value of the most negative value is problematic since it is not representable by the data type. In this case, the behavior of the block is controlled by the Saturate on integer overflow check box. If checked, the absolute value of the data type saturates to the most positive representable value. If not checked, the absolute value of the most negative value represented by the data type has no effect. For example, suppose the block input is an 8-bit signed integer. The range of this data type is from -128 to 127, and the absolute value of -128 is not representable. If the Saturate on integer overflow check box is selected, then the absolute value of -128 is 127. If it is not selected, then the absolute value of -128 remains at -128. Data Type Support An Abs block accepts a real- or complex-valued input of any data type except int64 and uint64 and outputs a real value of the same data type as the input. Dialog Box Saturate on integer overflow When selected, the block maps signed integer input elements corresponding to the most negative value of that data type to the most positive value of that data type. • For 8-bit integers, -128 is mapped to 127. • For 16-bit integers, -32768 maps to 32767. |u| Abs slref.book Page 3 Friday, June 21, 2002 5:58 PM
Abs For 32-bit integers, -2147483648 maps to 2147483647 When not selected the block does not act on signed integer input elements corresponding to the most negative value of that data type For 8-bit integers, -128 remains -128 For 16-bit integers, -32768 remains -32768 For 32-bit integers, -2147483648 remains- 2147483648. Enable zero crossing detection Select to enable zero crossing detection. For more information, see"Zero Crossing Detection"in the Using Simulink documentation. Characteristics Dimensionalized Yes Direct Feedthrough Yes Sample Time Inherited from driving block Zero Crossing No, unless Enable zero crossing detection is selected
Abs 2-4 • For 32-bit integers, -2147483648 maps to 2147483647. When not selected, the block does not act on signed integer input elements corresponding to the most negative value of that data type. • For 8-bit integers, -128 remains -128. • For 16-bit integers, -32768 remains -32768. • For 32-bit integers, -2147483648 remains -2147483648. Enable zero crossing detection Select to enable zero crossing detection. For more information, see “Zero Crossing Detection” in the Using Simulink documentation. Characteristics Dimensionalized Yes Direct Feedthrough Yes Sample Time Inherited from driving block Zero Crossing No, unless Enable zero crossing detection is selected slref.book Page 4 Friday, June 21, 2002 5:58 PM
Action Port Purp。se Implement the Action subsystems used by if and switch control flow statements in Simulink Libr Ports Subsystems Descript。n Action Port blocks implement Action subsystems used in if and switch control flow statements. See the references for the If and Switch Case blocks for les using Action Port blocks Action Use Action Port blocks to create Action subsystems as follows: 1 Place a subsystem in the system containing the If or Switch Case block. You can use an ordinary subsystem or an atomic subsystem In eithe er case 2 Add an Action Port to the new subsystem This adds an input port named Action to the subsystem, which is now an Action subsystem. on subsystems execute their programming in response to the conditional puts of an If or Switch Case block. Use Action subsystems as follows: 1 Create an Action subsystem for each output port configured for an If or Switch Case block 2 Connect each output port (if, else, or elseif ports for the If block; case or default ports for the Switch Case block)to the Action port on an Action When the connection is made, the icon for the subsystem and the Action Port block it contains are changed to the name of the output port for the If or Switch Case block (i.e, if(), else( 1, elseifi), case( ), or default( 1) 3 Open the new subsystem and add the diagram that you want to execute in response to the condition this subsystem covers The Action Port block has only the States when execution is resumed parameter in its parameters dialog. If you set this field to held(the default value)for an Action Port block, the states of its Action subsystem are retained between calls even if other member Action subsystems of an if-else or switch control flow statement are called. If you set the States when execution is resumed field to reset, the states of a member Action subsystem are reset to 2-5
Action Port 2-5 2Action Port Purpose Implement the Action subsystems used by if and switch control flow statements in Simulink Library Ports & Subsystems Description Action Port blocks implement Action subsystems used in if and switch control flow statements. See the references for the If and Switch Case blocks for examples using Action Port blocks. Use Action Port blocks to create Action subsystems as follows: 1 Place a subsystem in the system containing the If or Switch Case block. You can use an ordinary subsystem or an atomic subsystem. In either case, the resulting Action subsystem is atomic. 2 Add an Action Port to the new subsystem. This adds an input port named Action to the subsystem, which is now an Action subsystem. Action subsystems execute their programming in response to the conditional outputs of an If or Switch Case block. Use Action subsystems as follows: 1 Create an Action subsystem for each output port configured for an If or Switch Case block. 2 Connect each output port (if, else, or elseif ports for the If block; case or default ports for the Switch Case block) to the Action port on an Action subsystem. When the connection is made, the icon for the subsystem and the Action Port block it contains are changed to the name of the output port for the If or Switch Case block (i.e., if{ }, else{ }, elseif{ }, case{ }, or default{ }). 3 Open the new subsystem and add the diagram that you want to execute in response to the condition this subsystem covers. The Action Port block has only the States when execution is resumed parameter in its parameters dialog. If you set this field to held (the default value) for an Action Port block, the states of its Action subsystem are retained between calls even if other member Action subsystems of an if-else or switch control flow statement are called. If you set the States when execution is resumed field to reset, the states of a member Action subsystem are reset to slref.book Page 5 Friday, June 21, 2002 5:58 PM
Action Port initial values when it is reenabled. See the"Parameters and dialog box section following for more details Note All blocks in an Action subsystem driven by an Ifor Switch Case block must run at the same rate as the driving block. Data Type There are no data inputs or outputs for Action Port blocks. Parameters and dialog B。x oce this block n a subsystem to ink to a signal from an If block or a 0KJ_ca地」_A States when execution is resumed Specifies how to handle internal states when the subsystem of this Action Port block is reenabled Set this field to held (the default value) to make sure that the action subsystem states retain their previous values when the subsystem is reenabled. Otherwise, set this field to reset if you want the states of the Action subsystem to be reinitialized when the subsystem is reenabled Reenablement of a subsystem occurs when it is called and the condition of the call is true after having been previously false In the following example the Action Port blocks for both Action subsystems a and b have the States when execution is resumed parameter set to reset 2-6
Action Port 2-6 initial values when it is reenabled. See the “Parameters and Dialog Box” section following for more details. Note All blocks in an Action subsystem driven by an If or Switch Case block must run at the same rate as the driving block. Data Type Support There are no data inputs or outputs for Action Port blocks. Parameters and Dialog Box States when execution is resumed Specifies how to handle internal states when the subsystem of this Action Port block is reenabled. Set this field to held (the default value) to make sure that the Action subsystem states retain their previous values when the subsystem is reenabled. Otherwise, set this field to reset if you want the states of the Action subsystem to be reinitialized when the subsystem is reenabled. Reenablement of a subsystem occurs when it is called and the condition of the call is true after having been previously false. In the following example, the Action Port blocks for both Action subsystems A and B have the States when execution is resumed parameter set to reset. slref.book Page 6 Friday, June 21, 2002 5:58 PM