04-05-2009 08:59 AM
I'd like to measure the difference voltage between two analog inputs.
Could someone write me a VI for it, please?![]()
I'm new with Labview....![]()
Thanks a lot!!!
04-05-2009 09:23 AM - edited 04-05-2009 09:23 AM
On the numeric palette, there is a function called subtract. As the
help for it says, it 'Computes the difference of the inputs.'.
Since this is such a simple process, you need to provide some details on why you can't do this. You can wire just about any data type into the inputs. Post your code if you need further help.
04-05-2009 01:18 PM
If you haven't already done so, the best place to start is by going through the tutorials(s) and look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.
Remember, it's better to teach a person to fish than ...
04-06-2009 10:04 AM
Thanks for your suggestions.![]()
I wrote the codes as shown in the attachment.
but error occurs as:
Possible reason(s):
The specified resource is reserved. The operation could not be completed as specified.
04-06-2009 10:11 AM
Did you do a search for that error? It's a very common mistake. You cannot have two separate tasks with the same hardware resource. Just have both channels in a single task and change the DAQmx Read to NChan 1Samp. You then have a choice of getting a 1D DBL Array or 1D Waveform array. Either way, to get a specific channel, you just use the Index Array function.
04-06-2009 11:12 AM
Thank you for your reply.
but i still don't know how to deal with the 'NChan 1Samp'output. how can i extract the two voltages from it and make the calculation?
cheers
04-06-2009 11:44 AM - edited 04-06-2009 11:45 AM
As I said, use the Index Array function.
This is very basic stuff. Please take the time to go through the basic tutorials.