01-16-2015 01:51 AM
Hi,
I have a simple problem but I find no simple solution. I have calculated data elements (DBL) and stored them into a cluster. Now I want to write a selected element to a 4-20 mA current output. The user should choose the cluster-element by a DropDown-menue for each current output. Of course I know that I can use a ENUM and a CASE-function but that is not dynamical and for switching between 30 variables a little boring to code. Has someone a better idea to solve that problem?
Best regards,
Paul
01-16-2015 01:57 AM
If you have all the cluster elements as DBL only then you can convert them into array. Use a Ring control to index them if you want the user to select which variable.
01-16-2015 02:11 AM
Thank you! Simple solution! Do you have an idea how I can use the variable names instead of the RING-Index for selection? It would work of course by the numbers but the variable names would be much more comfortable!
Best regards,
Paul
01-16-2015 02:19 AM
You can add the variable names by editing the Ring control and when you select a variable you will get the corresponding index.