# Tracking path with a camera

**URL:** <https://tech-community.robotics.abb.com/t/tracking-path-with-a-camera/6752>\
**Category:** Robot Controller\
**Created:** [August 11, 2015, 10:22am UTC](https://tech-community.robotics.abb.com/t/tracking-path-with-a-camera/6752 "2015-08-11T10:22:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ABerton](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@ABerton](https://tech-community.robotics.abb.com/u/ABerton)\
**Post date:** [August 11, 2015, 10:22am UTC](https://tech-community.robotics.abb.com/t/tracking-path-with-a-camera/6752/1 "2015-08-11T10:22:02Z")

</div>

Hello, I’m trying to use a camera (connected to my robot system by the serial port COM1) to track my path between two points.  
I need to go from point A to point B (+Y direction), and I use the camera to find the varations in space refering to my workobject (+/- X direction).  
Basically, I start by sending the pattern position that was found by the camera, to the robot system as a STRING.  
After that, I use ReadStrBin to read the STRING in my program (I convert the value with StrToNum) and next I save the value as the position of my point B (pointB.trans.x)  
I use a loop to execute continously my moveL command :

ReadStrBin… StrToNum… pointB.trans.y :=valueY ; MoveL pointB, v30, fine, Tool\Wobj ; …. pointB.trans.y :=pointB.trans.y+1 ;

Usually, I use a TRAP to stop the loop.

The problem that I have is the stop time between the moment when the program is reading the serial port channel and the moment when the robot is moving on.

So my question is : there’s a way to do that continously ? or somebody knows a better way to do it ?

Thanks !
