Good Day everyone,
Been struggling with this one for a couple of days, I'm sure one of you fine people has the answer.
KRC4 Controller
V 8.6.11
Centerline Spot weld gun (E1)
MG_ME_180_KSP40 external axis on 4 position rotary index table. (E2)
Here's the problem. I have background code in place in sps.sub to allow the PLC to cause the table position to index. Index point is selected by a 4 bit array (Position 1A,1B,2A,2B). (TABLE_CMD)
$CYCFLAG[200]=(($ASYNC_STATE==#BUSY) OR ($T1))
$CYCFLAG[201]=NOT $CYCFLAG[200] AND $PERI_RDY AND $USER_SAF
IF $CYCFLAG[201] THEN
SWITCH TABLE_CMD
CASE 1
TABLE_1A ()
CASE 2
TABLE_1B ()
CASE 4
TABLE_2A ()
CASE 8
TABLE_2B ()
ENDSWITCH
Display More
When I have the PLC send an index command it works, but I lose my home position on the manipulator, as the indexer is in a different location. PLC will not allow indexing if the robot is not in home position. How can I teach my home position to be active regardless of axis E2 position? Here's the code for actual motion. NULLAXIS is a variable containing 0's for all axis positions.
DEF TABLE_1A( )
TABLE_CLEAR_POS()
TABLE_1A=NULLAXIS
TABLE_1A.E2 = 90
$OV_ASYNC=100
$ACC_EXTAX[2]=100
ASYPTP TABLE_1A
WHILE $ASYNC_STATE==#BUSY
Endwhile
END
Display More
Thanks!