FIN Watcher

FIN Watcher

The FIN Watcher was created so OEM's or Developers use this extension to do things based on a new tag getting added. What the FIN Watcher does is run in the background and look to see what new unique tags have been added on equipment. We also created the ability to run a function when a new tag is added.

As an example: when the brandAhu tag is added to any equipment a function is called which goes and finds a zip file that has points, tags and programs in it. Once the function is ran, it automatically creates the points, and the programs on the piece of equipment that got the brandAhu tag.

Another functionality of this extension is to collect information regarding the boolean points changing values. This means that once this extension is enabled the user will get on boolean points 2 new property tags that will specify the number of times the point has been turned on and the total period of time for which the point was on.

This feature is for developers only, we do not suggest someone else using this feature unless you are a developer.

How to use FIN Watcher?

To use FIN Watcher functions, the user must first enable the extension in the Settings App.

As we said before this extension has 2 different functionalists that the user can use:

  1. watch all the equips that get a special tag so that then it can add all the files stored inside the specified zip
  2. collect information about the boolean points changing values

Watching function

Once the extension is enabled, the user can go inside the Folio app, under Files and there is going to be a default zip file for demo purposes.

The tags that are set on the zip are important, because they represent different things:

  • finWatcherCallback: this enables the function to call this zip out
  • finWatcherCallbackOn : this will set the actual tag that will trigger the function ( in our example it'a a marker called vavMyTest)
  • func: this tag says this is a function
  • name: this gives the name of the function
  • src: it;s the actual function

If the users wants to use a custom made zip, first step is to upload it. To do that the Upload button will be selected an a browsing window will pop up to chose the desired file for upload. Once this is done, the user will select the file and hit edit. A new menu will appear in the right side of the window showing all tags on the file. The user needs to add the following tags:

  • finWatcherCallback: marker tag
  • finWatcherCallbackOn : property string tag - in the value field the user needs to put in the trigger of the function. In our example we have a marker defined like this: vavMyTest ==marker()
  • func: marker tag
  • name: property string tag - in the value filed the user will name the function
  • src: property string tag - in the value filed the user needs to copy paste the actual function (to do so the user can select the existing demo zip called standardFinWatcher and copy paste the information from this field to the new zip)

 

Then the user can set the frequency of the watcher, by typing inside Folio-> Axon: finWatcherFreq

To change the default freq from 49 seconds, the user will just hit Edit and in the menu in the right the desired value will be entered.

For the new change to apply the user must, stop and restart the extension in the settings app.

Once this has been done, every 10 seconds the Watcher function will be called to look after the set tag. Once it finds the tag, it will add all the points, tags and bline programs that are inside the zip file.

An example the function working would be:

  1. The user selects an equip and adds the vavMyTest tag to it



  2. Once the watcher function gets the new tag, it will add all the new tags, points and bline programs that are stored inside the zip file





And this is the first functionality of the FIN Watcher.

 

 

 

"How to setup FINWatcher" quick step-by-step summary

FIN Watcher  - How to make a custom template and run the finWatcher function on it

1. Make a template equip (add graphics/tags/bLine or anything else you want to be saved in the template)

2. Save and download template equip as a file - In DB Builder, select your equip, expand the “Template” drop down and hit save

3. Enable FIN Watcher - go to the settings app, locate FIN Watcher and enable it

4. Upload your template file - go to folio, switch over to “files” view (found in the top menu), and hit “upload” to upload your template file.

5. Convert your template file into a function - select your File from the folio list and hit “edit”. Add a marker tag named “func” this will convert the identity of the file to be recognized as a function

6. Add necessary FIN Watcher tags to the template file - while in the edit panel for the file, add the following tags:

       (Property Tags) (Add the following tags as strings)

  • finWatcherCallbackOn : the value entered will set the actual tag that will trigger the function heres an example format: vavHeat == marker() 
  • name: the value entered into this property will determine the name of the function 
  • src: leave the value of this property blank. This will be filled out in a later step 

        (Marker Tag)

  • finWatcherCallback: this enables the function to call out the template file

7. Set up your new function - go to the functions app in finstack, refer to the default function that got added when FINWatcher was enabled, copy and paste the function code into your new function

8. Create an equip & tag it - In the DB builder create an equip and give it the tag that you designated to be the "finWatcherCallbackOn"

(optional)

9. Adjust the frequency of the FIN Watcher - go to folio and adjust your finWatcherFreq  (this determines how often the fin watcher will run) Defaulted  at 59 Seconds