LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

Adapting Vl53L0X ToF Sensor to LabView

Good Day Everyone,

 

I have an automation job working with the NI myRIO in an existing control system, and I would like to attach the Vl53L0X for locating objects. On the bench, I've been able to use the VL53L0X with an Arduino library flawlessly. However, it is not clear how to get the myRIO to even talk with the sensor (I2C only). 

 

Is there a way to convert Arduino header files to a LabView SubVI? 

 

I'm ready to put some leg work in, I just need to know how to even start. 

 

My current tests so far:

I've used a logic sniffer to analyze what the Arduino is sending the sensor, hoping I could dumbly mimic it on the myRIO, but could not make sense of the multiple, multiple write and reads before any data was actually sent. I believe that ST (the chip manufacturer) has purposefully obfuscated their chip for some unclear reason, forcing developers to go through their extremely limiting C API.  

 

Best,

SBones

0 Kudos
Message 1 of 3
(5,449 Views)

Have you made any more progress on this?

Im looking to use labview to read distance measurement for benchtop instrument we are building.

We are using a NI compaq daq. 

 

M

0 Kudos
Message 2 of 3
(5,387 Views)

myRIO-1900 supports I2C. Most likely 1950 will support it too.

I2C is actually a very simple interface to implement even just normal GPIOs. 

You don't necessarily need C programming skills, you can do it in any language. 

 

Also from my reading of the datasheet of VL53L0X, I could not find any obfuscation. It's a simple straightforward interface to get data. There are however additional steps necessary for it to work. Initial data that you see before getting actual distance measurement maybe related to that. This should be straightforward as accessing the sensor, writing bunch of registers. Steps mentioned by datasheet are - 

 

1. Device Init and settings 

2. Load calibration data

3. Range setup

4. Range measurement

5. Digital housekeeping

0 Kudos
Message 3 of 3
(4,383 Views)