Labview and Sensors

To start off i have next to no experience with labview and I, like many others are trying to find which programming language to use next year. I know for all the drag and drop type of programming i’ve done in the past, LEGO NXT and RCX there are a specific set of sensors that you can use without seriously hacking the firmware.

Does anyone know how the support for different sensors will be done, in labview can you make your own ISR or low level code that is necessary to interpret sensors such as a custom CMU cam or a turbo encabulator, or will we need to rely on NI to release support for specific sensors.

Sensors are usually supported in LV by adding a collection of subVIs that give you a higher level API. The API can vary, but will usually include a Configure, a Read, perhaps a Write, maybe even a session based Open and Close.

These subVIs are written on top of the I/O used to communicate with the sensor. If analog, the subVIs will use the analog driver icons, and they will scale values and do book keeping in their layer.

If the sensor is on a serial link, then the subVIs will use the serial driver icons to send and parse messages to the device, do book keeping, etc.

For the cRIO and FRC, most of the I/O will come in through the FPGA, and the fast computation will happen there as well. So, the low level subVI icons are already built. WPILib will then use those icons, add addressing and scaling, and return the sensor values.

If you want to play with sensors in LV before WPILib is available, you might want to open up the Example Finder in the help menu. Search for a sensor such as a thermistor or accelerometer, and poke around in the sample programs looking at what is done. You can also look at serial examples. Just keep in mind that most professionals aren’t building FRC bots, and the sensors and devices they use may be quite different.

Greg McKaskle

Greg,

can we assume that the sensor VIs from the NXT toolkit will look like the VI’s we will be using?

I don’t think anyone can say that for sure just yet.

-Danny

My smartaleck answer: They will both be small square icons with wires coming from them.

Better answer: The NXT toolkit icons are similar, but simpler. Their implementation is built on top of LEGO I/O – either analog, or I2C. Learning how to do robotics using the NXT toolkit will be a good way to prep for the upcoming FRC libraries.

Greg McKaskle