Crimson 3.0 expression question

KNeland

Member
Join Date
May 2010
Location
Boise, Idaho
Posts
87
I am not experienced with the C+ style expressions utilized in crimson. I understand logic....and, or, nor...all that, but have no experience with the syntax. For now I am experimenting with making an image (in this case some piping) only visible when two different toggle switches are actuated. I was able to make the piping "appear" when I used a push button to "turn on" a tag I associated with said piping. I recognize that I can put a simple if, or equal to statement in the visibility field of the piping then it would work as I want(I think) The manual is very indepth and useful, but alot to digest quickly when not familiar with red lion stuff.
Any advice would be appreciated, as I find a few good examples tend to lead me in the right direction.

Thanks
 
You dont need to use the programming (thats a bit overkill) to make a line visible if 2 toggle switches are actuated, there is an easier way just using tags and in the line properties (cant remember the wording as at home and havent used it for a while) theres some sort of show option
 
Ahh...true

Being new to this software I am marveling at how truly versatile it is and the super sweet functionality of the RedLion stuff....My situation dictates that I am unable for the time being to connect the HMI to the actual PLC's that we'll be implementing, so I am simulating the different discrete states with switches that I am tagging. My boss mentioned (shooting from the hip) that when one particular combination of tanks+process is chosen by the operator, he would like to see that piping shown in an overall general display of the floor and such...I am utilizing the "visible" field in the object to make it visible, as you mention....but in this case I want it visible when one or more "tags" are true(picked by the operator). My limited experience shows me that the "visible" aspect of the object can be bound to a tag but I am using the expression to bind the visibility to several tags being true. There are more ways to do this, but I have to wade through to find the most elegant.

That being said....since my original post, I figured out an expression requiring 2(or more) tags to be true thereby making the object visible...and it works.

When the PLC is connected, it will be a case of if this and that are working then the screen will show the tube between those two things on the screen.

I have only been exposed to the RedLion and Crimson stuff for a few days now, and though it is a bit slow going I love the stuff!
 
How many tags to make it visible ?

Are they AND or OR scenarios ?

You can have a tag expression (in Tags - Cant remember again the full way to do it as at home) to group multiple tags

Doing it with a program is by no means wrong, there are many ways to do the same thing in crimson. Just make sure the programs only called when needed !

I'm sure someone here will post some examples who have C3 in front of them....

Have you looked at the sample programs on the RL website (they were C2, not sure if hey have C3 ones there as well yet)
 
Last edited:
Attached is a zip file example for you, using the display state property.

The top section is grouped, and will display with SW1 and SW2
The bottom section is individually hidden with display state set to SW1 and SW2 and Not SW3

Both have an or statement "||" if SW4 is true to display.

I wasn't able to test this in the simluator, but it should get you close.
 

Similar Topics

Has anyone ever used an expression to dynamically choose the server type and address at runtime? For all other e mail setup parameters I've done...
Replies
1
Views
1,352
Hello all, Does anyone know how I could have a numeric entry primitive object, take the operator input and multiply by 100. How could I write an...
Replies
6
Views
1,935
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
114
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
4
Views
189
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
106
Back
Top Bottom