How we can connect output on jnt rob target position and check it all time? Home checking
Inviato dal mio iPhone utilizzando Tapatalk
How we can connect output on jnt rob target position and check it all time? Home checking
Inviato dal mio iPhone utilizzando Tapatalk
You need (want) to set up a World Zone - when the TCP is in a specific area (I've only ever used spheres, but boxes and cylinders are also options) an output will turn on (or off).
Or... you can activate world zone limit supervision to keep TCP in (or out of) an area.
WZHomeJoiintDef and WZLimJointDef are a couple of commands that might be what you're looking for.
Iowan is correct, a World Zone will do this for you. Instead of looking at the TCP position it is safer to look for the position of each individual axis. The TCP could be in the correct place but the other axis could be in an area where, for example, a turntable could collide when indexing.
Your code should look something like this (VARS and jointtargets can be named as you like. Note that "delta pos" here represents the allowable deviation from the home position):
LOCAL VAR wzstationary wz_home;
LOCAL VAR shapedata joint_space;
LOCAL CONST jointtarget delta_pos := [[0.1,0.1,0.1,0.1,0.1,0.1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
LOCAL PERS jointtarget jpos_Home_rob1 := [[45,-30,30,0,55,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
PROC set_home()
! do_Home_R1 output control
! set up at Power On
WZHomeJointDef\Inside, joint_space, jpos_Home_rob1, delta_pos;
WZDOSet\Stat, wz_home\Inside, joint_space, doR1home, 1;
ENDPROC
This should be in a System module and the routine needs to be in the Power On shelf of the Event Routine, linked to whichever Task it's applied to (T_ROB1 etc.). It's easier to make using RobotStudio but can also be done using the Flex Pendant.
Hi 5GenusOfFun, then if I will implement as you say and the robot will be move from my home pos the output will be set off immediately. Then if I am waiting order from PLC and someone move manual robot and put back in automatic without going true main I will get error by plc side because not in home.
Inviato dal mio iPhone utilizzando Tapatalk
That is correct, once any axis of the robot moves out of the home position tolerance the output goes to "0". If the PLC is looking for this then yes, you will get an error. You can also use a WaitDO or WaitUntil for the output to be on in the start of your robot routines.