Red Lion flashing indicator

JeffKiper

Lifetime Supporting Member + Moderator
Join Date
Jun 2006
Location
Indiana
Posts
2,460
OK guys how do I make a indicator flash is a flag is 1 and not 0?
I can do it with a tag in the PLC but I would like to have a cleaner way to do it. I am sure there is a simple way to do this.
 
Note: This example was created by first setting up the Tag Format as Two-State and assigning Text for the On State and Off State, and setting up the default colors for the tag.

Then I just drag and drop it on screen, bump the font size around and align it, then drill into the tag settings. On the Data Tab, I check all the Get From Tag options.

And the Magik okkurs on the Figure Tab:

Crimson 3 Flashing Multistate Indicator.png
 
Last edited:
Are you wanting to flash an indicator from the Primitives menu?
I have done this before but that was in C2 in fact I think found a example of how to do this on RedLions website they have some samples you can download
 
Yes I do want to flash a indicator primitive.
Paul that is a cool idea. I will have to keep this in the back of my mind.
 
If you want the whole object to blink, then you can use the Visible Property:

Hey Kool, I just figured out I can put a comment in the field after the system Flash function...

Works Perfekt in the emulator...the whole group flashes twice a second...

Crimson 3 Blinking Group.png
 
Last edited:
You pointed me in the right direction. I used 2 images.
1st was the image off state image of an indicator. 2nd was the on state with a little bit of code "if (Tag1)return Flash(2);"
So when my E-Stop is not active I get the first image. When it is active I get the first and second alternating. Is there a better way to do this?
 
I know this is old, but it came up when I was looking to do this. The way I was able to pull this off was to just use the system clock with Complex Code.
If you use "return GetSec(GetNow())%2;" and put your tag in there then it will blink once a second to the system clock. From there you could include the original indicator to get something like "return GetSec(GetNow())%2&&yourBoolTag;" Unfortunately, the fastest blink rate is one second as they don't have a GetMilisec() function.
 
If it is flashing acceptably close to a .5Hz 50% duty cycle using the low bit of that second-of-minute integer, then is Red Lion running this code at a dozen Hz or more?

In which case it might be possible to calibrate the mean cycle time and use a counter to get it to flash at 1Hz or better; it won't be millisecond accuracy, but it might be good enough.
 
I was not able to see the above images as I was not logged in when I first found this page. It looks like OkiePC has the best solution with Flash(), so "return Flash(1)&&yourBoolTag;" will do the same thing as "return GetSec(GetNow())%2&&yourBoolTag;". The difference is Flash() requires an int, so it cant go slower than once/second while the GetSec() method can only go slower than once/second.
 
Or you can use the DispCount system variable, something like this:
Code:
yourBoolTag && DispCount.3
The lower the number given with DispCount the faster the flash.
 

Similar Topics

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
265
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
219
I'm trying to use a Red Lion Cub counter (Cub5B00) as a counter and give the cub's counts to a Graphite G12 PLC/HMI to display. After about an...
Replies
1
Views
111
Back
Top Bottom