Please help Instructions on HGC Laser distance sensor

Currently I am using the HGC 1100 Laser sensor to detect distance like the Youtube Video below.
I’m writing a program like this video and I can’t get it to work like this video.
Can you help me.
https://na.industrial.panasonic.com/products/industrial-automation/industrial-sensors/lineup/photoelectric-sensors-laser-sensors/series/71514/model/74915