03-21-2013 03:41 PM - edited 03-21-2013 03:43 PM
Solved! Go to Solution.
03-21-2013 03:47 PM
Please post the vi you made. Its tough to assume things based on the explanation of what is happening.
03-21-2013 04:09 PM
HERE IS THE PROGRAM I'VE MADE /
03-21-2013 04:18 PM
Please post in 2011 version
03-21-2013 04:26 PM
here it is :
03-21-2013 05:07 PM
To be honest I didn't understand the concept you are trying to implement. Here is what your code does
1. Your Dial 2 is your control and you have directly wired the output to the other dial and the time you have configured in the Elasped timer itself so it always runs until 10 seconds and then stops
2. In your second while loop you are using a Elasped timer again with a configured value of 10. Also the loop takes the value from loop1 which means its not executing until loop1 is executed
3. You have to have the time delay inside the loop and not outside, now your loop is greedy by taking the total usage of your PC.
Please explain the concept you are trying to implement
03-21-2013 05:30 PM
Hi,
In the real application.
What is the source value for the Gauge ?
Data Acquisition ? User Setting ?
03-21-2013 05:36 PM
the program does exactly what u just said !
but i don't understand the number 3 sentence.
well am working on a project on a link flight trainer and i want to calculate the time that the pilot takes to go from 0 to 30 degrees for example on the Attituge gyro indicator then it calculates the time while he's maintaining this value.
dial2 = the handle of the simulator
AGI = attitude gyro indicator ( it indicates the degree of turn of the plane)
i hope u understood what's it all about
thank you
03-21-2013 05:42 PM
@ABDESLAM wrote:
the program does exactly what u just said !
but i don't understand the number 3 sentence.
well am working on a project on a link flight trainer and i want to calculate the time that the pilot takes to go from 0 to 30 degrees for example on the Attituge gyro indicator then it calculates the time while he's maintaining this value.
dial2 = the handle of the simulator
AGI = attitude gyro indicator ( it indicates the degree of turn of the plane)i hope u understood what's it all about
thank you
What he's trying to say is he doesn't understand why the time delay is hanging off the end of the while loop like that. Since it won't execute until after the first while loop is complete, what does it do? If you're hoping it will induce a wait in between the two while loops, it might accidentally work that way, but since the second while loop and the time delay are running in aprallel, there's no way to determine which will happen first.
BTW - if you already know what the code does, what, exactly, is your question? How does what it is doing differ from what it should be doing?
03-21-2013 05:51 PM
The 3rd point is, you should not run a while loop without a delay otherwise it will eat all your PC usage.
Are you looking something like this?