Recipe Programming

Ned

Member
Join Date
Apr 2003
Posts
6
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 system to include part program recipes. This would include part number, upper ram set point and lower ram set point.

Any assistance guiding me in the right direction would be greatly appreciated!

Thanks,

Ned
 
good idea

Ned, PLCs are great for the recipe purpose you are contemplating. So to
include part number, upper ram set point and lower ram set point
you would need to set aside some data table files in your MicorLogix and use a set of switching commands from the PanelView to tell the PLC which set of data to use for which part. This is not a terribly complex program but it will require some planning ahead. Put all of your possible Part #s on paper with the appropriate ram limit set points. Then once you have all the data assembled, assign register locations for storing this data and write the code to access it with a push of a button, or a numeric keypad entry. You will probably be using a file fill instruction or even something as simple as multiple MOV instructions will get the job done. The part number needs to go to a display register in the PanelView and the limits ought to go to the respective part of your existing program that has control of the ram limit now. You post some of what you have done and we will gladly take a look at it. This idea might get you going in the right direction.
 
Another thing to think about...

randylud said:
Then once you have all the data assembled, assign register locations for storing this data and write the code to access it with a push of a button, or a numeric keypad entry.

To be a little more foolproof let the tool tell the PLC which tool is currently loaded. Depending on how many tools you have, you could use an array of prox switches to read a binary "tool number" and load the current tool's setpoints automatically.

Of course all of this depends on budget, number of tools, speed of change-over, frequency of change-over, etc.
 
When programming receipe interfaces, I always use a temporary area when allowing the operator to edit the receipe data. The drill I've used is a follows:

  1. Have the operator select the program to be edited via selector or numeric entry
  2. copy the information from the appropriate place in my data table to the temporary storage area
  3. Brind up a new screen to edit the temporary data
  4. When finished the operator can press save or cancel
  5. If saving, copy the temporary information to the proper area of the data table, if canceling, just do nothing.
    [/list=1]

    That's a general overview, once you get started in a direction, post what you have and we can help hammer out the details.

    Hint: You will need to use indirect addressing to access the different parts of you data table(s).
 
MicroLogix Receipe Programming

Thanks to all who answered my cry for assistance! Being an old i/o plc person this type of programming has me confused.

The PanelView has one screen setup for each part number..up to 75 to date. An example: #1 Upper Set Point N9:0 Lower Set Point N9:1 Actual Position N7:100 Hand Shake N20:0/0 Notification
N20:0/1 Retract 0:0/0 Advance 0:0/1

#2 Upper Set Point N9:2 Lower Set Point N9:3
and so on.

How do I move this data?

There will be about 75 part numbers.

Thanks again!

Ned
 
Hydraulic control

If you want "accurate" control of your hydraulic rams. get a RMC 100 motion controller from Deltacompsys.com

they blow anything else away

I have used their products very successfully
 
Ned:

Using a different screen for each recipe entry is definately a brute force solution and will quickly become unmanageable when you need to make a change to the screen format.

What you need to do (and this is the beauty of recipe programming) is to have one screen that is a "template" for the recipe and then, as you alluded to, you need to move the data into and out of the screen.

The micro doesn't have much real-estate space on it so first, I would program a screen for the user to select a recipe. This could be a numeric entry or selector list. For the sake of argument, let's say by hook or crook you get a number into N7:0 that represents the recipe number (0 being the first recipe and in your case, so far, 74 being the last recipe).

