LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

positive edge trigger for button of limit switches

As readinga button push  in arduino and you wire reading the pin X to a case, it will enter the loop many times, i just want it to enter ONCE on the positive edge trigger or when i tis gron from low to high...

i can do it by putting a sequence after pushing and a wait loop unti it is released...

but i was wondering if there is other way to do it?

CLAD, CTD
0 Kudos
Message 1 of 10
(6,446 Views)

It's hard to understand what you are saying.  It would be helpful for you to post your VI.

0 Kudos
Message 2 of 10
(3,667 Views)

Try doing by changing mechanical action of the push button. Right click on your push button on front panel go to "mechanical action".

Hope this helps !!

Upload the vi also.

0 Kudos
Message 3 of 10
(3,667 Views)

Here is an example..

The Vi Not working just keep counting until you release the fisical button attached to the pin 8 of the arduino detecting 5V...

The Vi option one i just keep reading the arduino until  the pin gets back to 0 value.. but is this the best way to detect the positive edge trigger or do you have another idea?

thanks

Jorge

CLAD, CTD
Download All
0 Kudos
Message 4 of 10
(3,667 Views)

Save it for LabVIEW 2010 as I suppose you have 2011.

0 Kudos
Message 5 of 10
(3,667 Views)

2010 version !!

CLAD, CTD
Download All
0 Kudos
Message 6 of 10
(3,667 Views)

I have just modified a liitle your "option1". Beacuse basically, what we have to do is read the pulse at one time and then again read at other time in order to detect edge of a given pulse. And you are doing right.

But as you constantly speaking of postive edge pulse but you programmed your vi for negative edge. Because you first detecting '1' then '0' means going high to low i.e negative edge pulse.

Although, I have uploaded option2. Try that.

Note: All for negative edge pulse. Change it as per your need.

Hope this helps !! Good Luck !!

Download All
Message 7 of 10
(3,667 Views)

By adding a feedback node it will only count once on the first change.

Message 8 of 10
(3,667 Views)

Bears, it worked pretty good..

gaurav_sharma

push counts option2 did not work arduino...

Thanks guys

Problem Solved !!!

CLAD, CTD
0 Kudos
Message 9 of 10
(3,667 Views)

Hi!

I was wondering if anyone has the idea to count the edges and show the "average" speed that they are appearing. For example if i want to measure how fast I press a button, and show it as an RPM mesure. Also...can you share the VI in LabVIEW 2010 file.

Thanks!

DMDsync
0 Kudos
Message 10 of 10
(3,667 Views)