Nate,
error 10009 usually occurs when the user does not specify a valid counter number for the Counter Group Config.vi. Valid counter numbers depend on the type of counter chip on your board. The detailed labview help of this vi gives all the info you need in this regard. In the pwm.vi the CTR Control.vi is called at the end of a while loop to reset the counter that was in use. This CTR Control.vi is taking in a task ID from the subvi called PWM.vi. If the subvi is operating fine, and you only get the error at the end, I would suggest that you should put a probe in the task ID that is being fed into CTR Control.vi and make sure it is consistent with the task ID that was setup internally in PWM.vi. Also, check the source of the error. This will give you a better idea about
the subvi that is giving trouble.