User guide

Chapter 5. Custom Profiling
177
Finally, we need to design a segment used to create a smooth entry into the repetitive portion
of the profile. We’ll assume that the home position of the arm is at 180 degrees, so it needs to
achieve the FOLRN ratio of 1304 in 30 degrees (341 slave steps). Using the same averaging
arithmetic as above, the required master distance for the entry segment is 523 steps. A sensor
is positioned with this entry segment in mind, and wired to TRG-A. A function to start motion
when the sensor is triggered will be imbedded inside the profile. The motion segments for the
stamping portion and recovery portions of the profile must be enclosed in a loop, and may be
programmed by picking the numbers from the table and equations above. Because the ratio
denominators are the same for all segments, and the slave distances are the same for the entry
and each of the stamping segments, these are commanded only when the values change.
Repetitive
Portion of
Profile
FOLRN
Master Travel
652
753
1304
1972
1000 1366 1866 2366 2732 3566 4400
Stamping Portion
Each segment has
341 slave steps
Recovery Portion
Program
FOLMAS21 ; Follow extra encoder
FOLEN1 ; Enable Following mode
INFEN1 ; Enable input functions
INFNC17-H ; Enable trigger A for interrupt
SCALEØ ; Parameters are in steps
DEF STAMP ; Start program definition
TRGFNA1 ; Profile starts upon trigger A
FOLRD1ØØØ ; Ratio denominator, 1ØØØ steps per inch
;define the entry segment
D341 ; Distance of 341 steps is about 3Ø degrees
FOLRN13Ø4 ; Goal ratio for start segment
FOLMD523 ; Master distance during ramp
GOBUF1 ; Build start segment
PLOOPØ ; Start the continuous loop
;this profile section starts 2-to-1 ratio, or a starting FOLRN13Ø4
FOLRN753 ; Goal ratio for segment
FOLMD366 ; Master travel in steps for segment
GOBUF1 ; Build motion segment
;the 2nd section of profile starts with the final ratio of the 1st section
FOLRN652 ; Goal ratio for segment
FOLMD5ØØ ; Master travel in steps for segment
GOBUF1 ; Build motion segment
;the next two sections are mirror images of the first two
FOLRN753 ; Goal ratio for third segment
FOLMD5ØØ ; Master travel in steps for 3rd segment
GOBUF1 ; Build motion segment
FOLRN13Ø4 ; Goal ratio for 4th segment
FOLMD366 ; Master travel in steps for 4th segment
GOBUF1 ; Build motion segment
;the next two sections complete the loop and are mirror images of each other
D1366 ; Slave travel in recovery segments
FOLMD834 ; Master travel in steps for recovery segments
FOLRN1972 ; Goal ratio for ramp up segment
GOBUF1 ; Build ramp up motion segment
FOLRN523 ; Goal ratio for ramp down segment
GOBUF1 ; Build ramp down motion segment
PLN1 ; End of loop cycle
;finally, a segment to end motion
D341 ; Distance of 341 steps is about 3Ø degrees
FOLRNØ ; Goal ratio for end segment
FOLMD1ØØØ ; Master distance during ramp
GOBUF1 ; Build end segment
END ; End of STAMP program definition
PCOMP STAMP ; Compile the program
; **********************************************************
; * To execute the program, enter the PRUN STAMP command *
; **********************************************************