You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old June 24th, 2003, 07:41 PM   #1
Ned
Member
United States

Ned is offline
 
Join Date: Apr 2003
Posts: 6
Recipe Programming

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
  Reply With Quote
Old June 24th, 2003, 08:15 PM   #2
randylud
Member
United States

randylud is offline
 
randylud's Avatar
 
Join Date: Oct 2002
Location: Greensboro,NC
Posts: 933
good idea

Ned, PLCs are great for the recipe purpose you are contemplating. So to
Quote:
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.
__________________
Thunder is good, thunder is impressive; but it is lightning that does the work!
Mark Twain-8/28/1908
  Reply With Quote
Old June 24th, 2003, 08:38 PM   #3
93lt1
Member
United States

93lt1 is offline
 
93lt1's Avatar
 
Join Date: Apr 2002
Location: Mount Pleasant, Iowa
Posts: 994
Another thing to think about...

Quote:
Originally posted by randylud
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.
  Reply With Quote
Old June 25th, 2003, 10:02 AM   #4
ndzied1
Lifetime Supporting Member
United States

ndzied1 is offline
 
ndzied1's Avatar
 
Join Date: Aug 2002
Location: Chicago, Illinois
Posts: 2,553
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:
[list=1][*]Have the operator select the program to be edited via selector or numeric entry[*]copy the information from the appropriate place in my data table to the temporary storage area[*]Brind up a new screen to edit the temporary data[*]When finished the operator can press save or cancel[*]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).
__________________
nOrM
======================
nOrM=Norman Dziedzic Jr.
I've never been to China but my phone has.
  Reply With Quote
Old July 28th, 2003, 09:09 PM   #5
Ned
Member
United States

Ned is offline
 
Join Date: Apr 2003
Posts: 6
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
  Reply With Quote
Old July 28th, 2003, 09:48 PM   #6
Orn Jonsson
Member
United States

Orn Jonsson is offline
 
Join Date: Apr 2002
Location: Boise Idaho
Posts: 123
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
__________________
Orn Jonsson
  Reply With Quote
Old July 29th, 2003, 01:55 PM   #7
ndzied1
Lifetime Supporting Member
United States

ndzied1 is offline
 
ndzied1's Avatar
 
Join Date: Aug 2002
Location: Chicago, Illinois
Posts: 2,553
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:[list=1][*]Calculate the number of the first actual parameter in the recipe data table[*]Copy the required recipe into holding registers for editing.[*]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
__________________
nOrM
======================
nOrM=Norman Dziedzic Jr.
I've never been to China but my phone has.
  Reply With Quote
Old July 29th, 2003, 01:58 PM   #8
ndzied1
Lifetime Supporting Member
United States

ndzied1 is offline
 
ndzied1's Avatar
 
Join Date: Aug 2002
Location: Chicago, Illinois
Posts: 2,553
oops, here's the graphic

A possible setup for the PV 300 micro
Attached Images
File Type: gif ned.gif (22.0 KB, 341 views)
__________________
nOrM
======================
nOrM=Norman Dziedzic Jr.
I've never been to China but my phone has.
  Reply With Quote
Old July 31st, 2003, 08:46 PM   #9
Ned
Member
United States

Ned is offline
 
Join Date: Apr 2003
Posts: 6
Smile 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
  Reply With Quote
Old August 1st, 2003, 12:52 AM   #10
ndzied1
Lifetime Supporting Member
United States

ndzied1 is offline
 
ndzied1's Avatar
 
Join Date: Aug 2002
Location: Chicago, Illinois
Posts: 2,553
Glad to hear it's working out and glad to help. So many here have helped me and others ... it's jut a big chain.

Take Care
__________________
nOrM
======================
nOrM=Norman Dziedzic Jr.
I've never been to China but my phone has.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Recipes and RSView32 poiuy LIVE PLC Questions And Answers 7 October 1st, 2005 03:33 PM
Omron NT631 V2(3.1) & Recipe Data Overconfident LIVE PLC Questions And Answers 4 October 13th, 2004 04:56 PM
SIEMENS S5 - Programming port damaged !! ayman metwally LIVE PLC Questions And Answers 2 August 19th, 2004 12:08 PM
Automation Direct DL05 problem david bron LIVE PLC Questions And Answers 16 February 2nd, 2004 09:52 PM
Programming Methods randy LIVE PLC Questions And Answers 2 February 4th, 2003 06:39 PM


All times are GMT -5. The time now is 12:24 AM.


.