From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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
(2,793 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
(2,792 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
(2,790 Views)

Ok

Thanks

Let me try

0 Kudos
Message 4 of 9
(2,781 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
(2,776 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
(2,770 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
(2,744 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
(2,727 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
(2,717 Views)