annuler
Affichage des résultats de 
Rechercher plutôt 
Vouliez-vous dire : 

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

Résolu !
Accéder à la 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

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
0 Compliments
Message 1 sur 8
3 438 Visites

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 Compliments
Message 2 sur 8
3 429 Visites

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

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
0 Compliments
Message 3 sur 8
3 422 Visites

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 Compliments
Message 4 sur 8
3 405 Visites
Solution
Accepté par l'auteur du sujet 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 sur 8
3 401 Visites

Brad,

 

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

 

Thank you,

steve

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
0 Compliments
Message 6 sur 8
3 392 Visites

Brad,

 

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

 

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

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
0 Compliments
Message 7 sur 8
3 374 Visites

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 Compliments
Message 8 sur 8
3 372 Visites