cancel
Showing results for 
Search instead for 
Did you mean: 

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

LV_Enthu
Active Participant

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

Message contains an attachment

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
10 REPLIES 10
Dennis_Knutson
Knight of NI

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

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.

aeastet
Trusted Enthusiast

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

Message contains an attachment

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
Highlighted
aeastet
Trusted Enthusiast

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

Message contains an attachment

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

Tim
GHSP
LV_Enthu
Active Participant

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

Message contains an attachment

Hey, thanks alot...Smiley Happy 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
aeastet
Trusted Enthusiast

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

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
tbob
Trusted Enthusiast

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

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
LV_Enthu
Active Participant

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

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
LV_Enthu
Active Participant

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

 


@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
LV_Enthu
Active Participant

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

Message contains an attachment

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