LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Doubt on multiple analog inputs using same DAQ device...

hello all,

             I have a simple program... 2 analog inputs cmg in from a single DAQ device... ai0,ai1.. i have created two seperate tasks, channels and all, but both the structures run

under the same while loop, and hence, the program gives me an error at the DAQ input"The specified resource is reserved. The operation could not be completed as specified.

"

 

I have attached the VI as well... how should I code this? I dont want the 2 channels operating simultaneously... they should have individual control... should I go for an event structure/???

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 1 of 11
(3,315 Views)

They have to be in the same task. You have a single DAQ card with a single A/D converter and a single convert clock. There is simply no reason you can't combine both channels in your example.

0 Kudos
Message 2 of 11
(3,308 Views)

Here is how you do it. You need to set your global Virtual channels into an aray. Then flatten then for the task. Then input to the start.

 

Tim
GHSP
0 Kudos
Message 3 of 11
(3,301 Views)

Here is the 8.0 version. I did not see that before I posted it.

Tim
GHSP
0 Kudos
Message 4 of 11
(3,300 Views)

Hey, thanks alot...:) how did you get it to run/??I tried to select two channels to the input... but couldnt get any waveforms on the chart...

 

should I change the channel constant to control/???I am attaching the snapshot...please see...

 

 

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 5 of 11
(3,288 Views)

I do not have your channels on my computer so you will need to set then in the array or change it to a control and add then to the array.

Tim
GHSP
0 Kudos
Message 6 of 11
(3,273 Views)

An alternative to using an array of channels and the Flatten to String vi, you can wire in a string to the Create Virtual Channels vi with the channel names separated by commas, such as "Dev1/ai0,Dev1/ai1,Dev1/ai2" or you could use a colon to notate a range of channels, such as "Dev1/ai0:2".  This is the same as having an array of the 3 channels and flattening to a string.

- tbob

Inventor of the WORM Global
Message 7 of 11
(3,261 Views)

alrite guys, thanks a lot for your advice... i shall try it out now and let you know...

 

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 8 of 11
(3,247 Views)

 


@aeastet wrote:

I do not have your channels on my computer so you will need to set then in the array or change it to a control and add then to the array.


i did try tat.. but could not see anything on the graph... did you get this code to run//?//?/

 

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 9 of 11
(3,245 Views)

hello all,

              SORRY to bump again into the thread... I could get the previous VI to work.... Now i went ahead and build another VI in which

i am reading analog and digital I/O from 2 different DAQs in the same while loop...

 

I RAN THE CODE, the analog input ran properly, however got and error in analogoutput and the digital output as

"Internal Software Error occurred in MIG software. Please contact National Instruments Support"

 

Please check the VI i have atached and can please tell me what is wrong in it/??/

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 10 of 11
(3,235 Views)