05-14-2015 07:24 AM
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
05-14-2015 08:00 AM
05-14-2015 08:07 AM
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.
05-14-2015 08:11 AM
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
05-14-2015 08:16 AM
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
05-14-2015 08:30 AM
05-14-2015 09:00 AM
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.
05-14-2015 09:48 AM
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.
05-14-2015 10:03 AM
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
05-14-2015 10:16 AM