*-----------------------------------------------------------------------------
* Filename          : TL_Blum_Laser.src (example PLC module)
* Version           : 2.0
* Machine           :
* Control           : iTNC 530 from software version 340420 00
* Compiler          : PLC
* Date of issue     : 01.04.2004
* Author            : Mr. Riedter, Fa. Blum
* Description       : Tool measurement Blum laser
*-----------------------------------------------------------------------------


#define /s    KL_override_100_percent                  K +10000

#define /s    ML_Blum_interface                        M1200[32]
#define /c    ML_NP_Blum_release_0                     M &ML_Blum_interface + 0
#define /c    ML_NP_Blum_release_1                     M &ML_Blum_interface + 1 ; 01.08.01 +1
#define /c    ML_NP_Blum_blow_clean_off                M &ML_Blum_interface + 2
#define /c    ML_NP_Blum_laser_dirt_aperture_open      M &ML_Blum_interface + 3
#define /c    ML_PN_Blum_tab_0                         M &ML_Blum_interface + 4 ; 24.02.99 +1
#define /c    ML_NP_Blum_tool_broken                   M &ML_Blum_interface + 5 ; 24.02.99 +1
#define /c    ML_PN_Blum_tab_1                         M &ML_Blum_interface + 6 ; 15.06.99 +1
#define /c    ML_PN_Blum_cycle_stop                    M &ML_Blum_interface + 7 ; 02.08.99 +1
#define /c    ML_NP_Blum_axis_shift                    M &ML_Blum_interface + 8 ; 02.08.99 +1
#define /c    ML_PP_Blum_cycle_interruption            M &ML_Blum_interface + 9 ; 01.08.01 +1
#define /c    ML_PN_Blum_tab_2                         M &ML_Blum_interface + 10 ; 01.08.01 +1
#define /c    ML_NP_Blum_release_2                     M &ML_Blum_interface + 11 ; 06.11.02 +1
#define /c    ML_NP_Blum_tool_blow_clean               M &ML_Blum_interface + 12 ; 01.08.01 +1
#define /c    ML_NP_Blum_oem_program                   M &ML_Blum_interface + 13 ; 01.08.01 +1
#define /c    ML_NP_Blum_critically_motion             M &ML_Blum_interface + 14 ; 21.02.03 +1
#define /c    ML_PN_Blum_Mxx15_table_selection         M &ML_Blum_interface + 15 ; 01.01.06 +1

#define /c    ML_PP_no_emergency_stop                  M &ML_Blum_interface + 18 ; 01.08.01 +1
#define /c    ML_NP_Blum_cycle_active                  M &ML_Blum_interface + 19 ; 01.08.01 +1

GLOBAL TL_Blum_laser

;----------------------------
LBL TL_Blum_laser
;----------------------------

;----------------------------
; Switch on/off Blum laser system
; Switch off on emergency stop, switch on after power on

  L      MG_control_operational        ; 01.08.01 +2
  =      ML_PP_no_emergency_stop

  L      ML_NP_Blum_release_0          ; 24.02.99 +1
  A      ML_PP_no_emergency_stop
  =      O_Blum_laser_enable_0

  L      ML_NP_Blum_release_1          ; 01.08.01 +3
  A      ML_PP_no_emergency_stop
  =      O_Blum_laser_enable_1

  L      ML_NP_Blum_blow_clean_off     ; 24.02.99 +1
  A      ML_PP_no_emergency_stop
  =      O_Blum_laser_blow_clean_off

  L      ML_NP_Blum_laser_dirt_aperture_open ; 24.02.99 +1
  A      ML_PP_no_emergency_stop
  =      O_Blum_laser_dirt_aperture_open

  L      ML_NP_Blum_release_2          ; 06.11.02 +3 (nur Laser NT)
  A      ML_PP_no_emergency_stop
  =      O_Blum_laser_release_2

  L      ML_NP_Blum_tool_blow_clean    ; 01.08.01 +3 (nur bei Bedarf)
  A      ML_PP_no_emergency_stop
  =      O_Blum_laser_blow_clean

  L      NP_M4060_tool_measurement_active
  R      ML_PN_Blum_tab_0              ; 15.06.99 +1 (wenn nicht benutzt)
  R      ML_PN_Blum_tab_1              ; 15.06.99 +1 (wenn nicht benutzt)
  R      ML_PN_Blum_tab_2              ; 01.08.01 +1 (wenn nicht benutzt)
  R      ML_PN_Blum_Mxx15_table_selection ; 01.08.01 +1 (wenn nicht benutzt)
  R      ML_PN_Blum_cycle_stop         ; 02.08.99 +1 (wenn nicht benutzt)

;----------------------------
; Spindle override set to 100% !

  L      ML_NP_Blum_cycle_active
  IFT
    L      KL_override_100_percent
    =      PN_W764_S_override_PLC
  ENDI

;----------------------------
; Reset Blum laser system on Internal stop, machine off

  L      NP_M4175_control_in_operation_flashes ; 01.01.00 +20
  A      NP_M4176_control_in_operation_on_or_flashes
  S      ML_PP_Blum_cycle_interruption

  LN     NP_M4175_control_in_operation_flashes
  A      NP_M4176_control_in_operation_on_or_flashes
  R      ML_PP_Blum_cycle_interruption

  L      ML_PP_Blum_cycle_interruption
  AN     NP_M4175_control_in_operation_flashes
  AN     NP_M4176_control_in_operation_on_or_flashes
  IFT
    L      MG_marker_one
    R      ML_NP_Blum_release_0
    R      ML_NP_Blum_release_1        ; 01.08.01 +1
    R      ML_NP_Blum_blow_clean_off
    R      ML_NP_Blum_laser_dirt_aperture_open
    R      ML_NP_Blum_release_2        ; 06.11.02 +1
    R      ML_NP_Blum_tool_blow_clean  ; 01.08.01 +1
    R      ML_NP_Blum_critically_motion ; 21.02.03 +1
    R      ML_PP_Blum_cycle_interruption
    R      ML_NP_Blum_cycle_active     ; 01.08.01 +1
  ENDI

EM
