# Information Hub

**URL:** <https://forum.inductiveautomation.com/t/information-hub/55485>\
**Category:** Ignition\
**Created:** [January 28, 2022, 1:27pm UTC](https://forum.inductiveautomation.com/t/information-hub/55485 "2022-01-28T13:27:10Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![yago.braga](https://avatars.discourse-cdn.com/v4/letter/y/dc4da7/32.png) [@yago.braga](https://forum.inductiveautomation.com/u/yago.braga)\
**Post date:** [January 28, 2022, 1:27pm UTC](https://forum.inductiveautomation.com/t/information-hub/55485/1 "2022-01-28T13:27:10Z")

</div>

Good morning,

I would like to a help  
I need to create a drawing that groups the status of 5 devices, as the status of any of them changes the color of the drawing is changed. I even created a script that groups the information of the 5, but I couldn’t make this script update every 3 seconds, because the script is linked to the drawing. How can I do this ? Would there be an easier way?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 28, 2022, 1:31pm UTC](https://forum.inductiveautomation.com/t/information-hub/55485/2 "2022-01-28T13:31:23Z")

</div>

Ignition version? Vision or Perspective? What do you mean by “drawing” ? AutoCAD?

Please show the script you tried. (Use the preformatted text button to make the posted code show indents and color coding.)

Do you have a mock-up of what you want it to look like?

---

<div class="post-metadata">

**Author:** ![yago.braga](https://avatars.discourse-cdn.com/v4/letter/y/dc4da7/32.png) [@yago.braga](https://forum.inductiveautomation.com/u/yago.braga)\
**Post date:** [January 28, 2022, 4:35pm UTC](https://forum.inductiveautomation.com/t/information-hub/55485/3 "2022-01-28T16:35:51Z")

</div>

I’m using Ignition Platform 8.1.7, developing in Vision, when I commented on drawing I was referring to the template.  
Below is the description of how it was implemented.  
I created a template of a device with the parameter called ‘Area’ and I am using a Window with the name of ‘Home’.  
Inside the template I have a parameter called Status, where this parameter is linked to a Tag.  
I need to link several tags to a single parameter.  
In Home(Window ) I fill the Area parameter with the route of the group of tags that will be linked to this template, example: **‘[default]Area\_28\_Validacao/SubArea’** and inside the template I have an expression inside another variable. Ex: **runScript(‘AtualizacaoHome.AtualizacaoStatusHome(’+{RoloMotor\_Vertical\_EspecialInverdo\_Validacao.Area}+’)’,0)**  
Which makes the call from a script.  
And in the script I scan the path that was passed in the Area tag and see the status of each variable.  
The problem is that I couldn’t get the script to run every 3 seconds, because each template will call the script by passing a different parameter.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 28, 2022, 4:58pm UTC](https://forum.inductiveautomation.com/t/information-hub/55485/4 "2022-01-28T16:58:06Z")

</div>

You shouldn’t be using a script for this. What you need is indirect binding within the template. Use a string parameter to the template that will contain the tag folder for “Area”. Then, where the template needs specific tags in that folder, you indirect bind to `{1}/rest/of/path/to/tag`. The `{1}` gets the pointer to the template parameter.

See this lesson from Inductive University:

> **[Indirect Tag Binding - Tag Bindings in Vision](https://inductiveuniversity.com/video/indirect-tag-binding/8.1?r=%2Fvideo%2Fsearch%2F?q=indirect%20tag%20binding&checked_topics=)**
>
> Indirect Tag Binding: An indirect Tag binding is very much like a standard Tag binding, except that you may introduce any number of indirection parameters to build a Tag path dynamically in the runtime. Learn more about Tag Bindings in Vision

---

<div class="post-metadata">

**Author:** ![yago.braga](https://avatars.discourse-cdn.com/v4/letter/y/dc4da7/32.png) [@yago.braga](https://forum.inductiveautomation.com/u/yago.braga)\
**Post date:** [January 28, 2022, 5:08pm UTC](https://forum.inductiveautomation.com/t/information-hub/55485/5 "2022-01-28T17:08:57Z")

</div>

Thanks for the answer,  
But that doesn’t suit me, because I’ll have several tags for the same object.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 28, 2022, 5:15pm UTC](https://forum.inductiveautomation.com/t/information-hub/55485/6 "2022-01-28T17:15:15Z")

</div>

Then use another substitution item in the tag binding. Or mock up what you want it to look like so we can understand the problem.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [January 28, 2022, 5:39pm UTC](https://forum.inductiveautomation.com/t/information-hub/55485/7 "2022-01-28T17:39:34Z")

</div>

> [@yago.braga](#):
>
> But that doesn’t suit me, because I’ll have several tags for the same object.

Why does having several tags negate the suggestion of Indirect Binding? They share the Area parameter correct?

---

<div class="post-metadata">

**Author:** ![yago.braga](https://avatars.discourse-cdn.com/v4/letter/y/dc4da7/32.png) [@yago.braga](https://forum.inductiveautomation.com/u/yago.braga)\
**Post date:** [January 31, 2022, 1:57pm UTC](https://forum.inductiveautomation.com/t/information-hub/55485/8 "2022-01-31T13:57:35Z")

</div>

Hi,

I made an illustration to better exemplify my question.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/2/92299ef3064b55a60e1445a59cede9e8203d10cc.png)

As can be seen in the illustration, I have a single template to represent several engines at the same time.

If any of the 5 engines fails, the fault will be indicated by the same tample, I will not have a template for each engine, but a single one that gathered all the information at the same time. I’m doing this because I have more than 600 engines in the plant and I have to show them all in a single window, where that window will represent the whole system.

---

<div class="post-metadata">

**Author:** ![yago.braga](https://avatars.discourse-cdn.com/v4/letter/y/dc4da7/32.png) [@yago.braga](https://forum.inductiveautomation.com/u/yago.braga)\
**Post date:** [January 31, 2022, 1:58pm UTC](https://forum.inductiveautomation.com/t/information-hub/55485/9 "2022-01-31T13:58:42Z")

</div>

Another point is that the template changes color according to the fault

---

<div class="post-metadata">

**Author:** ![yago.braga](https://avatars.discourse-cdn.com/v4/letter/y/dc4da7/32.png) [@yago.braga](https://forum.inductiveautomation.com/u/yago.braga)\
**Post date:** [January 31, 2022, 2:02pm UTC](https://forum.inductiveautomation.com/t/information-hub/55485/10 "2022-01-31T14:02:01Z")

</div>

It didn’t work using an indirect tag, because the tag indirectly I will use the template and each engine must be identified by a unique design, which is also not for my case.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [January 31, 2022, 2:13pm UTC](https://forum.inductiveautomation.com/t/information-hub/55485/11 "2022-01-31T14:13:35Z")

</div>

Do the 5 motors per template, have any part of their path shared?

---

<div class="post-metadata">

**Author:** ![yago.braga](https://avatars.discourse-cdn.com/v4/letter/y/dc4da7/32.png) [@yago.braga](https://forum.inductiveautomation.com/u/yago.braga)\
**Post date:** [January 31, 2022, 2:17pm UTC](https://forum.inductiveautomation.com/t/information-hub/55485/12 "2022-01-31T14:17:29Z")

</div>

Only belong to the same division subgroup, but work independently

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [January 31, 2022, 2:23pm UTC](https://forum.inductiveautomation.com/t/information-hub/55485/13 "2022-01-31T14:23:33Z")

</div>

Sorry, I don’t understand your tag organization, can you provide an example of what the path for two motors looks like?

---

<div class="post-metadata">

**Author:** ![yago.braga](https://avatars.discourse-cdn.com/v4/letter/y/dc4da7/32.png) [@yago.braga](https://forum.inductiveautomation.com/u/yago.braga)\
**Post date:** [January 31, 2022, 2:29pm UTC](https://forum.inductiveautomation.com/t/information-hub/55485/14 "2022-01-31T14:29:41Z")

</div>

Sure,  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/b/9bdf397921b9050b517ea132ad21db197aecd4fb.png)

As can be seen in the image, the ‘Area\_28’ is an area where the engines are located, the ‘SubArea’ is the group to which each engine belongs.  
Each area is formed by several subgroups and each subgroup will have only one template

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [January 31, 2022, 2:55pm UTC](https://forum.inductiveautomation.com/t/information-hub/55485/15 "2022-01-31T14:55:34Z")

</div>

So, in your template, you would create a string parameter, which you would pass the string of the Area you want the template to use.

You would then make an Internal Property for each motor status. These would all have an indirect binding where you substitute the Area parameter into the path.

`{0}/SubArea/RM1` for example.

Then use an expression binding for the template color that looks at the Internal Properties.

Perhaps something like:

```auto
case(binEnc(motor1,motor2,motor3,motor4,motor5),0,toColor("#000000"),1,toColor("#FF0000"),toColor("#00FF00")

```

I see no reason why a combination of indirect bindings and expressions can not do what you’re trying to do.

---

<div class="post-metadata">

**Author:** ![leonardo.godoi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/leonardo.godoi/32/27178_2.png) [@leonardo.godoi](https://forum.inductiveautomation.com/u/leonardo.godoi)\
**Post date:** [January 31, 2022, 5:01pm UTC](https://forum.inductiveautomation.com/t/information-hub/55485/16 "2022-01-31T17:01:24Z")

</div>

If you just want to update every 3 seconds, you could use the timer component inside your template, but it’ll be more of a gambiarra, really. If you’re going to use scripts, your time will be better spent using a script that just runs once to build your tag path for the template then you use indirect bindings for the rest of what you need, this’ll be faster, easier to implement and debug, but this seems to be the case where scripts aren’t really needed.  
Generally when you want something to periodically updated you use bindings and expressions and if you want something more complex, doesn’t need to run often or you can’t really do with expressions, then you proceed to solve it with scripts. At least that’s how i see it
