Page 1 of 1

Analog numeric value added to list box

Posted: Thu Nov 08, 2012 12:15 pm
by KevinA.
I'm trying to create an analog numeric display that whatever I type in it, once i click enter on the virtual keyboard adds that number to a listbox. Is it possible?

Re: Analog numeric value added to list box

Posted: Thu Nov 08, 2012 1:37 pm
by mark.monroe
You will need to use C# to do that. You can use the ValueChanged event of the AnalogNumeric box and put the code to add the number to a list box in there. The listbox is a normal C# control, of which there is a lot of information on how to add values to it online.

Re: Analog numeric value added to list box

Posted: Fri Nov 09, 2012 10:25 am
by KevinA.
I found how to do it but it creates me volatile values that won't display in my other analog numeric display. The thing is that I want to do a kind of database of numbers from 1-100 lets say (identification numbers). When I choose on my HMI a number in my listbox, it sends which one it is to the PLC and displays it in another analog numeric display. I also have to be able to create values in that database.

The recipe option would've been perfect but the only thing is that we can only create one same recipe from one button. And we can also only load one recipe from one button.

Is it possible to load or to create different recipes from one button. Can we put a variable instead of the name of the recipe in the action to charge a recipe in the button?

Re: Analog numeric value added to list box

Posted: Fri Nov 09, 2012 11:11 am
by mark.monroe
You might want to look at this forum post on how to create a custom recipe dialog box.

You would have to write code to open multiple recipes at the same time.

You can use the Globals.Recipe1.SaveRecipe("RecipeName") to save a recipe to that recipe database.