11-02-2023 02:08 PM
Hello!
I'm trying to use an NI 9474 module for PWM output. Using a cDAQ-9179 chassis with the following other modules: NI 9229, NI 9239, NI 9239, NI 9214, NI 9403, NI 9263.
I get error -88708 when I try to run my PWM code within my large program (that includes AI, AO, TC). When I run the PWM code by itself, I get good operation.
What possibilities are there that make "resource unavailable" for my counter within the larger program?
Thanks!
11-02-2023 09:03 PM
The "resource unavailable" error means that one of the hardware pieces required for the functionality is already in-use by some other task. In this case, by the time you try to create a counter output task, all the available counters on cDAQ are already used up by other tasks you created earlier.
When you test out just the counter output task, there is no other task using the counter and hence it works.
A cDAQ chassis contains only 4 counters that are shared by all modules as needed. Given this limited resource, you have to carefully configure the other tasks so you can satisfy the needs of all the tasks.
11-03-2023 11:04 AM
Is it possible to configure my tasks for this to happen? Is there an example of sharing counters between tasks to achieve this?
11-03-2023 12:27 PM
No, it is not about sharing. Please post your code to see how it can be improved under the constraints.
For example, If your household has only one notebook, will you and your sibling share the notebook at the same time? no, it is not logical.