,
"
tt ing for po Fig. 15: Advanced se tti for po s i tio n pe r i od and f ac t or in the a x is mapp in g
M C _G e arInP o s function bl ock This f un ction block is used to start a linear link at a d e fi ne d master and s lave po s ition.
––
un ct i on block Fig. 16 : M C _ G e a r I n P o s f unc
Smooth entry into the li nk
The im ag e at top right dis p la y s this procedure for diff e r e n t s ta r tin g s it uations (random po s ition of the slave ax is ). mo ve vem m en t of the s la v e drive is started when M a s te rS ync P o s i ti on The entry mo - M as te rS ta rtDi s t anc e ha has s been r e a che d. mo vemen vemen t smoo th ly enters the corr e s po At t his point, the en try mo po ndin g gear r at io.
16
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
Electronic Gear s
M C _G e arInP o s input parame te rs M as te r/ Sl av e: S p ecif ie s the master ax is r e f e r e nce and s la v e ax is r e f e r ence. Execute: Start link with po s itiv e edge on the Execute in put.
R ati oNume ra to r/ R R ati o D e nomi na to r: Gear ratio of the link. For e x a m ple : 3/1 Slave mo ves 3 time s f as te r than the master.
M as te rSyncP o s i ti on/ Sl av e SyncP o s i ti on: Master and s la v e po po s ition at which the axes run in- s ync . SyncMode: se e Fig. 17, Fig. 19 and Fig. 20. 20 .
M as te rStartDi s tance : The dista nc e within which the system has to f or m a " s m oo t h" entry into the gear link (" com pens at ion p e r f movement of the s lav e " ). V el oc i ty/ A cc el e rati on: Maximum speed or acc e ler a tion for the s la ve w he n ente r ing the li nk . M as te rP arID : A Pa r ID can be used as master s ign al ins t ea d of the ma ster s e t pos it ion. M as te rP arID M a xV e l oci t y: When us ing a Ma ste r Par ID , this parameter s pecif ie s the maximum speed of t his Pa r ID v alu e , which is valid when e n te r ing the ge a r and when chan gin g the gear r atio.
Note s :
An activ e link made by the M C _G e arInP o s f un ct ion block cannot be unc t ion call for the same or another int e rr u pte d b y an a dd it ion al f unc ins tanc e (i.e. the gear r atio cannot be changed e ith er ). The Slave must be in standstill when s tar t in g the link (MC_ Ge a r In an d MC_ Ge ar In P o s )! The link cannot be s t a rted if the master is mov in g bac k w ard s ! The master ax is is not aff e ct e d at all by these action s and can th e r e f or e e x e cu te b as ic mo veme veme nts as u s u al.
ASiM Multi-Axis Fun ctions
TM441
17
Electronic Gear s
S y n c h r o n i z a t i o n m o de s A mode parameter can ca n als o be used to de fi ne the th e position period, in which the s la v e dr iv e s ho uld move for entry into the gear. The point where the dr iv e s are linked is ba s e d on the mode and the current po sition of the s lav e a x is (current, la st or next p er iod ). T his all ow s e.g. a s la v e ax is co m pe n sa tion moveme moveme nt to the co rr es po n d in g conn e ct io n point to be f or m ed one on e pe r iod b pe r f od be f or e or one p e r iod after the current po po s ition pe r iod :
Fig. 17 CATCH_UP and SLO W_DOWN diag r a m
As shown in the imag e above, CATCH_UP alw a ys initia te s a mo vement to the next dr iv e linking point. SLOW_DOWN alw a ys initiat e s a mo vement to the pr e ce din g drive li nk in g point. D e pe ndin g on the current po po s it ion of the th e CATCH_UP mode might make it necessary to change to the next s lave , the fo r pe r iod (see above). It is a ls o po ss b ible to change to th e pr e ce din g p e r iod for the SLOW_DOWN mod e.
Based on our conveyor belt belt e x am ple (see be low ), the s la v e w ould mo ve f o rw ar d w he n linking in CATCH_UP mode and first backwards then f orw a r d in SLOW_DOWN mod e.
Fig. 18: Conveyor belt e x a m pl e
N _ P E R I O D diag r a m Fig. 19 WI TH I N
The im ag e above shows the b eh av io r for the W ITH IN _ P ER I OD mode for two diff e r e n t s ta r tin g s itu ation s . In thes thes e cases, the th e slav e a lw ay s mo ves to the s t ar t in g point w ithin t he current pe r iod .
18
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
Electronic Gear s
The s lav e w ould alw a ys move backwards when linking in the W ITH IN _ P ER IOD mod e because the SlaveSyncPosition is at the be ginn ing of the p e r iod in our conveyor b b elt e x a m p le .
Fig. 20 SHORTEST_WAY dia gr a m
When in the SHORTEST_WAY mode, the sla ve a lw ays moves to the next abo ve for two clos es t s t ar tin g point. This is ill u str a te d in the imag e abo different s t ar ting sit ua tion s. D e pe ndin g on the s itu ation, it could be abo ve) or the next pe r iod . necessary to change to the p r e ce ding (a s shown ab master co m pe n sat ion ha hap p pens when the What ha th e st ar t in g po s ition for the master c has s a lr e ady bee n exceeded? When u s in g pe r iod ic axes, this s tar t in g point a ls o recurs in the next p er iod . O the rw ise , the f unc unc tion block returns an Err or.
C a u ti o n : The SyncMode input must be confi g ur e d when us ing a periodic axis . With a non periodic axis, it is ign or e d.
Task: El e c t roni c gear with position re f e r ence "
"
unc tion block can now be tested the same way as The M C _G e a rInP o s f unc in th e pr e v iou s e x a m p le . unc tion block and operate it us in g the Watch f un ction. Int e gr at e t h is f unc Start th e f un ction block while the s lav e ax is is idle. Observe how the s la ve be ha v e s .
ASiM Multi-Axis Fun ctions
TM441
19
Electronic Gear s
3.2
Dynamic phase s hif t
When a link is a ctiv e, MC_Phasing will create a phase shif t between the ma ster an d sla v e ax is . The master po po s it ion sent to the s la v e is s hif t e d with respect to it s actu al ph ys ical po s ition. The phase s hif t is only " s ee n " by the s lav e , the master do e s n 't n ot ice . The phase shif t r e ma in s in p lace until another p ph as in g command changes it. MC_Phasing can be used if a link has alr e a dy been started with the F Bs MC_ Ge ar In , MC_ Gear In P os or MC_C C_ Ca mIn.
How is this d one ?
The po s ition for the s lav e is based on the " po po sit ion" of the linked master and the dr iv e link r ela tion s h p il e ): ip (linear or via a cam pr of il
Fig. 21 Mas te r / S la ve drive link r e lat i on s h p ip
The MC_Phasing f un ction block now generates a value for an a dd itiv e e le me nt or add itiv e ma ster ax is . This ele me nt is added to the actu al ma ster po po s ition. The r es ult ing value is then a pp li e d to the master s ide of the drive link r e lation s h p ip.
20
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
Electronic Gear s
The s p ecif ie d final value for the add it iv e ax is is created by a corr e s po nd in g s pee d i ncre as e after the f un ction block is a ctivat e d. This prevents any th e procedure. The r om o cc u rr ing (for the slav e ) dur ing the po po s ition jum ps f r ma ster is not a ff e ct e d by or does n ot "k now a bo ut" th is act ion at all .
unc t i o n bl oc k Fig. 22: Targeted phase s hif t caused by the MC _ P ha s ing f unc
tt in g for the linked s la v e . This means This r e sult s in a changed po po sit ion s e tti that a s pe cifi c phase s hif t can be im ple men t e d. Ge ne r ation of the value of the a dd itiv e master ax is is done s moo thly. MC_Phasing can be set to im ple me nt product s e pa r at ion. After cutti tt in g the cardboard, the sheets are right next to each other on a conveyor belt. They are ar e then tr an s f e rr e d to a second conveyor belt. A phase shif t can be executed for the second belt second belt once it ha has s bee n reached by a sheet. This creates a gap between the products, which is r e quir ed for f ur th e r pr oce ss ing .
ASiM Multi-Axis Fun ctions
TM441
21
Electronic Gear s
MC_Phasing function bl ock
un c ti o n bloc k Fig. 23 : M C _ P has i ng f unc
M as te r/ Sl av e: S p ecif ie s the master ax is r e f e r e nc e and s la v e ax is r e f e r enc e. Execute: Phase s h if t is started at a r is in g e dg e.
PhaseShift: Phase shif t [m as te r 's un its ].
V el oc i ty/ A cc el e rati on: Maximum speed / acc eler ation for a ch ie v ing the phase s hif t [un it s /s ec]. Note :
The r e s ultin g s la v e po s it ion is dir e ct ly dependent on the li nk re l a ti ons hi p . For e x a m p le , the gear ratio for an ele ct r on ic gear has the f oll ow in g eff e ct on the r e s u lt: Gear ratio = 1:5 (Mas te r : Slav e ) Mas te r - s id e s h if t : 2,000 un its (additive master ax is ) Sla v e - s id e s hif t : 10,000 un it s
22
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
Electronic Gear s
Task: P has e s hif t "
"
U se the th e MC_Phasing f un ct ion block. Go through all of the steps up to the point of activ a ting the link and pe r f th e phase s hif t for diff e r e nt f or m the tt in gs . s etti N o te :
mo vement. The MC_Phasing The phase s hif t is a dd it iv e to the current mo ca n als o be tested while the linked axes are idle (idle f un ct ion block can m as t e r ).
ASiM Multi-Axis Fun ctions
TM441
23
file Electronic Cam P rofil es
4.
E LE C TR O NI C CAM P R OFIL ES
To im ple me n t d ynam ic, n on -li n ea r movements, ACOPOS off e r s the option of us in g e le ctr onic cam ca m pr ofil e s for a x is linking. These cam ca m pr o fil e s can be created by the us e r .
il e s Fig. 24 E l e c tr onic cam pr of il
E le ctr onic cam pr ofil e s can be used in many diff e r ent w ay s. fi le s can be used qu it e e ff e ct iv e ly for s pr ing w in din g E x am ple : Cam pr ofil mach ine s. Separate axes are ar e used to cont r ol the feed, curvature and s lop e r e s pe ctive ly. This ma k e s it po po ss b ible to create any shape needed (s lop e s, cones, e t c. )
4.1
I n t r o du c t i o n
As we saw in the pr e v ious se ction, the po s it ion r e lat ionsh p ip for drive links can ca n be cle ar ly ill u s t r a te d in a diag r am . In the cam diag r am, we see the master po po s it io n value in the hor iz ont al dir e ction an d the s lav e po po sit ion in the v e r t ica l dir e ction. The cam profile ma ster po now a ss ign s a r e s pe ct iv e s la v e po po sit ion value for each ma po s ition il e mas te r period / cam mas te r value within a de f ined range (cam p ro f ile period). The s la v e drive must follow th is profile while the dr iv e s are ar e a ctiv ely li nk e d.
24
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
file Electronic Cam Profil es
i p Fig. 25 Cam profile as po s i ti o n r e lati ons h p
The master po po s it io n is converted to a co rr e s po n din g s lav e po po sit io n via the cam ca m pr ofil e . This all ow s the ma ster to move in both dir ect ions . The s la v e drive is "conn ect e d" to th e master via the cam pr of il il e . That means that the spe ed and acc eler ation v alu e s for the s lav e drive are spee d and acc e le r at ion of the master in conn e ct ion a ls o ta k e n from the spe with the cu r v e cha r act e r is tic. Therefore, the entire c ours e of the cam profile must be checked to make s ure the s l ave drive can accept any occurring speed and acc e l e ra ti on va l ue s .
E xamp l e :
L et 's assume the master sign al changes at a constant rate (e.g. uniform master ax is mo ve vem m en t, time as master, e tc. ).
Critical ranges (with maximum v a lu e s for s la ve speed and acc e ler ation ) a r e represented in the cam profile by maximum s lop e (- > speed as first d e r iv ativ e of t he po s it ion ) and the maximum s lop e change (- > a cc e le r ation / de ce le r a tion as s e con d de r iv a tiv e of the po s ition) due to the th e position comparison.
ASiM Multi-Axis Fun ctions
TM441
25
file Electronic Cam P rofil es
4.2
fi l es Creating cam p rofil th e cr e ation of cam pr ofil es with a po f u l A ut omat ion St udio supports the po w e r f cam pro fil fi l e editor . A cam profile can be e dit e d in the cam profile e dito r after b ein g in se r t ed to th e pr o je ct. Cam pr ofil e s are ar e created as NC s of tw a re ob je ct s in Au t omation St udio. The corr e s po nd in g object must first be ins e r te d to the p r o je ct be f or e a new cam ca m pr ofil e can be cr e a te d.
A ut omat ion St udio 2. x
After selecting the menu item Ins e rt – New O b je c t an Advanced Ob jec t is s e le ct e d in the subsequent dia log bo x . "
"
Fig. 26 I ns e r ti ng an advanced ob j e c t
After confi r ming this s e le ction by pr e ss ing the Next button, the r es pe ct iv e NC dat a ob je ct can ca n then be s e le ct e d in the next w indo w . For our ex am ple , le t 's se le ct the Typ e : NC Cam Profile from the R e s o urce : ACP10: Cam P ro fil e .
26
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
file Electronic Cam Profil es
The cam profile name can be entered in the " Name " fi e ld:
il e Fig. 27 I ns e r ti ng a cam p r of il
The new NC s of tw a r e object is created in the pr o je ct after con f ir min g the entry with t he Finish butt on.
ee Fig. 28 : Cam profile in the s of tw a r e t r ee
The cam profile e ditor is opened a u tomat icall y after com ple t in g the act ion and we can start m od e li ng the cam profile right away. At any point in the f u tu r e , the cam profile ca n be opened for e ditin g by do u ble - cli ck in g on the ee . r e s pe ctive icon in the s of tw ar e tr ee
ASiM Multi-Axis Fun ctions
TM441
27
file Electronic Cam P rofil es
A u t o ma t i o n S t u d i o 3
Fig. 25 : A pp e n di ng a new ob je c t
Se le ct Motion from the C a te g o ri e s s e ct ion of the dialog box that appears a f t e r s r s e le cting Append Ob je ct from the Ins e rt menu it e m. Additionally, a new cam profile can be s e le cte d in the right half of the dialog bo bo x by s electin g New NC Cam Profile from the te m plate s.
Fig. 29 : S e le c ti ng a new cam profile in the Moti o n a r e a
After conf ir ming your s e lection with the Next button, a new d ialog box app ears in w h ich the o b je c t name and a de s c ri pti on can be entered for the cam ca m pr ofil e . The corr e s po n din g NC data object still has to be se le ct e d. In our case, we will s ele ct the Subtype: ACP10 Cam P rofil fi l e .
name , a des c r p Fig. 30 : E nte r i ng the name ip ti o n and se l ec ti ng the ACP10 data ob je c t
28
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
file Electronic Cam Profil es
Fig. 28 : O b je c t a ss ig nm e n t
ac ti ve We will ass ig n the new cam profile to the activ e CPU by s e le ct in g " to act C P U".
The cam profile is then added to the Logical View after confi r m ing the s e le ction w ith the Finish b utt on.
Fig. 29 : The i nse r te d cam profile in the logical v i e w
The cam profile can be opened at an ytime in the Logical View and ed it e d in the cam profile e ditor by do u ble - cli ck ing the corr e s pon ding icon.
ASiM Multi-Axis Fun ctions
TM441
29
file Electronic Cam P rofil es
4.2.1 Editing a cam pr ofil e The cam profile e dito r in Au to mation Stud io is a f ull - f e atur e d tool that h e p ca m pr o f il il e s for the lps us create and ada pt very clear and exact cam tt ings are a v ail a ble for r e s pe ctive li nk ing r e quir e ments. A number of s e tti doing t his . The Aut o mat ion St ud io help system conta in s de t ail e d user inf o r mation about i ns e r ti ng the NC s of tw are ob je c t c am pr ofil fi l e (a s dis cu ss e d in the s e ction above), cr e ating the cam profile as well as inf or mation about the individual cam profile f or mats . "
"
l p Fig. 31 : A u tom at i o n St u dio O nli n e H e p
The f oll ow in g se ction s will e x plain the steps for fo r e d iting a cam pr ofil e .
30
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
file Electronic Cam Profil es
An "e m pt y" area in the e dito r is dis p la ye d for the cam profile after creating a r w indo w is divide d into three a r e as : new cam profile object. The e ditor w
Fig. 32 Cam profile e dit or
Display of the cam profile ( 1, top) as a f un ction of the s lav e po po s ition acc or din g to the master po po s it ion. Two diag r ams de r iv e d from the cu r v e ch ar acte r is tic (s pee d, acc e le r ation, etc.) are dis play e d in the low e r half of th e w in do w . A list (2, bottom left) for de finin g the fixed point of the cu r v e ch a r act e r is tic A list (3, bottom right) for de fi nin g s ynchro nous s e c ti ons .
It is recommended to a d ju s t the diagram p ro pe r ti e s be f or e ins e r ting fixed points an d synchronous s e ct ions . A detailed de s c ri p ti on of the po po ss b ible fi l e s . p rop e r ti e s and settings can be found in the Automation Studio help fil
ASiM Multi-Axis Fun ctions
TM441
31
file Electronic Cam P rofil es
settin gs include: The settin
Ge ne r a l pr op op e r t ie s
C olor s r s e tti tt in gs E x t e n s ion s Display op tions L a be ls and mu las C h a r act e r is t ic v alu e s f or mu
for cur ve s No ta tion s in the
diag r a m We now have the possibility of d efi ning fixed points on the curve as well a s s ynchr onous sections (linear s e ction s on the curve ch ar act e r ist ic) to create a cam pr of il il e . The conn e ct io ns for a com ple t e cam profile are ma de a ut om at ica ll y by the cam profile e ditor u s in g i nte rpo l a ti on curv e s :
il e uc ti o n of a cam p r of il Fig. 33 Cons tr uc
The figure above shows an e x a m ple of a cam pr ofil e . A total of four fixed points and o ne s y nchr onous section (with linear gr ad ie nt ) were d e f ine d. These de f in it ions a r e auto mat icall y connected by the cam profile e ditor to create a com ple te cam ca m pr ofil e: When t his happens, i nte rpol a ti o n c urv e s are ar e a ls o ca lcu lat e d and dis pla ye d. The user ca user can n als o de fin e the shape of the int e r po lation curves as we will see lat e r.
32
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
file Electronic Cam Profil es
■ Fixed poi nts A fixed point is a point in the cam profile for which the po sition of the s lav e a x is is de te r min e d by the user, at a s pe cifi c po s ition of the master ax is .
There are four ways to inse r t a fixed po int : via the menu , by s ele cting Ins e rt/ Fi xp oi nt via the s hor tc ut menu in the diag r a m with Ins e rt Fi xp oi nt by s e le ct in g the
In s e r t
Fixpunkt button in the diag r a m
in th e fixed point table , workspace at the low e r left (2)
Fig. 34: The table in the l o w e r left area of the workspace c on ta i ns the list of e x is t i ng fixed po i nts .
The f oll ow in g v alu e s are used in the individual t a ble column s: Column l a be l
Meaning (for mathematical notation 1 )
No .
C o nse cu ti v e number of fixed points in the t ab le
s ma.
P os i t i o n of the fixed point on the master a x i s
s s l.
P os i ti o n of the fixed point on the slave ax is
s´
sl .
s ´´ s l .
First de r iv a ti v e of the cam profile f un un ct io n on the fixed po i nt ( cu rrent gear r at i o ) Second d er i v a ti v e of the cam profile f un un ct io n on the f i xe d po po in t
ASiM Multi-Axis Fun ctions
TM441
33
file Electronic Cam P rofil es
Note :
The notation in dica te s whether po po s it ion or time un its s ho uld be used in the diag r a ms on the a bs ciss a (i.e. for the master axis). The use of po po s ition is la be le d as ma the ma ti c no ta ti on . The use of time is (co m par a ble to la be le d as p h y s i c al n o t a t i o n constant ma ma ster s pee d). T her e f or e , in phys ica l notation the first de r iv ativ e in the fixed point is e qu al to the speed an d the second de r iv a tiv e in the fixed point is e qu al to the acc e l e ra ti on of the s lav e th e pat h- time diag r a m of the s la v e ax is . The cam profile represents the a x is . "
"
"
"
34
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
file Electronic Cam Profil es
■ S ync h r o n o u s s e c t i o n s A synchronous s ect ion is a s e ction in the cam pr of il il e, wh ere the user s p ecifi e s a linear course of master and s lave po po sit ion A constant master ax is speed within a synchronous section als o r e s ult s in a con s t ant s la v e mo veme veme nt. In other wo wo rds, the cam profile is linear (com p ar a ble to an e le ctr on ic g e a r ).
There are ar e a ls o four ways to ins er t a synchronous s e ct io n: via the menu by s e le ct in g Ins e rt/ Synchronous S e c ti on via the s hor tc ut menu in the diag r a m with Ins e rt Synchronous S e c ti o n by s e le ct in g the d iag r am
"
In s e r t
Synchronous Se cti on button in the "
in the synchronous section table, in the workspace at the low e r right (3)
Fig. 35: Table in the l ow e r left part of the list of e x is t ing synchronous se c ti on s
The f oll ow in g v alu e s are used in the individual t a ble column s: Column l a be l
Meaning (for mathematical notation 1 )
N o.
C ons ec uti v e number of synchronous s ec t io ns in the t ab l e
s ma. 1
P o si t i o n of the synchronous se ct io n s t a r t i ng point on t he master a xis
s sl. 1
P o si t i o n of the synchronous se ct io n s t a r t i ng point on t he slave a xi s
s ma. 2.
P o si t i o n of the synchronous se ct io n end point on the mas te r ax is
s sl. 2
P o si t i o n of the synchronous se ct io n end point on the s la v e ax is
G r ad ad ie nt
Slope of the synchronous se ct io n or gear ratio gear ratio ( p pr od od uce d from the above d ef i ni t i ons )
ASiM Multi-Axis Fun ctions
TM441
35
file Electronic Cam P rofil es
Note :
When us ing physical not ation (ma st e r ax is = time) the master po po sit ion e ntr ies ch an ge acc or dingly to po int s in time. The gr a die nt of the synchronous s ection is e qu al to the spe spee d of the sla v e ax is in this range. ( time passes "e v e n ly" )
36
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
file Electronic Cam Profil es
■ I n te r p o l a t i o n c u rv e s unc t ion s e ct ion of a cam profile calcu la te d by the cam profile e ditor The f unc and an d locate d between two tw o definitions (fixed points, synchronous sections) is call e d an i nte rp ol ati o n c urve .
After each new fixed point or synchronous s ection is entered, int e r po lation curves ar e imm e dia te ly created in between, calculate d and dis p la ye d. The cam profile e dito r ma k e s sure that an inte r po lation curve li e s e x actly between two de fi ne d com po n e n ts.
L ik e w is e , an int e r po po la tion curve is als o de le te d if a fixed point or a s ynchr o no us s e ction is de le t e d. Note :
The ca lcu lation ensures that the cam profile f un ction and it s first de r iv ativ e ar e constant at the t r ansit io n po po in ts (e.g. the curves do not cont ain any jum ps at the e n d poin ts ).
Various curve types can be s electe d for the individual i nte rpol ati on curve s to more pr ecis e ly de s ign the curve ch a r act er is tic between the de fine d areas (fixed po in ts and synchronous s e ctio ns ). These pr ov ide d iff e r e nt ar e pr e de f in e d shapes acc or din g to t he type. S p ecif ic curve ch ar acte r is tics are supported by ty pe -s pe cifi c s etti tt in gs (t ur n in g po in ts , joining po int s, e tc. ). The corr e s po nd in g dia log box is opened by right-clicking on the int e r po lation cu r v e. T h e curve s e ct ion can be e dite d after s e le ct in g Curve P r o p e r ti e s .
ASiM Multi-Axis Fun ctions
TM441
37
file Electronic Cam P rofil es
Fig. 36 Curve pr op op e r ties dial og bo og bo x
D e t ail e d inf or m ation about the po ss b tt in gs can be found in th e ible s e tti A ut omat ion St udio Online Help files under Int e rpol a ti o n C urve s .
38
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
file Electronic Cam Profil es
Task: C re ati ng cam pr ofil fi l e s "
"
In s e r t the NC s of tw a r e object cam profile to your pr o ject and edit it in the th e cam profile e d it or. To do t his , use us e the option for de fi nit ion of fixed points an d synchronous s e ct ions .
vem m en t profile in which the s la v e ax is e.g. The imag e be low shows a mo ve fi le . reaches its maximum po sition in the right quarter of the pr ofil
When cr e a ting the cam pr o fil e , ma ke sure that the profile has ha s the same slope at the s tart and end point . This ch ar act er ist ic is im po po r ta nt for the f oll ow in g drive li nk a pp pp li cat ions . Supp l e me nt:
Transfer the pr o je ct with the new cam profile to the contr oll e r and a ctiv at e monit or mode. The cam profile sh ou ld now appear in the p r o je ct s of t w a r e tree as a data object on the cont r oll e r. The necessary cam ca m p r of il il e s for the cou pli n g a pp pp licat ion must be t r ansf e rr e d to the unc t ion block . ACOPOS servo drive u s in g the M C _ C a mTabl e S el e c t f unc
ASiM Multi-Axis Fun ctions
TM441
39
file Electronic Cam P rofil es
4.3
un c ti ons Linking f un
A cam profile must be tr an s f e rr e d from the con t r oll e r to the slave A C O P OS be f or e it can be us e d. The f oll ow in g se ction will e x p la in the corr e s po n din g r ou tin e s and an d p r oce dur e s needed to do this. 4.3.1 P r e pa r ing cam ca m pr ofil fi le s unc t io n block is r e quir e d for t r a ns f err in g a cam The MC_CamTableSelect f unc profile ob ject to the linked sla ve . unc tion block is ca ll e d, the corr e s po n din g cam profile (input When th is f unc pa r a m ete r : CamTable) is tr ans f err e d and an ID is returned for f ur t he r use with the link f un ct ion. tt in g for pr oce ss in g the cam profile one time or Additionally, the p r e -s e tti cyclically is ma de on th is f un ct ion block . Thus, it is po po ss b ible to allow the cam profile to cons t ant ly repeat its elf :
il e s to each ot h er Fig. 37 Cyclic attachment of cam pr of il
This r e sult s in a continu ous po sitionin g path for the sla v e .
40
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
file Electronic Cam Profil es
MC_CamTableSelect function bl ock
This f un ction block is used for do w nlo adin g and confi gur in g a cam profile on the li nk s la v e .
unc ti on bl oc k Fig. 38: MC_CamTableSelect f unc
M as te r: S pe cif ie s the ma ster ax is r e f e r e nc e. S l av e : S pe cif ie s the s la v e ax is r e f e r e nc e . CamTable: Na me of the de s ir e d cam ca m p r of il il e . Execute: Activa te f un ction block with po po s it iv e edge on the Execute in put.
Periodic: Se le ction between on e- t ime or cyclic p r oce ss in g of the cam ca m p r ofil e . mcNON_PERIODIC ... 0 mcPERIODIC ....... 1
C a u ti o n :
Smooth entry must be guaranteed when s ta r ting a cam profile link. When conn e ctin g cam ca m pr of il il e s con s e cut iv e ly, the b e ginn in g of the f oll ow in g cam profile is s e t s e a mle ss ly to the end of the pr e ce din g cam pr ofil e . You must first ensure that the speed and acc e l e ra ti on of the tr a ns i ti on is co ns tant (no bend in the po s it ionin g p ath ). The f oll ow in g s e ct ion s will pr o v ide some e x a m ple s of how to do this .
ASiM Multi-Axis Fun ctions
TM441
41
file Electronic Cam P rofil es
4.3.2 Linking cam pr ofil es A cam profile on the ACO POS is linked u s in g the th e M C _ C a mIn function bl o ck .
N f unc unc ti o n blo ck Fig. 39 : M C _ C a mI N
M as te r: S pe cifi e s the ma ster ax is r e f e r e nc e. Slave: S pe cifi e s the s lav e ax is r e f e r e nce . Execute: Start link with po s itiv e edge on the Execute in put.
M as te rOff s e t: Offset on the ma ster side . SlaveOffset: Offset on the s lav e s ide . M as te rSca li ng / Sl av e Sca li ng : Master / slav e -
s id e s cali ng of the cam p r ofil e . S tar tM o de : Start Mode based on the off s e t.
C amTabl e ID : Cam profile ID of the d es ir e d cam ca m p r ofil e . T he MC_C C_ C a mT a bleSe le ct f un ct ion block pr ovide s t his after the cam profile h as been succ ess f ull y do w nloade d.
M as te rP arID : A Pa r ID can be used as master s ign al ins t ea d of the ma ster s e t pos it ion.
42
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
file Electronic Cam Profil es
Poss Possii bilities bilities for s tart i ng the li nk :
Simil ar to the MC_ Ge a r In Po s f unc unc t ion block, the exact start of the link can a ls o be de f in e d here in r e la tion to the master and slav e po s itio n. The two ar e av ail a ble for fo r this de fi nitio n. (Note: parameters Offset and StartM ode are The master start po po s it ion r e tur ns periodically (< pe r iod >)). ar e three different va There are varri a ti o ns ( s ta rt modes) for de fi n in g the link s ta r t: Absolute from the zero point of the po po s ition pe r iod " Z e r o point of the po s it ion p e r iod + Off s e t" mcABSOLUTE
Fig. 40: Link start in the mc A bs ol ut e m od e
The s lav e calculat e s its start po sition by a dd in g the slave offset to the s tart of the period. It moves to this po s ition and w aits there until the mas mas ter has reached its ma s te r offset, als o started from t h e pe r iod b od be ginn in g. The s la v e links with the master ax is as soon as this has ha s bee n r e ach e d. Relative to the current po po s it ion " C u rr en t ax i s po po sition + Off s e t "
mcRELATIVE
Fig. 41 : Link start in the mc R e la tiv e m od e
ASiM Multi-Axis Fun ctions
TM441
43
file Electronic Cam P rofil es
The pr inc p th e mcABSOLUTE start mode, with the iple is the same as the e x ce pt ion th at the start po ar e calcu la te d po s itions for s la v e and master are based on their a ctual positions and take the r e s p ect iv e off s e t into con s ide r ation . ma ster / s lav e po s ition Directly from the current ma
mcDIREC T
Fig. 42 : Link start in the mc D ir ec t m od e
The cam profile is started right at the current mas te r and slave position. T he M a s te rOff s e t s pecif ie s where within the cam profile the link is started. The Slav e O ff s e t is not used in this start mod e.
N o te :
star t mo mod e to The ma ster ax is must be at standstill in the mc D IRE C T star link the s la v e at the correct po sition!
Note :
It is po th e start po po ss b i ble that the ma ster will pass the po sit ion for linking a few t ime s be cau s e the s la v e r e qu ir e s a ce r t ain amount of time to reach its start po s ition . Once the th e s lav e has reached its start po po s it ion, the link is started after the next master s t ar t po s ition ha has s been r e ach e d.
44
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
file Electronic Cam Profil es
fi l e Scaling the cam p ro fil A cam profile used for linking can be " s t r e tch e d" on both the ma ster and s lave s ide . Th e input parameters for the mu lt p i pli cation f a ctor s are includ e d in the M C _ C a mIn f un ction b lock .
This expands the le ngth of the master and slav e cam profile by th e corr e s po ndin g f act or. Example: Cam profile s ca li ng
Cam Ca m pr of il ar e of t e n created with a m ast e r - side dime n sion of one unit il e s are (cam p r of il il e ma ster p pe r iod = 1) and a s lav e -s ide d ime ns ion als o of one unit (cam profile s la v e pe r iod = 1). This makes it rather easy to "s tr e tch " a cam profile to match the th e actu al pr oce ss :
For e x a m ple , le t 's assume that the cam profile (mast e r p pe r iod =1, sla v e p e r iod =1 ) sh ould be set in a way so that e x actly one cut is made for each ma ma ster ax is r e v olut ion. T he r e f o r e , the th e mu lt p i plication f actor for the m as t e r - s ide must be set to th e same number of un it s for a master r e v olu tion.
When us ing a linear cam profile (com pa r a ble to e le ctr onic gea r ), the " g e ar r r r atio" can be de te r mine d us ing the mu lt p ipli cation f acto r s.
The MC_CamOut function block can be used to te r min at e an act iv e link aga in.
unc ti on b loc k Fig. 43: MC_CamOut f unc
ASiM Multi-Axis Fun ctions
TM441
45
file Electronic Cam P rofil es
Ta s k :
Set up the link for the cam profile created e ar li li e r u s ing the known pr ocess ocesse d c ycli call y. m e t hod . The cam profile s hould be pr
P r e p a ra t i o ns : unc tion s MC_CamTableSelect (for pr e par in g and tr an s f err ing Add the f unc the th e ca m profile), and M C _ C a mIn (for s ta r tin g the c am profile link) to the cyclic program pa r t for the s la v e drive. Make the necessary fixed tt in gs for the f unc unc tio n block s – e. g. : s etti (* Cyclic program section *) (* Function block calls *)
... (* Camming functions *) MC_CamTableSelect_0.Master:= Axis1Obj; MC_CamTableSelect_0.Slave:= Axis2Obj; MC_CamTableSelect_0.Periodic:= mcPERIODIC; MC_CamTableSelect_0.CamTable:= ’profile’ ’profile’; ; MC_CamTableSelect_0();
un ct ion is executed, the de f in e d cam profile object is When the f unc p r e pa r e d f or cyclic pr oce ss in g.
The link can be started u s in g M C _ C a mIn after succ e ss f ull y do w nlo adin g the th e ca m pr ofil e . MC_CamIn_0.Master:= Axis1Obj; MC_CamIn_0.Slave:= Axis2Obj; MC_CamIn_0.StartMode:= mcRELATIVE; MC_CamIn_0.CamTableID:= MC_CamTableSelect_0.CamTableID; MC_CamIn_0(); MC_CamOut_0.Slave:= Axis2Obj; MC_CamOut_0();
mod e is used. T h er e f or e , the off s e t v alue s can be The " R e lativ e " start mo used to de t e r mine the actual s ta rti ng point of the current positions (ma s t er /s lav e ). un ction block for linking in to the cam profile an d th e M C _ C amIn f unc U se the MC_CamOut for linking out of the cam pr o f il il e . P a y att e ntion to the a x is s ta tus!
Try to als o link the cam pr ofil e s u s in g diff e r e nt off s e t v alu e s. Obs erve the th e e ff e ct s – the r e lationsh p i ps can be seen clearly by ob se r vin g the r s pee d. po po s it ions at a s low e r ma st e r s Operate the f un ct ions u s ing the watch w in do w.
46
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
file Electronic Cam Profil es
C au t i o n : return ed In the p r og r amming e x a m ple above, the cam profile ID retur f r r om MC_CamTableSelect is tr ans f e rr e d d ir e ctly to the M C _ C amIn f un ct io n: MC_CamIn.CamTableID:= MC_CamTableSelect_0.CamTableID;
For this reason, you s h ould le a v e the "E x e cut e " input in th e MC_CamTableSelect f un ction block se t to " TR UE" because oth e rw is e th is value is reset to z e r o. In an "ind e pe nd en t" a pp pp lication task, you s h ould of course make sure that th e cam profile ID s are co rr e ct ly filed when p r e par in g multiple cam pr of il il e s . Th e correct ID must alw a ys be pr o v ide d on unc tion block in put when li n k in g. the r e s pe ctiv e f unc
The scaling values (mas t e r s r s ide and s la ve s ide s cali ng of the cam pr of il il e ) mu st be set to at least the value 1 for the lin k in g f act or s !
No te :
These f un ction block s used are in te gr at e d in a com ple te f un ction sequence in the "cam" task of the ACP10_MC sample p ro je ct. This task can be add ed to th e pr o je ct for con tr olli n g an ax is (virtual or real axis). ar e pr o v ide d in the structure (" gAx isSla ve ") for Additional v ar ia ble s are op e r at in g the linking f un ct ion. The cam pr o fil e object is tr ans f e rr e d after the command is given to start the cam profile link. Th e act u al link is then ma ma de when the C amTabl e I D is r e ce iv e d.
ASiM Multi-Axis Fun ctions
TM441
47
file Electronic Cam P rofil es
4.3.3 C h an gin g cam ca m pr ofil e s
When a cam profile link is activ e, the cam profile can be changed by calli ng th e M C _ C a mIn f un ct io n block aga in. The pe r iod of the activ e cam profile is ended and the new cam profile is attached af te r de f in in g a new C a mTabl e ID and a po s it iv e edge on the th e start point of the f th e first cam profile is the Exe cut e input. The end point of t second cam ca m pr of il il e . Neither the ma s te r and slave offset nor the s ta rt mode have any effect on the ca m profile chang e .
Fig. 44 Cam profile t r ans iti o n
C a u ti o n : You must als o make sure in t his case that the tr a ns it ion betwe ca m betwe en cam pr ofil e s is constant in order to avoid bends in the cu r v e .
The r e quir e d cam ca m pr o fil e s can be attached to each other in a con v e nie nt sequence af t e r b be in g t r a ns f e rr e d to the corr es po n din g ACOPOS (one time f or me d or cyclically). The r out in e s f or cha ng in g the cam profile must be pe r f progr am at the r e s pe ctiv e m ome nt s . in the a pp licat ion prog
48
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
file Electronic Cam Profil es
Task: C a m profile chang e "
"
unc tion w it hout h av ing to make any a dd it iona l We can now test t his f unc p r e pa r at ions. Link the cam profile as in the pr ev ious e x a m ple . unc tion a ga in, but now change the v a lu e s for Execute the M C _ C amIn f unc the th e ca m profile s cali n g. In pr inc p iple , th is procedure is carr ie d out the sam e way wa y as linking a new cam pr of il il e .
ASiM Multi-Axis Fun ctions
TM441
49
Cam Profile Automat
5.
CAM P R OF ILE AUTOMAT
The cam profile automat a ll ow s e v e nt-cont r oll e d linking of e le ct r onic cam pr ofil e s . The f oll ow in g e x am ple pr ov ide s a step-by-step clarification of the cam un ctiona lit pr of il il e automat f unc lit y. 5.1
I n t r o du c t i o n
L e t 's first take a look at the f oll ow ing e nc a p s ulation m ach in e :
Fig. 45 : E nc ap s ula ti on ma ch i ne : P i c tu r e 1 : Sl av e s tar ti ng point, P ic tu r e 2 : E nc ap s ula ti on
The product transporter acts as master ax is . The s la v e ax is clos e s each plas tic con ta in e r with a crown ca p. A high- s pee d digital input (trigger) detects if a product is present. If no product is present, then the s la ve r e mains in s tandstill . O the rw is e the con taine r is capped w it h a crown cap. L e t 's con sider how th is e x a m ple cou ld be im ple me nte d u s ing th e M C _ C a mI n f un ct ion block . First we wil l need 2 cam pr ofil e s : Cam profile 1, which keeps the th e s lav e in st an ds till wh en a conta in e r is n ot pr e s e nt.
Secon d cam profile for k ee ee ping the s l av e in s tan ds till Fig. 46: Secon
50
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
Cam Profile Automat
Cam profile 2 for the e nc a ps u la tion pr oced u r e :
Secon d cam profile for e nc ap s u lat i ng Fig. 47: Secon
First, the two cam pr ofil es must be t r a ns f e rr e d to the ACOPOS. A con tr ol pr pro gra gra m mu s t then be used to check if a trigger sign a l ha has s been r e ce iv e d. If so, then the cam profile 2 must be linked u sing the M C _ C amI n function block . If there is no trigger s ign al, then cam profile 1 sh ould be linked via th e M C _ C a mIn f un ction block (by ch an gin g the cam profile ID on the th e C amT a ble ID in put ). A much mo re s im ple and e ffi cie nt method w ould be if the ACOPOS cou ld de cide on it s own which cam profile s h ould be processed, based on the current proces proces s s itu at io n. This w ould simplify the cont r ol program and e n a ble much f as te r r r r e action t im e s . The cam profile automat was created to meet thes thes e demands. It is initialized and th e parameters are set on the corr es po n din g ACOPOS s la v e drive where it can then be processed inde pe n de ntly. This keeps the CPU load com p ar a bly low, even when a lar ge number of axes are in use. The running process r e s ult s in minima l r e a ction t ime s . Th e r e are ar e a lso many wa ys to inte r ve ne in the running aut om ats . step-b y-step y-step look at the structure In the f oll ow ing s e ct io n, we will take a step-b and an d op er ation of a cam profile automat us in g the ex a m p le shown e ar li li er.
ASiM Multi-Axis Fun ctions
TM441
51
Cam Profile Automat
5.2
unc ti onali ty S t ruc ture and f un
The e x a m ple abo abo ve can be structured in the cam profile automat as f o ll ow s .
Fig. 48 : Cam profile automat structure for the e nc ap s ula ti on ma ch i ne
Automat s tate s
state . These are The two cam pr of il ar e il e s are now each packed in a s pe cif ic state. call e d automat s t at es . State1,, in which the s la v e s h ou ld not p e r f These r e su lt in State1 f or m a movement because a product is not present and State2 , in which the en ca ps ula tion process s h ou ld be ex e cut e d. State0 is op t io nal and can be used as the initial state or standby state. No cam ca m pr of il il e can be ass igne d to this st ate . Change e v ents : even t is used to de t e r mine which event sh ould cause a change The change even of state (e . g. trigger event nc TR IGG ER , or r e ach in g the end of the state ncST_END, etc). When t h e change s h ou ld be a pp li e d must als o be de t e r min e d. For e x am ple , this can take place at the end of the state (ncST_END) or immediately (ncAT_ONCE) when the event occu r s . The subsequent state that sh ould follow is a lso de fi n e d. This p This p r ov ide s a sequence of automat s tate s . we re de f in e d for each of the two states in our e x a m ple. Two change events we automa t seque sequen ce for the encapsulation machi ne : Cam profile automa
The e nca p sulat ion mach ine changes to the State1 after the eventcon tr oll e d start (s t ar t at a s pe cif ic ma ster po po s ition) in the State0 . The s la ve f o r m any mov e me n ts in the State1 . Th e r e f or e, the first doe s not pe r f con taine r must be ex clu de d wh en s ta r tin g the m ach in e . If a trigger s ign al ( ncTR IGG ER ) is detected dur ing pr oce ss ing of State1, State1 , then the mach in e changes to State2 at the end of State1 (ncST_END), at which point the e nc a ps ulat ion process is then ex e cu t e d. A cont aine r is capped when State2 is executed. This state is repeated if a n oth e r trigger s ignal occurs in t his st ate .
52
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
Cam Profile Automat
If a product is not present or if the State2 runs co m ple te ly to the end ( ncST_END) w ith out a trigger s ign al ha v ing occurred, then the mach ine f o r m a movement. The must sw itch to State1 so that the s la ve does not p er f automat r em ains in State1 until a new trigger s ign al is r e ce iv e d. When a new trigger s ignal is r e ce iv e d, the automat is s w itch e d back to S ta te 2 and the e nc a psu lation process is cont inu e d.
Fig. 49: E nc ap s ula ti on ma ch i ne
This makes it po po ss b i ble to conse cu tiv e ly arrange a wide v ar ie t y of cam sequen cer. This il e s in a manner s imil ar to the ste ps (s ta te s ) of a step sequen pr of il f u r t he r e na ble s th e im plem en t at ion of flexible mach in e pr oce ss e s . se t, the automat can Once the th e automat para me te rs have been set ca n then be started in an y state and runs through the individual states acc or din g to the de f in e d change events an d subsequent sta te s.
Fig. 50: Sequence of automat s ta t e s
ASiM Multi-Axis Fun ctions
TM441
53
Cam Profile Automat
5.3
Imp l e me n ti ng
the cam profile auto mat
The parameters for the cam profile automat can be set tw o w ay s … se t in two
… us in g co rr es po n din g function blocks in the ACP10_MC library automat. The individual f un ct ion block s are for the cam profile automat. ar e h an dle d e x a ct ly the s a m e a s the f unc un ction block s which have been used up to n ow.
unc ti on b loc k s for cam profile au t om ats Fig. 51 : B& R - s p e cif ic f unc
… us in g the MC_AUTDATA_TYP data s truc tur e pro vi de d in the ACP10_MC library . This data structure con ta ins all of the cam profile automat par ame t e r s in structured form. A v ar ia b le with t his progra m and used to type can be created in the a pp li ca tion progr conf igu r e the au toma t.
Fig. 52: MC_AUTDATA_TYP data s t r uc tu r e
The f oll ow in g steps must be taken to im ple me nt a cam profile a ut omat :
54
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
Cam Profile Automat
Define global p a rame te rs for the automat (m ast e r or s la v e ax is , initial st ate , etc.) via the data structure M C _ A UTD A TA _ TYP >.
or us ing the unc tion block . M C _B R _ Ini tA utP ar f unc data f un uc tu r e . s tr uc "
fi l e s to the ACOPOS that are used in Down Down load all of the cam p rofil un ct io n block th e aut o ma t. The M C _B R _D ow nl oa dC a mP ro f Ob j f unc can be used to do this . automa t states must als o be de f in e d. A state can be de f ine d The automa u s in g th e M C _B R _ Ini tA utS tate f un ct ion block or th e uc tur e .
In the f oll ow ing s e ct io n, we will take a s pe cial look at the automat parameter s e tti ca n a ss is t us tt ings . T h e Automation Studio Online Help files can by p r ov idin g add it ion al in f or mat ion about this .
ASiM Multi-Axis Fun ctions
TM441
55
Cam Profile Automat
5.3.1 Defining global pa r ame t e r s We use the th e term, g l o b al p a rame te rs to in dicate that s e tti ar e tt ing s are pr inc p ip all y valid for all automat s tat e s . tt ings are made us in g the M C _B R _ Ini tA utP ar The a utomat 's global s e tti un c ti on block and the
"
These are the ba s is pa r a m ete r s:
The S ta rtP o s i ti o n, which all ow s ch an gin g from the bas is state 0 to a n oth e r s r st at e at the mom en t a s pe cif ic master po po sition is reached. To do t his , a corr es po n ding change event with the event type ncSTART must be defi n e d f or the bas is state 0. S pe cifi cation of the next parameter S tartI nte r val is a lso of im po po r ta nc e . S tar tI nte rva l : If the ma ster po po s it io n is alr e a d y locat ed be hin d th e S tar tP o s i ti on, then the th e change event ncSTART is generated at the n e x t mu lt p iple of the Sta rtInte rva l . These are the op tiona l par am e te r s:
M a xM as te rV e l oc i ty: The sla ve uses the maximum master speed to calcu lat e it s com pe n s at io n gear and to check if its limits have been exceeded. ( War nin g from the A CO P O S) th e co m pe n sa tion gear is This parameter is only r e quir e d when the b e in g us e d. S tar tS tate e n a ble s the automat to be started in any state. The automat starts in the ba s is state 0 if th is parameter is not s pe cifi e d. S tar tM a R e lP os can be used to start in the initial state within the cam ca m p r ofil e . S tartM aR e lP o s s pe cifi e s the ma ster dist anc e from the pre sen t in b e g inn in g of the cam pr of il il e . Any com pe n sat ion gears pre the initial state are ar e ign o r e d.
ese n tat i o n of a dir e c t s ta r t Fig. 53: R e pr ese
M as te rP arID : A Pa r ID can be used as master s ign al ins t ea d of the ma ster ax is set po s ition.
56
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
Cam Profile Automat
A dd M as te rP arID : The value of this Pa r ID is added to the master po po s ition. A dd Sl av e P arID : The value of this Pa r ID is add ed to the s lav e po po s ition ca lcu lat e d by the automat.
i p – additive e le me nt - s la v e Fig. 54: Master – drive link r e la t io ns h p
S al veF ac to rP arI D : The sla v e ax is scali n g is stretched by the value of t his Pa r ID . This f act o r a pp li e s to all states in the automat. E ve nt P a rI D : Pa r ID s pe cif ica tion, which serves as event source in states w he r e the th e event type ncPA R _ ID is used. An event is detected if the value of t his Pa r ID changes from 0 to a value != 0.
S l av eL a tchP arI D : The s la v e com pe n s a tion d is tanc e be gin s at the latch e d v alu e of this P a r ID in the com pe ns ation mode NT type) ncSL_LATCHPOS. The value of the P ar ID s pe cifi e d here (I N 1, TR IGGER 2 ). is la tch e d when a trigger occurs (TR IGGER 1,
ASiM Multi-Axis Fun ctions
TM441
57
Cam Profile Automat
5.3.2 Cam profile do w nload A cam profile must first be tr a ns f e rr ed to the ACOPOS (sla ve drive) via th e M C _B R _D ow nl oadC amP rof Ob j f un ction block be f or e it can be used in an automat s tat e . These are the input p a r a me te r s :
The name of the cam profile is s pe cifi e d us in g D a ta Ob je c tName . The cam profile is stor store d on the ACOPOS u s in g a s pecif ie d i nde x. The cam profile for the corr e s po n din g automat state can ca n then be s e l e c t e d u s i n g t h i s i nd e x . The Periodic parameter can be used to de te r min e whether the cam il e sh ou ld be executed one time or periodically. S pe cif ica tion p r of il of t his parameter is only us e f ul used in com bin ation with the FB MC_C C_ C a mIn. How a cam profile is processed on the cam profile automat is de t er mine d only by the change even even ts. mcNON_PERIODIC ... 0 mcPERIODIC ....... 1
C a u ti o n : A cam profile is s e lect e d for an automat state when de finin g the states. This cann o t be done until a cam profile with the corr e s po nding inde x is a v ail a b le on the ACO AC O P OS.
58
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
Cam Profile Automat
5.3.3 Defining the s ta te s Up to 15 states can be de fi ne d (In d ex 0…14). One of the 15 states, the basis s ta te (state 0) , is an e x ce ption because there cannot be any cam profile or co m pe ns atio n gear ass ig ne d to it. Only the de s ir e d change events have to be de fi n ed for the bas is state. In a way, it serves as a waiting s te p. autom at s t at es : The f oll ow in g e le me nt s can be de fi n e d for the other autom
A cam profile, which must be tr an sf err e d to the ACOPOS be f or e it can ca n be u s e d. The cam profile can then be used in any sta te . An op tion al compensation gear is a v a il a ble which is e ss e nt iall y an automatically calculated curve that compensates for po s ition and s pee d diff e r enc e s and ensures a continuo continuo us cam profile ar e v ar iou s mo des for fo r this connection du r in g s ta te changes. There are (see 5.3 Compensation g e ars )
Thus, the curve ch ar a cte r is t ic is de f ine d within a s t ate :
il e Fig. 55: State with c om pe ns a tio n and cam pr of il
Note :
It is po po ss b i ble to de act iv ate the com pe ns a tion gear. If t his is done, then the state only cont a in s the cam pr of il il e .
If a com p en s a tion gear is used in an automat state, then it will always be p roce ss e d before the co rr e s p ond i ng cam profile in the s tate . unc t ion block a n d The M C _B R _ I ni tA utS tate f unc
ASiM Multi-Axis Fun ctions
TM441
59
Cam Profile Automat
The state be in g h an dle d is s pe cifi e d by S tate Inde x (1 … 14 ). The C a mp rofil fi l e Inde x input is used to s e le ct the cam profile for the s ta te.
M as te rFac to r and Sl av e Fac to r de fi n e the th e master and sla v e - s ide cam ca m p r of il il e s cali n g. O p tion al parameters when us ing the event ncC O U NT : R e pe a tC oun te rIni t is the initial value for the counter when u sin g the nc C OU NT event type. The counter state is decremented by one each time the end of th e state has been reached. The event is ge nerated wh wh en the counter state zero is r e ach e d. coun ter R e pe a tC oun te rS e t can be used to change the current coun state on a running automat.
O p tion al parameters when us ing the com pe ns ation g e ar : C o mp M ode As me nt ione d alr ea dy , a com pe nsat ion gear that compensates for spe ed an d po s ition diff e r e nc e s can be used b e f or e the cam pr o f il il e . Different com pe ns at io n modes are a v ail a ble . The com pe n sa tion gear can ca n a ls o be disa b le d. These are the com p en s ation gears a v ail a ble : ncOFF or leave input op e n ncONLYCOMP ncONLYCOMP_DIRECT ncWITH_CAM ncMA_LATCHPOS ncSL_LATCHPOS ncSL_ABS ncV_COMP_A_SL ncV_COMP_S_MA ncV_COMP_S_SL
M as te rC o mp Di s tance is the confi gur e d m a st e r -s ide com pe ns ation d i s t a nc e . SlaveCompDistance is the confi gu r e d s lav e - s ide co m pe ns at ion d is t anc e .
parameter Exte nde dC ompL mp Li mi t is used to s pe cif y whether The parameter E limit v a lue s are ar e additionally de fin e d for com p e n s ation. If the input is set to ncOFF, ncOFF , then the limit v alu e s in the ax is ' Init ar e v a lid. d at a mod ule are ncOFF or input not s e t . ncON
60
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
Cam Profile Automat
M i nM as te rC o mp Di s tance / M i nSl av e C omp Di s tance : These two pa p ar a me te r s can be used to s pe cif y a minimum eff ect iv e com p en s a tion dist anc e f or ma ster and s lav e . MaxSlaveCompDistance can be used to de f in e the maximum e ff e ctiv e com p ens atio n dis tanc e for the s lav e . MinSlaveCompVelocity s pe cifi e s the minimum s la v e speed f o r com p en s a tion . MaxSlaveCompVelocity s pe cif ie s the maximum s la v e speed f or com p en s a tion . MaxSlaveAccelComp1 off e r s the option to de fi n e a maximum s la ve acc e ler ation value for the first half of the com p ens ation. MaxSlaveAccelComp2 off e r s the option to de f in e a maximum s la ve acc e ler ation value for the second half of the com pe ns ation. SlaveCompJoltTime can be used to de fi ne the jolt time in t h e com p en s a tion .
The f oll ow in g parameter can ca n op tion all y be used as master s ign al:
M as te rP arID : A Pa r ID can be used as master sign al inst e a d of the ma ster ax is set po s ition.
ASiM Multi-Axis Fun ctions
TM441
61
Cam Profile Automat
5.3.4 Defining change e v e nt s A change event must be de fi n e d for a state to in duc e a state change . Up t o 5 change events (0…4) are av ail a ble for ea ch state.
A chang e event has the f o ll ow in g pr op e r tie s: Tar Tar get state ( N Ne x tSt ate )
Event type (T y pe ) Event att r b i but e (Att r b ibut e ) Target state ( Ne x tS ta te)
The target state d ete r min e s what state s ho uld be a ct iv ate d next. The current s tate can ca n als o be s e lect e d here for r e pe t ition . Event type ( Typ e )
The event type de te r m ine s which event tr igg er s a state change. This can be an "e x t e r na l" s ig na l trigger or the end of the current cam ca m pr of il il e , et c. The f oll ow in g event types can be us e d: The event M as te r s tart p o s i ti on" (ncS_START) can be used to s w itch to another state in sy nch r o niz atio n with the master po po s ition. A s ta r t po s i ti on f or the mas t e r must be de t er mine d as well as a s ta rt interval for pe r iod ic r e pe tition of this event. The pas ses th e corr e s po n ding event is generated when the ma ster pas po po s ition (or the int e r v a l r e pe tit ion). "
The " C oun t" event ncCOUNT can be used to exit a cyclic r e pe at in g state. In pr inc p iple , this means that a pr e de fi n e d value ( R e pe atC oun te rIni t) is coun t e d down each time the state is ex ite d. ca n If the counter reaches zero, the co un t e v e nt is tr igg e r e d. This can be used to change to another s t at e . "
"
even t, s e v e r al states w ould be r e quir e d and With ou t this change even unc t ion a lit th e r e f or e " s pe nt " for th is sort of f unc li ty.
62
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
Cam Profile Automat
The " Tri gg e r" event ( nc TR I GG ER 1 or ncTR I GG ER 2) off er s the th e possibility to react to hardware s ign als from e x te r n al s e ns or s . An ACOPOS parameter ID can be e v alu ate d for the "P a r ID " e v e n t ( ncP A R _ ID 1...nc P A ID _ ID 4 ) . The change event is generated for a value that is not e qu al to 0. "
"
The " Si g nal " event ( ncS I G NA L1 … 4 ) can be used to generate a r o m within the a pp ch a n ge f r pp lication pr ogr a m. The " S ta te e nd change event ncST_END is t r igg e r e d as soon as the end of the state is r e a ch e d. "
The change is tr igg er e d reached via subsequent
event neg ati ve state e nd nc ST _ E ND + ncNEG A TI V E as soon as the s t a r tin g point of the cam profile is n e ga t iv e movement of the master. In t his case, the state cannot have a com p e ns at ion ge ar! "
"
Furthermore, it is als o po ss b ible to generate a change event from the th e lo gica l " and" op er ation (ncAND_N2E) from two of the events m e ntion e d a bo bo v e . Event attribute (A ttr tt ri b ute)
The event att r b ibute s p e cif ie s the time at which the state change (tr igg e r e d by th e corr e s po nd ing e v e nt ) occurs. (= action point) This means that the a ctu al state change c an be place d at the end of the cam profile when us in g cum s ta nc e s in the a trigger as change event, w hich occurs acc or din g to cir cum cam profile ch ar act e r is tic. The f oll ow in g event a tt r b ar e de f in ed : i bute s are ncAT_ONCE : The change into the next state is executed imm e d ia te ly or at the be ginn in g of the next sa m pli ng cycle. ncST_END : The change into the next state is not executed be f or e the end of the current state after com p e n s ation and cam pr of il ile .
ASiM Multi-Axis Fun ctions
TM441
63
Cam Profile Automat
E x am ple : "A pp lyin g change e v e nt s"
i bu tes Fig. 56: Action point for va r io us events and att r b
The imag e above ill us tr at es how an event att r b ibut e works in r e lat ion to a ch an g e e v e nt. A linear curve ch ar act e r is tic is shown which traverses from left to r igh t .
L et 's assume that a pr e vious ly de fi n e d change event " Tri gg e r1" occurs within this st ate . The event a tt r b i bute ncAT_ONCE is used to imme diat e ly change to a de f in e d s ta te (taking the sa m p li n g cycle into con s id er ation ). subsequen t curve cha r act e r is tic As a r e su lt, the system place s the subsequen e x actly on t he po po s ition of the actu a l trigger event. (trigger s ign al d et e r min ed in regard t o ha r d w a r e , with inc r e as e d timing r e s olut ion between s a m pli ng cycle s ). T h e r e f or e , in accu r acie s do not occur in the po po s it ionin g sequence due to the s a m pli ng cycle. When the " s tate e nd" event a tt r b ibu t e ncST_END is used, t his change is ca m pr ofil e . mad e at th e end of the current cam
64
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
Cam Profile Automat
unc tion block an d The M C _B R _ I ni tA utEve nt f unc comp onent are ar e used to
S tate Inde x : S pe cif ica tion of which state the event corresponds to. E ve nt Inde x s pe cif ie s the in de x for th is e v e nt. Type s pe cifi e s which event type to react to. Attribute d et e r mine s at which point in time the event s ho uld b ecome act iv e . ("act io n po in t") parameter Action is set to the value 1, then th is event is a ls o If the parameter Action used f o r s r s ynchr onize d tr ansf e r of changed parameters in the automat. See the in pu t parameter ParLock parameter ParLock from the f un ct ion block MC _B R _A utC ontrol .
The parameter NextState s pe cif ie s which state to change to when the th e e ve nt occurs (ta r ge t s tat e ).
ASiM Multi-Axis Fun ctions
TM441
65
Cam Profile Automat
5.3.5 St ar tin g and cont r olli n g the cam profile aut oma t unc t ion block MC_BR_AutControl is used to s ta rt and control the cam The f unc il e automat. If the automat is conf ig ur e d with the a pp li cat ion structure, pr of il then th is f unc unc tion bloc k a ls o ha ndle s initialization of the automat.
The MC_BR_AutControl f un ction block is activ at e d by an Enable in put. Var ious commands for the cam profile automat can then be given via the con tr oll e r in puts . Parameters can wh en an automat is running ca n als o be changed wh ( online p a rame te r change ). The con tr ol input ParLock can be used to block imm e diate a pp pp li cat ion of changed parameters in the automat. This e n a ble s s ynch r oniz e d a pp li cation o f changed parameters in an ACOPOS cycle . ParLock…0: Lock dis a ble d. In pr inc p ar e ip le , changed parameters are a pp pp li e d th e next time t his state is e nte r e d. ParLock…1,2: Lock e na ble d. That means that the ch an ge d p a r a me te r s have not yet been a pp li e d. ar e a pp ParLock…1 0: The changed parameters are pp li e d in s ynch r oniz ation the next time a change event occurs. 0 : The changed parameters are P arL ock … 2 ar e a pp pp li e d in s ynch r oniz ation the next time a change event occurs, which wa s conf igu r e d with Action = 1. Signal1…4 t r igg e r s a ch cha a nge even even t de f in e d with ncS IG NA L1… 4 . The event is alw a ys generated on the signal1…4 - input at a po po s itiv e e dge . 1…Set s ig na l, 0…Reset s igna l.
The Start cont r o l input is used to start the cam profile automat. unc t ion block must first have been e n a ble d with the Ena ble The f unc in put. tt in g the The cam profile automat can be stopped by s e tti th e Stop in put . After this occurs, the sla ve is then r e le a se d from the automat. Howe owe ver, the th e calcu lat ion of the s la v e po po sit io n and the event-state h an dli n g cont inu e s in the automat, a s long as the master is in m otion . (. Stan d- b by " automat m od e ) This ca lcu lat e d po po s ition is crucial for the automat r e s ta r t. "
66
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
Cam Profile Automat
When s top ping the automat, the s lave changes to s tan ds till with th e de ce le r a tion s pe cif ie d on the D ec el e rati on in p ut. If a value ha has s not b ee n s pe cif ie d here, then the limit value from the Init data m od u le is u s e d. The s lav e ax is can be returned to automat op e r a tion after a failure comm and. The automat is resumed at the current u s in g th e re s ta rt comm ma ster and s la v e po s it ion. Take note that the current s la ve po po s ition does not have to match the current cam profile set po po s ition!
es ta r ti ng after s lav e ax is f a il ur e Fig. 57: R es
If the automat is conf igur e d with the MC_AUTDATA_TYP data s truc ture , then th e initialization of the cam profile au tomat parameters de fi ne d in the uc tu r e occurs via MC_BR_AutControl as f o ll ow s : a pp pp lication st r uc stru ct ure is attached to th e The address of the a pp pp li cat ion data stru A d r A u t D a ta .
The parameter initialization is started with the cont r o l comman d I n i t A u tD a t a .
ASiM Multi-Axis Fun ctions
TM441
67
Cam Profile Automat
Note s :
il es: Preset cam prof ile alread ady y provid prov ided ed on the drive and do not have to be tr an These are alre ansf erred erred to the ACO ACOPOS. C amP rofil fi l e Inde x = 0x FFFF has s a ma ster and s la v e This p This pr e de f in e d linear cam profile ha le n gt h of on e unit and can be used as C amP ro fil e Inde x for the confi gu r at ion of t he automat. This can be used with multiplication f acto r s to produce any m:n s tr aigh t li n e . C amP rof ile il e Inde x = 0x FFFE This p This pr e de f in e d point cam profile can be used as C amP rofil fi l e Inde x for the configur a tion of the automat. This 0 - cam profile can only be used in conn e ction w it h com pe n sa tion modes (i.e. not in states with CompMode = ncOFF . The master and sla v e inte r v a l len gt h of this pr e d efi ne d minimum ca m profile is zero. However, the s lop e of the curve is not zero, but can be s e t us in g the multiplication f actor s . This e n a ble s the use of a pp licat ions, w hich only r e quir e one com pe n sa tion procedure w it h out cam ca m pr ofil e . Online pa rame te r c ha ng e : As m e nt io ne d e a r li li er, parameters of the cam profile automat can be ch an ge d dur in g op e r at ion. The exceptions to this rule are the compensation mode (CompMode), event typ e (Type), event attribute (Attribute) and M as te r P arI D .
Other methods of s topp ing the automat: Automat ope r ati on can be stopped at any time with a slave movement s to p (MC_Stop). A change to the state index 255 can be used to exit the auto ma t.
68
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
Cam Profile Automat
Task: S e tt i ng the pa rame te rs for a cam profile automa t "
"
In t his e x am ple , we will im p le me nt a s im ple task us in g the cam profile automat.
D e f aul t: ar e carr ie d past a cutter in s pe cifi c inte r v als on a conveyor belt. belt. Products are When a product is detected by a t r igg e r , the product s h ould be cut in the next pe r iod at th e co rr es po n ding po s it ion. If no trigger is r ece iv e d (no (n o product p r e s e nt), then the cu t procedure is not activat e d.
Fig. 59.1 : The mach i ne ' s initial s i t ua ti o n
Fig. 59.2 : Product is detected
m ach in e must s w i tch to state 2 in the next pe r i od
ASiM Multi-Axis Fun ctions
TM441
69
Cam Profile Automat
belt corresponds to the master p D is tr b ib ution on the conveyor belt pe r iod . (Ma ste r p pe r iod e x a m ple = 1000 un it s )
P r oce dur e :
Sketch the automat state diag r a m. The bas is state 0 s hould be used for the automat start (see the event ty pe ncS _ S TA RT) RT ). Draw the r e qu ir e d cam ca m pr of il il e s in the cam profile e dit or and make sure that the distr b i but ion on the conveyor b be lt corresponds to the ma ster p pe r iod . C o nf ig ur e the cam profile automat us in g the a pp pp li cation dat a structure and start it via the Watch f un ct ion. (* Init Program *)
(*general automat parameters*) A u t D at a. Ma s t er : = A x i s1 O b j; A u t D at a. St a r tP o s it i o n := 0; A u t D at a. St a r tI n t er v a l : = 1 0 0 0; (*Automat STATE 0 Basis State – Event A u t D at a. St a t e[ 0 ] .E v e n t[ 0 ] .T y p e AutDa Aut Data ta.S .Sta tate te[0 [0]. ].Eve Event nt[0 [0]. ].At Attr tribu ibute te AutD AutDat ata. a.St Stat ate[ e[0] 0].E .Eve vent nt[0 [0]. ].Ne Next xtSt Stat ate e
1*) : = n c S _S T A RT ; := ncAT ncAT_O _ONC NCE; E; := 1;
(*Automat STATE 1 standstill*) AutData.State[1].CamProfileIndex := 3; AutData.State AutData.State[1].Ma [1].MasterFac sterFactor tor := 1; A u t D at a. St a t e[ 1 ] .S l a v eF a c to r := 1; 1; (*Automat STATE 1 standstill – Event 1*) AutDa Aut Data ta.S .Sta tate te[1 [1]. ].Eve Event nt[0 [0]. ].Ty Type pe := ncTR ncTRIGG IGGER ER1; 1; AutDa Aut Data ta.S .Sta tate te[1 [1]. ].Eve Event nt[0 [0]. ].At Attr tribu ibute te := ncST ncST_E _END ND; ; AutD AutDat ata. a.St Stat ate[ e[1] 1].E .Eve vent nt[0 [0]. ].Ne Next xtSt Stat ate e := 2; . . . (* Cyclic program section *)
. . . (* Automat START *) MC_B MC_BR_ R_Au AutC tCon ontr trol ol_0 _0.A .Adr drAu AutD tDat ata a := ADR( ADR(Au AutD tDat ata) a); ; MC_BR_AutControl_0.Deceleration := 500; MC_BR MC_ BR_A _Aut utCo Cont ntro rol_ l_0.I 0.Ini nitA tAut utDa Data ta := 1; . . . MC_BR_AutControl_0();
70
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
Cam Profile Automat
Tips for i mpl e me ntati on
Prepare the linked axes for movement a ctio ns us in g the known m e t hod s .
The jog r o utine from the " b bas ic" task can be used for constant mo vement of th e master ax is . Start the cam profile automat, which was confi gu r e d e a r li comm and. Us e the trigger in put li e r, u s in g the r e s pe ctiv e comm 1 to s ign al the presence of a product. Be sure to a ls o observe the drive st atu s .
ASiM Multi-Axis Fun ctions
TM441
71
Cam Profile Automat
Example:
"
La be li ng ma chi ne
"
R e quir e me nt s : In the f oll o w ing process, s e lf - a dh e siv e la be ls will be p lac e d on bo ttl tt le s . The bo ar e transported on a conveyor belt belt tt le s that will be la b e le d are bo ttl (ma s t er axis) from right to left. The ca rr ie r s on the belt ensure e qu al s pacing between the bo ttl tt le s. The s e lf - adh e s ive la be ls are pr o v ide d on a paper belt (label belt), which r om a roll (s la ve ax is ). is drawn f r Before the roll, the label band is looped around 180° on a me tal edge. This frees t he la b els from the be lt.
The process is started with an empty mach in e . A trigger sign al is used to de t e r mine whether a bottle is present or n ot.
Fig. 60: Labeling ma ch i ne
72
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
Cam Profile Automat
L et 's take a look at the cam profile status diagram for this la beli ng m ach in e :
0 Bas Ba sis
S_START
1 St illst
TRIGG Z_ENDE
2 1 /2Ag l
TRIGG Z_ENDE
3 Zyk Zy k l
TRIGG Z_ENDE
4 Ag l1/2
TRIGG
Z_ENDE
Fig. 61: Cam profile status diag r a m for the l ab e li ng ma ch in e
5 states are r e quir e d: Ba sis state 0: For s tar t in g the process at a s pe cif ic m as te r po po s it ion. State 1: Is processed if a bottle was not present in the cu rr e n t and in the new cycle (no trigger s ig n al). State 2: After one pe r iod with no bottle (or after s ta r ting th e mach ine ) th is state is used to dis pe n se the n e x t la be l. State 3: This state, in which the la be ls are a pp li e d, runs con st ant ly in nor ma l op e r at ion (w ith ou t any m iss ing tt le s ). bo bo ttl State 4: This state is processed if a label wa s a pp li e d in th e pr ec e d in g cycle and a bottle is not present in the current cycle.
cann ot Take note that the conveyor belt on t his la be li ng mach in e cann cont ain a bottle when st ar tin g in the first p first p e r iod .
ASiM Multi-Axis Fun ctions
TM441
73
Cam Profile Automat
The f oll ow in g im age ill u s tr ate s the po po sit ion curve of the la b eli n g mach in e. The li n e ar segments represent the s ynchro nous s e ct i ons . seg ments. Master and slav e must One label is a pp pp li e d within each of these se mo ve at th e speed in these segments so that the label can be e v e n ly a pp li e d to the bo ttl tt le .
synchronous synchronous sections
compensation compens ation phases
slaveposition
½ compensation
½ compensation
compensation
masterposition ½ compensation
i ble cam profile for the lab e li n g ma chi ne Fig. 62: P oss b
tt les are another (m as te r p The bo ar e dist r b bo ttl ibut ed e v e nly from one another ( pe r iod ). One bottle s h ould be la be le d per master p ar e a lso dis tr b pe r iod . The la be ls are ibut ed e v enly on the belt (s la v e pe r iod ).
The s lav e s ynch r oniz e s itself to the next bottle (if p pr e s e nt ) in the compensation pha s e s . To do th is , the s lav e must acc ele r at e from st an d still mas ter speed s ta r tin g at a s pe cif ic ma ster po to the mas po s ition. If a trigger does not occur (no bottle), then only a half com pe ns at ion f or me d in state 4 and then tr a ns f e rr ed to s tan ds till . When movement is pe r f vem m en t is made aga in in the next bottle is present, a half com pe ns a tion mo ve state 2 (s la v e acc e le r a te s to m ast e r s r s pee d) and the label is a pp li e d.
74
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
Cam Profile Automat
Note :
The auto mat task from task from the ACP10_MC sample p ro je c t shows unc t ion for s e tti th e a pp lic at io n of the f unc tt in g parameters and cont r olli n g the ca m profile automat within the f r r a me w or k k of a com ple te procedure. All r outine s for pr e pa r in g the drive and h an dli n g errors (com par a ble to the " b ba s ic" t a sk ) are c on ta in ed in pro gram sequen sequen ce. The familiar con tr o l structure is pr ov id e d the pro for op e r at in g the pr oce dur es . "
"
St ar tin g the automat in the " aut o mat " task creates the functionality of a " min i la be li ng mach in e" – see A uto ma tio n Stu dio Online Help C am Profile Automat Ex a m ple s . <<
ASiM Multi-Axis Fun ctions
TM441
75
Cam Profile Automat
5.4
Compensation g e a r
As m en t ione d alr e a dy, a com p e ns at ion gear can be used for each s t ate . The compensation gear is an au toma ticall y calcu lat e d curve which compensates f or po an d po s ition d iff e r e nc e s d ur in g a state tr a ns it ion and ma int ains a continuous connection of the cam p rofil fi l e s . The necessary parameters are pr ov ide d in the M C _B R _ Ini tA utS ta te f un ct ion block and in TY P >.S ta t e[ x] data structure. (see 5.2.4 Defining the the
Fig. 63 Co m pe ns a ti on gear
The figure above shows a com pe n sat ion between two co ns e cu tiv e states (cam pr of il il e s ). If com p en s ation is used in a state, then the compensation movement i s always p e rf o rme d before the cam profile of the s t ate . These are the ba s is parameters for de f inin g the com pe n s at ion :
C om pe ns at ion mode ( C o mp M o de)
Master com pe ns a tion d is tance (M as te rC omp D i s tance ) Sla v e com p e ns at ion dist anc e ( Sl av e C omp Di s tance )
The diff e r e nt compensation gear modes provide po ili tie s f or po ss b i bilit compensating path as well as speed diff if f e re nce s .
76
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
Cam Profile Automat
5.4.1 C om pe ns at ion mod e s Defining the exit po int : The exit point is alw ay s at the end of the cam profile when us in g the event a tt r b ibu t e ncST_END and within the curve or within the com p e ns at ion where the event occurs w h e n u sin g ncAT_ONCE. nc OFF
C o m pe ns at io n gear d is a ble d. ncONLYCOMP
The com pe n s at ion dis ta nc e s are valid from the end point of the p r e ce din g state to th e s ta r tin g point of the cam profile in the next s t ate .
i bu t e ncST_ E N D Fig. 64 : Co m p e n s ati o n mode ncONLYCOMP with event a tt r b
The confi gur e d com p e ns at ion dis ta nce s (g2/h2) are valid from the curve end point of the pr ece din g state to the s tar ting point of the cam profile in the next state. The rest of the cam profile from the exit point (ch an ge event) to the end of the cam profile is add e d to the confi gur e d co m pe n sa tion dis tance .
Event
i bu t e nc AT _ Fig. 65 : Co m p e n s ati o n mode ncONLYCOMP with event a tt r b AT _ O N CE
ASiM Multi-Axis Fun ctions
TM441
77
Cam Profile Automat
nc ONLY C O MP_D IR EC T
The confi gur e d com p e ns at ion dis ta nce s (g2/h2) are valid, unlike the ncO NL YCO MP mode, from the exit point (e v e nt occurs) to the s ta r t in g point of the cam profile in the next s t ate .
ib u te nc AT _ AT _ O N CE Fig. 66 : Co m p e n s ati o n mode nc O NL YC O MP _ D I RECT with event a tt r b
nc W ITH _ C AM
The confi gur e d com p e ns at ion dis ta nce s are ar e based on the s e ct ion s ta r tin g at the midd le of the first cam profile to the middle of the second cam ca m il e . This o ff e r s the a dv a nt ag e that the ma ster and sla ve p er iod s are not pr of il changed when the cam profile is s ca le d. In t h is case, the e ff ectiv e co m pe n sa tion dis tanc e s (a2/b2) are based on the s ection from the e n d point of the curve of the pr e ce din g state to the s tar t in g point of the cam profile in th e ne x t state and are then r e s p ectiv e ly shorter if the cam profile is s c a le d.
i but e ncST_ E N D Fig. 67 : Co m p e n s ati o n mode nc WITH _ TH _ CA CA M with event a tt r b
78
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
Cam Profile Automat
In th is case, the conf ig ur e d com pe ns at ion dis tanc e s (g2/h2) are als o valid from th e middle of the first cam profile to the middle of the second cam ca m pr of il il e . C om p en s at ion starts when the event occurs and causes the effective com p en s ation dis t ance s (a2/b2) to be expanded to include the rest of the cam profile from the exit point (ch an g e e v e nt ) to the end of the cam ca m pr ofil e .
Event
i but e nc AT _ Fig. 68 : Co m p e n s ati o n mode nc WITH _ TH _ CA CA M with event a tt r b AT _ O N CE
ncMA_LATCHPOS master co m pe n s ation dis ta n ce (g2) runs from the latch The conf igur e d master c po po s ition to th e middle of the next curve. The s la v e co m pe nsat ion dis tanc e (h2) is de f in e d from "midd le to middle cu r v e ", the same as for ncWITH_CA M. ncTR IGG ER 1, 1, ncTR IGGER 2 and ncS_START are supported as latch events for the ma ster set po po s ition.
i bu te ncST_ E ND Fig. 69 : Co m p e n s ati o n mode ncMA_LATCHPOS with event att r b
The use of this com pe n s at io n is an event con tr oll e d process ("cu t after t r igg e r " ) w ith fixed s lav e int e r v als .
ASiM Multi-Axis Fun ctions
TM441
79
Cam Profile Automat
Two states are shown in the imag e above. A change event nc TR IGG ER 1 + ncP _ED GE with the event att r b ibut e ncST_END and target state "s t at e 2 " is de fin e d for the first s tat e . If the trigger event occurs in state 1, then the ma ster po po s it io n is la tch e d and the e ff e ct iv e com pe nsat ion dis ta nc e (a2) is calcu late d for state 2. ncSL_LATCHPOS
The conf igur e d s la v e co m pe n s ation dist anc e (h2) runs from the latch po po s ition to th e middle of the next curve. The master c o m pe ns at ion r o m " midd le to middle of cu r ve ", the same as f or dist anc e (g2) is de fine d f r nc WITH_CA M. nc TR IGG E R 1 and nc TR IGGE R 2 are ar e supported as latch events for the s lav e set po s it ion. The s lav e P ar ID that is la tch e d is de t e r m in e d via the input par a m et e r S l av e L atchP a rID of the FB M C _B R _ Ini t A utP a r.
i bu te ncST_ E N D Fig. 70: ncSL_LATCHPOS with event a tt r b
nc SL _ A B S
An absolute slave position is to be reached by means of a com p e n s ation ster com pe n s ation d is t ance is s pe cif ie d rel a ti ve l y, like in the gear. Th e ma ster c co m pe n sa tion mod e nc O NL YCO MP.
80
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
Cam Profile Automat
i b ut e ncST_ E N D Fig. 71 : ncSL_ABS with event a tt r b
Modes for compensation of speed d i ff e re nce s
The three f o ll ow in g mod es are used to co com mp ensa ensa te for speed diff e r e nce s . The goal o f t f th is mo de is to ach ie v e the s lop e (speed) of the subsequent cam profile while s ta yi ng within the slave li mi t s .
Fig. 72 : Co m p e n s ati o n of speed diff e r e nc es
The three com p en s at io n modes differ from one another based on the f o ll ow in g pr op op e r tie s : nc V_ C O MP _ A _ SL
compen sation distances have no influence here because The co nfi g ure d compen pro duced s ole ly by adh e r in g to the e ff e ct iv e com pe ns at ion dis t anc es are pr the s la v e limits. As a r e s ult, the entrance point of the subsequent cam ca m fastes t w ay p oss i b l e . profile is achie v e d in the faste nc V_ C O MP _ S _MA
ASiM Multi-Axis Fun ctions
TM441
81
Cam Profile Automat
The co nfi g ure d ma s te r compensation distance is maintained, the eff ectiv e s lave com pens ation dis t ance is produced s ole ly by a dher ing to the s la ve limits, r e gar dle ss of t f th e confi gu r e d s la v e com pe n s a tion dis tanc e .
_ S _ SL nc V _ C O MP MP _ The co nfi g ure d slave compensation distance is maintained , the e ff e ct iv e ma s te r com pe ns ation dis tanc e is produced s ole ly by a dh e r ing to the s lav e limits, r e gar dle ss of the confi gur e d master c om pe ns ation dist anc e .
82
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
Cam Profile Automat
Table of abb re v i a ti ons in the compensation g rap hi cs
The f oll ow in g parameters are used to calcu lat e the th e com p ens at ion because th e com pen s ation a lw a ys runs from the exit point of the cam profile of the pr e ce din g st ate (state1) to the entrance point of the cam profile of the next state (s tat e 2 ): S ta te 1: Abbreviati on
Description
k1x
Master multiplication factor AUT_MA_FACTOR
k1y
Slave multiplication factor AUT_SL_FACTOR
a1
"effective" ma master co compensation di distance
b1
"effective" slave compensation distance
c1
Master curve period * k1x
d1
Slave curve period * k1y
r1
Relative master position in the active curve
s1
Rel at ati ve ve sl sl av ave po pos itit io ion in in th the ac ac titi ve ve cu curve s1 s1 = k1y * c ur urv e func tition(r 1 / k1 k1x)
l1
Master latch position (set position) at time of trigger
q1
Slave latch position at time of trigger ( AUT_SL_LATCH_ID )
m1
Master po position (a (at the current au automat ca calculation cy cycle)
n1
Slave position (at the current automat calculation cycle)
o1
Master curve end pos ition
p1
Slave curve end position
S ta te 2: Abb Abbrevia eviati tio on
Desc Descrripti iptio on
k2x
Master multiplication factor AUT_MA_FACTOR
k2y
Slave multiplication factor AUT_SL_FACTOR
a2
"effective" master compensation distance
b2
"effective" s lave compensation distance
c2
Master curve period * k2x
d2
Slave curve period * k2y
g2
Master compensation distance parameter AUT_COMP_MA_S
h2
Slave compensation distance parameter AUT_COMP_SL_S
u2
Master entrance position in the cam profile AUT_MA_CAM_LEADIN
ASiM Multi-Axis Fun ctions
TM441
83
Summ ar y
6.
S UM MA RY unc t io ns for linking ax is The ACP10_MC library pr ov id e s numerous f unc unc t ion block s are de sign e d based on the PLCopen ob je cts . The individual f unc Mot ion C ontr ol standa standar d and f e atu r e a uniform de s ign r e gar din g functional u s ag e.
With the e l e c tr oni c gear it is po ss b i ble to im ple me nt linear position links, even with a de fine d s tar ting point for the axes, if ne ce ss a r y. unc tion block s are ar e a ls o pr o v ide d for non-li ne ar position C o rr e s po n d in g f unc fi l e s . As a r e sult, the linking of d iff e r e nt cam ca m links v ia e l e c troni c cam p rofil pr of il il e s is c ont r oll e d by the a pp li c ation tas k .
The cr e ation of cam p r of il il e s is supported by a cam profile editor in tt ing s make it easy to ad jus t a cam A ut omat ion St udio. Many d iff er e nt s e tti profile to the pr oce ss. ss .
Fig. 73 C ar t oni ng
f ul tool for The ACOPOS cam profile automat is an e x t r e me ly po w e r f neces sar sar y sequen sequen ces are e ff ectiv e linking of cam ca m pr o f il ar e com ple t ely il e s . The neces pr e de fi n e d. Initiali z a tion of th e au tomat structure and contr o l of the un ctions . A f te r automat mo mo de can be h an dled u sin g clear a nd or ga ga niz e d f unc the cam profile automat is started, the de f in e d sequences are processed on the ACOPOS fully inde pe n de n t. This reduces the load on the a pp pp lica tion pr pro gra gra m and a ll ow s a v e r y f as t , e v e nt - contr oll e d po s ition in g s e qu e nc e .
un ction s are su b je ct to the e ff e ct s of the states The ACP10_MC multi-axis f unc states. The user r e ce iv e s the necessary in the M o ti on Control diagram of states. inf or m ation for plann in g t he sequence he r e .
The ACP10_MC s am p le pr o je ct conta in s s a m ple tasks for the individual li nk ing a pp li ca tions and can be used as a mod e l for cr e ating a com ple te po po s itionin g a pp pp licatio n.
84
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions
Appendix
7.
AP P END IX
Motion Control Basic Functions (ACP10_MC): Drive pr e par at ion: MC_Power MC_H C_ Ho me MC_ B R _ Br ak e O p e r ation MC_ B R _ In itMod Pod MC_ B R_ L oa dAx is Pa r MC_ B R _ Sa ve Ax is P ar MC_ B R _ In itAx is Pa r MC_ B R_ In itAx isSu b je ct Pa r
B a sis movements: MC_ Mo v e A bs olu t e MC_MoveAdditive MC_ Mo v eVe locit y MC_ B R _ Mov eA bs olut e Tr igg St op MC_ B R_ Mov eA dd it ive T r igg St op MC_ B R _ Mov eVe locity T r igg St op MC_ B R _E v e ntMov e A b s o lut e MC_ B R_E v e ntMov e Add it iv e MC_BR_EventMoveVelocity MC_Stop MC_H C_ Ha lt MC_ Se tO v e rr ide
D e t e r minin g the drive s tat us MC_ R R ea dSt atus MC_ R R ea d Actu alP os itio n MC_R C_ R ea d Actu alVe locit y MC_ R R ea d Actu alT or qu e
D e t e r minin g and ack n o w led gin g drive e rr or s MC_ R R ea d Ax is Err or MC_R C_ R es et
Digital in pu t/ out p pu t signa ls MC_ R R ea dD ig italIn put
ASiM Multi-Axis Fun ctions
TM441
85
Appendix
MC_ R R ea dD ig italOu t p put MC_ Wr it e D igita lO ut p put MC_D C_ D ig ita lCa mS w itch
P os ition measurement MC_T C_ T ouch Pr ob ob e MC_ B R _ T ouch P r ob e MC_A C_ A bo r tT r igg e r
Motion Control Multi-axis Functions (ACP10_MC): E le ct r onic ge ar s: MC_ Ge ar In MC_ Ge ar In P os MC_ Ge ar Out MC_ P h as in g MC_ B R_ P h as in g MC_ B R _ O ff s e t Cam pr of il il e s : MC_C C_ C a mT a ble Se lect MC_C C_ C a mIn MC_C C_ C a mO u t Cam profile aut oma t: MC_BR_DownloadCamProfileObj MC_ B R _Do _D ow nloadC amP r ofil e D ata MC_ B R _ In itAut P ar MC_ B R_ In itAutSt at e MC_ B R _ In itAut E ve nt MC_ B R_A u t C ont r ol
86
TM441
ASiM Multi-Axi Multi-Axiss Fun ctions