01-25-2010 03:36 PM
Sounds like good effort on your part-
Sorry I got hung -up working today or I would have pointed you to the mouse up event. Thanks for clairfing the actins you needed and good job finding a solution!
01-25-2010 06:58 PM
Hi Kaspar,
Sliders can cause problems when used as controls.
First, they produce events for all interim values, so if you only want to respond to a final value, you have to play games with the mouse functions and even then there are issues that you can't completely fix.
As you observed, using the "mouse up" event has a caveat. "Sliding" the mouse off of the control and then releasing the mouse button will result in the slider value being changed but no "mouse up" event will be fired. Now the front panel is not in sync with the program settings. In your case, your state machine will stop, but no "next test step" will be selected. Your program may appear to have hung.
You can also play with "mouse leave" events but in the end you still have the same issue. You can't guarantee that the value that is shown on the front panel will be the value detected by your event structure.
Note that this whole issue is only a problem when the user does things that are slightly out of the ordinary (i.e.. "slides" off of a control), but that is something you can't control. You can call me paranoid.
After spending a few hours trying to get this to work reliably I came to the conclusion that I would only use sliders for direct control when I can use the "value change" event only - and the application can handle the many interim value change events.
Have you considered using a text ring, or a menu ring, or using the slider as a selector and then a boolean for a "Go to Test"? (Obviously, the large number of test steps you have to display is an important consideration.)
Note: I just reread one of your earlier posts and noticed that you are using the slider as both a control and an indicator. This could be a problem. What happens if the user is in the process of selecting a test and the program goes to the next test in the sequence? Will the control value be overwritten? This could be confusing.
Here's an idea:
Ok, sorry for the long post. I hope there is something helpful in here.
steve - one who makes simple things complex
01-26-2010 07:15 AM
Hello,
Thank you for your feedback on using horizontal sliders, you are correct. I wanted to minimize the operations that the technicians have to go thru in order to change the test sequence, which is why I tried to use the horizontal slider. I have the code working and it will be interesting to see the response of the techniciians to my attempt to make their job easier. If the technicains do not want to work with the "various features" of the horizontal slider, then I will change to code to eliminate "the features" and create a multi-step process to change the test sequence that will not have "features".
Perhaps the next release of Labview could have a horizontal slider event that could be called "Value Change Complete" that would
requires a timer value input be used to determine the "idle time" after a value change started so that the programmer can decide when someone has completed moving the slider.
Thanks again for your help!
09-01-2010 04:45 AM
I am using two event structure in my code (state machine). In those 2 event structures,
I have handled value change event for a Boolean control.
Value change event occurred at once on the boolean is detected by 2 event structure. How can I avoid this?
Please help me
09-01-2010 07:50 AM
Use one event structure. That is the typical useage. If you have the same event in multiple ones, both events will always fire.