6 capture, Capture -10, Simpliq – ElmoMC SimplIQ Software Manual User Manual
Page 195
![background image](/manuals/558389/195/background.png)
SimplIQ
Software Manual
Sensors, I/O and Events
MAN-SIMSW (Ver. 1.4)
12-10
OldMi=MI;MI=MI|0x16; /* Prevent operational AUTO_RLS routine while in
homing process*/
/* Arm homing for
↑RLS, stop after homing, don't initialize counter*/
HM[3]=7;HM[4]=0;HM[5]=2;HM[1]=1;
/* Go to the reverse */
JV=-10000;BG;WaitArrive(2000);if(status<=0)goto LastLine; end
/* Go until falling home switch, stop, and capture position*/
HM[3]=2;HM[4]=0;HM[5]=2;HM[1]=1;
JV=-JV;BG;WaitHome(2000);if(status<=0)goto LastLine; end
Pos1=HM(7)
/* Sample home switch from other side */
HM[1]=1; JV=-JV;BG;WaitHome(2000);if(status<=0)goto LastLine; end
/* Final calculation – set immediate difference correction to PX*/
HM[2]=10000-(HM[7]+Pos1)/2;HM[3]=0;HM[4]=2;HM[5]=1;HM[1]=1;
status=1;/*Success return */
##LastLine
MI=OldMI; ** Restore AUTO_RLS routine status
return
12.5.6 Capture
Capture is a special case of homing, in which the event is programmed to register only
the counter values, without affecting motion and without updating the position counters.
It efficiently synchronizes the motion origin with objects in the working space.
The drive can capture two events defined by the HX and HY commands, and register
occurrences of PX and PY of each event. The capture function captures both the main and
auxiliary position counters simultaneously, which is useful for synchronizing the main
and auxiliary positions. When main capture mode (HM[1]) is required, HM[7] and HM[8]
capture PX and PY respectively. When auxiliary capture mode (HY[1]) is required, YM[7]
and YM[8] capture PX and PY respectively.