LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

precise synchronization

Dear Friends,

      Now I am programming a DAQ system basically using a while loop. I used the "i" in the loop to count and the TDMS technique to record data(1D array). When I pressed the "stop" button, the number of data arrays were always one larger than the count. I guess when the count stopped, the one more data array were writen into the file, I don't know why? And how can the precise synchronization be realized ? Here I show a picture of framwork of the main VI ,maybe it help to understand what i mean. I am sorry that the source code cannot be issued.

   So ,please help me if you have any idea.

  Thank you

0 Kudos
Message 1 of 5
(2,432 Views)

i returns 0 on the 1st iteration

1 on the 2nd

2 on the 3rd... etc

 

So if i reads, say, 4 I would expect the loop to have executed 4+1=5 times, so 5 acquisitions.

Message 2 of 5
(2,417 Views)

Ok, I forgot "i" starting from 0, a stupid mistake. Do you think the structure of  this program OK?

0 Kudos
Message 3 of 5
(2,392 Views)

Is the "count" being one less the only issue you saw with your program?

0 Kudos
Message 4 of 5
(2,376 Views)

Yes, I think so.

0 Kudos
Message 5 of 5
(2,345 Views)