Implementation via PLC

The Dynamic Coordinate System (dynCS) is activated in the PLC as soon as transition_w.command := 1 is set. Here, the state of the dynCS changes from 0 to 1 and then to 2 (see Fig. “State of the dynamic coordinate system” in the section “PLC as Master“). Accordingly, the required parameters must be set beforehand.

Notice

To activate the dynCS, an M function (M100) can be used here since activation by #TRACK CS ON activates the dynCS a second time and may lead to abnormal behaviour.

Programming Example

PLC

PROGRAM DynCsPLC_M
VAR
  Init : BOOL;
  KbCs : HLI_COORDINATE_SYSTEM_INT;
  pDynCs : POINTER TO MC_CONTROL_DYN_CS_UNIT;
END_VAR
IF NOT      Init
THEN
  pDynCs^.enable_w   := TRUE;
(*Offset to rotary table centre point*)
  kb_cs.translation[0]               := DINT#-13059200;
  kb_cs.translation[1]               := DINT#0;
  kb_cs.translation[2]               := DINT#800000;
  kb_cs.rotation[0]                  := DINT#0;
  kb_cs.rotation[1]                  := DINT#0;
  kb_cs.rotation[2]                  := DINT#0;
(*Set the config. parameters*)
  pDynCs^.transition_w.f_kin_base        := TRUE;
  pDynCs^.transition_w.f_set_zero        := FALSE;
  pDynCs^.transition_w.f_rot_trans       := FALSE;
  pDynCs^.transition_w.filter_max_ticks  := UDINT#0;
  pDynCs^.transition_w.option            := UDINT#1;
  pDynCs^.transition_w.kinematic_base_cs := kb_cs;
  pDynCs^.transition_w.f_wait            := TRUE;
  Init := TRUE;
END_IF;
(* If DK was enabled by M100*)
(*IF M100.ACTIVE THEN *)
  pDynCs^.transition_w.command := DINT#1;
  (*M100.ACTIVE := FALSE     Reset trigger *)
(* END_IF *)
(* If DK was disabled by M101*)
(*IF M101.ACTIVE THEN *)
  pDynCs^.transition_w.command := DINT#-1;
  (*M101.ACTIVE := FALSE      Reset trigger *)
(* END_IF *)
(* Rotation about zero point set KbCs, *)
(* about Z axis at angle of rotary axis of table*)
IF pDynCs^.state_r.actual_state = UDINT#2 AND
   pDynCs^.command_semaphor_rw = FALSE
THEN
  pDynCs^.command_w.rotation[2]:=     gpAx[6]^.lr_state.current_position_acs_r;
  pDynCs^.command_semaphor_rw    := TRUE;
END_IF;

Programming Example

Slave

N200 X1305.92 Y0
N210 M100
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 M101

Programming Example

SDA

m_synch[100]       MVS_SVS     ( Activate dynamic CS)
m_synch[101]       MVS_SVS     ( Deactivate dynamic CS)