LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -50103 occurred at DAQmx Start Task.vi:7220003 . The specified resource is reserved.

Hi.

I have a problem with this error.

I would like to launch two programs at once, but it does not work, although everyone independently works well.

I am using NImyDAQ.

 

Thank you.

JJ.

0 Kudos
Message 1 of 8
(2,813 Views)

This is from here

 

With all National Instruments Multifunction DAQ devices, only one analog input and one analog output task can be run at the same time. ...

 

Not sure if it still applies. But you are trying to run more than 1.

 

mcduff

Message 2 of 8
(2,773 Views)

Thank you. But I still hope there is a solution for my problem.

 

Depends it on HW ? Or it is specific for NI device. I can use PCI6221 instead of MyDAQ (but not now).

If using PCI6221 can solve my problem. I am happy. But now I don´t have PCI6221 and I need to know it now :-(.

0 Kudos
Message 3 of 8
(2,769 Views)

You cannot have two routines trying to use the same hardware at the same time, p(articularly if (like most DAQmx devices) the Tasks are tied to the device.  In some circumstances, you can (I think) sometimes have multiple Tasks assigned to a single Device (I'm thinking about a 96-port DIO device that could be configured in a number of ways, and with a number of "groupings" of the ports into "Lines" of, say, 8 ports, so you could have a Task for the low 8 bits, another Task for the next 8 bits, and maybe Tasks for individual separate bits elsewhere).  However, you don't want the Tasks and the VIs to be totally independent of each other.  This is where LabVIEW Project comes in, to associate the VIs with a Project and to define the Tasks within the Project, so everyone knows who has access to which ports and devices.

 

Bob Schor

Message 4 of 8
(2,754 Views)

Ok. it means that, there is no way how to run this two codes simultaneously?
(if it don't involves the use of two devices)

 

I have on NI myDAQ two AO, but I can use only one in one moment?
I'm very frustrated.

 

thank you anyway Bob

0 Kudos
Message 5 of 8
(2,748 Views)

@Johnny_J wrote:

I have on NI myDAQ two AO, but I can use only one in one moment?


No, you can use both AO0 and AO1 (I think there's an example somewhere of making a Audio Filter, using AI0 and AI1 as "Left" and "Right" Audio In, and AO0 and AO1 as Audio Out.  The "trick", of course, is you have a single AO Task, Multiple Channels, Multiple Samples (did I say that backwards?), so the two AO channels are treated together.  See if you can find that example in the stuff you got with the myDAQ.

 

Bob Schor

0 Kudos
Message 6 of 8
(2,701 Views)

Hi bob. Thank you.

 

I need to work with 2x inputs and 2 x outputs simultaneously.

I am trying to create it with one multi channel task. 

On first AO i need sinus function where I will be able to change frequency "on the fly". On second AO I need linearly increasing signal. These signals will be passed through the electronic circuit and with simultanously AI I would like measure the output signals on the electronic circuit. (Changed input signals). 

 

Do you have a idea how to solve my error (in attachment) and "on the fly" change of frequency?

 

Thank you.

JJ

 

 

Download All
0 Kudos
Message 7 of 8
(2,685 Views)

The Error comes in the AI Loop.  Normally for AI, you start the Task, then (inside a loop) you read, process (usually by having the Loop be a Producer in a Consumer/Producer  pair, sending the data (through a Queue) to a parallel Consumer loop that plots it, saves it to disk, or whatever else you need.  When you loop again, you again do a Read, one read each loop, and when you exit the loop, you do the Stop Task.  So one Start Task before the Loop, Reads in the Loop, and Stop Task outside the loop.

 

As to your other question, how to create a variable-frequency sinusoid, if you look in the Forum about 7 posts before yours, you'll find one asking how to update amplitude and frequency of a signal "on the fly", exactly what I think you are trying to do.

 

It will be a bit of a "learning curve" for you, as it uses no Express VIs.  I dislike Express VIs, as they are designed to make simple tasks "almost trivial", and they encourage users to not learn how the functions really work so they can be used for more complex tasks (such as what you want to do).  I also dislike Dynamic Data Wires, which you will also not find in the earlier post's "How-to" explanation.

 

I advise you to study the AO code "by itself", and maybe even run it by itself so that you can see what and understand how it works.  Pay attention to the Sampling Rate and Number of Samples -- you need to understand the logic behind the values chosen.  Once the "Aha!" moment hits you, you should be able to add on the AI loop (incorporating the comments in my first paragraph).  I'm not 100% certain if this is true, but I would expect that the AI and AO loops do not need to run at the same speed ...

 

Bob Schor

0 Kudos
Message 8 of 8
(2,672 Views)