07-02-2007 01:16 PM
07-02-2007 02:44 PM
@jeff_scharpf wrote:
... Is it really this simple to get displacement or am I missing something?
Once you know a little bit of LabVIEW, YES, most things are that simple! 🙂
Unfortunately, it is difficult to judge a VI from a diagram image. What's in the "other case" of the case structure? What determines the rate of the while loop?
07-02-2007 02:58 PM
07-02-2007 03:27 PM
@jeff_scharpf wrote:
Thanks for the response. I understand it's hard to judge a picture. The case statement is only there so the operator clicks a "Start" button to initiate the file read. The "False" case is empty.
What is the boolean action of the switch for the case structure? Does it stay on or does it reset to false after each read?
OK, place an indicator on the iteration terminal of the loop and open the task manager to see the CPU usage of your rig. Most likely you will see that you'll use 100% of your CPU spinning the loop millions of times per second until the button turns TRUE.
In any case, your FALSE case should have a small delay (e.g. 100ms), so it only uses 0.01% of the CPU when no doing anything useful. Whithout a delay, a loop will spin as fast as the CPU allows.
An even better idea would be an event structure.
07-02-2007 03:43 PM
Thanks I understand. I will add some delays.
I'm more concerned that my displacement numbers are correct. I don't really care if I'm using 100% CPU as this is just a demonstration to see if I can do displacement.
07-02-2007 08:33 PM