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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6221 Replaced with USB-6221 BNC - Getting Error -50103

Solved!
Go to solution

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

 

vi block.png


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

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
0 Kudos
Message 1 of 8
(2,553 Views)

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.

Applications Engineer
National Instruments
0 Kudos
Message 2 of 8
(2,544 Views)

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

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 8
(2,537 Views)

Dear Steve,

 

I am currently working on reproducing the issue. I will get back to you as soon as possible.

 

Regards,

 

Perry S.

Applications Engineer
National Instruments
0 Kudos
Message 4 of 8
(2,520 Views)
Solution
Accepted by topic author stevem181

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

---
Brad Keryan
NI R&D
Message 5 of 8
(2,516 Views)

Brad,

 

That makes sense. I'll reply when I get a chance to test this at the customer's site.

 

Thank you,

steve

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
0 Kudos
Message 6 of 8
(2,507 Views)

Brad,

 

Stopping the AI task before running Self Cal fixed the problemSmiley Happy.

 

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

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
0 Kudos
Message 7 of 8
(2,489 Views)

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

---
Brad Keryan
NI R&D
0 Kudos
Message 8 of 8
(2,487 Views)