This document describes and shows a basic example of implementing recipe handling features in Crimson.
CR Series HMI / G3 Series HMI / G3 Kadet HMI / Graphite® HMI / Modular Controller / DA Series Data Station (excludes DA10) / Data Station Plus / ProducTVity Station
Recipe handling provides the ability to load, retrieve, and save multiple parameters that are related to each other.
Crimson 2.0, Crimson 3.0, or Crimson 3.1
- Start with a Crimson file that has the external device’s tags created and mapped. For this example: Milk, Eggs, Sugar.
- Create duplicates of the tags from #1, these will be used to store the data in the HMI. For this example: recMilk, recEggs, recSugar.
- Change the Extent of each of the new tags from #2 to Array. The default size of each array is 16 elements; this may be changed to suit the application.
- Set these new array tags Storage property to Retentive.
- Create a new Numeric tag to be used as the ‘recipe selector’. For this example: “recNum”.
NOTE: Retentive data is saved 3 minutes after powerup, and then every 6 minutes thereafter. Using the CommitAndReset() function will allow the user to force a save to the retentive memory, but it will also reboot the unit.
- Create 2 new programs Send and Save.
- Send will send the recipe data to the external device.
- Save will store the current external device values into the selected recipe file.
- Use code similar to the following for Send:
Milk = recMilk[recNum];
Eggs = recEggs[recNum];
Sugar = recSugar[recNum];
- Use code similar to the following for Save:
recMilk[recNum] = Milk;
recEggs[recNum] = Eggs;
recSugar[recNum] = Sugar;
NOTE: Translate the programs after modifying the code, or they will not execute.
- Add one data box to the display page for each of the array tags.
- Open the properties of the first box.
- Change the source to “recMilk[recNum]”
- Set the Operation to Data Entry.
- Repeat steps 1-4 for the remaining array tags.
- Add a data box for the recNum tag and enable data entry.
- Add a button to the display.
- Open its properties.
- On the Action tab, set the Operation to User Defined.
- Set the On Pressed or On Released (per desired behavior) to “Send()”.
- Repeat steps 7-10 to call “Save()”.
Use the recNum data entry field to select a recipe. Once a recipe is selected the recipe values could be edited using the data entry fields, sent to the external device using the Send button, or read back from the device using the Save button.
The page that contains the data entry fields for the recipe data could be password protected, the same similar pages could be created for the Send and Save buttons. String tags could also be used to name each recipe.
Programs could be written to read and write the recipe data to and from the unit’s memory card. The database attached at the bottom of this article contains a basic example of a program such as this.
It is the customer's responsibility to review the advice provided herein and its applicability to the system. Red Lion makes no representation about specific knowledge of the customer's system or the specific performance of the system. Red Lion is not responsible for any damage to equipment or connected systems. The use of this document is at your own risk. Red Lion standard product warranty applies.
Red Lion Technical Support
If you have any questions or trouble contact Red Lion Technical Support by clicking here or calling 1-877-432-9908.
For more information: http://www.redlion.net/support/policies-statements/warranty-statement