we want to use a NI cDAQ-9188 with 3 NI-9482 modules (and some other modules) to control a pump test rig. We are using LabVIEW 2019. Connecting all the analog inputs, analog outputs and digital inputs was no big matter.
But up to now I could not find a way to connect the digital outputs. The idea was to use a boolean button for every pump to run/stop it. I think the problem occurs somewhere in converting the signal. The error code is: error -200524. Copying the original message does not make much sense because I am using the german version of Labview.
I would be very thankful for receiving any help. THANKS!
Solved! Go to Solution.
sometimes it is much easier when you DON'T use ExpressVIs…
Use a boolean array with plain DAQmx functions:
You need to define the DO task with the same number of channels as are elements in the array (or vice versa)…
I think the problem occurs somewhere in converting the signal.
Why do yo need to Merge all those booleans into a DDT?
Why do you convert that DDT into a boolean array?
Why do you convert that array back to DDT?
Why do you convert that DDT into a 2D float array?
Why do you convert that float array into a digital waveform?
And why build an array of one element of that waveform???
All you need is a single BuildArray node - or use a boolean array instead of 10 buttons…
Learn DAQmx (there are excellent Tutorials out there -- a particularly good one can be found by doing a Web Search for "Learn 10 Functions in NI-DAQmx and Handle 80 Percent ...".
Do Not use the DAQ Assistant for this simple problem. Especially do Not use the Dynamic Data Wire (the black and white checkered wire) for anything -- it almost always creates problems except when used for the most trivial things (like an NI Sales Rep who doesn't know LabVIEW setting up a Demo for student to show "how simple LabVIEW is to use").
And when you get past the button mashing example and have to act on different Booleans from different parts of your code....
It will save you a lot of headaches and frustration trying to figure out why your Booleans are acting wonky.
Thank you all for helping me finding an easy solution!
@GerdW: I needed all the conversions because I wanted to find a way to connect the booleans to the ExpressVI. Your solution was ways easier and comfortable. Thanks a lot! I maybe gonna restructure my whole program now.
@Bob_Schor: I read many tutorials in the last couple of weeks. So I think it was impossible to memorize all the information. Thank you for reminding me of this tutorial.
@Ben: Thank you for your example. This can be very useful in my following work.
@altenbach: At last thank you for giving me the clue of using a cluster. This was the final tip I needed.