User | Kudos |
---|---|
6 | |
2 | |
2 | |
1 | |
1 |
I want to make a suggestion.
I often want to use 2 or more controls to trigger the same event, because sometimes the code for one control is only slightly different then for the other control. An example of this is a motor that turns left when a positive speed is entered and right when an negative speed is entered (See Example 1). To make sure my code will stay simple to read, I can easily "group" them in this manner (as in not coding 100 nearly the same events).
Please keep in mind that these are simple examples. For my coding I have to do more then just entering a constant. I have to do complex calculations for one control, maybe read a sensor for another and do nothing for a third. So here it is mostly not possible to use sub-VI's.
My suggestion is to make it possible to wire the control-reference from the event structure to a case-structure (See Example 2). This is not possible at the time. I managed program a decoder to find out what control was activated. But it feels dirty and takes away a lot of space. Being lazy, it would be great if NI could make it so that the Case-Structure would automaticly list all possible control-references.
Hope you guys understand what I mean. Study the 2 examples, I think they will make it clear.
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any idea that has received less than 5 kudos within 5 years after posting will be automatically declined.