Presentation is loading. Please wait.

Presentation is loading. Please wait.

Registration (position capture)

Similar presentations


Presentation on theme: "Registration (position capture)"— Presentation transcript:

1 Registration (position capture)
Trio Training Registration (position capture) Hardware Registration How it works and some examples

2 What is Hardware Registration?
Hardware Registration gives us the ability to: Accurately record the position of an event Can be triggered from many sources with 24V output signal Proximity sensor Optical sensor Magnetic sensor Output from vision system Or the zero mark on an axis encoder

3 What is Hardware Registration?
Registration Input

4 BASIC Commands for registration
REGIST(mode, channel, source, edge, window) mode Set to 20, 21 or 22 for most applications channel HW capture channel or module input number source Selects external input or Z encoder index edge Rising or falling edge trigger window 0 for no window, or set to 1 or 2 to use window OPEN_WIN position where the search for regist event will start CLOSE_WIN position where the search for regist event will stop

5 Hardware position capture
REGIST(20, channel, source, edge, window) When channel = 0: MARK Flag to show that event has happened REG_POS Position where event happened REGIST_SPEED Captured MSPEED where event happened When channel = 1: MARKB Flag to show that 2nd event has happened REG_POSB Position where 2nd event happened REGIST_SPEEDB Captured MSPEED where 2nd event happened

6 Benefit of Hardware Registration
External Event 1.2ms / 6mm 1ms 5mm 2ms 10mm 3ms 15mm 4ms 20mm 4ms 20mm 4mm SPEED = 5m/s MARK=TRUE REG_POS=6 IN(x)=ON MPOS=10 REGIST

7 OFFPOS Example 1 REGIST(20,0,0,0,0) WAIT UNTIL MARK OFFPOS = -REG_POS
Registration Input MC405 The Application: Boxes appear randomly on a conveyor. A label has to be applied relative to the leading edge of the box (MOVELINK). The Solution: Optical sensor senses the leading edge of the box Use REGIST to capture the position and use OFFPOS to reset the encoder to zero at this point. The conveyor position is now absolute in relation to the leading edge of the box. REGIST(20,0,0,0,0) WAIT UNTIL MARK OFFPOS = -REG_POS

8 Interpolated position capture
REGIST(21, channel, 0, edge, window) channel The module input number to use R_MARK(channel) Flag to show that event has happened R_REGPOS(channel) Position where event happened R_REGISTSPEED(channel) Captured MSPEED where event happened A “time-stamp” is generated when the input is triggered. The event time is then used to calculate event position by interpolation between MPOS now and MPOS from the previous servo tick.

9 Multiple registration inputs
When more than 2 registration events are needed on one axis, some hardware supports multiple registration channels. REGIST(22, channel, source, edge, window) channel The module input number to use R_MARK(channel) Flag to show that event has happened R_REGPOS(channel) Position where event happened R_REGISTSPEED (channel) Captured MSPEED where event happened Note: If this mode is used, all 8 inputs are assigned to the one axis. You cannot mix REGIST(22) and REGIST(20) on one bank of inputs.

10 Registration Example pitch Reg. mark BASE(lab_feed) REGIST(21,4,0,1,0)
DEFPOS(0) `sets the “at rest” position = 0 MOVELINK(pitch+radj,lnkdst,20,20,conv,2,lpos) WAIT UNTIL R_MARK(4) or MTYPE=0 IF R_MARK(4) THEN ‘ Reg mark seen, calculate error reg_err = expected-R_REGPOS(4) radj = reg_err*0.4 ‘Adjust by reg.‘gain’ ELSE ‘ Did not see reg mark misses=misses+1 IF misses>max_misses THEN GOTO reg_fail ENDIF

11 MOVEABS(100) MOVEMODIFY(140) MOVEMODIFY
Remember that MOVEMODIFY enables the program to change the end point of a move which is already in motion. 100 140 MOVEABS(100) MOVEMODIFY(140)

12 Credit card punch Registration Input MC405 Input

13 Credit card punch Loop: WAIT UNTIL IN(punch_clr)=ON MOVE(index_length)
“Perfect” Case without Registration Loop: WAIT UNTIL IN(punch_clr)=ON MOVE(index_length) WAIT IDLE GOTO loop Real Application with Registration Loop: WAIT UNTIL IN(punch_clr)=ON MOVE(index_length) REGIST(20,0,2,0,0) WAIT UNTIL MARK MOVEMODIFY(REG_POS + offset) WAIT IDLE GOTO loop

14 Registration and MOVEMODIFY
Additional Code for Error Trapping loop: WAIT UNTIL IN(punch_clr) = ON MOVE(index_length) REGIST(3)’ rising edge of R WAIT UNTIL MARK OR IDLE IF MARK THEN MOVEMODIFY(REG_POS + offset) WAIT IDLE ELSE PRINT #3,”WARNING! No Mark Seen” misses = misses+1 IF misses>20 THEN GOTO reg_failed ENDIF GOTO loop


Download ppt "Registration (position capture)"

Similar presentations


Ads by Google