There are examples for the ultasonic sensor included with LabVIEW under Help->FindExamples>FRC2012->Sensors. The example titles start with EZ1 MB1010 Sonar. There is an Analog and digital example. Post back if you have any questions on this.
Kevin Fort
Principal Software Engineer
NI