Hybrid implementation from PLC and NC program

The configuration parameters are transferred in the NC code by #TRACK CS ON [ID=0 …] Whereas the PLC only defines the correction and passed it on.

Programing Example

prg_example

Slave

N200 X1305.92 Y0

N210 #TRACK CS ON [ID=0 OPTION=1 FILTER=0 WAIT KIN_BASE X=-1305.92]
N230 G92 X1305.92
N240 Z90

; robot on rotary axis positioned by jumps
; to prevent

; rotary table (X1) is rotated independently of robot
N250 X0 Y0 X1[INDP_ASYN POS=-90 G01 F500 G90]
N260 Z80
N270 X-60
N280 X60
N290 X0
N300 Y-60
N310 Y60
N320 Z90

N480 #WAIT INDP ALL

; robot to rotary table centre point by jumps
; to prevent

N490 G01 X0 Y0
N500 #TRACK CS OFF [FILTER=0 WAIT]

Programing Example

prg_example

PLC

PROGRAM DynCsPLC_Activate

VAR

  pDynCs : POINTER TO MC_CONTROL_DYN_CS_UNIT;

END_VAR

(*Enable DynCS*)

pDynCs := ADR(gpCh[0]^.channel_mc_control.dyn_cs);

pDynCs[0]^.enable_w   := TRUE;

  

IF    pDynCs^.state_r.actual_state = UDINT#2 AND   pDynCs^.command_semaphor_rw  = FALSE

THEN

  pDynCs^.command_w.rotation[2]:=
-pAx[6]^.lr_state.current_position_acs_r;

  pDynCs^.command_semaphor_rw  := TRUE;

END_IF;