There are many ways to skin this cat. No matter which you use, the cat will still be bald.
Many questions need to be answered by you before meaningful advice can be given:
- Sequences follow the pattern of Action - Wait for Transition - Next Action -- Wait for Next Transition -- etc. You're post talks about the actions, but not about the transitions. Are you waiting for each cylinder to reach position before going onto the next? Is it just time?
Mainly time based but would end at a extend or retract position even if the timer expired.
- Do you ever do two things at once (diverge & converge the sequence) ?
Yes, same different functions can overlap during the sequence
- Does each step always control the cylinder rate? Is each cylinder's rate controllable?
not all steps require a rate change
- Can the sequences be paused / aborted? Are there recovery concerns from mid-cycle stops / crashes?
sequence can be aborted which would require a manual recovery but it wouldnt be difficult, sequence can be paused which is basically a temporary stop or feed hold
- Is the number of steps fixed or open-ended? Is there a realistic maximum number of steps that would be programmed.
not really, each sequence would have a max/min on the time sequence and rate, operation would continue after each sequence has completed its assigned duration
- How many different "recipes" do you expect to have? Can they be given unique enough identifiers to differentiate between very similar (but critically different) instructions?
would probably only need about 5 different configurations, it would be ideal to name them with a string designation so it is easily identified by the operator
- How often are downloads made to the PLC? If a recipe is stored in the PLC, then a download would lose any recipes created/edited since the last upload/save.
not that often but ocassionaly a functional update or bug removal is required, wouldnt this be negated if the recipe was saved to external memory?
- Are there (or will there be) multiple HMIs or Production Lines that will need the same Recipe list?
no, one PVP per machine, however it would be nice to save configurations that we develope for the customer to run and add them as a "Factory default"
To make the recipe function in the PV work, you basically will be downloading a bunch of numbers to the PLC. The PLC then has to know what each number means.
What I would probably do, if this is in a ControlLogix processor, is not to bother with the Recipe thing. Not that it's bad, mind you. I just like to know how things work, and tailor them for my needs.
I'd make a UDT of what a "step" needs (Cyl#, Direction, Rate, Time), then another UDT with header info (Name, ID) and an array of Steps. Then an array of THAT UDT which is the cookbook, plus an Edit and Active recipe, which is copied to/from the cookbook.
care to elaborate a little more on this? I think I follow you but not for sure. Are you saying UDT for each actuator for time and rate,
then a UDT that compiles all actuator UDT's together to start stop the sequence like an overhead manager?
But that's me.
The key to success is how to present things to the operator. Forget completely about how you are going to program it. First and foremost -- THINK LIKE AN OPERATOR. What info does he need to know to do his job? Don't confuse him with facts; give him what HE THINKS he needs to know, and little else.
Possibly the biggest hurdle in rolling-your-own recipe engine is interacting with the operator to select a recipe. Do you select by name (are they unique?) or by number? If by name and you don't have many, then it's fairly easy to set up a popup or multistate selector that is populated with the strings linked to tags in the PLC. If you've got a lot of recipes, then maybe that Recipe Manager will be better at the heavy lifting, or you need to have the operators enter by number, and hope they know which number is which.
having the ability to uniquely name 5-10 configurations would be best
It's usually a good idea to separate your recipe editor from your running recipe. Whether a recipe can/should be editable once it's been selected to run is another question you should know the answer to.
The rest is just the mechanics of programming. Figuring out the design is where the effort is.