LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

acquire data with time t=0

Hi Friend

The attached file is one VI which collect data of sin, cos function.

When I click acquire button, data will be written to the file.

 

The problems is I hope when I click acquire, the time value recorded to file is starting from 0s. But it always showed some time delay (7s.)

I do not know how to solve this problems

Thanks for your help

0 Kudos
Message 1 of 9
(1,954 Views)

Your t0 is the time difference between the start of the program and the time when you press "Acquire".  You would need to reset the start time whenever you press Acquire.  I recommend using an event structure.

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 2 of 9
(1,953 Views)

Something like this:

 

 

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 3 of 9
(1,951 Views)

Ok

Thanks

Let me try

0 Kudos
Message 4 of 9
(1,942 Views)

I worote program like you said. It exactly give me time from 0s.

But the new question is how can I exactly acquire data which is like 0s, 1s, 2s,

right now It has a little delay

Thanks for your help

0 Kudos
Message 5 of 9
(1,937 Views)

Use the Get Date/Time in seconds primitive (or Elapsed Time express VI) to determine when 1 second has elapsed instead of just waiting exactly 1000 ms.  Your other code has some overhead which is causing the loop time to be > 1.0 second. 

 

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 6 of 9
(1,931 Views)

Hello VT92

I tried many hours. It still does not work.

 

I posted my code.Could you advice me where it is wrong?

Elaspsed time is not correct. Porbably I need to set up correct start time, right?

 

0 Kudos
Message 7 of 9
(1,905 Views)

Try this.  The accuracy is dependent on the event structure timeout.

 

 

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 8 of 9
(1,888 Views)

I tried it, The new problem is when I log data, it is not starting from time =0s, 

.Thanks for your help

0 Kudos
Message 9 of 9
(1,878 Views)