Introduction
The Excel tool can be used to create links between the current component (defined in a line) and other components. The link can be created on both directions.
The direction accepts two values: inLink or outLink (the prefix is mandatory).
- from the component in the row sourceSlot to the components in the cell targetSlot if the direction is outLink
- from the component in the cell sourceSlot to the component in the row targetSlot if the direction is inLink
You can create multiple links to different components with the same target and source slots, just put the components separated by a semicolon in the cell.
Example
In the following example, two links are defined for the 4 points.
For the first link, the source component (source because it's a inLink) is defined with 4 different syntaxes:
- With an id (A schedule is created before with the id #Level1_Schedule)
- With a variable (its a path $Level1SchedulePath=slot:/Drivers/Level$201$20schedule)
- A relative ord (very handy when you need to create relative logic with the Excel)
- An absolute path.
For the second link, the target component (target because it's a outLink), we demonstrate how to define multiple targets, just by separating with ;
Below, shows the 4 links created from the first column
Columns syntax
Add a column called "Links", then define a subcolumn per link following this syntax:
direction:sourceSlotName:targetSlotName Example: inLink:out:in10
Try it yourself !
Here is the file used in the above import example. Download it, try importing it and see the result. You won't be able to import all the links in the second column in the first import. After the first import you must set the in9 slots in BuildingCmdSynthesis and Level1CmdSynthesis to fan-in.
Use relative paths
Instead of the sourceSlotName or the targetSlotName, you can put a relative slotPath to a slot
Example:
Internal id | Base | Template | Name | Links |
Id to reuse the component. Use # | Reference where the component will be created | Template name(include subpath if needed) | Name of the instance to create | Define link endpoint and slots |
outLink:NumericWritable/out:NumericWritable/in10 | ||||
#MySource | /Drivers | MySource | slot:Drivers/MyTarget |
Will create a link from Drivers/MySource/NumericWritable/out to Drivers/MyTarget/NumericWritable/out
Try it yourself !
Here is a file similar to the previous one.
There are two differences:
- we removed one link from the "inLink:out:in10" subColumn
- we created a new link subColumn "inLink:out:points/Valve$20command$201/in10" and added one link
Although those links seem different, if you import this file, you will have the same result as with the previous file.
Let's analyse the deleted link in the cell F9 (the value was #Level1_Schedule) :
- inLink: the link comes comes from the component in the cell (Level1_Schedule)
- out: the link comes from the slot out from the component in the cell
- in10: the link will go to the component in the line (Valve command 1) and will be linked to the slot in10
Let's analyse the new link in the cell H6:
- inLink: the link comes comes from the component in the cell (Level1_Schedule)
- out: the link comes from the slot out from the component in the cell
- points/Valve$20command$201/in10: the link will not go directly to the component in the line (ModbusTcpDevice), instead it will go to ModbusTcpDevice/points/Valve command 1 and will be linked to the slot in10
So in the end we have the same link
Create Links in subComponents
If your're not familiar witht the alarm, history or subComponent Column, please browse the dedicated documentation first (Set alarm extensions, Set history extensions, Add SubComponent)
You can also use a subColumn to create links on a subComponent, an alarm extension or a history extension. The rules are the same as above but instead of using the component of the row as a base, it will use the subComponent.
Example
subcomponent:MyColumnName | ||
Create/update a subComponent | ||
model | name | outLink:NumericWritable/out:NumericWritable/in10 |
Accepted values
Id
Variable
Relative slot path
Absolute slot path
If the relative path goes all the way back to the station, we will encode the path using a lower priority encoding method (here an Absolute SlotPath)