Ok, let's start from the beginning:
rsappia wrote:
First at all... The elements that will compose the recipe, where do they have to be declared? In the HMI memory or in PLC memory?
The same question with data records... where do they have to be declared? In the HMI memory or in PLC memory?
The answer is: wherever you like.
There are pros & cons for each method you use.
1) If you use the HMI for recipes, then you can make use of the HMI elements that are already there for that matter. But, if the Panel dies (which happens to me more often than I would like to think) then the recipes are lost and the customer is not very happy about it. (of course you could try and back them up... good luck if you manage to do it as frequent as the customer can change his recipes)
2) Or you can use the PLC to do the recipe management (I don't know what PLC you use, but it's not that hard as it sounds in the S7-300/400 STL, and I haven't tried in S7-1200 LAD, but I would say that is much easier).
You just have to implement functions that create, delete and modify Data Blocks (this is what a recipe essentially is: a DB)
(Take into account that in S7-300/400 you can have a DB change from shared to instance, and vice versa. So, the Instance DB is your running recipe, and the rest Shared DBs of the same type (or UDT) are the rest recipes.)
Now, if you use the PLC, it is much easier to back them up (OPC & SQL - Data Logging in S7-1200 - etc), and they are essentially saved in the MMC (if S7-300/400).
So, if shit hits the fan, you have everything in one place, and a VERY HAPPY customer!
IMO based on experience, I think that if you use the PLC to do the recipe management, you will be happier in the long run, AND you will have a piece of code that you're able to reuse over & over again in your projects (which is a HUGE ADVANTAGE). Think of it as an investment.
On the other hand, if you are on a tight schedule, or you don't give a -spam- about the application and/or customer, implement it on the HMI.
But, you should always work on the PLC option in your free time (if you tend to spare your free time programming PLC like me).
In general, the amount of control that you have over the PLC is incomparable to the control over the HMI (especially Siemens), so you have much more power in the PLC.
HTH