LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem DAQ mx in reading voltage- 2 channels

Solved!
Go to solution

Hi,

I made this VI, basically I want to read the voltage from two different channels (I have a DAQ USB6001), then write data in one spreadsheet on three columns (number of cicle or time, voltage 1, voltage 2). I have some problem with the queue and the sample rating, but above all I have this error:

 

Error -50103 occurred at DAQmx Start Task.vi:7220002

Possible reason(s):

The specified resource is reserved. The operation could not be completed as specified.

 

I have no idea why it doesn´t work, also because actually, both channels don´t work! the second one, it´s always on 0, the first one gives me that error. Can you help me? thanks!!

0 Kudos
Message 1 of 5
(2,362 Views)
Solution
Accepted by topic author Sim1

You need a single task for both channels.  This is because they are on the same module and therefore have to use the same ADC, MUX, sample clock, etc.  So as soon as the first task is created, the second cannot since all of those internal resources are taken.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(2,339 Views)

Yes, I figured out just now. Now I have one DAQ read, with Nchan and Nsamp. I put N samp because is synchronized with the clock. So now I have a 2D array. how can I write this array on a txt file? I tried several times but I cannot understand (I already tried it in one another project, at the end I put only 1 sample).

0 Kudos
Message 3 of 5
(2,337 Views)

Try using the Array To Spreadsheet String.  That will format your data into a format you want.  Then use the Write To Text File to actually write the data.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 5
(2,329 Views)

ok thank you, I try and in just in case I open another topic as this problems is solved!

0 Kudos
Message 5 of 5
(2,307 Views)