11-21-2023 08:34 PM - edited 11-21-2023 08:35 PM
Hello. I am a LabVIEW beginner.
Currently, I am trying to simultaneously generate 16 analog voltage outputs with different frequencies using cDAQ-9171 and ni-9264.
While I can successfully output a single analog signal through LabVIEW examples, when I try to generate 16 outputs simultaneously by changing the number of physical channels on the front panel, I encounter error -200524.
Could you please help me understand what might be wrong?
Thank you. Have a great day.
Solved! Go to Solution.
11-22-2023 01:21 AM
Hi eugenene,
@eugenene wrote:
While I can successfully output a single analog signal through LabVIEW examples, when I try to generate 16 outputs simultaneously by changing the number of physical channels on the front panel, I encounter error -200524.
Could you please help me understand what might be wrong?
The error message is quite clear: there are more samples in your data than there are channels in the DAQmx task! You need to define the task with all needed channels…
On your VI: you are using a very recent LabVIEW version. Many of us (including me) stick with older LabVIEW versions. So you would get a broader audience when you would downconvert your VI (File->Save for previous) before posting. I prefer LV2019.
11-22-2023 01:40 AM
Thanks GerdW. I downconverted my VI to LV 2012. (There was no LV2019. im sorry)
Does that mean that to output multiple analog signals, I need to modify not only the front panel but also the block diagram?
I'm also curious if there are examples of block diagrams for generating multiple analog outputs.
Best regards,
Eugenene
11-22-2023 01:53 AM - edited 11-22-2023 01:54 AM
Hi Eugenene,
@eugenene wrote:
Thanks GerdW. I downconverted my VI to LV 2012. (There was no LV2019. im sorry)
The attached VI still is saved with LV2023.
Please attach a downconverted version of your VI…
In the selection for downconversion there should be the whole list from LV8.0 upto LV2022 available.
Here's the dialog as shown by LV2019:
11-22-2023 02:22 AM
I made a mistake. Sorry..
It should be saved in the 2019 version now. Could you please check if the file opens correctly?
Thank you
Best regards,
Eugenene
11-22-2023 02:29 AM - edited 11-22-2023 02:30 AM
Hi Eugenene,
now I could open the VI.
I marked the important stuff in the frontpanel in bold:
The number of channels has to match the number of array elements in the WaveformSettings!
There is only one channel selected in the "Physical channel(s)" control…
11-22-2023 02:54 AM
Thank you for your kind response.
Looking at the attached image, I set the front panel's physical channels as a0 and a1.
In the block diagram, I added one more output array to the waveform settings, making it two in total.
However, I keep encountering the same error. Is there a mistake I made that you can identify?
Thank you.
Best regards,
Eugenene
11-22-2023 03:06 AM
Hi Eugenene,
@eugenene wrote:
However, I keep encountering the same error. Is there a mistake I made that you can identify?
Now there are two channels defined in the task, but still only one element in the waveform array!
@eugenene wrote:
In the block diagram, I added one more output array to the waveform settings, making it two in total.
It doesn't make sense to add another array indicator to your frontpanel when you want to append one more element to your settings array!
As this is very basic LabVIEW stuff: please consider those Learning resources offered at the top of the LabVIEW board! You really need to know how to recognize the number of elements in an array control!
11-22-2023 07:14 PM
Thanks to your help,
I've resolved the issue!
Thank you. Have a great day!