05-24-2017 10:30 PM
Good day,
I am planning to measure two analogue signals with a NI 9401 module on board of cRIO - 9068. I am using the standard NI 9401 acquisition example which works perfectly fine. The logging part is taken from http://www.ni.com/tutorial/11198/en/ . I've been using this example previously but only for one channel logging.But here I am experiencing a problem with multiple channels.
For instance I have 4 signals, each one of those is about 0V. I am sending to the channel AI0 8 V signal. So in the tdms file the AI0 column should give a sine wave, while three other columns will show sine waves around 0 V (0.06V). But what is happening in real life (tdms file attached), is that AI0-AI4 give sine waves with 8Vpk.
Can anybody help me to figure out why I can't log the signals properly? Thank you in advance.
Solved! Go to Solution.
05-25-2017 04:14 PM
Hi ESturov
Can you check with an oscilloscope/multimeter at the terminals to verify what you're logging is incorrect?
If it is incorrect can you use the probe tools to check whereabouts your data being corrupted?
Attach your code if possible
Cheers
05-25-2017 06:12 PM
Hi ingram.weeks
Maybe I should've specified it even better in the first message. There is nothing connected to the terminals AI1-A3. Only to the channel AI0. What I see on the graph:
But what I am getting after logging, you can see in the first message.
Probes are (just in case since you can see that the plot is fine):
All project files and VIs were attached in the first message as well. Thank you.
05-26-2017 02:09 AM - edited 05-26-2017 02:10 AM
Hi ESturov
Sorry, I was on my phone and clearly missed the attachments.
Looking at your file I can see that you have similar "high values" repeating every 4th row. This suggests that you have formatted the data incorrectly after reading from the FPGA.
If you are confident that the data you are seeing in your waveform graph is correct I would use that as a starting point as it means the data being plotted is correctly formatted. You can then save these 1D arrays (after decimation) as you wish.
Cheers
05-26-2017 02:44 AM
Hi ingram.weeks,
No worries. Well, I reckon the repetition is not surprising, because the module has 4 channels. And since we have the applied signal only to the channel one, other three channels will show low values. And after we receive one sample from each of the channels, the same pattern will be repeated. At least from this perspective, that is why I am pretty confident with these probe values.
Yep, the waveform graph is correct, since I am applying only one sine signal to the Channel 0 (8V). I will try to follow your advice and will get back when I crack it. Thank you for the tips.
05-26-2017 02:45 AM
In the example program you have modified, the number of elements you are reading from the FPGA is fixed. Meaning that a 1D array of 2000 is reshaped into a 2D array of 4x500.
You are presumably reading a different number of elements, however your reshape array inputs are still fixed. Meaning that the 2D array will be formatted incorrectly.
Cheers