Go to Post Be realistic in your goals, and relentless in hitting them. - IKE [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 Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Spotlight this post!  
Unread 07-02-2012, 23:13
dakaufma dakaufma is offline
Registered User
AKA: David Kaufman
FRC #0449 (Blair Robot Project)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Silver Spring
Posts: 28
dakaufma is an unknown quantity at this point
Re: Efficent way to send data?

Quote:
Originally Posted by DominickC View Post
The trick is I want to be able to have 50+ ranges to check if the readout from the rangefinder is within, and 50+ different bundles with different constants wired to one unbundle later in the code.
If I understand what you're asking, you want a large constant lookup table consisting of distance ranges (10-20, 20-30, etc) and corresponding shooter-related outputs for each range. If this is what you want, I suggest you do it with two arrays: one array of doubles specifying distance and one array of clusters specifying the output. I'm attaching a VI that does this -- feel free to experiment with it.

The VI I've attached is a constant model -- that is, for any measured distance in the (customizable) range 10 to 20 it outputs the same result. If you want to reduce the amount of calibration data (and calibration time) you can program a linear model instead. The VI will need to determine the constant outputs at 10 and at 20 and interpolate along the line between them to determine the final outputs. This version of the VI will be more complicated, but it will work well with few calibration data points. If you want a challenge, this will pay off in the long run when you need to do last-minute recalibrations.

Hope this helps.
Attached Files
File Type: vi StaticLookup.vi (8.7 KB, 6 views)
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 22:27.

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