04-14-2013 11:01 AM
clear whether using the XS1-man N12PA349 is simple as that is an inductive sensor to output normally open (NO) so you just have to read a 1-0 logic and then send it to the serial port and USAT LabVIEW graphical interface, using code that attach above the arduino can keep working so you do not have the computer connected.
on the environment you are quite right but you can either replace it or AVR Studio. NET, but this is not the subject of discucion, look
04-14-2013 11:57 AM
How do I proceed? I know it takes upload LIFA BASIC on my arduino. If someone could give me a program
04-14-2013 11:59 AM
With my program i've got a problem :
LabVIEW Interface for Arduino.lvlib:Digital Read Pin.viLabVIEW Interface for Arduino.lvlib:Set Digital Pin Mode.viLabVIEW Interface for Arduino.lvlib:Init.vi. A timeout occurred while trying to read form the Arduino.
04-14-2013 02:39 PM
Were you able to successfully upload the LIFA firmware to the Arduino?
The default baud rate for the Uno is 115200 so unless you have manually changed it you cannot use 9600 (add defaults for the Init VI is for the Uno).
If you google the error you will find the official documentation for that error and it will list a few things that you should check that could be causing it.
As for your LabVIEW code, you need to set a the mode for the digital pin that you want to use and specify which pin you are using when you read the digital pin. Your code should look like this:
Change the 5 to the pin number that you are using.
04-15-2013 02:47 AM
Thank you very much much
Now if it would be possible to deduce the frequency with the signal obtained to deduce the speed
04-15-2013 02:55 PM
What kind of speeds are you expecting to encounter? Also, how many pulses will you have per revolution? Simply polling the digital pin may not be adequate to catch all of thte pulses.
04-15-2013 11:02 PM
two pulse per revolution.
I know that V = w.r =
(speed = (RPM * PI/30) * radius)
I would like know km/h (km/h= 3.6m/s)
04-15-2013 11:04 PM
I would like to know the frequency or RPM
04-16-2013 01:10 AM
Ok but you need to know the range of RPM values that you are going to be seeing because if it is too fast then you will not be able to reliably detect the speed without modifying LIFA.
The best results would be achieved if you used a modified version of LIFA to use interupt pins as counters. Then, you would simply need to poll the counter value at a constant rate and you could then calculate the speed from that.
04-16-2013 03:18 AM
you still didn't say what RPM you are expecting at most. Unless this is a rather slow RPM, polling a digital signal to measure the pulses is likely not gonna work very well. There certainly will be a rather high inaccurracy since the software polling is not really guaranteed to occur in a very fixed interval.