Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

How to measure distance between two lines?

Hello,

 

I am working on a project where I am using two laser sensors, one at the top and one at the bottom. There is a conveyor line exactly between the sensors, and a continuous rubber strip is placed on it, whose thickness I would like to measure. I want to display it on a graph and also numerically, if possible. 

I have attached two images. In the first image, you can see the two profiles I get from the two respective sensors. To get the thickness, my logic is that I basically have to calculate the distance between these lines which I want to show in the third blank graph. The code that I have written for the calculation, you can see in the second image.

However, the result that I got with this code doesn't make any sense at all. Could anyone give me any hints of a better way to calculate this? 

  

Download All
0 Kudos
Message 1 of 3
(2,034 Views)

You will probably get a suggestion from the folks here to attach actual executable code rather than images, especially since the block diagram code look to have a lot more obscured.

 

Zip up the entire project, including all the VIs, and then re-post that. You'll get a lot more useful advice.

0 Kudos
Message 2 of 3
(2,010 Views)

You're probably right. I have attached the relevant files here alongwith a picture to show what I am trying to do.

And I'll repost anyway too. Thanks for the advice.

0 Kudos
Message 3 of 3
(2,004 Views)