The Secret Book of FRC LabVIEW

When I first started trying to teach LabVIEW programming to FRC team members, I became very frustrated. I don’t program for a living, but I do pretend to be a semi-competent LabVIEW programmer at work. But when I started with FRC, I found the Robot Framework completely mystifying. Worse, I could not find a book to explain it all to me.

Here is that book. Or rather, a first draft. Please respond with typos, errors, glaringly obvious topics I should have covered, but didn’t, etc.

The book is a PDF, but zipped to squeeze under the 5 MB size limit.

The smaller zip file contains images for use with Chapter 7.

Enjoy!

-GN

The Secret Book of FRC LabVIEW.zip (4.65 MB)
Secret Test Images.zip (607 KB)


The Secret Book of FRC LabVIEW.zip (4.65 MB)
Secret Test Images.zip (607 KB)

1 Like

I gave it a quick scan and two thumbs up. You cover a lot of material without bogging down, and you keep a sense of humor while on the journey. Good one.

Maybe you’ve re-inspired me to spend more time on my writing project.

Greg McKaskle

I’m only half way through, and enjoying the read. It’s nice to see someone else’s approach to teaching LabVIEW. I’ll be recommending this to our programming team as an additional viewpoint. Thank you for taking the time to put this in writing and share it with our community.

Edit: Finished it. Loved it.

I’ve been pretty busy lately, but hopefully when I get the time I will be able to read it and give you an opinion from someone who just learned LabVIEW in the last month.

This should be a great resource. I think that something like this was really needed.

I’m so glad that this arrived before the 2014 season so other rookie teams and new programmers have something to reference!

Great Job!

It’s awesome!
I’ll definitely use it to teach our new programming crew member’s.

Here is a revised version that fixes a page numbering problem. I found a better PDF tool that fixes some formatting problems, and as a bonus, makes a file small enough to upload without zipping.

Happy Diagramming!

-GN

The Secret Book of FRC LabVIEW v0.2.pdf (4.54 MB)


The Secret Book of FRC LabVIEW v0.2.pdf (4.54 MB)

Its written there that new packets are sent to the robot every 100ms, isn’t it 20ms rather than 100ms?

You are right. I don’t know where I picked up the 100 ms number. (The difficulty in finding out this kind of stuff is part of the motivation for the book.)

I’ll post a corrected version in a week or so. Let’s see what other wrong things can be found!!

Cheers,
-GN

On Page 14, you mention the clean up tools that are less than helpful in Labview. As a note, the Ctrl-U block diagram cleanup was made incredibly useful a couple years ago when they limited the clean up process to only the items on the block diagram that are selected.

So, you select a group of items, press ctrl-u, and it cleans up only the highlighted code. Bam!

I got really confused from the PID chapter.
the math is too complex to understand right away,
maybe it’ll be better to explain the idea of PID and how it works in general and some examples of it explained it detail, and only then to tell about the math behind it.

BTW can u upload the labview file of the PID simulator? (for both victor 884 and jaguar)

This is great. i really appreciate you putting this together

Greetings all-
Attached is a new edition of the book. It addresses some issues raised by readers, as noted below. (And thanks for the feedback! It is much appreciated.)

This error has been fixed, and the discussion of timing in Robot Main improved (I hope).

I never said they were less than helpful, only that the results were not to my taste. But I like the clean-up only the selection tip, and have added it.

PID control is very mathematical. There’s no getting around it. But I did rather jump right into it, so I’ve added an introductory section that explains the basic idea. It is very difficult to explain, for example, integral control with just words, however. I’m afraid that younger students with limited math won’t really be able to follow this chapter. But that will give you something to work towards for the following year!

As a matter of teaching philosophy, I don’t want to upload the VIs. The only way to get good and fast at coding LabVIEW is to have lots of practice coding LabVIEW. Hence, no uploaded VIs…

The Secret Book of FRC LabVIEW v0.3.pdf (4.51 MB)


The Secret Book of FRC LabVIEW v0.3.pdf (4.51 MB)

Proportional: “The greater the difference between the set point and the feedback signal, the stronger the output signal.”

*Integral: “As long as the feedback signal remains different from the set point, the integral control portion of the system keeps increasing the output signal.”
*
Derivative: “While the feedback signal changes, the output signal is decreased based on how quickly the change is occurring.”

I agree. Most high school students who are learning labview don’t know what dy/dx means, so I don’t see why one would start a chapter with it. Maybe have a chapter explaining the math, and another with code? I don’t know, just a suggestion. Really threw me off once I got to that chapter. It was all step by step based, then bam here’s an equation and here is how it is used. I don’t have a solution, but it needs to be addressed.

Other than that, the book is perfect. It made me laugh out loud reading it at times while in class today on my laptop. I got strange looks, but hey, I was learning. (Isn’t that what is important?) Thank you for putting in so much time and effort. I consider this a holy grail for FRC. Great job. Makes me want to do one on computer vision, but there are just so many ways to do it…

In page 127 it says:

At 10
frames per second, you will be acquiring images at the same rate that the Driver Station
communicates with the robot.

You’ve already changed the 100ms to 20ms, so this sentence is wrong.
You actually need 50fps to be at the same rate as the communication :slight_smile:

Thank you for putting together this manual, it is a great resource.

I have a question regarding your discussion on file organization, page 50, do you have any examples for this:

There are advantages to having all the files in one folder

Thanks

Thanks for noticing. This kind of catch is very helpful. A revised version is attached.

I wrote utilities for zipping and unzipping the project to a flash drive (for backup and moving the code between computers). It is 10X easier to write this routine if the file structure is flat.

The Secret Book of FRC LabVIEW v0.4.pdf (4.21 MB)


The Secret Book of FRC LabVIEW v0.4.pdf (4.21 MB)

Excellent work!
I am starting through the Ver. 0.4 now. If I come across any errors, or have any suggestions, I’ll post them right away.

Thanks so much for the book. You saved me!