Paras Posted September 27, 2009 Report Share Posted September 27, 2009 Hi all, I am working a simple project, where my first daq card (NI6009) acquires a data (PWM) from a microcontroller and sends it out to second daq card to control a servo. So one card is acquiring and another is generating the same signal. My problem is that, although the daq cards are set at 0-5V for both input and output, there is an error given by the second daq card saying the voltage being written is either too small or too big ( the value it shows is like - 856 X 10^-6 so thats negative 8 mV). I am not sure where this small negative voltage is coming from. Any ideas guys?? can i implement a filter or something to solve this problem? This program is just for testing, later i am planing to transmit the signal over the internet for remote experimentation. Quote Link to comment
Kurt Friday Posted September 27, 2009 Report Share Posted September 27, 2009 Hi all, I am working a simple project, where my first daq card (NI6009) acquires a data (PWM) from a microcontroller and sends it out to second daq card to control a servo. So one card is acquiring and another is generating the same signal. My problem is that, although the daq cards are set at 0-5V for both input and output, there is an error given by the second daq card saying the voltage being written is either too small or too big ( the value it shows is like - 856 X 10^-6 so thats negative 8 mV). I am not sure where this small negative voltage is coming from. Any ideas guys?? can i implement a filter or something to solve this problem? This program is just for testing, later i am planing to transmit the signal over the internet for remote experimentation. I just had a little play with my 6008 and what I found is that although I set my range to 0 to 1 V it will still pass a small negative voltage. I think the reason why is that the range is not setting a coercion range but sets the programmable gain of the device. when you set 0 to 5V its using the + 5V span or gain of the device ( ie 16 bits over +5V) so you will see negative values being propagated due to noise in the system when the microcontroller is outputting 0V. When you go to write your voltage, the limits on output are 0 to 5V, and that's a hard limit and the driver does a reality check first before it tries to write it, so if its negative you are going to get an error. The way to get around this is to use the In Range and Coerce function in the Comparison palette to coerce your voltage between 0 and 5 volts before you write it. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.