B3: Distributed systems - 840D sl only
2.3 Examples
Extended Functions
Function Manual, 03/2013, 6FC5397-1BP40-3BA1
137
2.3.5.2 Programming
Program for NCU1 (leading axis)
NCU1 traverses leading axis Z
Identifier for NCU2, that the leading axis of NCU1 is assigned: Link variable $A_DLB[0] = 1
Identifier for NCU2, that the leading axis of NCU1 has been released: Link variable
$A_DLB[0] = 0
Program code Comment
N1000 R1 = 0 ; Initialize loop counter
N1004 G1 Z0 F1000 ; Traverse axis Z to the starting position
N1005 $A_DLB[0] = 1 ; Identifier for NCU2: Axis Z is assigned
LOOP10: ;
N1005 R1=R1+1 ; Increment loop counter
N1006 Z0.01 G91 ; Traversing the leading value axis Z
N1008 Z0.02 ; Traversing the leading value axis Z
N1010 Z0.03 ; Traversing the leading value axis Z
N1012 IF R1 < 10 GOTOB LOOP10 ;
N1098 $A_DLB[0] = 0 ; Identifier for NCU2: Axis Z is free
Program for NCU2 (following axis)
The program establishes a connection between leading axis movements on NCU1 and
following axis movements on NCU2 via a curve table. If the table has been defined, NCU2
goes into the wait position (N2006) until NCU1 has assigned axis Z as the leading axis
(N1005). The coupling is activated (N2010) as soon as axis Z has been assigned as leading
axis. The coupling is kept until NCU1 has released axis Z as the leading axis.
Program code Comment
N2000 CTABDEL(1) ; Initialize table 1
N2001 G04 F.1 ;
N2003 G0 Y0 Z0 ; Traverse axes Y, Z into the starting position
N2002 CTABDEF(Y, Z, 1, 0) ; Table definition ON
N2003 G1 X0 Y0 ; Intermediate point 1
N2004 G1 X100 Y200 ; Intermediate point 2
N2005 CTABEND ; Table definition OFF
LOOP20: ;
N2006 IF ($A_DLB[0] == 0) GOTOB LOOP20 ; Wait for NCU1
N2010 LEADON(Y,Z,1) ; => close coupling
LOOP25: ;
N2030 IF ($A_DLB[0] > 0) GOTOB LOOP25 ; Keep the coupling until NCU1 no longer
traverses the leading value axis
N2090 LEADOF(Y,Z) ; => open coupling