Recipe programming in RsLogix5K

Houdini

Member
Join Date
Sep 2004
Location
Windsor, Ontario
Posts
9
I am just new in programming in Logix5000 and Panelview Plus. I've programmed SLC and Panelview classic. I was wondering the best way to tackle my latest project.

I have a machine that I need to control through various steps. Below I have created a table showing what needs to be done. Bascially it just goes through each step after the timer has reached the setpoint. When it has went through the whole recipe it will go back to the top and continue until it has completed the number of cycles. Sounds pretty easy. I also need a way to edit these values on the panelview Plus. There may also be up to 5 different recipes to choose from.

I have been told to that I can use the Recipe function of the panelview. I have also been told I can use UDT's in Logix to do this. Does this sound like the way to go? Is there an easier way to do this? (I'm also new to UDTs).

The program is already written and working with manually entering the Speed and Torque values So I would just need to tie into those Tags.

Any insight would be great.. Thanks!!

:confused:

Step Test.jpg
 
Last edited:
I was looking over Arrays. Can I use an Array to store all this data and move in the values into my working registers when needed? Would the array be "DINT[20,3,5]? (that's if of course I change the Torque to not use decimals but whole numbers so I can fit it in a DINT)

20 (Steps)
3 (Parameters (Time, Speed, Torque))
5 (Different Recipes)

Would this store all my data and I can use a panelview screen to edit it and load it in to the present recipe?
 
Last edited:
Option 1 uses two nested UDTs.
Create a UDT called udtStep (or whatever you like). udtStep has elements Time (DINT), Speed (DINT), and Torque (REAL). Create a second UTC, udtRecipe. udtRecipe contains Step[23] which is an array of type udtStep, and NumCycles (DINT). Now create a tag called Recipe of type udtRecipe.

With option 1, to access time of step 3 you would use Recipe.Step[3].Time.


Option2
Create a udt called udtRecipe. It contains NumCycles (Dint), Time[23] (DINT array), Speed[23] (DINT array), and Torque[23] (REAL array). Now create a tag called recipe of type udtRecipe.

With option 2 to access time of step 3 you would use Recipe.Time[3].

Choose which one will work best for you.

Recipe can be an array to store multiple recipes in the PLC
 
In udtRecipe make 'Step' an array (23 long) of type udtStep instead of just 1.

Then your tag, Recipe, could be an array of type udtRecipe if you want to have a bunch of recipes.
 
Got it.. Thanks.. I had a difficult time locating where I can make the element an array..I had a "DOH" moment... Can't believe i missed it..

I think I can handle all the PLC stuff now (moving between all the parameters) but what do you think is the best solution for editing these in panelview. I've heard to try and stay away from the Recipe function. There will be over 80 tags to view and manipulate on the screen (23 steps with 3 parameters for each step ,+ the cycle count).
 
When we use them we have two single recipe tags. One is the 'Current Recipe' being the one currently running the process. The other is an 'Edit Recipe'.

We have a screen where we enter a recipe number, press a 'Load' button which moves (COPY actually) from the recipe list into the single 'Edit Recipe' tag. The HMI edits just this 'Edit Recipe' area. A 'Save' button is provided to copy back the recipe list.

If you want (and it won't hurt anything) you can provide a similar thing for the Current Recipe. You don't really have to provide entry objects for everything, just those that are safe to change while running. You could provide just display objects for the others. Some other action (perhaps starting the process) would have performed the 'Load' function. You can provide a 'Save' button to preserve the runtime changes.
 
Moving recipes (Registers) is not to hard.
You need an "Active Step" logic section, this is where you write the data from each step and is what the motor is doing at the present time..
Then you have 22 rungs (1 for each Step). The start of each rung is an equal to instruction that verifies the correct step number. Then there will be 3 move register instructions that moves the recipe data (time, speed, and torque values) to the "Active Step" logic.

First rung:
If Step == 1 then move the following registers (time, speed and torque values) to the "Active Step" logic.
When the time expires then increment the "Step" and it will load the next set of registers from the next rung to the "Active Step" logic.

..
 
Understood. I think I can get the PLC part down. I'm just trying to find a way to do the HMI part. I've been trying to figure out this Recipe function in Studio and am still working on it. I also have the option of just creating a table on the HMI with 3 columns and 22 rows (66 numeric input buttons)and each button has a different tag associated with it (eg: step 1 speed,time and torque etc.). I assume this is the low tech way of doing it. I also assume that the recipe function simplifies this process.

BTW, thanks for the help on the UDTs. it worked great.
 
I'm just trying to find a way to do the HMI part. I've been trying to figure out this Recipe function in Studio and am still working on it.

Recipes are very easy to implement in FT View studio.Suppose we want to have different values written to 3 tags named X,Y and Z depending on the selected Recipe.To do that, here are the basic steps:

1.Create 3 numeric input objects and link them to the tags.

2.You will notice in the "General" tab of each numeric input object that each of the objects have a Tab Index.Let us assume the numeric input objects for X,Y and Z have Tab indices of 1,2 and 3 respectively.

3.Now under the Graphics folder of your project tree right-click on "Recipes" and select "New".In the Recipe editor that opens, type the following:

1,5
2,10
3,33

Then Save it as "Recipe 1".

4.Similarly, create other recipes.

5.Add a "Recipe" object to your display.

6.Run your Display.Double-click on the Recipe object to get a pop-up where you will be able to select your Recipe from a drop-down menu.After selecting' click on the "Restore" Button.

For example, selecting Recipe 1 and clicking "Restore" will write 5,10 and 33 to tags X,Y and Z respectively.
 

Similar Topics

Hi All, I'm new in UnityPro. Can you all guys help me on the UnityPro Programming? I need to create a Sequential Table (Recipe type format)...
Replies
7
Views
1,824
I've built a few programs with Recipe databases using the Cmore programming software and some EA7-T6C screens. When I do standard numeric entry...
Replies
2
Views
2,017
OK it's tough for me but I need to write a small program to run recipes in GML commander. I need a recipe which will consists of about three or...
Replies
2
Views
3,801
I interfaced a MicroLogix 1200 and PanelView 300 micro to a hydraulic press to form a programmable limit switch control. I need to expand this...
Replies
9
Views
11,473
I have a micro1400 processor running two routines (transfer compression/compression molding press). Recipe parameters are stored from job to job...
Replies
0
Views
53
Back
Top Bottom