Red Lion Cadet G304K2 Question on Buttons

gbradley

Lifetime Supporting Member
Join Date
Apr 2002
Location
Corona, Ca.
Posts
1,637
Red Lion Crimson3.0 buttons
G304K2
The background image changes, and I see that you can Move the text on press.
Is there any way to have the text change when the button is pressed?

TextChange.jpg
 
Red Lion Crimson3.0 buttons
G304K2
The background image changes, and I see that you can Move the text on press.
Is there any way to have the text change when the button is pressed?

Are you asking if the text can be changed while your finger is on the button?
 
Are you asking if the text can be changed while your finger is on the button?
Yes.
When you press the button and hold it in the text is changed to something else.
like my example.
I should have shown a big fat finger on the button in my example. :p
 
Yes.
When you press the button and hold it in the text is changed to something else.
like my example.
I should have shown a big fat finger on the button in my example. :p


I can think of several ways to do it based on how you are using the button.

If you are running a program rather than changing a tag value this will work.

Create a string tag to hold the Button Text. On Pressed set the text to what you want the down text to be, On Released set it back to the default.

If you are toggling a tag value then use the ON State and OFF State values of the tag to be the button data.

There are other ways, give me some direction as to what you are actually trying to do.
 
I can think of several ways to do it based on how you are using the button.... give me some direction as to what you are actually trying to do.
I am trying to make a page look as close as I can to the Panelview component screen that I am replacing.
On the PVComponent you can have different text, and backgrounds and images based on the state of the button.

Momentary.PNG
 
I am trying to make a page look as close as I can to the Panelview component screen that I am replacing.
On the PVComponent you can have different text, and backgrounds and images based on the state of the button.

Thankfully I don't have to mess with A-B stuff often.

As I said, if you can tell me what the particular button is supposed to do, I can tell you how to change the text. Does it run a program, does it download a value, does it toggle a tag, does it change a page?

I would probably create two programs for each button - lets call them OnPressed and OnReleased. Put them in a folder specific to the button so you can copy, paste, and rename the folder for a new button.

The button Action would be User defined. The On Pressed Action would be (for instance) Btn1.OnPressed(). The On Released Action would be Btn1.OnReleased().

Now go to the programs and make the button do what you want it to do including changing the text of a tag named Btn1_Text. That tag will be the Data for the button.

In the Btn1.OnPressed() program you would have a line that is Btn1_Text == "What I want it to say when pressed";

In the Btn1.OnReleased() program you would have a line that is Btn1_Text == "What I want it to say when released";

There are easier ways to do it, but since I don't know what your button will do, I can't zero in on the easiest way, this is just the way that will allow you to:

1. Set a tag to another value
2. Toggle a tag
3. Go to a page
4. etc.

Just by writing code in the programs I showed above. Typically the OnReleased() would just set the Button Text (BTN1_Text) to what you want the button to normally say.

If you want the button to say something different based on the value of the tag you are changing, there is an easier way, but again, I am trying to give you an all inclusive method.
 
Thankfully I don't have to mess with A-B stuff often.

As I said, if you can tell me what the particular button is supposed to do, I can tell you how to change the text. Does it run a program, does it download a value, does it toggle a tag, does it change a page?...
Sorry,
The button turns on a bit (b9[1]) in the PLC (L30ERM) when pressed.
The bit starts a couple of timers that increment a float value up slowly, but increases the rate of change, the longer you hold the button in.
I have another button that decreases the value in the same way.
When I push the button it says "Value increasing".
If I push the other button it says "Value decreasing"
It's not that big of a deal, I just was wondering how to do it so that the HMI looks similar to the previous PVC.
 
Sorry,
The button turns on a bit (b9[1]) in the PLC (L30ERM) when pressed.
The bit starts a couple of timers that increment a float value up slowly, but increases the rate of change, the longer you hold the button in.
I have another button that decreases the value in the same way.
When I push the button it says "Value increasing".
If I push the other button it says "Value decreasing"
It's not that big of a deal, I just was wondering how to do it so that the HMI looks similar to the previous PVC.

That's easy. Create a tag based on the increase bit. For the off state of the tag put the normal button text. For the on state put "Value is increasing" for the button text use =TagName.AsText. The syntax may be a little different depending on your button options.

When you press the button and make the bit true the tag based on it will update and its "AsText" ON state will display on the button.
 
Thanks J,
Works great!
I had a little trouble at first because I was using "=TagName.AsText." with the trailing period.
It didn't like that.
Once I got rid of the period, it was all good. :site:
 

Similar Topics

I have a Red Lion Cadet G304K2 HMI that I want to use to communicate with CompactLogix 1769-L30ERM using Ethernet/IP Is there a tutorial or...
Replies
15
Views
12,382
While they came up quickly with a fix for the alarm date issue quickly I will have to drive around for a week or so, burning up a lot of fuel...
Replies
4
Views
267
From the Red Lion website, after some customer enquiries in the last week or so... Rev. March 25, 2024 [18:30] Just thought it might help a...
Replies
9
Views
279
How do you install update on Red Lion Crimson ver 3.1. Do I just need to run the exe file on the host server?
Replies
1
Views
107
Hello All, I need the ability to remotely reboot a Red Lion CR3000 HMI. Due to some graphics issues when the database is updated the HMI must be...
Replies
4
Views
221
Back
Top Bottom