Module parameterization in the block diagram
To parameterize a TcCOM instance, the parameter window can be used directly in the block diagram. In addition, the Property table can be used, which can be expanded or collapsed on the right-hand edge of the block diagram. A basic distinction is made between different parameter values:
"Default", "Startup", "Online" and "Prepared"
The following value types can be found in the drop-down menu of the Property table of the block diagram:
- Default values are the parameter values during code generation. They are invariably stored in the module description file and enable the manufacturing settings to be restored after parameter changes.
- Startup values are stored in the TwinCAT project file and downloaded to the module instance as soon as TwinCAT starts the module instance.
Startup values for the input process image can also be specified in Simulink® modules. This allows the module to be started with non-zero input values, without the need for linking the inputs with other process images. Internal signals and output signals have no starting values, since they would, in any case, be overwritten in the first cycle. - Online values are only available if the module was started on the target system. They show the current parameter value in the running module. This value can also be changed during runtime. Although in this case the corresponding input field has to be enabled via the context menu, in order to prevent accidental inputs.
- Prepared values can be specified whenever online values are available. They can be used to save various values, in order to write them consistently to the module. If prepared values have been specified, they are displayed in a table below the block diagram. The buttons to the right of the list can be used to download prepared values as online values and/or save them as starting value, or delete them.
Parameterization in the block diagram
Parameterizable blocks are marked with a yellow box in the block diagram.
Double-clicking on the block or a single click on the yellow box brings up a window with the parameters that can be changed.
If a value is changed, it can be applied with the following keyboard commands:
CTRL + Enter | Set online value directly |
SHIFT + Enter | Set startup value |
Enter | Set prepared value |
The icons in the title bar have the following functions:
Close window | |
Keep window in the foreground across all block diagram hierarchical levels | |
Keep window open at the current block diagram hierarchical level | |
Minimize window to title bar |