LabVIEW Interface for Arduino Discussions

取消
显示结果 
搜索替代 
您的意思是: 

Analog Read pin/encoder

i dont quite understand labview yet, but i got the basics down. im trying to figure out the number of steps per revolution of an encoder i came across. so i typed up an labivew vi to use the arduino as a o-scope but it seems to be skipping some values from my encoder, i only get the zero pulse once every 5 or so rotations, and the other pulses are erratic.

The arduino is wired to the encoder directly with no resisters.

comming out of the encoder i have 8 wires: +5v, Gnd, Ch A+, Ch A-, Ch B+, Ch B-, Ch Zr+, Ch Zr-.

i have all the channels directly linked to the analog inputs(0-5).

how fast is the analog read pin?

i see that there is a sampling rate VI, how do i use it?

is there a more efficent way to do this?

Did i wire it up right?

0 项奖励
1 条消息(共 4 条)
6,561 次查看

Hey jchalo99,

A single analog read with the LIFA toolkit is pretty slow (I usually get around 50HZ when benchmarked).  This is probably why you are missing pulses. We are going to have a faster acquisition mode in the 2.0 release which should make it easier to do what you want.

Kevin Fort
Principal Software Engineer
NI
0 项奖励
2 条消息(共 4 条)
3,570 次查看

Thank you Kevin_F,

wow that compounded to six pins, with pwm write pin aswell must make it pretty slow. thank you for the quick reply so i dont continue to waist my time.

I cant wait till LIFA 2.0.

0 项奖励
3 条消息(共 4 条)
3,570 次查看

If you want to be able to use the Arduino as a scope you could consider making a piece of code yourself which just reads the analog input as fast as you can and write those values out to the serial port.  You would then just need to read the serial port two bytes at a time in LabVIEW and output the data.  This is essentially what we will be doing for LIFA 2.0

Kevin Fort
Principal Software Engineer
NI
0 项奖励
4 条消息(共 4 条)
3,570 次查看