@agiakos tonget the motion to stop properly when the signal is reached place the waypoint inside an if statement, on the setup screen use the signal is low as the condition and check the box for monitoring continuously. This will cause the motion to exit as soon as the signal is reached. You may want to place a stopj(8) command right after the if statement just to make sure motion stops correctly.
Then you can use a pose_trans() function to calculate waypoint 3. You will use the pose Tool from the pose drop down list in the formula editor.
waypoint3=pose_trans(Tool,p[0,0,0,0,0,-d2r(270)])
this assumes that you you want to rotate around the Z axis of the tool. If you need a different axis place the rotation in the correct axis as well as use the correct sign to change the rotation direction. The d2r() function allows the system to convert degrees to radians as the function needs the new angle in radians and any linear move in meters if there were a linear component.
What this function will will do is take where you currently are situated and calculate a new waypoint based on the changes desired to the existing point.
Hello community,
I am trying to calibrate a sensor, the first step is to find the pin hole(there is a screw attached to the sensor). The second step is start rotating the wrist 3 and stop it when I am receiving a signal(notify me that I am at the far right or left point) and the 3rd step to make the Wrist 3 rotate at the other direction 270 degrees(distance between far left and far right) and receive kind of similar message.
The 1st step I did it using the linear search and rotational search. The 2nd step I was able to introduce an event that pop ups a message and pause the program. My problem is with the 3rd step,because the Wrist 3 position is different every time(detects the screw head at different degrees) I would like to have a variable waypoint and that waypoint should be the robot position when the event occurs. I will try to use something like WaypointEvent=get_target_joint_positions(), but I would like your suggestions.
I hope I was clear enough