08-19-2007 07:03 PM
I'd like it if someone can help me with these.
Team RoboSquad
http:\\teamrobosquad.blogspot.com
08-19-2007 07:12 PM
Well, I just figured out how to run a loop for a certian number of times. I didn't know the i in the loop stored the count.
Team RoboSquad
http:\\teamrobosquad.blogspot.com
08-20-2007 01:20 AM
08-20-2007 10:16 AM
08-20-2007 10:20 AM
@Albert Geven wrote:
To run a loop a certain number of times wire a value to the big N.
The i is the loopcounter that indicates how many times the loop has been executed already.
An array can be indexed or autoindex (this is preferred becasue of speed)
To autoindex an array just wire it to a loop (for) and see the open square in the border of the loop.
Right click the open square and you can disable autoindexing.
Where is the big N?
The NXT Toolkit only supports While loops, right? I just need to know how to write data to an array and read it. I need to write 144 vaules to two arrays.
08-20-2007 10:27 AM
08-20-2007 12:05 PM
08-20-2007 08:57 PM
Variables: local variables are basically "references" to front panel indicators or controls, and can be read or written just like normal variables. But depending on what you're really trying to do, just adding a constant to the block diagram or using wires to pass a value to different parts of your program may be a better solution.Well, Im trying to save a data value without file access.
Documentation: the LabVIEW help is pretty extensive and comes with LabVIEW. You can also use the Example Finder to search for examples for a particular topic, including "while" and "array."
I mean documentation specific to NXT Toolkit.
Debug gray-out: when you turn on Execution Highlighting on a LV block diagram, LV will gray-out parts of the program it hasn't executed yet. Once the sensors have been read and are ready to be displayed, the meter indicator should get "re-colorized."
Gray-out only happens when I feed data from a cluster.
Arrays: from your post, it isn't clear to me whether you're completely unfamiliar with what an array is, or you're just confused by LabVIEW's implementation of them. If it's the former (what is an array?), your best bet is to use Google or Wikipedia to build some basic knowledge. If it's the latter (how do arrays work in LV?), try using the Example Finder to find and work through some examples. If you're still confused, try to ask a more specific question. One thing that may be confusing is that, by default, arrays don't have a type. If you drop an array constant on the block diagram, you get an array of <nothings> with a black border. To tell LV what types of values will be in that array, you have to drop a constant of that type inside the black box: a numeric constant, a boolean constant, a string constant, etc. Then the array constant which change color to match the data type it will hold, and you'll be able to type in values for the different elements of the array. Maybe that's the key realization you're missing?
It is the implementation of it that confuses me. I want to add a new number to an array 72 times in a loop. There will be 2 different arrays I will need. (I could use 2-d array?)
08-20-2007 09:17 PM
08-20-2007 10:29 PM
What is a shift register. Is it available in the NXT Toolkit?
I just need to know how to build and add data to an array. The Help files do not cover the differences in the NXT Toolkit.