Sign in to follow this  
Followers 0
jfls45

Crimson 3 examples

7 posts in this topic

Hello gentlemen, I just started using Crimson 3 with a G315 HMI. I am creating my screens using an existing Rockwell project as a reference. I have some questions about how to create pushbuttons that latch and interlock. I've snooped around Red Lion's website and some Google searches but not much luck finding anything. I'm thinking I may need to put some C code together utilizing the "User Defined" action feature but I am not trained in C programming at all. Doing a Google search for C programming basics or even Syntax leaves me feeling like I could get lost searching for exactly what I need. There's alot of stuff out there and I've already spent enough time rummaging around trying to find what I feel is what I need. Does anyone have any code examples or a .pdf with just the basic C programming information to help me understand. I'm open to any help or suggestions and yes I have been reading and using the Crimson 3 manual. Thanks Jfls45

Share this post


Link to post
Share on other sites
I doubt you'll have to resort to custom code. Red Lion pushbuttons are, in general, much more flexible and powerful than PanelView objects. Describe exactly how you want to combine "toggle" and "interlock" functions. They're generally separate. Toggle is very easy in Crimson; just select the "Pushbutton" action operation and choose "Toggle". An Interlock is also straightforward: select the "Change Value" action operation and specify the value you're writing to a tag. Use the same tag, but different values, on multiple buttons for an "Interlock".

Share this post


Link to post
Share on other sites
I tried the Change Value setting, It doesn't automatically change my PB back to it's off state when I press the next button. For example, I have 10 mechanical adjustments on a piece of machinery. Each adjustment is done in order, when I press the first it changes state but when I press the second it doesn't return to it's original state, each pb remains at its on or changed state after I have pressed all the buttons. Change Value PB's 1-10 each tag is: ManualAdjustSelect[0], ManualAdjustSelect[1]... this arrangment i get the above condition. This is not an interlocking pb. Have a missed something? I was able to do the following: When I set them up as User-defined I created a Complex Expression: This prevented the above condition as stated above. ManualAdjustSelect[0]= 0, ManualAdjustSelect[1]= 0, ManualAdjustSelect[2]= 0, ManualAdjustSelect[4]= 0, ManualAdjustSelect[5]= 0, ManualAdjustSelect[6]= 0, ManualAdjustSelect[7]= 8, I want this pb to send a value of 7 ManualAdjustSelect[8]= 0, ManualAdjustSelect[9]= 0, What I am trying to do is send a value from 1 to 10 that corresponds with what mechanical adjustment I am wanting to make. I need them to be interlocking, there is only one joystick. The HMI is writing to a PLC tag. Should I be adding this code to a change value setup? What I have here prevents more than one pb from sending a value but does it actually send the value when pressed? I need these pushbuttons to work just like the radio station select buttons in your car (or pickup if you can afford the gas) thanks Edited by jfls45

Share this post


Link to post
Share on other sites
Don't use a boolean array; just use an ordinary Numeric Tag that's associated with an ordinary integer in the controller. Each button will write a different value to the same tag. I'll post an example in a moment.

Share this post


Link to post
Share on other sites
This example has ten buttons all using the "Set Value" action to write a different value (1 through 10) to the same Integer tag. Each of the buttons "Show" visibility is tied to the value of that tag, with the general expression "Manual_Adjust_Select != x" as the Visible condition (where X is the state number). The expression "!=" means "not equal to" in Crimson. Each of the buttons has an identically sized gray panel directly behind it (Crimson has a good "forward/back/background/foreground Arrangement command), so that when the button is hidden the gray panel takes its place. This is as similar as I could get to the "radio buttons" on a car radio. State zero is equal to none of them being pressed, though you could easily make them States 1 through 10 instead of 0 through 10. The file is a Zipped *.CD3 file created in Crimson 3 build 502.001. Interlock_PBs.zip

Share this post


Link to post
Share on other sites
Ok, thanks for putting this together for me. I am curious though, what is the advantage vs disadvantage of doing it either way. With my way there is only one button to create. I am also writing to a data tag which its source tag is from the PLC (via L5K). thanks for your help, I am trying to learn as much as I can. Not just learn it but understand it as well.

Share this post


Link to post
Share on other sites
I'm not entirely sure what "your way" is; you explained it but it hasn't sunk in to me how the array type tag and pushbutton are working together. If you zip and post the Crimson 3 file I'd take a look. When I'm faced with either making ten simple objects and editing each one, or creating a complicated object I can cut-and-paste, I'm going to take the brute force approach most of the time, especially if I think it's going to be easier for a future user to diagnose. I used an internal Red Lion database tag just because I didn't have a PLC connected; in the real world you'd use a tag with a PLC address associated with it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0