Redlion complex code

yaldrim

Member
Join Date
Nov 2015
Location
Lahore
Posts
9
hi,

I am new to Redlion Crimson Software and I making a customize faceplate for PID. I have placed two buttons one for Auto and one for Manual.
I want that when it put it in Auto or Manual mode, there should be indication of auto or manual in Alphabets.

Regards,
 
hi,

I am new to Redlion Crimson Software and I making a customize faceplate for PID. I have placed two buttons one for Auto and one for Manual.
I want that when it put it in Auto or Manual mode, there should be indication of auto or manual in Alphabets.

Regards,


yaldrim,

In the show tab of each of your buttons, there's a display state; visible.

In that text box input "[tag or condition] != 1" for the Auto and Manual buttons to show only when your condition is true and it will hide the others when not.

K
 
If you want to change text on the screen, then use a multi-state integer tag. Put your state text (Auto, Manual) into the tag Format tab.

On your display page, use the Text Box with the following expression for your text
Code:
=PIDstatusTag.AsText

Then just use your push buttons to change the value of that integer tag.
The multi-state format in Red Lion is very useful!
 
If you want your "faceplate" to be used with multiple instances, have a peek at Widgets. it took me some time and head scratching to figure out how to properly set up a Widget, but now I use them quite a bit.

If you create a widget with folder binding enabled, and your tags follow some sort of consistent naming strategy, you can re-use one faceplate for any number of PID loops each with its own tags.

Some caveats for Widgets: If you use the tag properties for things like colrs, units and text within the widget, those data elements might get broken when the "widgetizing" gts done. A workaround is to make more data inputs to the widget to populate elements within the tags that are used by the widget. A simpler way is to uncheck the properties of the items' color, format, label and the fields will be automatically populated with fixed copies of those values from whatever tag you started with. Then you can widgetize and the formatting borrowed from the tag will still be there as constants inside the widget when it is done.

A completely different way to make one page or faceplate that can be used with mutiple instances is to use array tags and have a tag used for the index inside the elements. This means building your tag structure differently, but could end up being better suited to applications that have more than a few instances. The advantage here would be that your faceplate is global. One group of objects or a page that you can tweak that simply share a tag for a pointer to arrays of tags.

With Widgets, if you have three pages (or twenty) that use a copy of the widget, then you decide you want it to have a different text size or move something, you have to go back and update all of them. This could be an advantage if you wanted to be able to have them be individually customized, and even if you want them all uniform, it is very easy to copy and paste and bind the folders to make the changes across a few copies.
 
Last edited:
Widget example with folder binding.

The attached example has a widget called HOA. It writes to a tag that is presently internal, but could easily be mapped to a PLC address.
0=Off, 1=Manual, 2=Auto.

I use the colors of the buttons' edges to show whether they are depressed or not. That wasn't good enough for some of my little G304K2 applications so I also put a red "LED" symbol next to the button which is active.

If you need to have a two position selector, it is pretty simple to drill in and blow away the Auto mode or even change the widget definition to use a flag tag (bit) instead of an integer.

Hope this helps. And let me know if the Widget source shows up and works correctly. I have my doubts as to where the widgets are actually stored. There are actually three widgets that show up when I download and open the zipped file, but is that because they exist in my installation of Crimson or the cd3 file?
 
Last edited:

Similar Topics

I have a bevel button on a crimson 3 G15 panel. I am trying to use the 2 state color animation to change button colors based on tag data. I have...
Replies
5
Views
4,943
Hiya - I've got a mitsi plc and I'm using a redlion graphite to display some values and enter data etc.. I have been trying to use the complex...
Replies
4
Views
1,843
Hi, I got a question for those who know a bit more about the RedLions than I do. Can you create a Data Log on a Complex Data Tag? I've got a...
Replies
3
Views
4,110
Hey guys, hoping someone here could give me a little advice. I'm working with a CR1000-04000 in Crimson 3.1 and I was interested in adding the...
Replies
4
Views
117
Hi, I have a complex database in Crimson 3.0 and in one of the display pages I am trying to get a tag to show the sum of several other tags. The...
Replies
3
Views
167
Back
Top Bottom