01-16-2016 08:19 AM
Hi guys, I have an idea how to solve my problem, but im not very skilful at labview. So, I want to compare the data from two ultrasonics sensor blocks. Like these:: These blocks output a value in centimeters. I want measure the difference between the value detect by them. So let's say one detects 4cm and the second detects 6 cm. I want to get the difference calculated from those blocks. like 6 - 4 = 2cm. Maybe displayed in some block. Does anyone know how to do it? I think it can be done. So I beg you, and then I want to based on that difference make 'less than' comparison and case structure, but that I can do it I hope. Please help me. I can clarify further if I did it badly so far.
01-18-2016 02:53 AM
I don't uderstand where is the problem, but if You want to calculate the difference You need to use subtract function.
If You want to display the result You need to create an indicator.
Please write some more description of Your problem and attach the VI to be sure we are on the same page 🙂
Please write a feedback
01-18-2016 09:39 AM
..and that shows I'm silly about labview;D, thanks a lot for your answer. In general I want to program a robot using two ultrasonic sensors that will recognize three shapes, it does two for now and I'm struggling with the third shape(flat one). Sensors are placed one over the other. Shapes like these:So first two I do by comparing distances from upper and lower sensor. If upper is closer then avoid, if upper is farther then push, And the flat one i wanted to recognize if the difference between distances too small. I didnt think i could just subtract ;D. I'll try that.
If i copy a vi it shows only the interface part for some reason, not block diagram. But here is the screenshot:
01-20-2016 02:50 AM
If I understand properly You should use functions from comparison palete:
I attach my Idea to implement Your fiunctionality.
Please test nad write a feedback (VI was created in LV 2015).