08-07-2007 09:40 AM
08-08-2007 07:47 AM
08-08-2007 09:30 AM
08-08-2007 10:06 AM
Well, I extracted the relevant parts of the problem to make a simple VI to post; you should find it in the attachment. I'm using LabView 8.2; what happens on my computer is that sometimes the unit indicator (the right most column) keeps showing the previous value even after I chose an new scale (it then updates as soon as there is aone more front panel activity); the problem actually doesn't occure every time; it occures randomly. In my original VI, where there are much more functions in the loop, it occures much more often than in this here. By connecting an indicator to the loop index I found out that the function actually triggers correctly, that is always, also when I click to make my choice; however, for some reason the indicator that indicates the unit of the chosen scale doesn't always get updated.
... I eventually solved the problem by having the loop execute twice for every front panel activity; activate this feature by connecting the boolean wire to the "do not wait!" input of the wait-function.
Tom
08-08-2007 11:15 AM
08-09-2007 02:09 AM
Thanks, for the simple and clear explenation. Also your proposed solution including the modified vi is quite helpful. I know, the thing with having the loop run is a hack. However I think I'll stick with that, since, as a mentioned, there are much more things and particularly more controls in my original vi. Even with the "run twicw" feature the "Wait for activity" solution keeps programing complexity and transparency much better in my opinion (apart from the remodelling work it saves).
In any case thanks again!
Tom
08-09-2007 08:50 AM
Well, I would obviously debate this, and so would a lot of other regulars on here, but you are more familiar with the rest of your code, so you should be the best judge of this. Still, you should consider the event structure for future implementations. You might learn to like it.
Even with the "run twicw" feature the "Wait for activity" solution keeps programing complexity and transparency much better in my opinion (apart from the remodelling work it saves).