Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

PWM Output

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!

0 Kudos
Message 1 of 4
(1,109 Views)

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.

 

santo_13_0-1698976811103.png

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 4
(1,077 Views)

Is it possible to configure my tasks for this to happen?  Is there an example of sharing counters between tasks to achieve this?

0 Kudos
Message 3 of 4
(1,047 Views)

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.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 4 of 4
(1,040 Views)