LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -200301 When Using Property Node to Update Counter Pulse Output

I get Error -200301 for my PID controller, although I am using a wait VI in my while loop set for 1010 ms.  The loop is to update the output for a PID controller each second.  I have added time, 10 ms, as noted to make sure that it can complete before the next interval, but this still does not always keep the error from occuring.  I do not want to increase my wait time in the loop as it will be out of line with the actual time.  What can I do to avoid this error.
0 Kudos
Message 1 of 2
(3,304 Views)
Hi Mhschmid,

The error -200301 occurs because you’re trying to change an attribute of the clock output before it has completed at least one cycle.  For example, I used the Gen Dig Pulse Train-Continuous.vi (Help » Find Examples » Hardware Input and Output » DAQmx » Generating Digital Pulses) and modified it slightly as shown below.  I tested the example with quite a few variations of numbers on two different computers all with the duty cycle at 0.5.  It appears that at frequencies greater than 1 KHz I was able to set a wait until next ms multiple to 1ms and never saw the error on either machine.  When I reduced the frequency and left the wait at 1ms, I was able to go as low as 32 Hz without seeing the error on one machine and only 48Hz on the other.  This just shows that the exact minimum timing is system speed dependent.  In regards to how to avoid this error, I would first use a wait until next ms multiple in the while loop of your counter generation.   As long as the calculations and processes made within the while loop take less time than the wait you set, the while loop iteration will wait for x ms regardless of those other execution times.  This allows you to have better control over the rate of your while loop.  I would also recommend keeping your wait to at least 1 period of your frequency.  If you’re generating a 1 KHz signal, keep the wait greater than 1ms.


I hope this helps,
Paul C.

Message Edited by Paul C. on 08-28-2007 10:58 AM

0 Kudos
Message 2 of 2
(3,281 Views)