11-09-2013 11:14 AM
Mi problema es el siguiente, tengo un programa que hice que me cuenta el numero de vueltas que da un motor y me las convierte en revoluciones por minuto, hasta ahi todo esta bien, el problema viene cuando le agrego el control de un servomotor porque el programa ya no me muestra la lectura correcta de las RPM´s pero el servo funciona a la perfeccion.Dejo imagenes de mi codigo para ver si alguien cual es el error en la programacion y como lo corrigo, espero que alguien me pueda ayudar.
Este es el programa con el servo y el contador de rpm
Este es el codigo sin la parte del servo
siempre me da una lectura uniforme de 1200 +_- 60 RPM´s
pero cuando le pongo el servo me da esto
El tacometro varia de 800 a 1020.
Espero que alguien me pueda ayudar porque esto ya me esta desesperando
11-09-2013 05:59 PM
It looks like you are trying to use the Arduino (and LabVIEW) as an encoder. Is that what you are doing? What is your hardware set up and what are the specifications of the encoder and the expected motor speeds?
So, if you are trying to implement an encoder, it is not a good idea to try and do it in LabVIEW with Arduino. You can, however, implement the encoder in the Arduino (with interreupt pins) and then have a custom LIFA function to read the RPM value in LabVIEW.
Some other tips/suggestions:
11-10-2013 12:44 PM
yes, i´m trying to use arduino uno like encoder to control a servo and also read the speed in a motorcicle. i´ve been used the spark in the engine to read the RPM and the servo like speed control
expected speed: 3000 RPM´s
11-10-2013 12:49 PM
the problem is when i have servo VI and tacometer VI together because the VI freezing and the RPM sampling is wrong but the servo works perfectly.
when only have the tacometer the sampling is correct and labview show me in the frontal panel the correct value
11-10-2013 01:31 PM
You are slowing down the VI by putting more functions in it. Therefore, you are going to need to change how you are reading the speed. You will need to move it to the Arduino with interrupt pins so that it can get every pulse. Then, you will need a custom LIFA function to read the current value.
11-10-2013 04:07 PM
ok, i need change pin to the interrupt pins ( #2 or #3) and a custom LIFA
but i have not idea how customize the LIFA is my first time using arduino whit labview