LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

integration problem

Hi everyone, this is probly an easy question, but I need to know how to intergrate my data. It is for a wireless accelerometer. Ive attached the VI, but I cant seem to get the intergration right. It was built in LV 8.2 with some functions that might not appear for you. The signal output is a single number, orange wire. 

0 Kudos
Message 1 of 6
(2,906 Views)

Since you are only gettting a single point per iteration, you need to use the ptbypt version.

 

What determines the loop rate of your while loop? 

0 Kudos
Message 2 of 6
(2,895 Views)

it is to loop until i tell it to stop

0 Kudos
Message 3 of 6
(2,879 Views)

 


@Eli Hafitz wrote:

it is to loop until i tell it to stop


... but how fast?

 

0 Kudos
Message 4 of 6
(2,873 Views)

Im not sure, how do i determine the loop speed?

0 Kudos
Message 5 of 6
(2,839 Views)

Since you did not include the subVI, there is no way to tell by looking at the code. How long does it take to read the sensor?

 

"Determine" is a somewhat fuzzy word in this context:

 

  • You can measure the loop speed by subtracting successive tick counts using a feedback node.
  • You can define the loop speed by placing a defined wait inside the loop. (e.g. 10ms or 100ms).

 

 

Typically, a toplevel user interface loop like this needs a small wait so the loop spins at a defined rate. Without a wait, the program speed will depend significantly on the computer speed and is thus not predictable. If somebody would run in in a few years on a 100x faster computer, it will run 100x faster than today. Without a wait, the program also uses all CPU it can get, slowing donw any other prcesses that need to run once in a while.

0 Kudos
Message 6 of 6
(2,810 Views)