Go to Post robots like to give you troubles... its like they have a mind of their own. - hayleybayley217 [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 20-01-2013, 08:22
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: New to FRC, and LabVIEW. Need some help.

You asked what an array was.

An array is a collection of similar values stored in a piece of memory. You can access the values one at a time or operate on the collection as a whole.

For example:
If your robot collects ultrasonic data at 20 per second and stores them for five seconds, you now have 100 ultrasonic readings.

Do you put them in individual variables or wires? That would be a lot of variables to keep track of. So, instead, you might want to put the data into one sequential array with values labeled 0 through 99. You could index the array at 0, 20, 40, 60, and 80 to see what was in front of the robot each second as it moved. And you could compute different indices to grab any time's measurement you want.

In other math, you could operate on the whole array at once to convert it to millimeters or inches or offset it to the edge of the robot. You could also break the array into five other arrays and compare or operate on them.

Finally, arrays don't have to be one dimensional. If you have values on a grid, a 2-D array is very useful. This is how images from the camera are typically stored.

Greg McKaskle
Reply With Quote
Reply


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 04:04.

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