Introduction
The Import Tool can set any slot value in the station relative to the current component.
The slot must exist
- The slot cannot be readOnly
The TypeSpec of the slot must be a BSimple or a BStatusValue
BREAKING CHANGE: since the 46.13.1, you cannot write in readOnly slots anymore
Example
The EnableHistory will set the enabled slot in the history to true.
Name | History | EnableHistory | |
Name of the instance to create | |||
model | name | slot:BooleanInt/enabled | |
ModbusClientBooleanPoint | history:BooleanIntervalHistoryExt | BooleanInt | true |
Column syntax
This column is a dynamic column: its name (in the first row) doesn't matter. Here we named the column "EnableHistory" but it could be anything else. Put any name you want.
Define the name of the subcolumn with the following format:
slot:<relative slot path from the component in the row to the slot>
Accepted value:
BSimple: Slot value (BSimple encoded to a String)
- BStatusValue: The Value of the slot without the status. For an Enum, the value must be the tag, escaped or not
IMPORT
You can put a null status using the {null} keyword.
To put a value in a BEnumStatus, the targeted component must have a range facet and the value in the cell must be a tag within this range
Try it yourself !
Here is the file used in the above import example. Download it, try importing it and see the result.
EXPORT
If the targeted slot is a BStatusValue with a null status, the value of the cell will be set to {null}
If the targeted slot is BStatusEnum, the value will be unescaped.
Advanced feature
Note that the base in the example above is the point itself (the current line). So the relative path is evaluated from the point.
You can also add this column inside a Column targeting a subComponent (History, Alarm, SubComponent or InfoSource column). To do so, simply add a subColumn with the "slot:..." syntax to the desired subComponent.
Now, the base will be the SubComponent itself. You can use it for shorter syntaxes.
Example:
Here we put the slot:enabled as a subColumn in a History, but you can also add the subColumn in an Alarm, a SubComponent or an InfoSource column.
This subColumn will target the enabled slot directly in the HistoryExtension.
Name | History | ||
Name of the instance to create | |||
model | name | slot:enabled | |
ModbusClientBooleanPoint | history:BooleanIntervalHistoryExt | BooleanInt | true |
The difference is tiny but now, the base is the extension itself. (Thus the relative slot path ord of the slot column is independant of the extension name)
Try it yourself !
Here is the file used in the above import example. Download it, try importing it and see the result.