0
votes

I'm currently setting up a HMI as a Project at work. The operator will create a recipe that includes the following:

  1. General recipe data (strings) e.g. customername, comment. - Input is not restricted
  2. Number values (real) e.g. temperature, Moisture. - Input is restricted to min and max values
  3. Timespans (timespan) e.g. heating time, cooling time - Input is restricted to time, min and max values

A recipe would look something like this:

memberName Value Unit Comment
Customername My Customer - The customer name of this recipe
Product Flour - Used product for this recipe
Temperature container 45 °C Setpoint temperature in container
Target Moisture 11 % Target product moisture
Heating time 1h 30min time Total heating time
Drying time 30min time Total drying time

So far I have managed to load a saved recipe into a datagrid like I displayed above with the help of the infosys example:

https://infosys.beckhoff.com/english.php?content=../content/1033/te2000_tc3_hmi_engineering/53218196597888701067.html&id=

I modified the ConvertToDatagrid.js function so that it also returns the min, max, comment and unit of each memberName.

The issue with this solution is that I can't figure out how to restrict and check for valid inputs in the individual cells. You shouldn't be able to enter a number higher than than the max or lower than the min value. I'd also like to display a timespanpicker when selecting a cell which needs a time input.

I thought about just replicating a Datagrid with textboxes but I don't know how to select data from the array provided by ConvertToDatagrid.js. Another option would be to just link the symbols of the recipe to the textboxes but then I would have to always activate the recipe when selecting it which doesn't really seem that clean either.

I'd be glad if someone experienced with the recipe management could help me :)