From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-25-2011 04:31 AM
My customer is replicating a system that worked fine with an NI USB-6221. Now I'm getting an error with the NI USB-6221 BNC. The error only occurs when I try to perform a Self Calibration.
---
The error:
Error -50103 occurred at DAQmx Self Calibrate.vi:1
NI Platform Services: The specified resource is reserved.
---
I've implemented the driver as an action engine.
What is odd to me is that I can run the action engine stand-alone to setup the device and run the self cal without getting an error. But when I call these routines from another vi - the error occurres.
To clarify (and reproduce the problem) - with USB-6221 BNC set as "dev1":
1) DAQ Analog In AE.vi - Select "Setup" as action on vi then run it
2) DAQ Analog In AE.vi - Select "Cal" as action then run it - no error
3) Place the DAQ vis in a new vi as shown - run and that's when I get the error
This is my first experience with DAQmx, so any ideas of what might cause this problem would be appreciated.
Thanks,
steve
LV2009 Sp1
MAX 4.71
NI-DAQmx Device Driver 9.2.1
Solved! Go to Solution.
04-26-2011 12:48 PM
Dear Steve,
I have found a knowledge base article on ni.com that lists a few reasons why this might be happening. Take a look at it and see if it helps.
http://digital.ni.com/public.nsf/allkb/66DB5B7A0535B88C8625774B0075081E?OpenDocument
Regards,
Perry S.
04-26-2011 03:38 PM
Perry,
Thanks for your reply. I saw that link when searching for an answer. The solutions did not *seem* to apply to my situation - the code worked with the USB-6221.
I'm hoping that someone who knows DAQmx well will look at my code and see if I made any mistakes. Testing the code on a USB-6221 BNC in another environment would also be much appreciated.
Thanks,
steve
04-28-2011 05:16 PM
Dear Steve,
I am currently working on reproducing the issue. I will get back to you as soon as possible.
Regards,
Perry S.
04-28-2011 07:50 PM - edited 04-28-2011 07:52 PM
Hi Steve,
The "Setup" action leaves the DAQmx task running, so the 6221's AI resources are reserved to prevent other programs and VIs from interfering. When the top-level VI stops running, LabVIEW automatically tells DAQmx to clear the task. This is why you get different behavior when you run the action engine as the top-level VI than when you run the action engine as a subVI. Auto-cleanup aside, you need to unreserve (e.g. stop or clear) all tasks before you can self-calibrate the device, so try executing the "Close" action before "Cal".
Brad
04-29-2011 04:37 AM
Brad,
That makes sense. I'll reply when I get a chance to test this at the customer's site.
Thank you,
steve
05-02-2011 03:09 PM
Brad,
Stopping the AI task before running Self Cal fixed the problem.
The older USB-6221 DAQ apparently did not have this restriction.
It would be nice to have this mentioned in the Help info for DAQmx Self Calibration.vi.
Thanks Again,
steve
05-02-2011 03:41 PM
Hi Steve,
I'm afraid M Series has never supported running an AI task and performing a self-calibration at the same time, so something else must be different between the old and new systems. Regardless, stopping the AI task before performing a self-calibration is the right thing to do, so I'm glad that it fixed the problem.
Brad