Into memory

| Vectorized | C |
in the palette on the schematic

The block is designed to connect one part of the schematic with another part located in an arbitrary place of the project. Setting the block on the communication line corresponds to setting a named label on the block diagram. After that, the labeled signal can be used in an arbitrary place of the project with the help of the block From memory. The block is vectorized and performs the procedure of forming global (named) variables in dynamic memory, by means of which the 1st stage of "wireless" data transfer is implemented (for example, from the Main schematic window to a submodel or from a submodel to the Main schematic window or to another submodel). The block has only input ports (one or more).

The block has a special dialog box containing the Name of a variable dialog box (for entering the name of the global variable) and the List of variables information box (for displaying the list of names of all global variables available in the project at the moment of opening the dialog box). By default, Y1 is entered in the line Name of a variable in the 1st block moved to the Schematic window. If you are satisfied with this name of the variable, clicking "Yes" will result in the formation of a global variable of the same name (scalar or vector according to the block input dimension) in the dynamic memory. If the default name (Y1) is left in the 1st "Into memory” block moved to the Schematic window, then when the dialog box of the 2nd "Into memory" block moved to the Schematic window is opened, the default name Y2 will be suggested, and the List of variables information box will contain 2 (two) names: Y1 and Y2. To create a connection point it is necessary to place the block on the schematic, connect to it a communication line containing the required signal and set a name for it. By default, the signal has the name "Y1". To change it, you must double-click on the block, enter the desired name in the "Signal name" field and move it to the Variables of the block field of the block using the Add a variablebutton. Each variable added there will correspond to an input port to which the communication line can be connected.

Properties:

None

Parameters

None

Example of filling in the dialog box

If you want to give a variable (scalar or vector) a unique name (for example, dN(t)/No), you must delete the default name in the dialog line and enter the desired one. The "Into memory" block allows you to control at what level of circuit nesting the recorded signal can be used. The counting of nest levels occurs relative to the level at which the block is located. The mechanism is implemented using prefixes to the signal name, having the format:

<А>#
where A is a prefix denoting the number of higher levels at which the variable should be visible. If the variable name is simply preceded by the # character, without a number, then the variable will be available at the current level and all levels below the current level. If A = "local", then the variable will only be available at the current level and not available below or above the level. If the prefix (<A>#) is absent, then the variable is available from any part of the project. For example, if the variable has the name 1#Y1, then it can be used with help of the "From memory" block at the same level where the "Into memory" block is set and one level higher. At other levels, the variable will not be visible. If the variable has the name local#Y1, then it can only be used at the current level, and above and below it will be unavailable.
Прим.: To form a vector global variable, it is necessary to preform a vector input signal, for example, by means of a type block «Мультиплексор».