QUOTE(mos89 @ Feb 1 2008, 05:42 AM) [snapback]64587[/snapback]
Hi,
How to save recipe data file on ML 1100 ?
When i use save command my program + data memory is saved, but not data in recipe file!
How to do it , how to change a small thing in the program without erase all recipe data ?
There is no such thing as a "recipe" in a PLC program which is separate from the ladder and data files. You are probably referring to something stored in the HMI and not the PLC. It is very common (and annoying) for HMI's to offer "recipe" features. Your problem is very common.
If you want to implement recipes in PLC's, the easiest way is using the COPy instruction. Here is a pseudo-code example of creating a recipe system in a PLC:
Recipes are numbered 101-119. Recipes are 50 words long and integers. The current (active) recipe is in location N100:x where x is the entry number in the recipe (x=0-49). In pseudo-code:
If save-bit is set and recipe-number-to-save is between 101 and 119, COP #N100:0, #N[recipe-number-to-save-to]:0, 50; clear save-bit
If load-bit is set and recipe-number-to-load is between 101 and 119, COP #N[recipe-number-to-load]:0, #N100:0, 50; clear load-bit
Be very careful when using indirect addressing. ALWAYS check your inputs. If you don't and somehow an invalid value gets into your indirect register, it will fault the processor.