Crimson 3 Symbol animation

Chattahoochee

Member
Join Date
Jun 2011
Location
Georgia
Posts
31
I am using Crimson 3 and I am still learning how to use it.
I have used the primitives when I needed to make a button, panel, etc flash in applications I have created so far but now I would like to use the two "cool fans" in the symbols resource pane but I cannot figure out how to get one to flash on and off to give the look of the fan running. I can do this using logic in the PLC program but I know there has to be a much simpler way to do it using Crimson 3.
I know this is probably a basic question but it's got me stumped.
Thanks.
 
You can use the image object, to cycle through the two images. Then use an expression , for the image selection. Such as FanRunning * (getsec(getnow())%2)

This will give you a modulus of two based on the time in seconds (0 for even, 1 for Odd) Multiplying it by a flag tag will cause it only to cycle when your tag is on. There are other ways to do it, but this is what I would use for a two image rotation
 
Last edited:
You can use the image object, to cycle through the two images. Then use an expression , for the image selection. Such as FanRunning * (getsec(getnow())%2)

This will give you a modulus of two based on the time in seconds (0 for even, 1 for Odd) Multiplying it by a flag tag will cause it only to cycle when your tag is on. There are other ways to do it, but this is what I would use for a two image rotation

If I might offer a slight tweak, I'd use DispCount.0 to update the fan. If this is too fast (it shouldn't be), you can change it to DispCount.1.

DispCount.0 will change the image everytime the display updates and DispCount.1 will update it every two screen updates.

As mentioned above, multipling the result by a tag indicating that the fans is running will only animate the tag when the Fan is ON.
 
I am also learning and have discovered that trigger actions can be recursive ..... which is usefull for cycling values.
If you set up a trigger to fire when the TAG value changes and then in the trigger definition change the TAG itsself you will create a loop that constantly updates once its started.
On top of that trigger actions have a configurable delay so you have a way to set the update freequency.

As was previously pointed out there are many ways to go but I like this one. I tested it with some of the fire graphics and a random statement to pick the value, hence which of the 7 graphics is displayed each time the tag updates.

I can send you the code if you would like to play with it.

Alistair.
 
I am also learning and have discovered that trigger actions can be recursive ..... which is usefull for cycling values.
If you set up a trigger to fire when the TAG value changes and then in the trigger definition change the TAG itsself you will create a loop that constantly updates once its started.
On top of that trigger actions have a configurable delay so you have a way to set the update freequency.

As was previously pointed out there are many ways to go but I like this one. I tested it with some of the fire graphics and a random statement to pick the value, hence which of the 7 graphics is displayed each time the tag updates.

I can send you the code if you would like to play with it.

Alistair.

While the impact may be slight, the benefit of including the logic in the Animated Image rather than in the tag definition is that the logic will only run when the particular display is active.

You can animate multiple images (rather than just 2) using DispCount and the Modolo function, or if you really want to get fancy you can do things in a Complex Function (or call a program) in the Image Select field.
 
I put this in the Fan image complex code dialog box-

TagsPLC1.O_0_0 = 1 * DispCount.0;

I will not have a chance to test it until later. Thanks
 
I am also learning and have discovered that trigger actions can be recursive ..... which is usefull for cycling values.
If you set up a trigger to fire when the TAG value changes and then in the trigger definition change the TAG itsself you will create a loop that constantly updates once its started.
On top of that trigger actions have a configurable delay so you have a way to set the update freequency.

As was previously pointed out there are many ways to go but I like this one. I tested it with some of the fire graphics and a random statement to pick the value, hence which of the 7 graphics is displayed each time the tag updates.

I can send you the code if you would like to play with it.

Alistair.

Yes, I would like to see different ways of doing this with your code, thank you.
 
I put this in the Fan image complex code dialog box-

TagsPLC1.O_0_0 = 1 * DispCount.0;

I will not have a chance to test it until later. Thanks


You can simplify to TagsPLC1.0_0_0 * DispCount.0;

However I would caution you not to use "_any number" at the end of your tagname. This is is reserved internally by C3 and will yield unexpected results if you move tags around. If you want to use the format, add _IN or _OUT or any other letter scheme to the end.
 
You can simplify to TagsPLC1.0_0_0 * DispCount.0;

However I would caution you not to use "_any number" at the end of your tagname. This is is reserved internally by C3 and will yield unexpected results if you move tags around. If you want to use the format, add _IN or _OUT or any other letter scheme to the end.
When I export the data from RSLogix 500 into Crimson 3 it names all the tags this by default I guess.
 
If I might offer a slight tweak, I'd use DispCount.0 to update the fan. If this is too fast (it shouldn't be), you can change it to DispCount.1.

DispCount.0 will change the image everytime the display updates and DispCount.1 will update it every two screen updates.

As mentioned above, multipling the result by a tag indicating that the fans is running will only animate the tag when the Fan is ON.
In the Display state:
I used (DispCount.0)*Tag4 for one image,
and (DispCount.0-1)*Tag4 for the other image, and it looks pretty good.
In the Crimson 3.0 software under Resource Symbols, they were listed as Cool fan (Animation frame1), and Cool fan (Animation frame2)
Thanks

RotatingFan.jpg
 

Similar Topics

From what I read, one is able to add animation behaviour to primitives. When I select a symbol, there is no option to add behaviour. However, I...
Replies
1
Views
2,641
I'm using a SLC 5/05 with a redlion G310. I'm using crimson 3 build 222 to program the G310. My question is when I use a symbol say a pump and I'm...
Replies
3
Views
2,576
Hi all, When selecting an image from the Symbol Library in Crimson 3, you are offered a set of pre-colored symbols, but I cannot find a way to...
Replies
13
Views
6,874
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
149
Hi, I'm having an issue in crimson 3.0 when I create a programme using a case statement referencing a fault word that each bit needs to change the...
Replies
5
Views
298
Back
Top Bottom