After the user enters the recipe number, you should have a function key on the screen to edit the recipe. When pressed, the PLC needs to perform the following functions:
  1. Calculate the number of the first actual parameter in the recipe data table
  2. Copy the required recipe into holding registers for editing.
  3. Bring up the recipe template screen to edit the recipe
    [/list=1]
    For the sake of argument, let's say this PB is controlling B3:3/0.

    Now, it looks like your recipe has two items, upper set point and lower set point. During editing, let's store these values in the registers N7:10 and N7:11. So before editing, we need to get the values to these places. Looks like you have setup file N9 for the recipe storage of the recipes. So, to calculate the position of the first recipe point in N9, multiply the recipe number (N7:0) by 2 and store this value in N7:1. For Example, for recipe 13, the first parameter will be at N9:26.

    To 'get' these values, we use something called indirect addressing. If we have stored this offset number in N7:1, then we can address the first parameter using the notation N7:[N7:1]. When the controller sees this, it gets the value stored in N7:1 and uses it in the address. So, for our example above, when N7:1 = 26, then the PLC replaces N7:[N7:1] with N7:26. The power and beauty of this is that you can address different parts of the data table based on what numbe the operator types in.

    Ok, were getting close to putting it all together. I have attached a graphic of two screens below to show a possible configuration for you along with some addresses (which of course you could change to your liking). Note that there is only one screen to edit the preset values. Because, before starting we always move the proper values into N7:10 and N7:11, this screen will always be editing these values. One last housekeeping issue is that you will need to set up a register to let the PLC change the displayed screen on the micro. For this example, I'll use N7:2. Also, it's a good idea to set up a register for the micro to tell the PLC what scren is actually displayed and I'll use N7:3.

    Ok, given all that mess, here is the code to drive it:

    /* When the edit button is pressed, Multiply the recipe # by 2 */
    /* Then copy the Proper recipe values to N7:10 & N7:11 */
    /* Then Call for a screen change to the Editing Screen */
    B3:3/0
    ---] [------------[ONS]--------------------+---+ MUL-------+--+
    | | N7:0 |
    | | 2 |
    | | N7:1 |
    | +-----------+
    |
    +---+ COP-------+--+
    | | N9:[N7:1] |
    | | N7:10 |
    | | 2 |
    | +-----------+
    |
    +---+ MOV-------+--+
    | 2 |
    | N7:2 |
    +-----------+

    /* When the save PB is pressed, Copy the recipe values back */
    /* Into the proper place in the data table and change the */
    /* Screen back to the Reicpe Number Entry Screen */

    B3:3/1
    ---] [------------[ONS]--------------------+---+ COP-------+--+
    | | N7:10 |
    | | N9:[N7:1] |
    | | 2 |
    | +-----------+
    |
    +---+ MOV-------+--+
    | 1 |
    | N7:2 |
    +-----------+

    /* When the screen reqested by the PLC is displayed on the micro */
    /* Write a 0 to the request register to allow Screen Change */
    /* buttons pre-programed on the micro to work properly */
    ----+ EQU-------+---[ONS]----------------------+ MOV ------+---
    | N7:2 | | 0 |
    | N7:3 | | N7:2 |
    +-----------+ +-----------+



    A couple other notes.
    • You will have to make sure that the indirect address pointer (N7:1 in this example) does not ever point to an address that doesn't exist. You can limit it's value in the Tag editor in paneliview and you can also use a less than instruction in the PLC if you want to be real careful. Otherwise you could get a run time error that will fault the processor.
    • When the operator presses the cancel PB, just change the screen back (can use a PV screen select button) and DON'T copy the data back into the N9 file so the old values will still be there.
    • You will need to write similar code for when the operator wants to select a recipe to run where you copy the recipe values to temporary storage and run your program from there. That is left as an exercise to the reader I've always wanted to say that :)

    I think this should give you a good head start on recipe programming and, as you can see, there really isn't a lot of code to it. It is also easy to expand to larger recipes as the COP instruction can move a block of data at one time.

    Good Luck
 
MicroLogix Receipe Programming

:)

Norm ....I want to thank you for all your assistance on this subject! I think it finally is starting to click. I have the controller functioning on the bench, have some more tweeking prior to final installation.

Could not have gotten there without this site! Hopefully one day I will have something to contribute.

Once again.....Thanks!

Ned
 

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,809
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...
Replies
11
Views
3,043
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,004
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,766
I'm using legacy recipe to download a recipe to the PLC. A little background, the recipes are large. They are broken down into 6 tables, each 16...
Replies
2
Views
80
Back
Top Bottom