06-16-2010 03:26 PM
I am using NI-DAQmx C functions to get a 6601 Counter input and update a continuous pulse train output. I initialize the output counter, set the frequency property, and start the output task running at about a 12kHz frequency output. The next iteration occurs after about 200 ms (which is >> 83 microsec) and I also look at the CORdyForNewVal flag, which is set. Despite this, I get a -200301 error indicating that the output counter has not completed one cycle.
Any idea what may be wrong?
06-17-2010 03:02 PM
Howdy RMC!
You will receive Error -200301 if you do not have a software delay in your generation loop to prevent you from updating the frequency before the counter has completed one cycle. This KnowledgeBase article explains the cause of the error: Error -200301 When Using Property Node to Update Counter Pulse Output
07-06-2011 05:12 AM
Hello all...thanks to comment in this forum.
Ive designed a solution.....could you try to check it?.....
07-06-2011 05:25 AM
Hello
But same problem appear when i want to read and write and save ina file data, then the same error appear...error 200301, how could i solve it?...im using a NI USB 6212.
Thanks.
Adrian Chavarro
UGENT UNIVERSITY
adrianfernando.chavarrochavarro@ugent.be
07-06-2011 06:36 AM
The problem appear when i change the amplitude of the PWM, then the actual value of the duty cycle is diferente to the previus each sample.
07-08-2011 03:48 PM
Hello,
I looked over the sample code that you have provided. What function are you trying to accomplish with this piece of code? The update of the duty cycle using all the math functions along with the frequency input and Amp PWM does not make sense to me; could you explain the purpose of this? If you could explain the application in more detail, I may be able to make some suggestions.
I also noticed that the frequency is set to 1Hz when I opened the example code. A one millisecond wait is not long enough (for one cycle) if you are running at only 1Hz.
Eric
07-09-2011 10:14 AM
Well, by default PWM frequency is 20000Hz, then, if i want to excite a motor, and get the frecuency response i can change the frecuency of the changes in the duty cycle and amplitude. Well, to start the experiment, i needed to start the device in amplitud = 0 and mode manual.After some samples i can change to automatic and also to change the amplitud from 0 to 1.Becouse i must to wait a complete cycle to update the duty cycle of the PWM in the loop.
Adrian chavarro
Electronic Engineer
Msc. Student UGENT
Belgium-Colombia
07-11-2011 01:36 PM
Hello Adrian,
When you start your experiment, you are starting with zero amplitude in manual mode. Are you trying to ramp the PWM signal from 0% duty cycle to 100% duty cycle?
Also, can you attach a screenshot of the front panel and error message to confirm the settings of your application during the error?
Eric