LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Measure RPM with Arduino LabVIEW?

Can anyone help me? I have a project to measure rpm using Arduino and fc-30 encoding, is there an example so that the data from the hardware can be displayed in labVIEW with LINX?

0 Kudos
Message 1 of 6
(1,739 Views)

Hi yog,

 


@yog30 wrote:

I have a project to measure rpm using Arduino and fc-30 encoding


Maybe you should explain the meaning of "fc-30 encoding"…

 


@yog30 wrote:

is there an example so that the data from the hardware can be displayed in labVIEW with LINX?


There are several examples to display data, measured by Arduino, with LabVIEW.

What have you tried?

Where did you fail?

Have you tried to use the Arduino IDE instead of LINX and employ the (virtual) COM port of the Arduino to transfer data?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(1,721 Views)

Thank Gred,

The working principle of the FC-03 encoding sensor. When something comes in "opto interruptor" gap, DO output will produce HIGH or 5V logic (leds) green DO will die). While under normal conditions, DO will produce logic LOW (green led DO live).

 

I have listed my project below, In this labview program I can only search for chopped. What I want the program to look for counts per minute or rotation per minute (RPM).

0 Kudos
Message 3 of 6
(1,715 Views)

Hi yog,

 


@yog30 wrote:

I have listed my project below, In this labview program I can only search for chopped. What I want the program to look for counts per minute or rotation per minute (RPM).


Why do you need two local variables and a case structure? Why do you need orange DBL when you want to count integer pulses?

You already know the "count", so all you need to do is to calculate the difference between current "count" and some previous "count" value and divide by the time elapsed in between!

 

Simple solution:

  1. Set a reasonable loop iteration rate, like 200Hz (aka 5ms wait).
  2. Store the "count" value in a PtByPt-DataQueue with a length of 200 elements: this will give you a queue length of 1s…
  3. Now you can get the difference between actual count and count of "1s before" and calculate the RPM easily…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(1,710 Views)

Hi Gred,

 

I use a case structure because the data is in the form of analog read, the values ​​are 0 and 5 so I use it to get true false and my true value is chopped and displayed using DBL.

0 Kudos
Message 5 of 6
(1,706 Views)

Hi Yog30,

 

Notice that you can do the same thing with less "hidden code" by using a Select node like Gerd shows in his post.

In this way, if the boolean is true then it will add one, and if not it will output the input value.

Then the shift register handles the 'link' between iterations (you could also use a Feedback Node, but I think Shift Registers like in Gerd's example are often clearer).


GCentral
0 Kudos
Message 6 of 6
(1,671 Views)