12-10-2018 06:52 PM - edited 12-10-2018 07:22 PM
Hi,
I have built a DAQmx with 4 analog input channels. Because at the time I am writing the code I do not have any hardware connected I created a virtual device. I am trying to creating a drop-down menu through which I will choose for which channel I need the RMS. For the RMS I am using the Cycle Average and RMS.vi. For some reason my code works only for when I have "Channel 1" while for the rest of the channels I get nothing. Note that the virtual device generates identical signals for the virtual channels. Has anyone ever experienced a similar problem? I attach my code.
KR,
Michail
Solved! Go to Solution.
12-10-2018 08:00 PM
Michail,
I suggest you Simplify. Do a single Channel. Don't generate a simulated signal with a simulated DAQ device, use the Waveform Palette and generate a known signal with known "noise". Should take 4-5 functions. With real "knowns", you can see if the analyses (plots, RMS) make sense. Simplify before you try to analyze.
Bob Schor
12-11-2018 07:52 AM - edited 12-11-2018 07:54 AM
Hello Michail,
+1 for the steps Bob gave you. Your VI as-is looks functional to me. Executing it I can select between four different (physically existing) AI channels. There is a minor, potential issue: You need to selected the channels on your Front Panel before executing the VI. Did you do so?
I have a few comments regarding your code, making it easier and/or better. Nothing that changes its behavior, though:
12-12-2018 07:04 AM
Thank you both for your comments. At the end, I tried it with actual hardware and it worked fine. This code is part of a larger one but your advice is very helpful to improve the entire application.
KR,
Michail