Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -50103 occurred at DAQmx Start Task

Solved!
Go to solution

Hello!

I'm using the attached VI to control a stepper motor that works flawlessly under LV2010 but starts throwing error (image below) when used under LV2012. If anyone has an idea please help.. 😞  - Thanks!

Note that I've DAQ assistant is configured properly.

 

erro 50103.png

______________
KowdTek
LabVIEW 2009

One Step At A Time, Maybe Two...
0 Kudos
Message 1 of 7
(4,548 Views)

Hi KowdTek,

 

This error occurs when you are trying to use the same hardware resource for more than one task or route.  I took a look at your code and noticed that your Fast Move Express VI is set to run continuously, which means that once you start it, it will repeatedly output your 100 sample pulse train until you wire a TRUE into the stop input terminal of an Express VI .  This is reserving your board's counters without freeing them up, and I also imagine that the continuous behavior is not what you intended.

 

Instead, I would recommend that you change your Fast Move Express VI to output N Pulses, and also move that VI into your case structure that is gated by Home?2 in order to conditionally execute this move.  I have attached the modified VI here for your convenience.  I also added a stop control to the loop so that the user can manually stop executiong without using the Abort button (not recommended).

 

Let us know if you have any questions!

 

Regards,

Regards,
Chris Elliott
x36772
0 Kudos
Message 2 of 7
(4,515 Views)

Hello Chris,

I'm not using the same hardware resource for more than one task. In fact, I tried to configure the Fast Move Express VI to a different hardware (USB 6259) alone (same PC) but the same issue occurs. The thing I've noticed is this VI works on WinXP with LV2010 & LV 8.6. Now that the machines OS is upgraded to Win7 + latest LV version it stops working. but I really hate to downgrade.

 

Thanks,

 

______________
KowdTek
LabVIEW 2009

One Step At A Time, Maybe Two...
0 Kudos
Message 3 of 7
(4,509 Views)

Hi KowdTek,

 

Sometimes the way different OS's and CPU architectures handle concurrency can vary greatly; this can affect application behavior when parallel threads are running without proper use of concurrent mechanisms such as semaphores and resource management.

 

Your Fast Move Express VI asynchronously spawns a separate thread when it is called in order to output your counter task.  Each loop iteration spawns a new thread running a continuous counter output task, which has to reserve a counter on your board.  In my testing of your code, the Fast Move Express VI would execute twice (reserving counter 0 and then counter 1) and error out on the third iteration after both counters were reserved.  Setting the Express VI to N Pulses instead of Continuous allows the resource to be released after 100 pulses are output, which I presume to be the intended behavior.

 

Did you try the VI I attached in my previous post?  The modification I made was motivated by the explanation above and allowed the code to execute properly with a PCI-6221 on my computer.

 

Regards,

Regards,
Chris Elliott
x36772
0 Kudos
Message 4 of 7
(4,501 Views)

Hello Chris!

I finally had a chance to test the VI you modified. It works but it requires some tune up because it doesn't run smoothly. It makes its smooth motion then in some point "tick sound" is noticed as if the motor stops for a while... (see simple illustration below)

__________-__________-__________-__________ and so on... as my purpose is to bring the device under test down smoothly like before when I'm still using WinXP....

 

Thanks!

 

______________
KowdTek
LabVIEW 2009

One Step At A Time, Maybe Two...
0 Kudos
Message 5 of 7
(4,487 Views)
Solution
Accepted by topic author KowdTek

Hi KowdTek,

 

Thank you for the update.  I had presumed you were not intending the output to be continuous (smooth).

 

Express VIs generally are not designed for this kind of use because they open and close a session every time you call one.  This should result a in a glitch in your output like you were seeing.  To be honest, I am quite surprised you were not seeing this non-smooth behavior before with your implementation on Windows XP, and I don't have a good explanation for why it worked.  I can, however, recommend a more robust approach to generating this smooth output you are looking for.

 

If the goal is to only move once per INIT (e.g. once you start moving, don't stop until you're finished, at which point the VI returns to the INIT state), you should convert your Express VI to DAQmx code (right-click»Generate NI-DAQmx Code).  And try an implementation similar to this in your EXEC & MON case.  This should produce the desired behavior.

 

EXEC & MON Case.jpg

 

Regards,

Regards,
Chris Elliott
x36772
Message 6 of 7
(4,475 Views)

Chris,

It worked like a charm...

 

Thank you very much.

______________
KowdTek
LabVIEW 2009

One Step At A Time, Maybe Two...
0 Kudos
Message 7 of 7
(4,465 Views)