Crimson 3 G308 Programming

Bullzi

Lifetime Supporting Member
Join Date
Jun 2012
Location
Colorado
Posts
1,530
Hi All,
I using a G308 connected to a ML 1400 for this Project.

I have a Motor Operated Valve with Open and Closed Limit Switches running into the PLC. I want to put a single object on the G308 that will be Red when the Closed Limit Switch is made, Green when the Open Limit Switch is made and Yellow when neither of the switches are made.

Right now I have the box going red when the Open switch is not made and green when it is made. I would like a more positive indication of the valve's status.

I have played around with it but haven't been able to figure it out. I'm missing something or I am over thinking it. Any help you can give would be greatly appreciated.

Thanks!!
 
This is the code I use under Figure -> Fill Format -> Color 1, for a rectangle that shows the status of a motor.

if (Alarm)
return 0x001F; /*red*/
else
if (Running)
return 0x03E0; /*green*/
else
return 0x7FFF; /*white*/

I hope this helps!
 
Thanks Elcan!!
In your code do I put my tag mane for the limit switches in the (Alarm)and (Running) positions? Syntax wise do I include the ()?
 
Answered my own question. I have to put the () around the tag name, Thanks for the help I am going to try it a little later and see what I get.
 
I was looking for that code. Were do you get those codes? I looked in the manual and couldn't find anting. Was just about to do a Internet search.
 
One last question. If I want text in the box to say OPEN, CLOSED or - for the three states how do I do that?
 
I was looking for that code. Were do you get those codes? I looked in the manual and couldn't find anting.
This trick works for me:
Open the properties for an object that uses a color, like a rectangle. Go to Fill Format. Set Pattern as "Solid Color". For "Color 1", select any color you need to find out the code. Then, change "Fixed" to "Expression". The color code will be displayed.
 
What type of object are you using? If you use a Data Box, you can go to the "Format" tab, set the type to multi-state, "Edit..." the number of states, and set the text for each state.

[Edited to add: for this to work, you would need to change "Value:" under the "Data" tab to complex code and do something similar to above:
If <closed> return 1
If <open> return 2
else return 3]

Another option is to stack objects with their visibility ("Show" tab) set. The yellow one would be always visible and placed on the bottom of the stack. Then the red one with visibility set to <closed>, then the green one with visibility set to <open>
 
Last edited:
One last question. If I want text in the box to say OPEN, CLOSED or - for the three states how do I do that?
This is a little more complicated. I would do something like this:
1) Add a rectangle primitive.
2) Right click -> Add Data.
3) Properties -> Format: Multi State. States: 3.
4) Format Sates: 1: 1, Closed; 2: 2, Open, 3: 3: Moving.
5) Data-> Data Source -> Value: Complex. Code:
if (Closed)
return 1;
else
if (Open)
return 2;
else
return 3;

I hope this is clear enough!
 
Thanks everyone for the help. I applied your instructions and it worked perfectly.
Thanks again I learned something today!!
 

Similar Topics

I'm trying to set up a setpoint program in a G308 for a vacuum furnace. I want to allow the user to have up to 20 program profiles to select...
Replies
7
Views
6,481
Hi Everyone, I am starting a new project using a Red Lion G308 connected to a existing AB SLC 504 PLC. This is my second project with the G308...
Replies
3
Views
1,875
I have encountered a problem when I try to send alarm from red lion G308 operator to both text and email using crimson 3.0. The G308 is...
Replies
2
Views
3,222
Attn Red Lion folks: Just wondering when existing G308 and G310 models will be supported by Crimson 3? I have a project that could really benefit...
Replies
3
Views
2,445
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
1
Views
75
Back
Top Bottom