I was asked to become a programmer for my FRC team (4096). I am currently reading through as many tutorials as possible to familiarize myself with LabVIEW. I have a question as of now.
When I program, do I just work under Team VI’s? Also, do i even bother the Robot Main VI?
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.