Thanks for coming into the conversation JHarbin!! I know you are one of the Crimson Guru's on the site.
You may be right. I think in understand what Widgets are for. Basically aren't they just a user primitive? Much like a button or a indicator light ? Is that right?
Where I know I am weak is understanding what Folder Binding and assigning tags does when you create the Widget. It would seem that it would be better to just create the Widget and then add the tags later (if it can be done).
For example: When you pull a primitive into your page (say a indicator light) you get a pop up box that you populate with the Data Source (tag) and so on. Can you make a Widget that when you pull it into a page it will ask you for the data source (tag) for all the elements of the Widget? In my example there were 7 different elements that required tags. So in my thinking I should be able to create the Widget and not assign any tags. Then when I pull in the Widget into my page a pop up comes up asking for my tag for each of the 7 elements of my widget. Does that make any sense? Is that even possible?
Since I put all those tags in a folder what does that give me? I understand I can drag and drop the folder from one DB to another but what advantage does folder binding give you?
I like the Widget, but wish Red Lion would put a video online that explained all this as it is kind of "different" concept in the HMI world. At least in my experience. The manual is very vague on the subject. Kind of wordy if you ask me
Thanks for the help!!
You asked several questions and I can't answer all of them right now - two of my granddaughters are over and I am enjoying GrandPa mode.
However, the difference between regular binding and folder binding is fairly straight-forward.
When you don't use regular binding, you assign the tags manually to a widget by dragging the tag into the data box of the widget. If the widget uses 10tags, you will drag each of 10 tags into the appropriate box in the widget's property page.
With folder binding, you choose bind widget and drag one folder into the widget and it automatically binds all 10 tags to the appropriate widget data tag. This is probably the most important feature of folder binding. I'll give an example below.
I use both based on what I am trying to accomplish. Don't simply limit yourself to showing data values - widgets can have parts that change color, change text, and change the page called based on a button embedded in it.
I have widgets that simply change the color of a graduated rectangle based on which tag is dragged into it. I create pipes and elbows this way and it is very quick and easy to change the colors. There are no data values at all (numeric data) the colors pipes etc. just change. Although I use this in a more complicated way, I once had a customer who wanted the pipe colors to be changed on a dozen or more pages. Since I had used this functionality, when I changed the colors of the tags that were assigned to the widgets, the whole page full of pipes, elbows, tees, etc. changed at one time.
I have other widgets that have complex logic and they use the bound data to make calculations.
Most of my work is process or utilities related so I do a lot of PID work. As I mentioned before, I use widgets with folder binding to display each of the PID loops in my projects.
Here is a truncated list of the tags in my PID folder:
1. General Tag that contains the PID Loop Name - this is used in the Widget to describe the Loop. I call the DESC
2. PV - the Loop Process Value
3. SP - the Loop Setpoint
4. OP - the Loop Output
5. M/A - 0 when Manual - 1 when Auto
6. GAIN - the P component
7. RESET - the I component
8. RATE - The D component
There are others, but this is a good list. Now, the widget will have Definitions configured using these names and then those definitions assigned to Data Primitives, Text Primitives, Color elements, etc as needed. When I bind this folder to the widget, it populates the widget with all the values related to that PID Loop. When I want to do the second one, I simply duplicate the folder, change the registers so that the new folder will look at the registers for a different PID loop in my controller. Then I bind the new folder to a copy of the widget. In my case, I use the same register structure in my controller for PID Loops so I can actually copy 16 or more folders from one project (representing 16 or more PID Loops) to another project and simply change the DESC tag and everything else will be set. I didn't mention it above, but my folder structure also contains the ranges of the engineering units for the PV, SP, and OP so even those are set automatically. That way the valid ranges for SP data entry for example is already set and the operator can't enter an invalid value.
There are many other features of widgets that make them very powerful, but it takes playing with them a little to understand - yes, there doesn't seem to be as much documentation as you might like, but if you follow the manual it will give you a great start.
This has been kind of rambling, but I hope it will simply get you excited about exploring the possibilities that widgets present.
As for me, I wish that there was one function added to widgets. That would be late or runtime binding. That way you could create a whole screen as a widget and then bind it to the appropriate folder every time you loaded it during runtime. As it is, when I want this functionality, I simply duplicate the page, bind it to the appropriate folder and then call it as needed. It just makes it a little more complicated if you want to change the page after creating 10 duplicates, but it's not really all that bad.