01-26-2016 07:36 PM
I changed the channel to an array (7 channels) and used DAQmx Flatten Channel String.vi, but I cannot get the Analog 1D Wfm NChan Nsamp to work without error. I changed it to Analog 2D Wfm NChan Nsamp and made a 7 waveform 2D array of data, but I always get an error.
01-26-2016 08:18 PM
Please (a) attach code (VIs, not a .JPG), (b) tell us what version of LabVIEW you are using, (c) describe the DAQ equipment you are using, and (d) tell us the sampling parameters (sampling rate, etc.).
Bob Schor
01-26-2016 08:41 PM - edited 01-26-2016 08:41 PM
I don't understand what you did. You don't need to create an array. The syntax is simply like Dev1/ai0:6 for 7 channels.
If you get an error with Nsamp/Nchan and 1D waveform, you needed to provide the error code/message. Silly to try and guess what it is.
01-27-2016 10:30 AM
The code is a standard LV example (LabVIEW>Help>Find Examples>Hardware Input and Output>DAQmx>Analog Output>Voltage - Continuous Output.vi).
I tried changing the channel control to a constant PXI1Slot3/ao2:8 and still got the following error:
Error -200524 The number of channels in the data does not match the number of channels in the task.
Previously, I tried, without success, to get the waveform generation loop to generate 7 waveforms and I tried building an array of 7 waveforms, but the "DAQmx Write Analog 1D Wfm NChan Nsamp" still throws an error. As noted previously, I tried changing this to 2D Wfm without success.
01-27-2016 10:57 AM
01-27-2016 11:01 AM
01-27-2016 12:30 PM
Sorry, I thought that the subject title would indicate that I was doing output.
I also played around some more and solved the problem. I had to make 7 entries in the Waveform Array block. I had assumed that the for loop would run the proper number of times since I was specifying 7 channels. Once I made 7 entries in the Waveform Array block, it worked properly.
Thanks for the help.