SystemLink Forum

cancel
Showing results for 
Search instead for 
Did you mean: 

How to properly use tags

Solved!
Go to solution

Hello, this might be a very simple question but I need to clarify when I should create, write, read and delete tags in order to use them properly.

I will have in my application several machines that have a cRIO-9030. These machines will be running and I would like to monitor several properties of them using skyline tags.

Let's say I would like to monitor the battery level of 10 machines at all times.
My questions are what do I do with the tags in different situations?

 

  1. All of the machines are off and we turn them on
  2. 1 of the machines goes into maintenance and It will be turned off and on several times
  3. One of the machines ran out of battery

1) Do I create, for example a tag for Battery_level_machine_01 and constantly write to it to keep it updated?

2) Do I delete the tag and then create it again when the machine turns on?

3) If the machine ran out of battery and did not have time to delete the tag, what happens when I create a tag that already exists?

 

In general, when and where should I create and delete a tag?

What I mean is, should I create the tags in the labview program running on the cRIO or should I create them from before hand in the server using the web application?

 

Also if I have 10 machines that will generate a tag called "Battery_Level", how do I know which belongs to which machine? Is there a way of grouping them by targets?

 

What happens with the tags if the server goes down?

0 Kudos
Message 1 of 3
(4,073 Views)

I recommend prepending the minion ID, which is a unique identifier for a system to the tag path.  I have a VI called Create Tag Path on my github repository at https://github.com/joshuaprewitt/tag-utils that you can use.  

 

In addition, to prepending the minion ID it also adds the top level VI name to the path to make it easy to distinguish between tags coming from different applications, which will be useful in the future when we add alarms and templates for dashboards.

0 Kudos
Message 2 of 3
(4,034 Views)
Solution
Accepted by topic author RaulPerez

Regarding your other questions, I would have the targets create the tags every time your application starts.  It is perfectly fine if they already exist, so there is no need to delete them and there is no need to create them in advanced.

 

I would recommend periodically publishing the data instead of publishing it just once.  This will increment the last updated timestamp, which is used by some clients like Dashboards.  When you create a dashboard you can specify the "Age of stale data", which will add a yellow border around the control if the data is older than that.

 

Screen Shot 2018-01-09 at 11.54.11 AM.png

 

In the future we will have a tag historian, and the historical data will be deleted anytime you delete the tag.  If you want the historical data to persist, then I wouldn't recommend deleting the tag everytime the application starts or stops.

0 Kudos
Message 3 of 3
(4,029 Views)