[FTC]: Faster LabVIEW motor .vi's

Greetings,

I’ve attached a set of modified motor .vi’s that execute ~30% faster than the ones in the toolkit. The optimizations are listed in the block diagrams for those who are interested. They are direct replacements for the existing .vi’s and should require no further modifications to your code.

These .vi’s will not cure fundamental code problems. Rather, they will let you coax a little bit more out of the NXT. An example where they might be useful would be in an autonomous balancing program that is not quite looping fast enough to stay balanced.

Most of the speed tricks could also be applied to the fixed distance and servo .vi’s if you choose to do so.

As always, caveat emptor.

Best Regards.

faster FTC vi’s.zip (172 KB)


faster FTC vi’s.zip (172 KB)

This isn’t really the right thread but didn’t want to add another one.

We are working on our auton programs and I am shocked at the memory size. Our teleop ( about 85% complete ) uses about 30 kb but one auton ( simple drive a distance, turn using distance, drive a distance, move nxt motors ) uses around 70 kb; both in correct tournament templates. If we take the code out of the template - code is easily half the size. This leads me to think the auton template is driving the size butthis is not the case for the teleop template.

Does this box or does this sound like we have something wrong? I was hoping to be able to store several autons but looks like we will need to preselect once we know what color we are.

I don’t have the code with me ( at work ) but we are driving two motors ( one per side ) off one controller - nothing fancy at all.

First year with Labview - I haven’t personally learned it so I am truly letting the kids guide me. Looking for feedback to understand if what we are seeing is typical.

Try selecting chunks of your code and creating subvi’s. This dramatically decreases memory.

We have subvi’s: “move to rolling goal” “score in rolling goal” “move to wall”.
These are individual blocks in our main autonomous program but when you open these subvi’s there is all of the code embedded within them.

Good luck.

Greetings,

LabVIEW programs are typically much larger than their ROBOTC counterparts, but 70 kB is excessive. 20-40 kB is more typical w/40 kB being a pretty large program.

As Ethan states, the use of sub vi.s can drastically reduce memory requirements. Any spot where you reuse code is likely a good candidate for a subvi.

Finally, if you could post your code, I’m sure there are several folks here who would help try and find out where all your memory is being used.