Crimson 3 Widget help

Bullzi

Lifetime Supporting Member
Join Date
Jun 2012
Location
Colorado
Posts
1,530
Happy New Year to everyone!!

Since it is slow this time of year for me I decided to learn Widgets. I have a couple of screens that I build and use many times, I figured Widgets would be way easier than copying screens from one file to the other.

A couple of years ago I asked about this and JeffKiper supplied the attached PDF with good instructions on how to create a widget. I followed his instructions and created a widget and blinded it to a folder like the instructions said. That file is attached.

Here is where things are a little fussy for me: If I start a new Crimson Database and pull the Widget I created into a new screen, shouldn't the folder with the tags be created in my new project? I ask because it doesn't happen for me when I do that. I understand that I will have to modify the tag Data Source to fit the PLC that I am using but shouldn't the tags already be there? Any idea what I might have done wrong?

Thanks for any help you can provide!!
 
I figured that is what I needed to do. If I have to create the folder and tags each time then what is the purpose of folder binding and adding tags to the widget? It seems like there is something I am missing.

Without Crimson creating the tags and folder about the only time a widget saves is the drawing time. While that will save me some time, going back and forth to remember what tags to create could be a pain.
 
Well technically your widget will require the same tags every time. For example if you had a HOA widget I would just create one folder with the proper tag structure then export the tag database to excel and copy/edit folders for each HOA that I need, import back into crimson then bind the folders to each instance of the widget.
 
Thanks Matt,
I didn't know I could export the tags. I just learned something new.

I still think that it would be KILLER if Crimson would create the tags and folder automatically when you pull the Widget into your project.
 
Thanks Matt,
I didn't know I could export the tags. I just learned something new.

I still think that it would be KILLER if Crimson would create the tags and folder automatically when you pull the Widget into your project.

You can drag the folder from one instance of Crimson to another.

It seems as though you are thinking of Widgets differently than the purpose they were designed for. A Widget is designed to support many different tag groups that have the same structure. For instance I have a Loop Faceplate Widget to support a dozen or more PID tag groups (folders). If I copy the widget from one project to another, I still need 12 instances of the widget that need to be bound to the correct PID folder.

If you have exact duplicates from one project to another, just copy 12 tag folders over, copy one widget, duplicate the widget, and then bind the tag folder to the correct widget. It really is that easy.
 
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!!
 
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.
 
Thanks JHarbin!!

I have been playing around with widgets for a couple days now and the concept is starting to sink in.

I read your last post and then created another widget. With your explanation and some practice I think I understand what is going on.

Thanks for the help!!
 
The one thing that would be great for widgets would be if they would update all instances when a change is made
For example if I have 10 of the same widget in a project and I make a change change to that widget it would be great if that change was replicated in all 10 instances
 
Yea me too. Kind of like a Block in AutoCAD.

Another thing I would like is when you bring in a Widget into a page that the font will auto scale to fit the screen.

If I make the widget on a G09 and then pull it into a G306 the text font is usually to big and has to be modified to fit the object. If it would do that on its own that would be good.
 
There is a way to globally change text size and style on all screens. I believe you can even tell it to search out a certain style and size and change it to another. can't remeber off the top of my head where the option is though.
 
Yea me too. Kind of like a Block in AutoCAD.

Another thing I would like is when you bring in a Widget into a page that the font will auto scale to fit the screen.

If I make the widget on a G09 and then pull it into a G306 the text font is usually to big and has to be modified to fit the object. If it would do that on its own that would be good.

Personally, I don't like auto scaling, so I don't think this would help me, but let me make a suggestion.

Use the Save Conversion feature of Crimson 3.0 to convert the G309 project with the widget you want to use to a G306 project. Then drag the widget to your new project.

You might not like the results, but I suspect they will be the same as you would get with auto scale.
 

Similar Topics

Hi everyone, I am using Crimson 3.0 to edit a project file created by a vendor. I have created a widget, and spent some time figuring out that...
Replies
4
Views
1,852
Does anyone know how to link an element of an array tag to a widget? My current widget needs to use the array element tag's .AsText property and...
Replies
2
Views
1,322
Good morning, I have built a widget and when I use the smart duplicate feature on that widget, it just copies the previous widget and does not...
Replies
1
Views
1,897
I created a widget with several numerical display primitives. I want the user to be able to tap the widget, which will then show a popup screen...
Replies
0
Views
2,151
I have created a widget with folder binding enabled. The widget also has an associated action. The action is : change value, data=tag1 to write...
Replies
12
Views
6,330
Back
Top Bottom