Mb1200 get range analog subvi block

We are trying to set up the ultrasonic sensor mb1200 in analog. The older examples have a block for mb1020 get range. We are unable to find a similar block in the pallette. Do we have to create a new subvi ourselves to create a block on the palette. Or is there somewhere else to look for the block we need?

Just use the ultrasonic palette vis.
They change when you place them on the block diagram, wire them in, and pick the right device.

These are called polymorphic vis and they are actually a collection of vis that are selected from based on the input data types.


Thanks. Is there a way to know which blocks are polymorphic?

A lot of the ones we use are polymorphic.
You can right-click on a vi to get the pop-up and if it has a menu entry for “Open Polymorphic vi”, then it’s got several variations associated with it.

It’s how LabVIEW deals with vis that are fundamentally the same common action, but require dealing with slightly different mixtures of data types.

Any of the Open vis with that selection box under it is polymorphic for each of the possible selections, as well as, any downstream vis that deal with the differences.
For example, the WPI Library Opens where you need to select the type of motor controller attached.


Thanks for the help, we are a rookie team and just beginning to learn how Labview works. We have the followed the code example for the MB1020 analog ultrasonic sensor for the MB1200 sensor. There is not a choice to use the MB1200). We are not getting any errors from the code. We inserted a numeric display on the front panel so we can get a reading from the sensor. However we get a single output and the number does not change as we expected when the “target” is moved closer and farther away from the sensor. Any suggestions on what we should be looking at to correct the problem?

The differences in the EZ models won’t be affected by the provided vi. You can just treat it as an MB1010.
Most of the EZ model differences just provide a variety of detection cones and ranges.

Narrow down the problem to either software or hardware.

First, I’d use the provided FRC example as is, without any changes. (Getting Started->Support->Find FRC Examples…->Sensors->EZ1 MB1010 Sonar - Analog.lvproj)
That will eliminate any possible user coding errors.
The example is fully functional and is already setup to run without any changes over a USB connection to the roboRIO.

  1. Open up the front panel of EZ1 MB1010 Sonar - Analog.vi
  2. Double check your sensor wiring against the diagram on the front panel.
  3. The default code assumes the sensor is connected to Analog input 2
  4. Leave the front panel settings as they are for this test just to see if you can get any response, otherwise, you can set a different AI channel, scaling factor is ~.0117, average bits just filters the raw input to smooth the response.
  5. Connect your PC to the roboRIO via a printer USB cable and turn the roboRIO on
  6. Then use the run arrow in the upper left of the front panel to run the example
  7. Make sure the sensor has a clear field of view, e.g, don’t just set it on a table top unless it’s pointed directly up at the ceiling and there aren’t any wires or other obstructions in the general vicinity (including any people).
    *]See if you can get the output to change at all.