Measurement of a coordinate system
You can use the SEW_MK_Robotics.SEW_RobUserCs.CoordSysMeasurement function block to measure a coordinate system, for example the position and orientation of a workpiece or a conveyor belt in the desired reference coordinate system.
To do so, 3 points of the coordinate system to be measured from the point of view of the reference coordinate system (e.g. BASE) must be applied to the input variables Position_1/2/3.
Depending on the measurement method set (input variable eCoordSysMeasurementType), these points are either …
- the origin (input variable alrPosition_1),
a point on the positive X-axis (alrPosition_2 input variable) and
a point in the XY-plane with positive Y-coordinate (alrPosition_3 input variable) of the coordinate system to be measured (P1_Origin_P2_OnXAxis_Xpositive_P3_InXYplane_Ypositive measurement method)
or - a point on the X-axis (alrPosition_1 input variable),
another point on the X-axis with larger value of the X-coordinate (alrPosition_2 input variable) and
a point on the Y-axis with positive Y-coordinate (alrPosition_3 input variable) (P1_OnXAxis_P2_OnXAxis_XGreaterThanP1_P3_OnYAxis_Ypositive measurement method).
You can determine the 3 points to be entered, for example, by moving the TCP (e.g. with a measuring tip) to the 3 points in jog mode or automatically using TouchProbeMeasure. The Interface_MyRobot.Basic.OUT.SetpointPose.alrBase output variable or the Interface_MyRobot.PrgVar.astPoseValues[n] SRL variable parameterized for the measured Touchprobe position can be applied directly to the Position_1/2/3 input of the CoordSysMeasurement function block.
The transformation is calculated when the CoordSysMeasurement.ComputeTransform method is called, and output in the alrTransformVector as well as alrTransformFrame output variables if executed without errors.