LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

detect change of status of digital pin and send to counter (indicator)

Solved!
Go to solution

Have you looked at the code that I posted?  I posted it for LV2010 in post #5.  The one that you are asking for is not very efficient and would not be recommended.

0 Kudos
Message 11 of 16
(953 Views)

I know for my setup I ended up just switching the encoder that I had intended to use.  I was able to find an encoder that output an analog (0-5V) signal, which when using LV + Arduino, was much easier for me to work with.  Thank you for all you help though.  Once I was able to wrap my head around the signal loss problems I might encoder with high resolution encoders, I figured it just made more sense to change my hardware.

0 Kudos
Message 12 of 16
(953 Views)

NathanB. I already have the code that you posted. But I want to see Genesisfactor code since I have a quad encoder. I don't understand what I am asking is not very efficient. All I want to do is learn. Sorry if I am asking too much.

0 Kudos
Message 13 of 16
(953 Views)

His code is not made for a quadrature encoders.  The best method for using a quadrature encoder with Arduino is creating Arduino-side code (with the encoder library) and making LabVIEW functions to simply retrieve the current counter values or even setting the value to what you specify.

I have quadrature encoders working perfectly on our Arduino Mega 2560's but it is using the older Arduino software (022).

In the coming weeks I will try to port my working code to the latest firmware for everybody.

To better help you, what Arduino are you using?  What version of the Arduino software are you using?

0 Kudos
Message 14 of 16
(953 Views)

I am using Arduino Uno and I am trying to learn to control a Dc motor using Labview as well as gettiing data from my IMU to display in labview. I just wanted to see from the above examples as to how to read quadrature encoder count. I can already program it in Arduino 1.0 but I want to connect it all to labview since I can do it graphically. I would appreciate it if you can share your code when its working. I look forward to it.

Thank you.

0 Kudos
Message 15 of 16
(953 Views)

Are you saying you have the quadrature encoder working with Arduino using the encoder library?  If yes, then all you need to do is to make it work at the same time as the LIFA firmware (put the encoder stuff in the LIFA firmware).

Then, after you have that working, all you need to do is make a new function in the main switch statement of teh LIFA code that simply reads the value of the count and transmits that back to LabVIEW.  This part is actually quite simple, you just need to look at an existing function like digital read or something and do it likewise.

0 Kudos
Message 16 of 16
(953 Views)