LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 50103 - DAQmx error

Hi guys,

 

Yet another set back in my progress; first hardware and now software. I came across this error 50103 while trying to calibrate my device. I am using Analog Input 0 (ai0) and analog input 5 (ai5) to measure two voltages at the same time and come out with a calibration curve that fits the relationship  between the two voltages. Now, after tonnes of reading on NI website and forum, I have come to realize that simultaneous tasks cannot be created using the daqmx. I get that I can open only one train of daqmx modules for the analog inputs and read multiple channels. BUt, how do I separate those two separate values? Can someone give me an example VI that reads two analog voltages at the same time? I am at home right now and dont have LabVIEW on my laptop to view examples.

 

Thanks!

 

V

I may not be perfect, but I'm all I got!
0 Kudos
Message 1 of 11
(3,814 Views)

Oh I use a DAQ USB 6008.

 

V

I may not be perfect, but I'm all I got!
0 Kudos
Message 2 of 11
(3,813 Views)
Use two separate Daq Assistants designating one port for the each Daq Assistant. This will make you read both the voltages. or you can use a single DAQ selecting both input ports. and select the measurement to be "differential". This will give you the direct measurement of the voltage differential between both the inputs. You can then callibrate or graph it the way u want.
Regards
Asad Tirmizi
Design Engineer
Institute of Avionics and Aeronautics

" Its never too late to be, what u want to be"
Using LabVIEW 8.2
0 Kudos
Message 3 of 11
(3,803 Views)

I want to use the traditional daqmx vi's. And not Daq Assistant. Because I have inherited a program from another person and I have to make amends to it.

 

Thanks!

 

VJ

I may not be perfect, but I'm all I got!
0 Kudos
Message 4 of 11
(3,791 Views)

Even if you used the DAQ Assistant, using two of them would be wrong. And if you did select differential it would not return the difference between the 2 channels

 

Since you don't have LabVIEW with you, I don't know what posting any code will do. When you do have LabVIEW, look at just about any of the examples. In the physical channel control, specify multiple channels. Click on the little arrow on the right side and select browse. Use Ctl-Click or Shift-Click.

 

You will need to select a DAQmx Read function that returns multiple channels. You'll then pick the data typ[e (1D DBL, 2D DBL, 1D Waveform). You use the Index Array function to get a specific channel.

Message Edited by Dennis Knutson on 02-15-2010 08:10 AM
0 Kudos
Message 5 of 11
(3,783 Views)

Thanks Dennis. I was just reading up on Index arrays. I have a question though. What would be the dimension of the array for 2 analog voltage readings in a while loop? Would it be a 2n*1 array? or would the elements be overwritten that when I index the array, I get the updated value? I hope my question is clear.

 

Thanks!

 

Vj

I may not be perfect, but I'm all I got!
0 Kudos
Message 6 of 11
(3,773 Views)
The dimensions would depend on the data type you use, how many channels, and how many samples. I would suggest you use a waveform data type where you would have 1 element per channel. Overwriting the array would happen with each DAQmx read. It has nothing to do with indexing.
0 Kudos
Message 7 of 11
(3,770 Views)

Hmmm... Ok.... I will try what you have said. I am attaching what I have done so far. They are not in waveform data type yet. i will try that out as well. But, for my understanding , do you think what I have done so far is correct( please refer images), in terms of multiple samples and multpile channels and how they are split for my application?

 

THanks a bunch!

 

VJ

I may not be perfect, but I'm all I got!
Download All
0 Kudos
Message 8 of 11
(3,763 Views)

Don't understand at all why you would be taking multiple samples and then all of those index array functions to get a scalar. Why don't you simply request a single sample.

 

Also, do not use multiple Index Array functions. Just drag it to get multiple inputs, which will give you multiple outputs.

0 Kudos
Message 9 of 11
(3,756 Views)

I get the part about single samples. I tried it out and it makes it easier.

 

_______________________________________________________________________________________

Also, do not use multiple Index Array functions. Just drag it to get multiple inputs, which will give you multiple outputs.

______________________________________________________________________________________

 

I dont understand this part. drag it in what sense? Could you point out in the snapshot i posted? This is a program I inherited and I am making changes to get the system running.

 

Thanks!

 

VJ

I may not be perfect, but I'm all I got!
0 Kudos
Message 10 of 11
(3,744 Views)