LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronizing Counter Output and Analog Input to control and record at the same time

The code below is fairly large a may be a bit hard to read, as it is not optimized by a professional developer, and is meant for personal use only. I am trying to record signal outputs from a counter on the NI board (USB 6366), along with other analog inputs from recorded voltage changes from an IR beam sensor, using the analog input. Right now I only have the counter outputs and trigger for the recording device setup. I want to verify that when I send out the signals, they will record and occur at the times I demand within a range of 0.01 secs. I tried to have the code run as fast as possible by minimizing the amount of data in the while loops (why I have the constants outside of the case structure that starts the loop, I figured this would minimize calculation time). Unfortunately, It seems that the recordings are not as exact as I want. I want the pulses to come out every minute on the minute, but they are off more than 0.1 seconds. I am thinking the recording and command loops are not starting at the same time and wonder if that would fix it, and how to do that. I tried rendevous, but that simply stopped the recording until the command time was over. If there is a better overall structure for this, please let me know. 

Download All
0 Kudos
Message 1 of 2
(644 Views)

I could take a quick look later if you save back to LV 2020 or earlier and repost

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
0 Kudos
Message 2 of 2
(586 Views)