Buttons for downloading / uploading recipes / parameters
TouchWin offers a simple option for writing parameters to and reading them from the control unit via a recipe download and upload. Two buttons are available for this in the Part menu. There you specify the target address in the PLC in Object. Recipe Data is the address of the recipe data in the touch panel. Under Recipe Count, you specify how many values are written.
To use this function, the memory areas for the recipe in the panel can simply be written via an input field. Once all parameters are complete, they can be written to the controller using the download button.
More complex functions via function button
The predefined recipe buttons work for very simple parameter transfers. However, if things get a little more complex, the function buttons offer very good options for implementing simple recipe controls. Here is an example:
A recipe is to be loaded from a CSV file and transferred to various memory areas in the controller. To do this, simply create a function button with the following actions:
- Import CSV is used to load the parameters from a CSV file into consecutive registers in the touch panel; the Data tab allows you to specify the structure of the data, e.g. bits etc.
- using the Arithmetic function, it is possible to perform calculations on the parameters before downloading, for example to scale quantities with other parameters
- the individual parameters are now written to the PLC via several Copy Register instructions
- Data Block Transmit enables the transfer of several registers
- Copy Coil copies individual bits
If this function button is now pressed in the visualization, the individual instructions are executed and the recipe is loaded into the controller.