LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

syncronise two data sets were one set is not constantly logging

Hello,

 

I’m trying to collect data from two counters and three analogue signals. The problems I have are that the shaft encoders connected to the counters sometimes do not rotate. So no signal is sent and subsequently stops the analogue data from being collected until the counters get a signal again. I was told to use two independent while loops one or the counters and the second one for the analogue signals. To further improve the system and make use of the dual core technology I separated the loops completely this means I save the data into to files also. But when I want to synchronise the data I have no synchronising point in the two sets to align the data to.

I attached the vi file that might make it easier.

Thanks for your help in advance.

 

Regards,

 

Fred

0 Kudos
Message 1 of 2
(2,357 Views)
If what you want is synchronize analog input and counter measurement, I suggest you go for buffered AI and buffered count edge measurement. For synchronization, use the AI sample clock as the clock for counter edge measurement. Configure all the tasks (two counter and one AI) and start the counter tasks first and then the AI task. In this way measurement will be synchronized with respect to a common clock.
 
Configure counter 1 (CI. Cnt Edges)--> Cnfigure Counter 2 (CI. Cnt Edges)---> Configure AI (continuous)---> Set counter 1's clock as AI Sample clock ---> Set counter 2's clock as AI Sample clock --->Start Counter 1task --->Start counter 2 task --->Start AI task----> read counter 1, counter 2 and AI in parallel loops...
BR
Message 2 of 2
(2,345 Views)