06-20-2023 09:46 PM
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.
06-26-2023 07:35 AM
I could take a quick look later if you save back to LV 2020 or earlier and repost
-Kevin P