Home› Programming
Discussion
Back to discussions page
drpz
Posts: 5 Apprentice
Cam Locate Object Coordinates to Modbus |
22 views
|
Answered | |
/ Most recent by drpz
in Programming
|
6 comments |

Hi,
I'm using Cam Locate to find an object, and would like to write the XYZ coordinates of the object to Modbus, but I'm a little unsure of the syntax. It looks like the XYZ position is stored in Fx, Fy and Fz variables, and I also see Copilot functions like "get_sensor_fx()". I have tried: Set MODBUS_3=Fx or Set MODBUS_3=get_sensor_fx(), but that isn't working. Anyone know how to do this?
I'm also curious to know if someone can explain what these coordinates are offset from, and how to find that?
Thank you!
I'm using Cam Locate to find an object, and would like to write the XYZ coordinates of the object to Modbus, but I'm a little unsure of the syntax. It looks like the XYZ position is stored in Fx, Fy and Fz variables, and I also see Copilot functions like "get_sensor_fx()". I have tried: Set MODBUS_3=Fx or Set MODBUS_3=get_sensor_fx(), but that isn't working. Anyone know how to do this?
I'm also curious to know if someone can explain what these coordinates are offset from, and how to find that?
Thank you!
Tagged:
Fx, Fy and Fz are not coordinates. This is the force apply on each axis.
You can get the position of the object detected via the variable : object_location
object_location is a UR waypoint like: P[x,y,z,rx,ry,rz]
Knowing that you can get the x,y,z position.
Any ideas on what I might be doing wrong?
It should be fine.
Make sure that you call this variable after a camlocate and not before.
Could you please share your program ?
Thank you!!
Program:
You can eventually define the variable at the beginning of the program.
object_location=p[0,0,0,0,0,0]
For your information, here below is an extract of the camera manual about the object_location variable.