Hello,
I am trying to activate the PLC output when the robot reaches a frame. To do this, I use the FrameDistanceCondition function, where I insert TCP and frame as a parameter. However, this function does not start. I tried to modify the parameters and found that the function responds from a distance of 1400 mm, which is stupid because my TCP stands directly at a defined point. I checked the TCP frame and static frame distances using the distanceTo function, and it shows the distance of points 0.012 ... mm so the distance calculation works correctly.
Robot is KUKA iiwa 14 820 with Sunrise 1.16 and is placed upside down so I have Mounting Orientation angle around X (C) set to 180°
Thanks for your help. PR
Code
private void InitializeHomeFireCondition()
{
// Create frame distance
_homeMatch = new FrameDistanceCondition(
_singleton.data.getFrame("/P1"),
_singleton.gripper.getDefaultMotionFrame(),
1400);
// Create edge listener to set condition
IAnyEdgeListener homePositionListener = new IAnyEdgeListener()
{
@Override
public void onAnyEdge(ConditionObserver conditionObserver, Date time, int missedEvents, boolean conditionValue)
{
_singleton.logger.info("HOME CONDITION " + conditionValue);
_plcComm.SetHome(conditionValue);
}
};
// Create observer
ConditionObserver homeObserver = _singleton.observer.createConditionObserver(_homeMatch, NotificationType.All, homePositionListener);
homeObserver.enable();
}
Display More