Crimson 3 Recipes

kay_gsr13

Lifetime Supporting Member
Join Date
Oct 2011
Location
NC
Posts
57
[FONT=&quot]Hello, I need some help on creating 3 recipes in Crimson 3. When I select a recipe button (1-3), a value is written into 16 other integer tags that is mapped to my AB ML1400 N7:0-N7:15 PLC register. I have a total of 2 page in Crimson 3 where the 1st has the 1-3 recipe buttons and the other pages that has 16 data boxes to correspond to each push recipe button. [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]I want to be able to hit "button 1" and 16 values are written into the sixteen data boxes. The same for the other two recipe buttons. [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]I want to be able to tweak those value manually and hit save and it would change the value in my complex code as well.[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]The last thing is that when I push "button 1, 2, or 3" the page would automatically go to the data page. I've emulated it but nothing is writing to my integers. I translated (Ctrl-T) my program with no errors, but no results.
[/FONT]

[FONT=&quot] [/FONT]
[FONT=&quot]Here what I have so far, let me know if I'm on the right track. If not please advise. Thanks
[/FONT]

[FONT=&quot] [/FONT]
if (RECIPES.RECIPE_1_SEL == 1);

RECIPES.RECIPE_1_VAR_1=10;

RECIPES.RECIPE_1_VAR_2=20;

RECIPES.RECIPE_1_VAR_3=30;

RECIPES.RECIPE_1_VAR_4=40;

RECIPES.RECIPE_1_VAR_5=50;

RECIPES.RECIPE_1_VAR_6=60;

RECIPES.RECIPE_1_VAR_7=70;

RECIPES.RECIPE_1_VAR_8=80;

RECIPES.RECIPE_1_VAR_9=90;

RECIPES.RECIPE_1_VAR_10=100;

RECIPES.RECIPE_1_VAR_11=110;

RECIPES.RECIPE_1_VAR_12=120;

RECIPES.RECIPE_1_VAR_13=130;

RECIPES.RECIPE_1_VAR_14=140;

RECIPES.RECIPE_1_VAR_15=150;

GotoPage(RECIPES_1);

if( RECIPES.RECIPE_1_SEL == 2 );

RECIPES.RECIPE_1_VAR_1=160;

RECIPES.RECIPE_1_VAR_2=170;

RECIPES.RECIPE_1_VAR_3=180;

RECIPES.RECIPE_1_VAR_4=190;

RECIPES.RECIPE_1_VAR_5=200;

RECIPES.RECIPE_1_VAR_6=210;

RECIPES.RECIPE_1_VAR_7=220;

RECIPES.RECIPE_1_VAR_8=230;

RECIPES.RECIPE_1_VAR_9=240;

RECIPES.RECIPE_1_VAR_10=250;

RECIPES.RECIPE_1_VAR_11=260;

RECIPES.RECIPE_1_VAR_12=270;

RECIPES.RECIPE_1_VAR_13=280;

RECIPES.RECIPE_1_VAR_14=290;

RECIPES.RECIPE_1_VAR_15=300;

GotoPage(RECIPES_1);

if( RECIPES.RECIPE_1_SEL == 3 );

RECIPES.RECIPE_1_VAR_1=310;

RECIPES.RECIPE_1_VAR_2=320;

RECIPES.RECIPE_1_VAR_3=330;

RECIPES.RECIPE_1_VAR_4=340;

RECIPES.RECIPE_1_VAR_5=350;

RECIPES.RECIPE_1_VAR_6=360;

RECIPES.RECIPE_1_VAR_7=370;

RECIPES.RECIPE_1_VAR_8=380;

RECIPES.RECIPE_1_VAR_9=390;

RECIPES.RECIPE_1_VAR_10=400;

RECIPES.RECIPE_1_VAR_11=410;

RECIPES.RECIPE_1_VAR_12=420;

RECIPES.RECIPE_1_VAR_13=430;

RECIPES.RECIPE_1_VAR_14=440;

RECIPES.RECIPE_1_VAR_15=300;

GotoPage(RECIPES_1);

[FONT=&quot] [/FONT]
 
I will get back to you on that, I have a recipe program but the information is proprietary to a system I am developing. Let me see what I can do for you without conflict of interest.
 
Recipe calling

Ok, this would be a very basic recipe call, you will see I added quite a lot of data tags, in Crimson data tags are your friends, use them often. I added a series of buttons using scripting rather than programs since they are short. You can access them in the button action properties. If all you are doing is simple recipe calling with 1-10 recipes this would be the easiest (not necessarily the prettiest) way. If you don't mind me asking can you give me more information on the end goal of this project or premise of it.
 
Forgot to tell you, you probably will not be able to emulate the one I sent back. Emulating does not always work with scripting from my experience, you might have to upload to a unit on the bench and connect the PLC in as well. I do not have a system to setup for bench testing.
 
Stig, Thanks for the prompt respond and your example. We are packaging medical supplies. My goal here is allow the operators to select a recipe button that has preset values designated by me of course with the proper nomenclature,(To avoid entering the wrong values) mapped to the N:7 registers of my PLC program. The recipe consist of drive speed, timer delays at a station before indexing, amount of vials to put in, Glue temperature to apply to the boxes, box width, etc. I've looked at the tutorial manual and tried using the arrays to accomplish my goals with no avail. I guess that would be the cleanest way of doing it. This is my first RedLion HMI project. With help hopefully the goals will be accomplished. I also have the unit in hand for testing, I will keep you updated. Thanks again Stig!
 
Last edited:
Gotcha, nice project. I was just curious because you live in the same area as the company I am engineering a control system for to replace their existing system. Just making sure we were not after the same goal, if you run into other problems with crimson reply to this thread.
 
Haha, I see your concern. I might be lucky or unlucky but most of the PLC and HMI program changes and development are made by me. It will allows me to mature more and hopefully be able to assist other later on.
 
Yep, I know what you mean. I got into it 3 years ago and have not looked back since, there are many of great minds on this site, it is probably one of my best resources that I go to for information. Good luck on your project.
 
I concur, there are great minds on here. I learn a lot just by reading on the forum. Thank you everyone for contributing. On another note....Stig, your script worked like a charm! Now off to integrating. I still might try to see if I can get the arrays to work going off of your script. Big Thanks!!!
 

Similar Topics

Hi all. I using a Red Lion panel and crimson 3 to produce a control for an oven. I need to store several values for 13 products. Each product as...
Replies
4
Views
1,812
Greetings, Can anyone assist me with finding a way to save Recipes to the CompactFlash card in Crimson 3? I've been searching through the...
Replies
8
Views
2,567
Hi Guys, Although quite new to Crimson 3.0, I have read through and written specific recipe routines using the tutorials Red Lion sent through...
Replies
6
Views
8,255
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
146
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
285
Back
Top Bottom