Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -50103 While using two separate NI-9401 Modules for PWM and Duty Cycle

Solved!
Go to solution

Whilst building a testing apparatus for the control and regulation of compressors, I was asked to expand my test unit to monitor and control 6 units as opposed to the 3 it was already built for. I had already finished the programming for 3 units and there were no issues. I am generating a PWM signal through the NI-9401 which controls 3 compressor units. Once the signal is read, a Tach signal from each compressor is built into a separate task and read by the 9401 to produce an RPM measurement. This works just fine when running 3 units. However, once I had been asked to expand the testing apparatus, I wired in a second NI-9401 module to control the next three units as the one module does not have enough space to include 6 inputs while outputting a signal. I wired and wrote the program for the second module EXACTLY how I did for the first module, just with different tasks and now I am receiving an Error -50103 stating that the resource is reserved for all of my close and clear task vi's. Any input would be helpful. I have attached the Vi in question to see if anything can be noticed in the coding.

0 Kudos
Message 1 of 5
(2,443 Views)

My cDAQ knowledge is limited, but I *think* the problem is that the 9401 modules have no counter/timers of their own.  They can be used to connect digital signals between the outside world and the built-in counter/timers in the cDAQ *chassis*.  Odds are the chassis only has 4 counters, so you may need to get a module other than the 9401, something with counters built in.

 

 

-Kevin P

 

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 2 of 5
(2,440 Views)

Thanks, I am currently running with an NI cDAQ-9178 chassis and you are correct, I only have 4 counter/timers. Would you happen to know if each of these counters is utilized independently by each task (i.e. each task uses one counter/timer) or is this configured as one counter utilized per module? Otherwise I have an additional chassis, I am am fairly new to the world of LabVIEW, but would I be able to utilize the module through a separate chassis in the same project, or is this an issue?

0 Kudos
Message 3 of 5
(2,437 Views)
Solution
Accepted by topic author mcgraa98

Again, I don't know all the details for various combos of chassis and module, but it will generally be the case that 1 task will use 1 counter and be able to control 1 compressor.  

 

Your chassis has 4 counters and I *think* your 9401 module gives you connectivity between any or all 4 of those counters and the outside world.  That's why you've been able to run 3 compressors so far.

 

You should be able to connect up two separate 9178 chassis that each have a 9401 module as part of 1 project.  If 3 counter output tasks work on 1 chassis, you should have no problem running another 3 counter output tasks on the other chassis.

 

Sorry I can't be more definitive, I know desktop board capabilities much better than cDAQ.  There's a lot that's very similar, but I know there are also some differences and am not exhaustively familiar with what they all are.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 4 of 5
(2,416 Views)

Thanks again for the feedback. I wanted to mark this as a solution just in case anyone else finds themselves in the same scenario. It seems as though this issue with the number of counters in my chassis was the issue. I simply connected a single module chassis (NI-9171) in addition to my NI-9178 and was able to run the entire program without any issues. As you had aforementioned, there is an error when the second group of compressors call to the module since the first three compressors were already utilizing the counters necessary for the calculation.

0 Kudos
Message 5 of 5
(2,389 Views)