Check out the list of all tutorial videos on the C-More Micro HMI at this link:
The Recipe Button allows you to change the values of up to 99 tags with a single button press. In this example we have three different recipes changing the quantities of these ingredients. You can see each button press is modifying all four of the ingredients with a single button press. Also notice that the recipe button doesn’t change when I click on it, so we added indicators to remind us which button had been pressed – there’s a trick for that which we’ll show you in the example. So let’s get right to it … double click or drag the recipe object onto the screen. The first page of the dialog just has all the formatting options we covered in the How To Use Objects Common Features video. The second tab is where we get the work done. You just fill out the table with up to 99 entries of which TAGs get what data when the button is pressed. Let’s fill out a few … click on the add button … grab a tag – lets grab almonds - set the value and say Add. Grab another TAG, how about PEANUTS, we’ll make him 45. Another one – how about RAISINS. And we’ll do one more – how about sugar? Close when you are done. And now we have our new recipe. These TAGS are going to get these values each time the recipe button is pressed. Note that you do need to be a LITTLE careful here – if you add another TAG – lets add the PEANUTS TAG – which we have already added – and we’ll change the value to something like 77 – and hit close – now the PEANUTS TAG will be set to 45 but then later in the list it will be changed to 77, so the 77 will replace the 45. On a short recipe like this it is obvious, but on a long list It might not be so apparent. So be careful tht you don’t over wright these values when creating these tables. and then – and change the value to 22 .. and say “ADD” - now look what happens. The second SUGAR TAG will over wright the first one. The 50 will be replaced with a 22. On a short list like this is obvious, but on a long list it might not be so apparent, so be careful you don’t over wright and values when creating these tables. That’s all there is to setting up a recipe button. Let’s take a look. Resize it, move it , simulate it save the project and up pops our new recipe button. Currently all of those TAGs are set to zero. But when I press the recipe button, it updates all of the TAGs in one fell swoop. We still have the issue though, that when you click on the recipe button, it doesn’t appear to change so it doesn’t tell the user that anything happened. How do we get the recipe button to look like it changes? Let’s bring up the first example and take a look … If we double click on a recipe button we can see the answer – Over here on the recipe we have added additional TAGs. These TAGs keep track of which recipe buttons have been pressed. So when we press recipe button 1, it sets recipe button 1’s TAG but turns off the other TAGs. Likewise, recipe button 2 turns off recipe button 1 but turns on recipe button 2. And 3 does the same ting – it turns on 3 and turns off 2 and 1. Then we just put some indicators on the screen that monitor those TAGs. So that is how we are keeping track of which button has been pressed. If we simulate this real quick we can see when we press button 1, It turns on his TAG and turns the other two off. Button 2 turns on his TAG and turns the other two off and button three does the same thing. So now the user can see which recipe is currently being displayed on the panel. One last trick – you can take these indicators and lay them on top of the recipe buttons .. let’s try that real quick. If I go grab these indicators and simply drop them on top of the recipe buttons – we missed a little bit, let me fix that – my recipe buttons need some work here, but you got the idea - Let’s Simulate that. Now when you click on the recipe button, it looks like the recipe button is lighting up, but it is actually the indicator button sitting on top of the recipe button. So that’s a neat trick to make your recipe buttons look like they’re changing state, and act like radio buttons! That’s it for this video – be sure to check out all of the other videos in this series. And as always, please send us any topics you would like to see covered – or - any other comments for that matter – we appreciate the feedback!