04-28-2020 05:31 PM
Hi,
I am using NI USB-6343 module to read 2 input signals which one is a command signal to my device and second one is the feedback from the device at any given sample these two should match but since there is a delay between the two I want to take samples on one channel after a constant delay... I am using DAQ assistant block could someone explain how to add a delay before taking samples on one channel and then send it for comparision with the other signal...
Thanks
04-28-2020 06:51 PM
Take both channels simultaneously. Then account for the amount of delay when looking at the data from the 2nd channel.
04-29-2020 05:29 AM
Hi,
I have a similar issue where different channels that should be the same have some time shift. In my case this is often because the data is coming form different sources, with some variable latency in one or another route.
If the time delay is constant you can use a feedback node or similar to hold the value of one back for a number of cycles. If the timing error is not constant this will not be enough, and you will need to post-process the data to re-synchronise.
I developed the attached VI to identify and correct time-shift errors using a cross-correlation calculation. Identify one input as the 'master', and another as the Seconday input. These channels should be equivalent in shape & form as far as posisble. Filtering the data first can help if there is lots of noise.
If there are other channels with the same timing as Master & Secondary, compile them into arrays of clusters and wire to the appropriate inputs. Similarly, if you have a separate Timebase channel, that can be connected.
The outputs will match the general timing of the original master input, and could be time-shifted or trimmed as appropriate.
I hope this is of some use to you. Getting the signals synchronised at the point of acquisition would always be better, but not always possible.
Regards,
Ian