Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

case structure daqmx

Hello, I'm new to Labview and I'm stuck.  I can't figure out how to run this simulator.  I'm trying to take a decimal input and convert it to a binary sequence by lighting up some led's.  Attached is the program.  It's giving me this error when I run it: 

 

Error -200022 occurred at DAQmx Write (Analog DBL 1Chan 1Samp).vi:7

 

Possible reason(s):

Measurements: Resource requested by this task has already been reserved by a different task.

Task Name: _unnamedTask<A6E0>

 

Any help would great.  Thanks. 

0 Kudos
Message 1 of 20
(4,764 Views)

Two major problems (and, um, several small ones, but that's just cause your new to this).

 

1) Data Flow Control:  You have none.  If you don't tell LabVIEW in what order you want things to run, it'll choose for itself, and it probably won't what you want.  The error cluster is a very good way to impose some flow control.

 

2) You're not cleaning up your DAQ Tasks.

 

A fixed VI is attached.  LV 8.5.

0 Kudos
Message 2 of 20
(4,751 Views)
Thank you very much for your help.  The input you provided was great.  I got it to work!  Thanks again. 
0 Kudos
Message 3 of 20
(4,722 Views)

Hi...

 

 here again i am posting in an old Thread.. The problem is i want data from both the voltage and Temperature modules. The data needs to by synced and by thet i mean that the temperature and Volate reading should be at the same instant.
For this i have to run both the DAQmX read at the same time but i get the error 200022..

 

I dunno how to get rid of this error and have a paralell data aquistion.

Could anyone please help.

Attached is the VI..

0 Kudos
Message 4 of 20
(4,572 Views)

You could have searched for the error code or the message (resource reserved) and found out what you are doing wrong.

 

I don't have 2009 installed here but I can tell you are either using two DAQ Assistants or two different DAQmx Reads and that is simply not allowed. You have to combine both channels into a single task and use a single DAQmx Read/DAQ Assistant. To specify multiple channels with DAQmx, you simply use the syntax Dev1/ai0:1. If you are using the DAQ Assistant, follow the instructions for multiple channel selection.

 

In any case, you will not get both readings at the 'same instant' unless you are using one of the simultaneous sampling DAQ cards. Most DAQ cards mux the signals into a single A/D and there is a small delay between the different channels being sampled.

0 Kudos
Message 5 of 20
(4,554 Views)

Hi dennis..

 

You are right.. I am using 2 DAQmx reads.. i did not know that it was not allowed. I cant go to lab until monday. Could you please tell me which version of LabVIEW you have so that i could show you the code in that format..

i ll also look into doing what you say on regarding using just 1 DAQmx read on  monday.. 

Thanks so much for the reply

 

 

0 Kudos
Message 6 of 20
(4,548 Views)
8.6
0 Kudos
Message 7 of 20
(4,545 Views)

Ok Dennis..

 

I shall get back to you asap...

Thanks again 

0 Kudos
Message 8 of 20
(4,542 Views)

Hi dennis..

 

I tried pluggin in the inputs into a single DAQmx but it doesnt seem to work that way. It says wires connect more than one data source. I am not sure how to go ahead and to the wiring. The basic LabVIEW tutorials dont help much in this case. Can you please look into the code and help me modify it ??

I have saved it for u in 8.6 format.

0 Kudos
Message 9 of 20
(4,481 Views)

Try this.

 

Message Edited by Dennis Knutson on 11-30-2009 11:54 AM
0 Kudos
Message 10 of 20
(4,474 Views)