11-02-2021 12:45 AM
I'm using NI 9223 Compact Rio module with the NI cDAQ-9174 chassis to measure inverter output phase current.
The NI 9223 allows me to sample the parameter at a rate of 1MHz/ch maximum.
Well if set the sampling frequency to 1MHz, a weird pattern in the current signal appears like the one in the figure below.
When I reduce the sampling frequency, this disappears. The original signal does not contain this pattern and I checked by using the oscilloscope. So it's definitely the problem caused by the NI module when sampling frequency is very high.
Does anyone have any explanation why this happens?
11-02-2021 09:17 AM
It looks like you're not continuously capturing and missing samples in-between.
Please share the source code to check for incorrect use of the instrument.
11-03-2021 08:02 PM
Thank you for replying.
Here's my source code.
11-04-2021 06:14 AM
Nothing jumps out in the picture, though I'd urge you to learn to avoid the "Signal Manipulation" palette and those blue dynamic data wires. Just use array indexing to extract waveforms of individual channels.
I do note that there's a pretty regular looking pattern and it seems to repeat at just about exactly 1 second intervals. I also note that you've chosen to use a duration as a way to request the # samples to read. Does that duration happen to also be 1 second?
Even if so, I can't fully connect the dots between that code pic and the previous graph, but I would see those things as likely clues.
-Kevin P
11-04-2021 09:54 AM
It is possible that the "write to measurement file" action within the loop is slowing down the loop such that you're not reading the samples fast enough not to lose any samples.
I would try moving the write to file to another loop like a Producer-Consumer structure or use DAQmx TDMS log feature instead.
11-09-2021 02:15 AM
yes the duration is also 1 second
11-09-2021 02:16 AM
Thanks you for replying.
I will try the solutions you suggested