Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

200301 error

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?

 

 

 

 

0 Kudos
Message 1 of 8
(7,096 Views)

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


Regards,
Barron
Applications Engineering
National Instruments
0 Kudos
Message 2 of 8
(7,079 Views)

Hello all...thanks to comment in this forum.

 

Ive designed a solution.....could you try to check it?.....

0 Kudos
Message 3 of 8
(6,740 Views)

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

0 Kudos
Message 4 of 8
(6,739 Views)

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.

0 Kudos
Message 5 of 8
(6,737 Views)

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

Eric Liauw
Senior AE Specialist - Automated Test | CLD | CTA
National Instruments
0 Kudos
Message 6 of 8
(6,720 Views)

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

 

 

0 Kudos
Message 7 of 8
(6,715 Views)

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

Eric Liauw
Senior AE Specialist - Automated Test | CLD | CTA
National Instruments
0 Kudos
Message 8 of 8
(6,704 Views)