Redlion HMI Crimson 3.0-complex code-2 state color control

tmadore

Member
Join Date
Jan 2016
Location
Connecticut
Posts
12
I have a bevel button on a crimson 3 G15 panel. I am trying to use the 2 state color animation to change button colors based on tag data.
I have two flag bits which I need to control the 2 state color.

basically I have 2 buttons which control the direction of a conveyor belt as well as turn it on, and an off button which turns the conveyor off.

One bit A turns the conveyor on and the other bit B controls the direction.
I wish to color the direction button only if the conveyor is powered and going in that direction.

I cannot seem to figure out how to change the color of the button with the logic from two data bits.
I have tried nested if statements but I keep getting "not enough arguments"

Any ideas would be appreciated.
 
You can use logical operators with the tag values in the color fields. You don't need to use any complex code.

As an example, in the 'figure' tab:

Face format

- Pattern: solid color
- Color 1: 2 state
- Select your on and off colors
- Value: General
- Type your two tag values in there, example for tags named 'BIT_A' and 'BIT_B', the expression would be (BIT_A&BIT_B)==1

Your ON color will only be shown when both those bits are on.

P.S. You don't need the parentheses, I just like to group operations.

Hope that helps..
 
Last edited:
Here is an example using 4 state coloring.

Run this in your emulator and pick apart the file to see one way of skinning this cat.

I used flag tags "A" and "B" and clicking on the buttons toggles the states.
 
Last edited:
Activate Tag and send to plc

Hello.
Can you help me.
I need activate a Bit and send to plc (C200H, OMRON),example: When in the HMI 10:00 am oclock, the hmi send a Bit for plc.
 

Similar Topics

Hi Experts! I am trying to get a Redlion Crimson 3.0 HMI to talk to a Rockwell Emulator. I imagine I'll have to use OPC DA. Has anyone done this...
Replies
0
Views
1,176
I have 8 of these systems all running the same code. Just this one seem to gain about 30 seconds in time everyday. So in 48hrs time will be...
Replies
3
Views
656
Hello, can anyone help with what driver to use in Crimson to communicate Ethernet/IP to a Prosoft PLX31-EIP-MBS gateway. The gateway will pull...
Replies
6
Views
824
Hi, I am using a Micrologix 1400 for a project, and we were supposed to use a 4.3in PanelView HMI. By means of delivery times, that won't be...
Replies
1
Views
979
How to change Daylight saving time ON/OFF automatically in Crimson3.0&3.1/Redlion HMI How to change Daylight saving time ON/OFF automatically in...
Replies
5
Views
2,186
Back
Top Bottom