04-16-2012 05:08 AM
Hello,
I have been using a rotary encoder to trigger a retriggerable sampling task. The encoder will give a pulse once per revolution and this will cause Labview to generate a finite pulse train which will be used to sample an analogue channel. The program will also return the pulse width of the encoder signal once per rev.
A problem arises if the encoder is run at speed, I receive error 200140. But if I run the program at a lower speed I eventually receive error 200278.
I am not sure why this is occuring as I am sampling continuously.
Thanks,
Ingram 🙂
04-16-2012 05:52 AM
Sorry,
I have realised that I did not set the sampling type for one of the analogue tasks. I have set this and manage to avoid error 200278.
I now receive
Error -200019
ADC Conversion attempted before prior conversion was complete
if I try to increase the frequency of my measurements.
04-18-2012 07:03 AM
Hi Ingram,
Many thanks for your post. Error 200278 occurs any time the ADC needs to carry out a conversion before the current conversion is completed. All ADCs have a rate at which they are able to carry out the analog to digital conversion which we are not able to exceed.
http://digital.ni.com/public.nsf/allkb/1275F44215D5C13F862579AE006CA222?OpenDocument
What hardware are you using to execute your code. It definitely seems that you are exceeding the sample rate of the device.
Let me know what you are using and what sample rate you have setup.
Many thanks,
04-20-2012 04:35 AM
Hi Aaron,
Thanks for your response. I am using a PCI 6250 to take pulse width readings and a PCI 6220 to take temperature readings, triggered by the encoder.
I have been experimenting with a small electric motor and I believe the noise created by it is causing the programme to crash. I have attached a screenshot of some the waveforms I obtain when running. I occasionally also see large voltage spikes.
I have been sampling at 50kHz and running the encoder at 1000rpm.
Thanks
Ingram
04-23-2012 09:18 AM
Hi Ingram,
Thanks for your response regarding this issue.
Just to clarify, you are using the PCI 6250 to measure pulses from an encoder which is generating one pulse per revolution and turning at 1000 rpm and you are sampling this at 50kHz.
You are then taking these pulses and using them to trigger an input on the PCI 6220 which then reads the temperature. Does this mean you are taking 1000 temperature reading per minute?
Without seeing how you are implementing this in your code it is very hard for me to tell if the crash is as a result of this. Just to confirm, are you still getting the same error message?
Both the cards you are using don’t have simultaneous sampling; this means that the sampling speed is shared between your tasks.
If you believe the issue is with your code then please do attach this to your next post.
Many thanks,