LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Combining 2 analog outputs going wrong

Hello everyone

 

I'm using a USB3101FS (DAC-card) to create analog outputs from Labview. 3 channels AO0:2 are used for a 3 phase net (sinewaves), the other channel AO3 is used for a adjustable DC-voltage. If I use them separately, everything is working just perfect. But when I'm trying to use them in the same program, I can't get the 3 phase net. 

In attachment, you can see my program. You can find AO0:2 on the top of the program, AO3 on the bottom of the program.

 

Is there anyone who can help me with this please?

 

Dear regards 

Thybris

0 Kudos
Message 1 of 14
(3,361 Views)
I can't view your VI right now but I'm going to guess that you have two separate tasks so the solution is to use a single task with all 4 channels. You would just make a dc array with a single, common value on all elements and of the same size as your sinewave.
Message 2 of 14
(3,356 Views)

Dennis,

 

The VI does show the analog outputs as two different tasks.  It actually is using a Measurements Computing device (I assume) since it is using the ULx driver library.

 

Thybris,

When you say something isn't working, it usually helps to provide more details.  Do you get any kind of error message?  If so, what is the error number and what does it say?   The way you have it programmed, if this was using NI-DAQmx for an NI DAQ device, you'd be gettin error -50103 for resource reserved, which happens when you try to start another task that is using the same resources such as a timing engine as another task.  I don't know what the ULx driver error message would be.

 

The solution is to put all 4 channels into the same Analog Output task.

Message 3 of 14
(3,346 Views)

Thank you for the fast comment. 
The only problem is that the data for the first 3 analog outputs are created outside the while loop (it is constant for the whole program) and the data for the other analog output is created IN the whil loop (so it can be adjusted while the program is running). 
Do you have any solution for this? I've already tried to bring the data for the sinewaves in the while loop, but I get the error: 10014 occure at ULX Start Task.

 

Dear regards 

Thybris

0 Kudos
Message 4 of 14
(3,342 Views)

Dear RavensFan

 

No, I didn't get any errors. The problem was only that I couldn't measure anything on the output of MC device. I understand that I have to put the 4 channels on the same task, but then I have the problem Error 10014 (after I put the 3 analog output sinewaves in the while loop).

 

Dear regards

0 Kudos
Message 5 of 14
(3,338 Views)
How can you say that you don't get any errors and then say that you get error 10014? That's a measurement computing error so you'll need them to explain what exactly it means. It would help if you explained how you combined the waveforms and dc values. Did you do what I suggested so that you have 4 waveforms?
0 Kudos
Message 6 of 14
(3,325 Views)

I've connecte the 4 signals on one task, but it isn't working (the 3 sinewaves are ok, but the other one doesn't come true the device. If I measure on the AO3 I have 0V).

In attachment the program. (short version)

 

And I get the error 10014 only when I put the signal generation inside the while loop. 

0 Kudos
Message 7 of 14
(3,311 Views)

You are taking a scalar and turning it into a 1-D array of only 1 element.  When you build your 2-D array with the other arrays that have many more elements, your last row is only going to have one value with all the rest of the columns in that row auto-filled with zeroes.  So you get one blip of your value on that channel, followed by a steady zero output after that.

 

You need to make that last value a 1-D array with the same length as your other 1-D arrays.  Use Initialize Array to do that.  Then that value will persist on the channel throughout the analog output.

Message 8 of 14
(3,302 Views)

Yes this works! Thank you.

 

But I want to make that value variable. With that, I mean that I want to settle the value (it raises as my rpm raises). So here I have to put it inside the while loop, but when I do this, I get an error. Is there any way to solve this?

 

Dear regards

0 Kudos
Message 9 of 14
(3,294 Views)
You haven't given an explanation of what the error means. Post an image of the latest block diagram and include the error explanation. I don't have the ulx driver and I'm not going to install it.
0 Kudos
Message 10 of 14
(3,285 Views)