09-29-2014 08:04 PM
HI everyone,
I have a simple question regarding a test that I am doing. I have a test board with a single input pin that requires 2 different counter tasks. One to generate a frequency scale and the other to output a specific number of pulses. My question is can I create a task for the frequecy test, close and clear that task and generate another task that does the pulses on the same counter? I've tried this but it appears that the first task doesn't release the counter resource. I'm using a 6363 board and only have 4 counters so I'm trying to recycle counters for different tasks. Any tips or suggestions would be most apprieciated.
Thanks,
K2
09-30-2014 07:48 AM
Generally speaking, that should be able to work. Are you by chance using the "DAQmx Connect Terminals" vi to route your counter output to the test pin? As a rule, I almost always do my routing with task-based methods so the routes will be cleared when I clear my task. The routes set up by "DAQmx Connect Terminals" are independent of tasks, and some connection routes may depend on having control over resources that are already reserved by tasks.
If that's not it, can you post your code (LV 2013 or earlier please)? This sounds plenty do-able.
-Kevin P
09-30-2014 08:44 AM
Thanks for the reply. I have not tried using the "DAQmx Connect Terninals" but I think I will give them a try in the future. I was able to solve my problem. As it turns out my conflict was not in reconfiguring the counter. I realized that I was trying to output a frequency on the counter as well as trying to count the pulses on the same counter - that does not work. Needless to say I switched the pulse counter to another counter and everything now appears to work correctly. Thanks again for your input!
09-30-2014 01:19 PM
Glad you got things going. Just to be clear, I wasn't trying to suggest that you specifically *should* use "DAQmx Connect Terminals", in fact I myself generally *avoid* it. Feel free to experiment and stuff though, maybe it'll be a better fit for your situation(s) than I've found it be for mine.
-Kevin P