LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -200489 / AI Voltage problem

Solved!
Go to solution

Good day, 

 

I am trying to read in 5 voltages from a DAQ module. If you see the photo attached, you'll notice the for-loop. When all five readings were read in the for-loop, there were no issues. However, because I need to apply a different scale to the Pressure Gauge, I pulled it out, hoping it would work the same way as before. It did not work:

Error -200489: Specified channel cannot be added to the task, because a channel with the same name is already in the task.

DAQmx Create Channel (AI-Voltage-Basic).vi:1780002<append>
<B>Channel Name: </B>PLS2

<B>Task Name: </B>_unnamedTask<28B>

 

What am I doing wrong or is there a better way to do this?

0 Kudos
Message 1 of 5
(5,560 Views)
Solution
Accepted by jamesbe

Hi James,

 

instead of attaching a plain image you should have attached the VI or a snippet! Images are rather hard to debug with LabVIEW…

 

Did you use probes to check for the error? The error message is quite clear, so the problem should be easy to locate!

 

Remove the DAQmx function right after the BuildArray: right now you send the very same string to the channel name input for each of the 4 channels. And don't forget to set the correct DAQmx channels in those "PLSx" controls!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(5,554 Views)

Hi,

 

The DAQmx Flatten Channel String takes in "Names" which is why you see the coersion dot where you have the 4 controls built into an array of controls. You then define the array of strings with the same name (PLS1, PLS2, PLS3, PLS4). This is the conflict that error is throwing. I believe you do not need that array of strings as the DAQmx task name controls are being typecast as strings via the coersion dot on the Flatten Channel String vi. 

 

 

CLD | CTD
0 Kudos
Message 3 of 5
(5,548 Views)

From the picture we can't see the actual names of names of the channel in the controls. If the names are PLS1, PLS2, ... then you are trying to rename them to already existing names.

 

Ben64

0 Kudos
Message 4 of 5
(5,537 Views)

"Remove the DAQmx function right after the BuildArray"

The Flatten String funtion seemed to work when they were all in the the for loop, but they stopped getting indexed once I separated them, so removing the function allowed them to be indexed again. 

Thank you all for the answers!

0 Kudos
Message 5 of 5
(5,515 Views)