Go to Post "You know, if we shoot the flame thrower out of the back of the car while driving down Main Street at 2:00am, we are probably going to get in a lot of trouble..." - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 23-10-2014, 16:45
Aren Siekmeier's Avatar
Aren Siekmeier Aren Siekmeier is offline
on walkabout
FRC #2175 (The Fighting Calculators)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: 대한민국
Posts: 735
Aren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond repute
Re: Coustom Quadrature Encoder VI

Quote:
Originally Posted by jman4747 View Post
I've been working on a VI to read counts from an encoder and get direction. I was looking for general feedback on it. Also, what would be a good way to get the period between pulses for a speed calculation?
Every time you see a rising edge, take the difference between the current time and the previously stored time. Then store the current time over the previous to be used at the next rising edge. This difference is the period between rising edges. Then you can take a rolling average over a user-defined sample size to smooth out noise.

But how fast do you expect this loop to be running? Are you compiling this vi as part of an FPGA image, or will it run in software? Make a rough calculation of what the period of your encoder will be in your particular application, and make sure the loop containing this VI can keep up.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 20:19.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi