08-07-2017 03:32 PM
I am relatively new to LabView, so I'll describe as much as I can about the problem.
I have a 1D Double array of 4 values that I am trying to write to 4 different pressure transducers using the DAQ assistant. I have added all 4 channels to the DAQ assistant, and I am passing the array as input to DAQ assistant. However, when I try to run it, it gives me
Error 20054
08-07-2017 03:49 PM
No Pictures, please -- send Code (preferably Entire Projects after the enclosing Folder has been compressed to a Zip file, otherwise the relevant entire VIs).
I never use the Dreaded DAQ Assistant (to give it its full name), so I'm not sure where/how one specifies multiple channels in a DAQ Out task. But if one configures a multi-channel Task in MAX or in the Project, opens the Task with Start Task, does a DAQmx Write specifying Multiple Channels and Single Sample, puts it in a While Loop to do it multiple times (if desired), then closes the Task with Close Task, this should do what you want.
Bob Schor
08-08-2017 11:17 AM
Hi,
Each channel is looking for an array of values to read in. In the Block Diagram palette under Signal Processing you can find folders for Waveform Generation and Signal Generation. The signals will be DBL arrays.
For example, if you are looking to send a pulse signal of a certain value try going to Signal Processing >> Signal Generation >> Pulse Pattern in the Block Diagram palette. The Pulse Pattern function will output a 1D DBL array which can be sent to a single channel.
Each channel needs to be sent it's own signal. To combine the 4 signals, you are going to need to build an array of 4 signals (one for each channel). Each signal will be a DBL array and then you will build an array of these arrays using the Build Array function. The output of Build Array can be the "data" input of the DAQ Assistant. When wired to the DAQ Assistant a Convert To Dynamic Data should take the 2D array and make it dynamic data for the DAQ Assistant.
Thank you,
Angie Cisneros
08-09-2017 12:15 PM
Thanks for your prompt response Bob_Schor. Unfortunately I cannot upload the entire code, since it interfaces with a C++ compiler and has a lot of subVI's. However, I did try what you said, where I used the DAQmx instead of the DAQ Assistant. I do have a question about the write task itself though. If I am passing a 1D array of values to the write task,1) How do you create a multi-channel task in MAX? From what I tried, it just seems to be going back to the DAQ Assistant when I try to do that. Instead, I just listed out the channels, comma separated, as the 'task' input to the Start Task VI. Will this work? 2) Will it write the values in the order I specify the channels? In other words, how does LabView know which value to write to which channel?
08-09-2017 12:18 PM
Hi Angie, I am not trying to send any sort of waveform to the channel. I just have analog voltage values between 1 and 10 volts, and this value changes in every loop of my code.
08-09-2017 03:07 PM
Hi,
Would you mind attaching some screenshots of the code? Maybe one of your loop and one of the entire code? In the original post the picture was not added correctly.
To send a single value to be read set Generation Mode to 1 Sample (On Demand) in the DAQ Assistant.
Attached is a gif of me working out what I think you are looking to do with a simulated device.