0% found this document useful (0 votes)
44 views114 pages

Documentation PLC Basic Program ITNC530

The document provides comprehensive documentation on the PLC Basic Program for the iTNC530, detailing its advantages, program structure, and configuration steps. It covers various functionalities such as tool changing, emergency stop positions, and input/output assignments, along with guidelines for adapting the program to specific machine requirements. Additionally, it includes conventions for symbol names and outlines the configuration settings necessary for effective operation of the PLC system.

Uploaded by

Giuseppe Abati
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views114 pages

Documentation PLC Basic Program ITNC530

The document provides comprehensive documentation on the PLC Basic Program for the iTNC530, detailing its advantages, program structure, and configuration steps. It covers various functionalities such as tool changing, emergency stop positions, and input/output assignments, along with guidelines for adapting the program to specific machine requirements. Additionally, it includes conventions for symbol names and outlines the configuration settings necessary for effective operation of the PLC system.

Uploaded by

Giuseppe Abati
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 114

Documentation

PLC Basic Program


iTNC530

03/2011
Contents
Page
1 PLC Basic Program................................................................................................................5
1.1 Advantages of the PLC Basic Program ..........................................................................5
1.2 Adaptation of the PLC Basic Program ............................................................................5
1.3 PLC Program Structure...................................................................................................6
1.4 Functions ........................................................................................................................7
1.5 Conventions for Symbol Names .....................................................................................8
1.6 Configuration.................................................................................................................11
1.7 PLC Input/Output Assignment ......................................................................................22
1.7.1 iTNC without HSCI .................................................................................................22
1.7.2 iTNC with HSCI ......................................................................................................35
1.8 Other Definition and Include Files .................................................................................37
1.9 Machine parameters .....................................................................................................38
1.9.1 Timers and counters ..............................................................................................38
1.9.2 General MP data for the PLC ................................................................................41
1.9.3 General Config data for the PLC ...........................................................................43
2 PLC Soft Keys ......................................................................................................................45
2.1 Structure .......................................................................................................................45
1.1 Description ....................................................................................................................48
3 Mask Files ............................................................................................................................60
4 Torque Monitoring ................................................................................................................65
5 Automatic Tool Changer ......................................................................................................67
5.1 Fundamentals ...............................................................................................................67
5.2 Tool Call ........................................................................................................................68
5.3 Tool Table .....................................................................................................................69
5.4 Pocket Table .................................................................................................................69
5.5 Tool Change .................................................................................................................70
5.5.1 Tool change with single gripper (fixed pocket) ......................................................70
5.5.2 Tool change with dual gripper ................................................................................71
5.6 Manual Tool Change.....................................................................................................73
5.7 Automatic Tool Change ................................................................................................73
5.7.1 Sequence of actions (single gripper) .....................................................................76
5.7.2 Sequence of actions (dual gripper) ........................................................................81
5.7.3 Sequence of actions (dual gripper with cam disk) .................................................88
5.8 Tool Magazine ..............................................................................................................96
5.9 Loading the Tool Magazine...........................................................................................96
5.9.1 Sequence of actions (magazine as asynchronous axis) ........................................97
5.9.2 Sequence of actions (magazine with counting pulse control) ................................99
5.10 Tool Change Service ..................................................................................................103
5.11 Signal States during Tool Change ..............................................................................104
6 Variants of Emergency Stop End Positions .......................................................................107
7 Test Functions of the Basic Circuit Diagram ......................................................................109
8 Basic Circuit Diagram.........................................................................................................113

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 3


1 PLC Basic Program

1.1 Advantages of the PLC Basic Program

• Know how
- TNC functions
- OEM experience

• Reliability
- Tested by many PLC programmers and OEMs

• Efficient
- Saves time
- Extensive library

• Support
- Easy problem analysis
- Executable on test stations (MSU) and iTNC 530 programming station

• Universal
- TNC310 .. iTNC530
- Analog / digital
- Various machine types

• Update
- File base (www.heidenhain.de)
- Available free of charge

1.2 Adaptation of the PLC Basic Program

The PLC Basic Program can easily be adapted to the requirements of a machine tool.
Basically three steps are required for this purpose.

• Configuration of OEM.cfg
- Operation with clamped axes
- C-axis mode
- Tool changer / tool magazine type
- Pallet changer type
- Number of input/output units
- Temperature compensation
- Type with EMERGENCY STOP end positions

• Adaptation of the I/O interface – Glb_IO.def


- As per the circuit diagrams, the inputs and outputs of the machine are assigned
to the intended symbolic operands

• Machine parameters, MP_data.tab, MP_config.tab


- Timers and counters
- PLC positions, feed rates, ...
- Options

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 5


1.3 PLC Program Structure

<OEM.cfg>
<Main_PGM.src>
DEFINE CFG_Emergency_end_coded = "inactive"
DEFINE CFG_Number_PL =0
#define /g Glb_IO.def DEFINE CFG_brake_active = %000000001111100
DEFINE CFG_Tool_changing_system = "TC_type_10"
USES Library.src
EXTERN Init_after_Reset
EXTERN Library
<Glb_IO.def>
USES Axes.src
#Type
EXTERN NC_Axes
O_unclamping_X M
USES Spindle.src
O_unclamping_Y M
EXTERN Spindle
O_unclamping_Z O13
O_unclamping_4 O14
L NP_M4172_1st_PLC_run
I_reference_end_posit_X I0
CMT Init_after_Reset
I_reference_end_posit_Y I1
I_reference_end_posit_Z I2
I_control_operational I3
CM Library
I_reference_end_posit_4 M
CM NC_Axes
CM Spindle

EM

<Axes.src>

GLOBAL NC_Axes

<Spindle.src>

GLOBAL Spindle

<Library.src>

GLOBAL Init_after_Reset
GLOBAL Library
;----------------------------
LBL Init_after_Reset
...

File types EM
;----------------------------
LBL Library
• PLC Main (.src) ...
• PLC Module (.src)
• Definition (.def) CMT Absolute
...
• Configuration (.cfg) EM
;----------------------------
LBL Absolute
...
EM

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 6


1.4 Functions

The PLC basic program comprises the following functions:

• Control of analog and digital axes


• Support of clamping axes
• Referencing of axes
• Emergency stop end positions
• Hirth axes
• Electronic handwheel
• Gear shifting
• Analog and digital spindle control
• Oriented spindle stop
• Display and management of PLC error messages
• Hydraulic control
• Coolant control
• Evaluation of M-functions
• Alternating table operation
• Pallet changer
• Lubrication
• Chip conveyor
• Touch probes
• Indexing fixture
• Door control
• Feed control
• Manual and automatic tool change
• Help functions to configure the tool changer
• Temperature compensation
• Display functions in small PLC window
• PLC soft keys
• Mask files for diagnosis and the display of information
• Machine parameter evaluation

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 7


1.5 Conventions for Symbol Names

General information

The symbol of a symbolic operand is supposed to clearly define the type and status of an
operand. The name of an operand should explain its function without requiring any further
comments.

HEIDENHAIN recommends using the following names:

Definition of a general symbol name

XY_Function_description

Description of operand function by any text

Separators

<Status>: Optional, if not clearly defined by type


Possible entries: L = local
G = global

<Type>: Specifies the type of operand.


Possible entries: Operand types M,B,W,D,K

Example: DG_Pos_Window_S

Special cases

1. PLC-NC or NC-PLC interface operands:


These operands are always global.

XY_Operand_function_description

Description of operand function by any text

Separators

Fixed operand address, e.g.: M2000, W262

Separators

Specifies the signal direction.


Possible entries: PN = Signal from PLC to NC
NP = Signal from NC to PLC

Example: NP_M4000_S_in_Position

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 8


2. Inputs and outputs:
These operands are always global.

X_Function_description

Description of operand function by any text

Separators

<Type>: Specifies the type of operand.


Possible entries: Operand types I, O

Example: I_Release_Tool

3. Positive and negative edge markers of the inputs:


These operands are always global.

IX_Function_description

Description of operand function by any text

Separators

<Type>: Specifies the type of operand.


Possible entries: IP == Positive edge of an input
IN == Negative edge of an input

Example: IP_Release_Tool

4. Timer:
These operands are always global.

TY_Function_description

Description of operand function by any text

Separators

<Type>: Specifies the type of operand.


Possible entries: TS == Timer start
TR == Timer Run

Example: TS_5_Clamp_Unclamp

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 9


5. Counter:
These operands are always global.

CY_Function_description

Description of operand function by any text

Separators

<Type>: Specifies the type of operand.


Possible entries: CS == Counter start
CD == Counter decrement
CR == Counter running

Example: CS_RS_Err_ReStart

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 10


1.6 Configuration

The first configuration step is selecting the control model and the NC software version in the
Project menu item of the PLCdesignNT software.
The actual configuration takes place in OEM.cfg, where the following settings can be made:
• Tool-specific torque monitoring
A maximum torque can be allocated to each tool via TOOL.T.
• EMERGENCY STOP limit switch
Type of the EMERGENCY STOP limit switches used (coded, non-coded)
• Spindle with star/delta switchover
For TNC controls with separate spindle DSP star/delta switchover can be activated.
• Additional error markers
Markers can be provided for up to 800 additional PLC error messages.
The standard quantity of error markers from the NC is 200 for iTNC530.
• Monitoring of working space
If certain areas within the software limits defined in MP91x and MP92x need to be blocked.
• Lubrication of axes
Lubrication can be deselected, if there is no need to lubricate the axes.
• Cycle 332 Tuning
With the cycle 332, machine parameter subfiles can be edited according to the desired
milling plan (roughing, finishing…) while an NC program is running.
• Machine operating panel TE535Q MB520
The TE535Q MB520 may be used as an alternative to MB420.
• Additional timers MP4111
If the standard timers (48) are not sufficient, additional timers may be generated via an entry
in OEM.SYS (MP4111). The PLC configuration CFG_MP4111_additional = “active“ provides
convenient access to these timers via the markers TS_xxx and TR_xxx.
• Rapid traverse instead of spindle override
With the configuration CFG_Override_rapid_traverse_instead_spindle the spindle override
is used as rapid traverse override. By this means NC programs can be influenced by two
different feed-rate overrides, depending on whether NC blocks are machined at machining
feed rate or at rapid traverse. If the Fmax override is active, a bar diagram can be displayed.
In this case, the spindle override is adapted via keys or soft keys.
• AxesNT with CC/UM brake control
With digital axes only the signals WG_drives_ready (CM 9162) and WL_standstill_CCU
(CM 9159 ) are now evaluated for controlling the brakes The hardware of the brakes should
be powered as long as the switch-off delayed relays of the pulse release (X71) are live.
Therefore, the PLC outputs for the brakes must be of the "cannot be switched off by an
Emergency Stop" type (e.g. O24..O30). When HEIDENHAIN inverters are used, one could
do without the outputs O_unclamping_xxx and connect the brakes directly to X392.
• IPC_61x0
Introducing the IPC 6110/IPC 6120 created the possibility of installing a second control
section at the machine tool. Data exchange takes place via Ethernet interface, similar to
a Teleservice connection.
• Python
After activating this configuration Python OEM processes (SIK option #46) are supported.
An additional soft-key row is displayed to start examples of Python scripts.

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 11


• Python masks
Example of creating a PLC status window with plcgtk widgets.
- embeddedWindow: Embedded window
- table: Simplified view of table grid (gtk.table)
- plcCheckButtons: Select fields Byte/Word/Dword
- plcCheckButton: Select field Marker
- plcEntry: Input field Byte/Word/Dword/String
- plcLabel: Display field Byte/Word/Dword/String/Marker
- plcLevelBar: Bar diagram Byte/Word/Dword
- plcStateIcon: Status icon Marker
• Python TNC mail
With TNC MAIL, e-mails can be sent on PLC events (emergency stop, end of program, ...)
"Mail to SMS support" of external providers (e.g. Vodafone) allows for forwarding these
events as text messages.
• Python Workspace Camera
Script for viewing a live stream on HEIDENHAIN TNC controls via the media player
(mplayer) in an embedded window (jh.gtk.window).
• Temperature compensation
The temperature compensation of the axes can be activated via factors defined in machine
parameters or with the help of tables.
• TNC data transfer via V.24/V.11
With this module, data can be transmitted and received via the V.24/V.11 interface.
The interfaces are activated by selecting operating mode (CFG_mode_Vxx) and interface
(Interface_Vxx) in the OEM.CFG. The master sends data immediately after the first PLC
cycle. The slave does not send before it has received any valid data.
• TNC data exchange via TCP-IP
Data exchange between two or several HEIDENHAIN controls via the TCP-IP interface.
- CFG_PLC_PY_Server: Opens a communication port and reacts to incoming functions.
- CFG_PLC_PY_Client_1: Connects to a server and can send function calls.
• 3-D head
Support of permanently installed and exchangeable 3-D heads which can be positioned
by the spindle in the C-axis mode.
• 3-D head – axis 1
The index of the first logical 3-D head axis is entered here.
• 3-D head – axis 2
If available, define the index of the second logical 3-D head axis here.
• 3-D head – reference-value selection
For 3-D head axes that do not have their own measuring systems the axis positions can
be stored in non-volatile PLC and activated using the reference-value selection.
• 3-D head – torque limitation
Torsion may be generated by increased friction of the 3-D axes combined with a too weak
spindle design. The clamping behavior can sometimes be improved by reducing the driving
torque (value in MP_data.tab).
• Spindle in C-axis mode
For applications such as interpolation milling, D'Andrea tool, etc., the spindle can also be
positioned as an axis. The configuration takes place with
CFG_S_in_axis_mode = "active"
CFG_S_axis_index = 10
To activate the C-axis mode, the spindle is oriented to the last saved position and then
switched to C-axis mode. When positioning is finished, the control loop opens and the
current position freezes.

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 12


• Free rotation
Free rotation can be activated for rotary and auxiliary axes. With the *.cfg configuration the
function is enabled and the axis assigned. Soft keys / M-functions are available for selection
of cw/ccw rotation and assignment of the S-override: FN19 can be used to alter the feed
rate for rotating the rotary axis. When the nominal speed (freely rotating axis) is reached,
the feed rate is enabled.
• Axis configuration – brake
Definition which axes feature a clamping (mostly rotary tables, swivel heads and vertical
axes.)
• Axis configuration – switch-on position
For clamped axes you can define that the clamping is not active during normal operation
(e.g. Z-axis is permanently controlled and only clamped before the control voltage is
switched on, in the event of an EMERGENCY STOP or a failure.)
• Axis configuration – clamping signals
For clamped axes you can define, whether input signals (clamped, released) are available.
Without such signals the evaluation is effected via timers.
• Use nominal value as actual
By means of the module 9148 the nominal value can now be used for the axes instead
of the actual value. This is particularly useful when operating with Hirth axes.
• Axis configuration – central drive
Definition of those axes that are driven by a common motor (central drive).
• Axis configuration – C-axis mode
Definition of which axes are positioned in the C-axis mode (move axes by means of the
spindle drive, e.g. double swivel head)
• Axis configuration – common position encoder
Axes that possess a common position encoder (e.g. spindle encoder is used to acquire
the positions of the swivel-head axes)
• Axis configuration: Group 1 with Gantry Master Slave Mode
Axis configuration: Group 2 with Gantry Master Slave Mode
Clamped axis groups belonging together in master/slave mode or Gantry relation must
be defined. Two groups of this type are supported.
• Axis configuration: Axes with active current controller
For critical axes with clamping it may be required to open only the position controller.
Current and speed controller remain active in clamped status (exception: EMERGENCY
STOP.)
• Axis configuration – save field angle
Depending on the axis configuration CFG_field_angle_saved_in_PLC the current field
angles are stored in the file PLC:\MP\Field_angle.tab when an axis is clamped. In the case
of positive plausibility these are the values that are returned when the control is restarted.
• Axis configuration - reference limit switches
If no reference limit switches are available, the reference end positions can also be generat-
ed by software (only when operating with linear encoders.) The position of the trigger edge
of the software trip dog is defined in MP960.
• Axis configuration – move to safe position after referencing
Defines which axes are to move to a certain, safe position (MP_Data.tab) after reference
mark traverse. The preset value is entered in MP960.
• Manual tool change
If the option TC manual axes position inactive (+$0200) was not deactivated with MP4310.2,
axis positionings are also performed for manual tool changes (of tools that are not in the tool
magazine).

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 13


• Tool changer, tool magazine
By combining the tool changer and the tool magazine, 80 different tool exchange systems
are available.
• Tool changer
Two basically different types can be differentiated: single or dual gripper. For each type
several variants can be selected. However, this definition is only a preselection. The PLC
programmer needs to adapt the type to the actual requirements of the machine (CASE
structure.) For simple machines without automatic tool change the PLC modules can be
deselected (inactive).
• Tool magazine
(no magazine, pulse-controlled or asynchronous axis)
Magazines with asynchronous PLC axis or pulse-controlled servo drives (PLC I/O interface,
e.g. hydraulic drives, asynchronous motors) can be selected. For an asynchronous PLC axis
the axis number reserved for this purpose must be specified. For simple machines without
tool magazine the PLC modules can be deselected (inactive).
• Pallet changer
Alternate operation (machining a workpiece alternately on the left/right side of the machine)
or pallet changer can be activated. For machines without pallet changer, the related PLC
modules can be deselected and are then inactive.
• Control connected to simulator
For test purposes real machine variants can be simulated on machine simulators or on
the iTNC 530 programming station. The MSU configuration (machine simulation unit) is
available for this purpose. Attention: On real machines these options must be inactive!

If the iTNC 530 operates with source code, variables from MP4000 can be provided in
OEM.CFG for conditional compilation. Moreover, the non-volatile memory of the TNC and
the output paths for compilation can be modified on the computer with PLCdesignNT.

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 14


File: OEM.cfg

Configuration PLC project

Definition of symbols for conditional compilation


- Machine configuration
- Hardware components
- Axes configuration

Conditional check #if <symbol> = <value>


...
#endif

Screen resolution

DEFINE CFG_resolution = "%GraphicsResolution%"

PLC version, machine type, machine variant, machine number, HSCI

PLC version (CFG_PLC_version):


- chosen freely

Machine type:
- Typ OEM specific (e.g. RS100) [Type]
- MSU (Motor Simulation Unit) [MSU_530]
- Programming station OEM [PS_OEM]
- Programming station public [PS]

Machine variant:
- not jet specified [inaktiv]
- MSU with CC422 (single-channel I32) [MSU_CC422]
- MSU with CC424 (two-channel X150) [MSU_CC424]
- MSU with HSCI (two-channel PL6xxx) [MSU_HSCI]

Machine number (CFG_machine_number):


- Machine number (OEM specific) [xxx]

HSCI (CFG_HSCI)
- iTNC530 without HSCI [inactive]
- iTNC530 with HSCI [active]

DEFINE CFG_PLC_version = "Basic 56"

DEFINE CFG_machine_typ = "Typ"


DEFINE CFG_machine_variant = "inactive"
DEFINE CFG_machine_number = "123"

DEFINE CFG_HSCI = "inactive"

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 15


Machine Configuration
[inactive/active]

DEFINE CFG_tool_specific_torque_monitoring = "active"


DEFINE CFG_emergency_end_position_axes_coded = "inactive"
DEFINE CFG_spindle_S1_with_wye_delta_switchover = "inactive"
DEFINE CFG_spindle_S2_with_wye_delta_switchover = "inactive"
DEFINE CFG_Error_messages_additional = "inactive"
DEFINE CFG_Working_area_monitoring = "inactive"
DEFINE CFG_Lubrication_axes = "active"
DEFINE CFG_332_tuning = "active"
DEFINE CFG_machine_operating_panel_TE535Q_MB520 = "inactive"
DEFINE CFG_timer_MP4111_additional = "inactive"
DEFINE CFG_override_rapid_traverse_instead_spindle = "inactive"
DEFINE CFG_IPC_61x0 = "inactive"
DEFINE CFG_axesNT_brake_control_via_CC_UM = "inactive"

DEFINE CFG_Python = "inactive"


DEFINE CFG_python_masks = "inactive"
DEFINE CFG_energy_option = "inactive"
DEFINE CFG_TNC_Mail = "inactive"
DEFINE CFG_Workspace_Camera = "inactive"

Temperature Compensation
- inactive [inactive]
- Factor from PLC:\MP\MP_Data.tab [MP_factor]
- with Table PLC:\CORRECT\TMP_COMP.TAB [Table]

DEFINE CFG_Temperature_Compensation = "Table"

Data transmission between two iTNC on serial interface RS232/RS422

To activate the interface a configuration of operating mode


(CFG_mode_RSxxx) and interface (CFG_interface_RSxxx) is necessary.
Immediately after the first PLC scan the master transmits data. The
slave will wait to start transmitting until significant data received.

Configuration of the operating mode (CFG_mode_RSxxx)


- inactive [inactive]
- operating mode Master [Master_RSxxx]
- operating mode Slave [Slave_RSxxx]

Configuration of the interface (CFG_interface_RSxxx)


- Interface_RS232 [Interface_RS232]
- Interface_RS422 [Interface_RS422]

DEFINE CFG_mode_RSxxx = "inactive"


DEFINE CFG_interface_RSxxx = "Interface_RS232"

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 16


Data exchange between two or more Heidenhain controls over
TCP / IP interface.

CFG_PLC_PY_Server = "active": Opens a communications port and responds


to incoming functions.
CFG_PLC_PY_Client_1 = "active": Connects to a server and can send
functions.

Default Port 8076.


The name of the server must be defined in PY_TCP_IP_CLIENT_1.src in
KS_ Process_Parameters.

DEFINE CFG_PLC_PY_server = "inactive"


DEFINE CFG_PLC_PY_client_1 = "inactive"

3D Head
- 3D Head [inactive, active]
- Selection reference value from PLC (non volatile 3D head position)
or transfer reference in mode reference (reference dog available)
[&inactive/&active]
- Index of the 1./2. 3D head axis [-1:inactive,3:axis_4 .. 8:axis_9]
- Torque limitation spindle motor before 3D head clamping
[value in MP_data.tab]

DEFINE CFG_3D_head = "active"


DEFINE CFG_Reference_value_selection = "active"
DEFINE CFG_3D_head_axis_1_index = 5
DEFINE CFG_3D_head_axis_2_index = 6

Spindle positioning in axis mode (C-axis mode)


e.g. interpolation turning
- S in axis mode [inactive, active]
- Index axis [-1:inactive,3:axis_4 .. 17:axis_18]

DEFINE CFG_S_in_axes_mode = "inactive"


DEFINE CFG_S_axis_index = 10

Free rotation for turn- and auxiliary axes


- Free rotation [inactive, active]
- Index axis [-1:inactive,3:axis_4 .. 17:axis_18]

DEFINE CFG_free_rotation = "inactive"


DEFINE CFG_turning_rotary_axis_index = 4
DEFINE CFG_turning_infeed_axis_index = 0

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 17


Number of connected PLC I/O boards (PL)

Note:
After introduction of
MP4031 : x ;Monitoring the really connected PLs
the activation of PLs will be made by machine parameter.

Axes configuration
- Axes with clamping mode (brake) and clamping signal
- Axes with central drive or C axes mode
- Move axes after traverse reference to a position defined in
file MP_Data.tab
[%876543210987654321]

* 876543210987654321
DEFINE CFG_axis_brake_active = %000000010011111100
DEFINE CFG_power_on_clamping_mode_off = %000000000000000100
DEFINE CFG_axes_with_signal_clamped = %000000000000000000
DEFINE CFG_axes_with_signal_unclamped = %000000000000000000

DEFINE CFG_axes_use_nominal_value_as_actual = %000000000000000000


DEFINE CFG_axes_with_central_drive_mode = %000000000000000000
DEFINE CFG_axes_with_c_axis_mode = %000000010000000000
DEFINE CFG_axes_with_common_used_position_ROD = %000000010000000000
DEFINE CFG_axes_group_1_gantry_or_master_slave = %000000000000000000
DEFINE CFG_axes_group_2_gantry_or_master_slave = %000000000000000000
DEFINE CFG_axes_group_3_gantry_or_master_slave = %000000000000000000
DEFINE CFG_axes_with_active_current_control = %000000000000000000
DEFINE CFG_field_angle_saved_in_PLC = %000000000000000000

DEFINE CFG_reference_end_position_software = %000000000000000000

DEFINE CFG_posit_safe_after_reference = %000000010000000000

TC manual
- If in MP_Config.tab the option -MG_TC_position_manual_inactive-
has not been deactivated, the tool change of maual tools
(tools not in pocket table) will be made after axes PLC
positioning.
- 1. Z to Z safe - DG_TC_pos_X_manual
- 2. X to X manual - DG_TC_pos_Y_manual
- 3. Y to Y manual - DG_TC_pos_Z_manual
- 4. Z to Z manual - DG_TC_pos_Z_safety

DEFINE CFG_Pos_X_manual = "inactive"


DEFINE CFG_Pos_Y_manual = "active"
DEFINE CFG_Pos_Z_manual = "active"

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 18


Machine parameter for tool change

MP7480.0 MP7480.1

inactive (1) 1 0
single arm 5 0
double arm 3 3

Legend:
(1) - an existing automatic tool change system can be temporary
switched off

Tool changing system (Z is always the tool axis)

inactive - only manual tool change posible

TC_type_xx -> 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16

single arm X X X X
pickup Z Y X
pickup Z X
pickup Z X X
pickup Z X+/X-/Y+/Y- X
mag moving with X axis X
mag moving to spindle X
mag on fixed position X
no magazine X
(1)

TC_type_xx -> 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16

double arm X X X X X X X X
(hydraulic system)
TC arm middle position X X X X
(as basic position)
TC arm middle position X X X X
(for exchange Tspecial)
TC gripper X X X X
(output)

TC_type_xx -> 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16

double arm X X X X
(cam driven)
TC arm middle position X X
(Tfixed or Tspecial)
TC gripper X X
(output)

OEM spezific
TC_type_OEM

For TC_type_05..12 it is possible to distinguish between TC gripper and


TC gripper on transport carriage
- CFG_TC_transport_carriage [inactive, active]

Legend:
(1) - will be prepared

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 19


DEFINE CFG_Tool_changing_system = "TC_type_10"
DEFINE CFG_TC_transport_carriage = "inactive"
DEFINE CFG_PLC_pos_X_software_end_switch = "active"
DEFINE CFG_PLC_pos_Y_software_end_switch = "active"
DEFINE CFG_PLC_pos_Z_software_end_switch = "active"
DEFINE CFG_PLC_pos_4_software_end_switch = "active"
DEFINE CFG_PLC_pos_5_software_end_switch = "active"

Tool magazine system

inactive - only manual tool change posible

Mag_type_xx -> 01 02 03 04 05 06 07 08 09 10

Pulse X X X X X X X X
Reference sensor X X X X
Pocket 90 deg shift X X X X
Index X X X X

PLC axis X X
Pocket 90 deg shift X

Note:
for Mag_type_09..10 (PLC axis) it is necessary to assign to an index
of the magazine axis (CFG_TC_magazine_axis_x_index)
- inactive [-1]
.. ..
- axis 4 [3]
- axis 5 [4]
.. ..
- axis 18 [17]

Maximale count of magazines (CFG_TC_magazine_max_count)


- if more than 2 magazines provided, the I/O symbols
and timer has to be extended
- Machine parameter are designated up to 8 magazines
- PLC module for an arbitrary count of magazines (structure)
prepared

- TC magazine maximale count [2..8]

DEFINE CFG_Tool_magazine_system = "Mag_type_10"


DEFINE CFG_TC_magazine_axis_1_index = 7
DEFINE CFG_TC_magazine_axis_2_index = -1
DEFINE CFG_TC_magazine_max_count = 2
DEFINE CFG_magazine_tool_lock = "active"

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 20


Pallet Changing System
- inactive [inactive]
- Alternating table mode [Alternat_table]
- 3R system with I/O interface [3R_System]
- 2 pallet changer linear [2_PC_linear]
- 2 pallet changer turn [2_PC_turn] (1)
Legend:
(1) - will be prepeared

DEFINE CFG_Pallet_changer = "Alternat_table"

Machine simulation active (Programming station) or


Machine simulation unit (MSU) connected
[inactive/active]

DEFINE CFG_Motor_unit = "inactive"

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 21


1.7 PLC Input/Output Assignment

1.7.1 iTNC without HSCI

In the file GLB_IO.DEF the inputs and outputs of the machine must be assigned to the
appropriate symbolic addresses.
Non-assigned inputs and outputs are not deleted, but are assigned a marker (M). Inputs
at which 24 V are present in default state and which are not used, receive the logic state 1
(MG_marker_one).
Inputs and outputs that are not available yet must be added to this file and assigned to
symbolic addresses as well.
Inputs and outputs additionally added must of course be programmed accordingly in the
PLC program. To retain easy updatability the module OEM_func.src or new PLC modules
are used.

File: Glb_IO.def

PLC outputs / PLC inputs


symbolic operands always describing logic status one (=1)

#type

Outputs X41/X46 (O0 - O7)

O_lamp_NC_start O0
O_lamp_NC_stop O1
O_lamp_power_on O2
O_lamp_spindle_M5 M
O_lamp_spindle_M3 M
O_lamp_spindle_M4 M
O_lamp_coolant_M08 M
O_lamp_coolant_M07 M
O_lamp_tool_unclamped M
O_lamp_TC_enable M
O_lamp_chip_conveyor M
O_lamp_lubrication_on M
O_lamp_table_1 M
O_lamp_table_2 M
O_lamp_TC_pocket_loading M
O_lamp_axes_motion_from_end_position M
O_lamp_TNC_alarm M
O_lamp_program_end M
O_lamp_special_mode M
O_lamp_PC_release M
O_program_run M

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 22


Outputs X41 (O08 - O30)
X41 (O24 - O30 not switched off by emergency stop)

O_servo_drive_release_X O8
O_servo_drive_release_Y O9
O_servo_drive_release_Z O10
O_servo_drive_release_4 O11
O_servo_drive_release_5 M
O_servo_drive_release_6 M
O_servo_drive_release_7 M
O_servo_drive_release_8 M
O_servo_drive_release_9 M
O_servo_drive_release_10 M
O_servo_drive_release_11 M
O_servo_drive_release_12 M
O_servo_drive_release_13 M
O_servo_drive_release_14 M
O_servo_drive_release_15 M
O_servo_drive_release_16 M
O_servo_drive_release_S1 O12
O_servo_drive_release_S2 M

O_unclamping_X M
O_unclamping_Y M
O_unclamping_Z O13
O_unclamping_4 O14
O_unclamping_5 M
O_unclamping_6 M
O_unclamping_7 M
O_unclamping_8 M
O_unclamping_9 M
O_unclamping_10 M
O_unclamping_11 M
O_unclamping_12 M
O_unclamping_13 M
O_unclamping_14 M
O_unclamping_15 M
O_unclamping_16 M

O_chip_conveyor O15
O_chip_conveyor_back O16
O_spindle_blow_clean M
O_S1_tool_unclamping O17
O_S1_tool_clamping M
O_S2_tool_unclamping M
O_S2_tool_clamping M
O_TC_magazine_cw O18
O_TC_magazine_ccw O19
O_TC_magazine_rapid_traverse M
O_TC_magazine_slow_motion M
O_TC_magazine_lock_pin_out M
O_TC_magazine_lock_pin_in M
O_TC_magazine_to_spindle_position O20
O_TC_magazine_to_basic_position O21
O_TC_pocket_put_out M
O_TC_pocket_put_in M
O_TC_magazine_load_position_unlock M
O_TC_arm_put_out M
O_TC_arm_put_in M

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 23


O_TC_arm_turn_cw M
O_TC_arm_turn_ccw M
O_TC_arm_to_middle_position M
O_TC_arm_to_spindle_position M
O_TC_arm_to_basic_position M
O_TC_arm_gripper_close M
O_tool_lock_open M
O_tool_lock_close M

O_TC_pickup_put_out M
O_TC_pickup_put_in M

O_pallet_in_machine_unclamping M
O_pallet_in_machine_clamping M

O_PC_door_open M
O_PC_door_close M
O_PC_1_to_load_position M
O_PC_1_to_machine_position M
O_PC_2_to_load_position M
O_PC_2_to_machine_position M
O_PC_1_rapid_traverse M
O_PC_2_rapid_traverse M

O_PC_release_stop_position M
O_PC_release_machine_position M
O_workpiece_unclamping M
O_PC_load_door_open M
O_PC_bit_0 M
O_PC_bit_1 M
O_PC_bit_2 M
O_PC_bit_3 M
O_PC_bit_4 M
O_PC_bit_5 M
O_PC_bit_6 M
O_PC_bit_7 M
O_PC_table_empty M
O_PC_start M

O_coolant_M07_on O22
O_coolant_M08_on O23
O_coolant_M17_on M
O_S1_wye_delta_switchover O24
O_S1_gear_range_1 O25
O_S1_gear_range_2 O26
O_S2_wye_delta_switchover M
O_S2_gear_range_1 M
O_S2_gear_range_2 M
O_S1_spindle_fan M
O_S2_spindle_fan M
O_axes_motion_from_end_position O27
O_power_relais_voltage O28
O_TC_magazine_guard_unlock O29
O_guard_1_unlock O30
O_guard_2_unlock M
O_start_index_table M
O_release_special_mode M
O_lubrication_on M
O_hydraulic_on M
O_working_light M

Enter number of the output in MP4042


O_auto_power_off_after_END_PGM

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 24


Outputs Handwheel HR 410 X23 (O109 - O111)

* Variant 45

O_HR410_lamp_spindle_M3 O109
O_HR410_lamp_NC_start O110
O_HR410_lamp_NC_stop O111

* Variant 44

* O_HR410_lamp_spindle_M3 M
O_HR410_lamp_spindle_M5 M
O_HR410_lamp_spindle_M4 M

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 25


Inputs X42 (I0 - I31)

I_emergency_button_unlocked I0

I_control_operational I3
I_not_ref_end_posit_X I4
I_not_ref_end_posit_Y I5
I_not_ref_end_posit_Z I6
I_not_ref_end_posit_4 I7
I_not_ref_end_posit_5 M
I_not_ref_end_posit_6 M
I_not_ref_end_posit_7 M
I_not_ref_end_posit_8 M
I_not_ref_end_posit_9 M
I_not_ref_end_posit_10 M
I_not_ref_end_posit_11 M
I_not_ref_end_posit_12 M
I_not_ref_end_posit_13 M
I_not_ref_end_posit_14 M
I_not_ref_end_posit_15 M
I_not_ref_end_posit_16 M
I_X_not_overtravelled M
I_X_Y_not_overtravelled M
I_X_Y_Z_not_overtravelled M
/c I_X_Y_Z_4_not_overtravelled M &MG_marker_one
/c I_X_Y_Z_4_5_not_overtravelled M &MG_marker_one

I_end_posit_axis_X I8
I_end_posit_axis_Y I9
I_end_posit_axis_Z I10
I_end_posit_axis_4 M
I_end_posit_axis_5 M

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 26


I_clamped_axis_X M
I_clamped_axis_Y M
I_clamped_axis_Z M
I_clamped_axis_4 M
I_clamped_axis_5 M
I_clamped_axis_6 M
I_clamped_axis_7 M
I_clamped_axis_8 M
I_clamped_axis_9 M
I_clamped_axis_10 M
I_clamped_axis_11 M
I_clamped_axis_12 M
I_clamped_axis_13 M
I_clamped_axis_14 M
I_clamped_axis_15 M
I_clamped_axis_16 M

I_unclamped_axis_X M
I_unclamped_axis_Y M
I_unclamped_axis_Z M
I_unclamped_axis_4 M
I_unclamped_axis_5 M
I_unclamped_axis_6 M
I_unclamped_axis_7 M
I_unclamped_axis_8 M
I_unclamped_axis_9 M
I_unclamped_axis_10 M
I_unclamped_axis_11 M
I_unclamped_axis_12 M
I_unclamped_axis_13 M
I_unclamped_axis_14 M
I_unclamped_axis_15 M
I_unclamped_axis_16 M

I_guard_1_closed I11
I_guard_1_closed_locked I12
/c I_guard_2_closed I11
/c I_guard_2_closed_locked I12

/c I_circuit_breaker_ok M &MG_marker_one
/c I_pneumatic_pressure_ok M &MG_marker_one
/c I_hydraulic_pressure_ok M &MG_marker_one

I_S1_gear_range_1 I13
I_S1_gear_range_2 I14
I_S2_gear_range_1 M
I_S2_gear_range_2 M
I_emergency_stop_circuit_ready I15
I_S1_tool_unclamped I16
I_S1_tool_clamped I17
I_S2_tool_unclamped M
I_S2_tool_clamped M
I_TC_arm_put_out M
I_TC_arm_put_in M
I_TC_arm_cw M
I_TC_arm_ccw M
I_TC_arm_middle_pos M
I_TC_arm_basic_pos M
I_TC_arm_spindle_pos M
I_TC_arm_brake_pos M
I_TC_pocket_out M
I_TC_pocket_in M
I_TC_arm_gripper_opened M

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 27


I_TC_magazine_reference I18
I_TC_magazine_exact_position I19
I_TC_magazine_counter I20
I_TC_magazine_guard_closed I21
I_TC_magazine_guard_locked_closed I22
I_TC_magazine_in_spindle_position M
I_TC_magazine_in_basic_position M
I_TC_magazine_lock_pin_in M
I_TC_magazine_lock_pin_out M
I_tool_lock_open M
I_tool_lock_close M
I_TC_pickup_put_out M
I_TC_pickup_put_in M

I_S1_tool_located_in_spindle M
I_S2_tool_located_in_spindle M
I_tool_pocket_not_empty M

I_PC_door_opened M
I_PC_door_closed M
I_PC_position_1_occupy M
I_PC_position_2_occupy M
I_PC_1_in_stop_position M
I_PC_2_in_stop_position M
I_PC_1_in_load_position M
I_PC_2_in_load_position M
I_PC_1_in_machine_position M
I_PC_2_in_machine_position M
I_PC_load_door_closed M
I_pallet_in_machine_unclamped M
I_pallet_in_machine_clamped M
I_key_workpiece_clamping_on_off M
I_key_PC_cabin_open M
I_workpiece_unclamped M

I_PC_cabin_opened M
I_PC_cabin_closed M
I_PC_cabin_closed_locked M
I_PC_ready M
I_PC_alarm M
I_PC_3R_selected_in_auto_mode M

I_lubricant_level_ok M
I_lubricant_pressure_ok M
I_index_table_in_position M
I_additional_axes_mounted M

/c I_coolant_level_ok M &MG_marker_one
/c I_SM_1xx_temperature_ok M &MG_marker_one
/c I_PW_210_temperature_ok M &MG_marker_one
/c I_DA300_pressure_ok M &MG_marker_one

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 28


Input servo drive release (pulse enable SIMODRIVE)

Machines with digital interface to inverter


-------------------------------------------
Servo drive release by X42/33 - I32 or X150
enter address 32 in MP4310.0
MP 4130.0 : 32 ;Suppress the monitoring functions

I_servo_drive_release I32

Machines with analog interface to inverter


-------------------------------------------
(e.g. SIMODRIVE 611) servo drive release 9/64 (max. braking performance for
deceleration)
switch off pulse enable 9/63 delayed by hardware (K6/K7)
input for servo drive release TNC must be entered in MP4130.0
input I0 not supported by PLC Basic Program for this function
MP4130.0: <address> ;Suppress the monitoring functions

I_servo_drive_release M

only for Siemens SIMODRIVE 611 (X111 72-73.1)

/c I_Siemens_supply_recover_unit_operational M &MG_marker_one

only for Indramat Power Drive supply unit HVE (X7 3-4)

/c I_Indramat_power_supply_ok M &MG_marker_one

Inputs only for analog drives

/c I_temp_drives_power_stage_ok M &MG_marker_one
/c I_drives_operational M &MG_marker_one
/c I_S1_spindle_operational M &MG_marker_one
/c I_S2_spindle_operational M &MG_marker_one
/c I_S1_spindle_temperature_ok M &MG_marker_one
/c I_S2_spindle_temperature_ok M &MG_marker_one
I_S1_spindle_I_max M
I_S2_spindle_I_max M
I_S1_actual_equal_nominal_rpm M
I_S1_actual_lower_nominal_rpm M
I_S2_actual_equal_nominal_rpm M
I_S2_actual_lower_nominal_rpm M
I_S2_spindle_active M

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 29


#if CFG_Machine_operating_panel_TE535Q_MB520 = "active"

Combined machine panel TE535Q


Input X46/X3 (I128 - I152)
X42/X10 (I17 - I31) or PLxxx (Ixx - Ixx)

I_key_function_1 I24
I_key_function_2 I25
I_key_function_3 I26
I_key_permissive_mode I27
I_key_S_jog_right_cw I28
I_key_S_jog_left_ccw I29
I_key_axis_6_plus I30
I_key_axis_6_minus I31

/c I_key_axis_X_minus I128
I_key_axis_Y_minus I129
I_key_axis_Z_minus I130
I_key_axis_4_minus I131
I_key_axis_5_minus I132
I_key_axis_X_plus I133
I_key_axis_Y_plus I134
I_key_axis_Z_plus I135
I_key_axis_4_plus I136
I_key_axis_5_plus I137
I_key_axis_7_plus M
I_key_axis_7_minus M
I_key_axis_8_plus M
I_key_axis_8_minus M
I_key_axis_9_plus M
I_key_axis_9_minus M
I_key_axis_10_plus M
I_key_axis_10_minus M
I_key_axis_11_plus M
I_key_axis_11_minus M
I_key_axis_12_plus M
I_key_axis_12_minus M
I_key_axis_13_plus M
I_key_axis_13_minus M
I_key_axis_14_plus M
I_key_axis_14_minus M
I_key_axis_15_plus M
I_key_axis_15_minus M
I_key_axis_16_plus M
I_key_axis_16_minus M

I_key_release_toolchange I138
I_key_tool_unclamping I139
I_key_tool_unclamping_foot_switch M
I_key_chip_conveyor_back I140
I_key_guard_unlock I141
I_key_chip_conveyor I142
I_key_spindle_M3 I143
I_key_spindle_M4 M
I_key_spindle_M5 I144
I_key_coolant_M08 I145
I_key_NC_start I146
I_key_NC_stop I147
I_key_NC_stop_2_axes_spindle M
I_key_rapid_traverse I148
I_key_axes_motion_from_end_position I149
I_key_coolant_M07 I150

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 30


I_key_power_on I151
I_key_additional_coolant I152
I_key_coolant_M17 M

I_key_TC_magazine_guard_unlock M
I_key_axes_plus M
I_key_axes_minus M
I_key_lubrication_axes M
I_key_enable_table_1 M
I_key_enable_table_2 M
I_key_enable_new_workpiece_on_pallet M
I_key_working_light M
I_key_TC_magazine_cw M
I_key_TC_magazine_ccw M
I_key_TC_mag_load_unclamp_foot_switch M
I_keylock_switch_special_mode M
I_key_override_F_100 M
I_key_override_S_100 M
I_key_override_S_plus M
I_key_override_S_minus M

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 31


#else

Inputs X46 (I128 - I152) machine touch panel MB420

/c I_key_axis_X_minus I128
I_key_axis_Y_minus I129
I_key_axis_Z_minus I130
I_key_axis_4_minus I131
I_key_axis_5_minus I132
I_key_axis_X_plus I133
I_key_axis_Y_plus I134
I_key_axis_Z_plus I135
I_key_axis_4_plus I136
I_key_axis_5_plus I137
I_key_axis_6_plus M
I_key_axis_6_minus M
I_key_axis_7_plus M
I_key_axis_7_minus M
I_key_axis_8_plus M
I_key_axis_8_minus M
I_key_axis_9_plus M
I_key_axis_9_minus M
I_key_axis_10_plus M
I_key_axis_10_minus M
I_key_axis_11_plus M
I_key_axis_11_minus M
I_key_axis_12_plus M
I_key_axis_12_minus M
I_key_axis_13_plus M
I_key_axis_13_minus M
I_key_axis_14_plus M
I_key_axis_14_minus M
I_key_axis_15_plus M
I_key_axis_15_minus M
I_key_axis_16_plus M
I_key_axis_16_minus M

I_key_release_toolchange I138
I_key_tool_unclamping I139
I_key_tool_unclamping_foot_switch M

I_key_TC_magazine_guard_unlock I140
I_key_guard_unlock I141
I_key_chip_conveyor I142
I_key_spindle_M3 I143
I_key_spindle_M4 M
I_key_spindle_M5 I144
I_key_coolant_M08 I145
I_key_NC_start I146
I_key_NC_stop I147
I_key_NC_stop_2_axes_spindle M
I_key_rapid_traverse I148
I_key_axes_motion_from_end_position I149
I_key_coolant_M07 I150
I_key_power_on I151
I_key_coolant_M17 M

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 32


I_key_axes_plus M
I_key_axes_minus M
I_key_lubrication_axes M
I_key_enable_table_1 M
I_key_enable_table_2 M
I_key_enable_new_workpiece_on_pallet M
I_key_chip_conveyor_back M
I_key_working_light M
I_key_TC_magazine_cw M
I_key_TC_magazine_ccw M
I_key_TC_mag_load_unclamp_foot_switch M
I_keylock_switch_special_mode M
I_key_function_1 M
I_key_function_2 M
I_key_function_3 M
I_key_permissive_mode M
I_key_S_jog_right_cw M
I_key_S_jog_left_ccw M
I_key_additional_coolant M
I_key_override_F_100 M
I_key_override_S_100 M
I_key_override_S_plus M
I_key_override_S_minus M

#endif

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 33


Inputs Handwheel HR 330 X23 (I160 - I162)

I_HR330_key_plus I160
I_HR330_key_minus I161
I_HR330_key_rapid_traverse I162

Inputs Handwheel HR 410 HR 410/420 X23 (I173 - I175 only HR 410)

/c I_HR4x0_key_permissive_mode M &MG_marker_one
I_HR4x0_key_permissive_mode I23

Variant 45

I_HR410_key_spindle_M3 I173
I_HR410_key_NC_start I174
I_HR410_key_NC_stop I175
I_HR410_key_spindle_jog M

Variant 44

* I_HR410_key_spindle_M3 M *I173
I_HR410_key_spindle_M5 M *I174
I_HR410_key_spindle_M4 M *I175

Variant xx

I_HR410_key_enable_VT M *I173
* I_HR410_key_NC_start M *I174
* I_HR410_key_NC_stop M *I175

Inputs Handwheel Adapter HRA 110 X23 (I160 - I170)

/c I_HRA110_S1_Bit0 I160
/c I_HRA110_S1_Bit1 I161
/c I_HRA110_S1_Bit2 I162
/c I_HRA110_S1_Bit3 I163
/c I_HRA110_S1_Bit4 I164
/c I_HRA110_S1_Bit5 I165
/c I_HRA110_S1_Bit6 I166
/c I_HRA110_S1_Bit7 I167

/c I_HRA110_S2_Bit0 I168
/c I_HRA110_S2_Bit1 I169
/c I_HRA110_S2_Bit2 I170
/c I_HRA110_S2_Bit3 I171
/c I_HRA110_S2_Bit4 I172
/c I_HRA110_S2_Bit5 I173
/c I_HRA110_S2_Bit6 I174
/c I_HRA110_S2_Bit7 I175

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 34


1.7.2 iTNC with HSCI

The HSCI serial interface (HEIDENHAIN Serial Controller Interface) is a bus system to connect
HEIDENHAIN control components. When an HSCI/PROFIBUS system is configured, the
components are specified in a project and their arrangement is described. On the basis of this
data, IOconfig generates the IOC file (*.IOC) that contains all relevant configuration data.
MC 6xxx HEIDENHAIN controls have an HSCI master integrated as standard. The PL 6xxx
input/output system is connected as a slave to the HSCI bus.
IOconfig generates and exports symbol definition files (*.DEF). These DEF files describe the
PLC inputs/outputs that are integrated in the PLC program of the control
(GLB_IO_CONFIG.DEF).
Unused inputs and outputs must be entered in GLB_IO_CONFIG.LIB.

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 35


[GLB_IO_CONFIG.DEF]

*######################################################################
* HEIDENHAIN IOconfig Thu Mar 03 17:08:09 2011 (1299168489)
*######################################################################

#TYPE
CONF_TIME_STAMP K 1299168489

* HSCI:
#TYPE

I_ESA_control_operational I 212 ;;;X9.7a


I_ESB_servo_drive_release I 213 ;;;X9.7b
I_RO_UNUSED I 214 ;;;RO X9.4a
I_RO_UNUSED_0012 I 215 ;;;RO X9.5a
I_RO_UNUSED_0013 I 216 ;;;RO X9.6a
I_RO_UNUSED_0014 I 217 ;;;RO X9.3b
I_RO_UNUSED_0015 I 218 ;;;RO X9.4b
I_RO_UNUSED_0016 I 219 ;;;RO X9.5b
I_RO_UNUSED_0017 I 220 ;;;RO X9.6b
I_RO_MC_RDY I 221 ;;;RO X9.3a
I_emergency_button_unlocked I 222 ;;;X11.3
I_emergency_stop_circuit_ready I 223 ;;;X11.4
I_guard_1_closed I 224 ;;;X11.5
I_guard_1_closed_locked I 225 ;;;X11.6
I_UNUSED_0028 I 226 ;;;X11.7
I_UNUSED_0029 I 227 ;;;X11.8
I_TC_magazine_guard_closed I 228 ;;;X11.9
I_TC_magazine_guard_locked_closed I 229 ;;;X11.10

[GLB_IO_CONFIG.LIB]

PLC outputs / PLC inputs


symbolic operands allways describing logic status one (=1)

Legend:

SLS = key operated switch

TC = tool change
TC_mag = tool magazine
PC = pallet change

#type

;HSCI O_lamp_NC_start O0
;HSCI O_lamp_NC_stop O1
;HSCI O_lamp_power_on O2
O_lamp_spindle_M5 M
O_lamp_spindle_M3 M
O_lamp_spindle_M4 M

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 36


1.8 Other Definition and Include Files

File: GLB_TCMB.DEF
In the file GLB_TCMB.DEF, all markers, bytes, words, double words, timers, counters and
constants that are used globally in the PLC program are defined with symbolic operands.
This file also contains the definitions of the additionally required symbolic addresses entered
by the PLC programmer.

File: GLB_NC.DEF
The file GLB_NC.DEF contains all variables with symbolic addresses that concern data
exchange between NC and PLC.

File: ASCIICOD.DEF
The ASCII codes of the connected keyboard are listed in this file and can be addressed using
the respective symbol name.

File: MAC_LIB.INC
In the file MAC_LIB.INC the macros for error handling when calling PLC modules are defined.
These macros are used in the entire PLC program.

All other DEF files are only required to assign the already existing settings and it is not neces-
sary to make any alterations.

File: SYSTEM.DEF
The SYSTEM.DEF file must be called before all other definition files. In this file the definitions
for conditional compilation (control model, symbols, machine variants, maximum number of
axes) are entered.

File: INTERN.DEF
With the file INTERN.DEF the definitions for conditional compilation are created. This is required
to decode CONFIG.DEF settings for tool-change or tool-magazine systems.

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 37


1.9 Machine parameters

File: *.MP

1.9.1 Timers and counters

MP4110 Run time for PLC Timers T0..T47


Input 0 to 1000000 [s]

MP 4110.0 : 0.125 ;Timer 250ms


MP 4110.1 : 0
MP 4110.2 : 0.5 ;Key impulse recognition
MP 4110.3 : 20 ;Referenz Timeout
MP 4110.4 : 1 ;Spindle nominal value on ramp
MP 4110.5 : 0.25 ;Spindle delayed stop, after axis stop
MP 4110.6 : 0.5 ;Drive enabling off-t --> Axis monitoring off/on
MP 4110.7 : 4 ;Servo drives ready
MP 4110.8 : 10 ;Spindle speed change
MP 4110.9 : 0.25 ;Servo drive release for spindle orientation
MP 4110.10 : 10 ;Gear timeout
MP 4110.11 : 0.1 ;Gear jog, pause
MP 4110.12 : 0.3 ;Gear jog, right (cw)
MP 4110.13 : 0.7 ;Gear jog, left (ccw)
MP 4110.14 : 1 ;Gear, delayed stop
MP 4110.15 : 0
MP 4110.16 : 0
MP 4110.17 : 0
MP 4110.18 : 20 ;Tool changer timeout
MP 4110.19 : 0.25 ;Tool changer, generic timer
MP 4110.20 : 10 ;Lubrication (delayed off, test pressure 0)
MP 4110.21 : 5 ;Lubrication, pressure generation (sensor)
MP 4110.22 : 10 ;Hydraulic system, pressure generation
MP 4110.23 : 1 ;Start indexing fixture
MP 4110.24 : 0.25 ;Tool changing arm cam, middle position -t --> stop
MP 4110.25 : 50 ;Pallet changer timeout
MP 4110.26 : 0.15 ;Pellet changer, generic timer
MP 4110.27 : 10 ;3-D head timeout
MP 4110.28 : 0.5 ;3-D head, generic timer
MP 4110.29 : 3 ;TSxxx Air blowing
MP 4110.30 : 20 ;Tool magazine timeout
MP 4110.31 : 0.3 ;Tool magazine 1, oriented stop
MP 4110.32 : 0.3 ;Tool magazine 2, oriented stop
MP 4110.33 : 0 ;Tool magazine 1, delayed stop
MP 4110.34 : 0 ;Tool magazine 2, delayed stop
MP 4110.35 : 5 ;TCP-IP Client Timeout
MP 4110.36 : 0.5 ;Axes monitoring off - I32/X150 (not HSCI)
MP 4110.37 : 0
MP 4110.38 : 0
MP 4110.39 : 0
MP 4110.40 : 0
MP 4110.41 : 0
MP 4110.42 : 0
MP 4110.43 : 0
MP 4110.44 : 0
MP 4110.45 : 0
MP 4110.46 : 1.5 ;Control voltage on -t-> off
MP 4110.47 : 1.5 ;Control voltage off -t-> on

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 38


MP4111 Cycle time for PLC timer T96..T999,
Start of timer with Module 9006
Number of additional timers in OEM.SYS
- Keyword: NUMBERMP4111 = x ; [1..999]
Input [s]

MP 4111.96 : 0 ;Unclamping 1
MP 4111.97 : 0 ;Unclamping 2
MP 4111.98 : 0.5 ;Unclamping 3
MP 4111.99 : 0.5 ;Unclamping 4
MP 4111.100: 0.5 ;Unclamping 5
MP 4111.101: 0.5 ;Unclamping 6
MP 4111.102: 0.5 ;Unclamping 7
MP 4111.103: 0.5 ;Unclamping 8
MP 4111.104: 0.5 ;Unclamping 9
MP 4111.105: 0.5 ;Unclamping 10
MP 4111.106: 0.5 ;Unclamping 11
MP 4111.107: 0.5 ;Unclamping 12
MP 4111.108: 0.5 ;Unclamping 13
MP 4111.109: 0.5 ;Unclamping 14
MP 4111.110: 0.5 ;Unclamping 15
MP 4111.111: 0.5 ;Unclamping 16
MP 4111.112: 0.5 ;Unclamping 17
MP 4111.113: 0.5 ;Unclamping 18
MP 4111.114: 0 ;Clamping 1
MP 4111.115: 0 ;Clamping 2
MP 4111.116: 0.5 ;Clamping 3
MP 4111.117: 0.5 ;Clamping 4
MP 4111.118: 0.5 ;Clamping 5
MP 4111.119: 0.5 ;Clamping 6
MP 4111.120: 0.5 ;Clamping 7
MP 4111.121: 0.5 ;Clamping 8
MP 4111.122: 0.5 ;Clamping 9
MP 4111.123: 0.5 ;Clamping 10
MP 4111.124: 0.5 ;Clamping 11
MP 4111.125: 0.5 ;Clamping 12
MP 4111.126: 0.5 ;Clamping 13
MP 4111.127: 0.5 ;Clamping 14
MP 4111.128: 0.5 ;Clamping 15
MP 4111.129: 0.5 ;Clamping 16
MP 4111.130: 0.5 ;Clamping 17
MP 4111.131: 0.5 ;Clamping 18
MP 4111.132: 3 ;Timeout axis 1
MP 4111.133: 3 ;Timeout axis 2
MP 4111.134: 3 ;Timeout axis 3
MP 4111.135: 3 ;Timeout axis 4
MP 4111.136: 3 ;Timeout axis 5
MP 4111.137: 3 ;Timeout axis 6
MP 4111.138: 3 ;Timeout axis 7
MP 4111.139: 3 ;Timeout axis 8
MP 4111.140: 3 ;Timeout axis 9
MP 4111.141: 3 ;Timeout axis 10
MP 4111.142: 3 ;Timeout axis 11
MP 4111.143: 3 ;Timeout axis 12
MP 4111.144: 3 ;Timeout axis 13
MP 4111.145: 3 ;Timeout axis 14
MP 4111.146: 3 ;Timeout axis 15
MP 4111.147: 3 ;Timeout axis 16
MP 4111.148: 3 ;Timeout axis 17
MP 4111.149: 3 ;Timeout axis 18

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 39


MP 4111.150: 0.1 ;Waiting in position 1
MP 4111.151: 0.1 ;Waiting in position 2
MP 4111.152: 0.1 ;Waiting in position 3
MP 4111.153: 0.1 ;Waiting in position 4
MP 4111.154: 0.1 ;Waiting in position 5
MP 4111.155: 0.1 ;Waiting in position 6
MP 4111.156: 0.1 ;Waiting in position 7
MP 4111.157: 0.1 ;Waiting in position 8
MP 4111.158: 0.1 ;Waiting in position 9
MP 4111.159: 0.1 ;Waiting in position 10
MP 4111.160: 0.1 ;Waiting in position 11
MP 4111.161: 0.1 ;Waiting in position 12
MP 4111.162: 0.1 ;Waiting in position 13
MP 4111.163: 0.1 ;Waiting in position 14
MP 4111.164: 0.1 ;Waiting in position 15
MP 4111.165: 0.1 ;Waiting in position 16
MP 4111.166: 0.1 ;Waiting in position 17
MP 4111.167: 0.1 ;Waiting in position 18
MP 4111.168: 0.5 ;Axes monitoring off - axes group 01 (HSCI)
MP 4111.169: 0.5 ;Axes monitoring off - axes group 02 (HSCI)
MP 4111.170: 0.5 ;Axes monitoring off - axes group 03 (HSCI)
MP 4111.171: 0.5 ;Axes monitoring off - axes group 04 (HSCI)
MP 4111.172: 0.5 ;Axes monitoring off - axes group 05 (HSCI)
MP 4111.173: 0.5 ;Axes monitoring off - axes group 06 (HSCI)
MP 4111.174: 0.5 ;Axes monitoring off - axes group 07 (HSCI)
MP 4111.175: 0.5 ;Axes monitoring off - axes group 08 (HSCI)
MP 4111.176: 0 ;reserved for Python
MP 4111.177: 0 ;reserved for Python
MP 4111.178: 0 ;reserved for Python
MP 4111.179: 0 ;reserved for Python
MP 4111.180: 0 ;reserved for Python
MP 4111.181: 0 ;reserved for Python
MP 4111.182: 0 ;reserved for Python
MP 4111.183: 0 ;reserved for Python
MP 4111.184: 0 ;reserved for Python
MP 4111.185: 0 ;reserved for Python
MP 4111.186: 0 ;reserved for Python
MP 4111.187: 0 ;reserved for Python
MP 4111.188: 0 ;reserved for Python
MP 4111.189: 0 ;reserved for Python
MP 4111.190: 0 ;free available (CFG_Timer_MP4111_additional)
MP 4111.191: 0
MP 4111.192: 0
MP 4111.193: 0
MP 4111.194: 0
MP 4111.195: 0
MP 4111.196: 0
MP 4111.197: 0
MP 4111.198: 0
MP 4111.199: 0

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 40


1.9.2 General MP data for the PLC

PLC data (e.g. positions, feed rates, temperatures, …) are filed in the table
PLC:\MP\MP_Data.tab (as of Basic_53). These tables – which you can expand to your require-
ments – are read together with the machine parameters.

They are accessed by soft keys that are part of the vertical soft-key row in the operating mode
Machine Parameter Programming.

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 41


When one of these soft keys is pressed, the table editor is started and the range concerned
displayed. New data can be saved by pressing the SAVE soft key; to cancel your entry,
press the BACK soft key. If you exit the table editor with the END key, a pop-up window
with a confirmation request appears.

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 42


1.9.3 General Config data for the PLC

PLC configurations (e.g. reference autostart, coolant without M3/M4 – on/off…) are stored in
the table PLC:\MP\MP_Config.tab PLC:\MP\MP_Data.tab (as of Basic_53).
These tables – which you can expand to your requirements – are read together with the
machine parameters.

They are accessed by soft keys that are part of the vertical soft-key row in the operating mode
Machine Parameter Programming.

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 43


2 PLC Soft Keys

2.1 Structure Machine function

Diagnosis function

Python function

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 45


Diagnosis function

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 46


Python function

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 47


1.1 Description

Machine functions:

Machine functions

Spindle functions

Tool functions

Spindle override increase by +1% / +5%

Spindle override 100%

Spindle override decrease by -1% / -5%

Feed override 100%

NC-Start

NC-Stop

Move active axis in positive direction

Move active axis in negative direction

Rapid traverse (programming station)

Back and close PLC window

Lubrication on

Automatic switch after the end of the NC program

Monitoring working area

Alternating table operation on/off

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 48


Axis motion from end position

Chip conveyor on/off M50/M51

Chip conveyor reverse

Chip conveyor interval on/off

Chip conveyor settings

Linear axes compensation

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 49


Linear axes compensation settings

3D head – Position, Parameter

3D head – Enter: Position, Parameter / Service

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 50


Spindle Start M03

Spindle Stop M05

Jog mode spindle direction M3

Jog mode spindle direction M4

Spindle orientation M19

Coolant outside on/off M08/M09

Coolant inside on/off M07/M09

Coolant additional on/off M17/M09

Touch probe TSxxx blow off M16 (timer)

Dry run mode

Free rotation assignment spindle override

Free rotation turn cw

Free rotation turn ccw

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 51


Activate tool change

Clamp/unclamp tool

Tool specific torque control on/off M82/M83

Magazine loading

Rotate tool magazine clockwise

Rotate tool magazine counter-clockwise

Load/unload tool from magazine

Diagnosis functions:

Change the soft key row to the diagnosis functions

To be prepared

Change mode of the upper moving-bar diagram in the small PLC window

Change mode of the lower moving bar diagram in the small PLC window

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 52


Display list of active PLC error messages

Display soft key row with the diagnosis functions

Display soft key row with the status displays

Display soft key row with PLC documentation

Logbook PLC debug on/off

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 53


Display the first part of the drive diagnosis

Display the second part of the drive diagnosis

Display the third part of the drive diagnosis

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 54


Display tool change diagnosis

Display tool magazine diagnosis

Display temperature compensation diagnosis

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 55


Settings for the temperature compensation

Display general status information

Display strobes

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 56


Display axes status

Display spindle status

Display status of PLC positioning

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 57


Display documentation of the M-functions

Display documentation of the inputs and outputs

Display example image

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 58


Open Python menue

Python Energy Option “Energy efficiency”

Python TNC Mail transmit via E-mail

Python Workspace camera

Python simple example „Hello World!“

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 59


3 Mask Files

M_error.a:

/* ERROR QUEUE
------------
*/
CHARSIZE=AUTO;
"\n";
CHARSIZE=MEDIUM;
"ERROR TABLE";
CHARSIZE=AUTO;
LINEDIST=LINEDIST-1;
CURSOR=ON;
"\nNR STAT TEXT \n";
CURSOR=OFF;
ERRQUE=10/c/l/s;
" STATUS - C: CE possible\n";
" S: Error generates NC-STOP\n";
" E: Error generates EMERGENCY STOP\n";
" 0-2: Priority";

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 60


M_dia_a1.msk:

/* Diagnosis axes/spindle
----------------------
*/
CHARSIZE=AUTO;
"\n";
CHARSIZE=MEDIUM;
"DIAG AXES/SPINDLE";
CHARSIZE=AUTO;
LINEDIST=LINEDIST-1;
CURSOR=ON;
"\n";
" X Y Z 4 5 6 S \n";
CURSOR=OFF;
"Motor Temperature [Degree] \n";
" %4D %4D %4D %4D %4D %4D %4D\n",
$WG_drive_temperature_X$/c,$WG_drive_temperature_Y$/c,
$WG_drive_temperature_Z$/c,$WG_drive_temperature_4$/c,
$WG_drive_temperature_5$/c,$WG_drive_temperature_6$/c,
$WG_drive_temperature_S$/c;
"Motor Utilization [%%] \n";
" %4D %4D %4D %4D %4D %4D %4D\n",
$WG_drive_utilization_X$/c,$WG_drive_utilization_Y$/c,
$WG_drive_utilization_Z$/c,$WG_drive_utilization_4$/c,
$WG_drive_utilization_5$/c,$WG_drive_utilization_6$/c,
$WG_drive_utilization_S$/c;
"Motor rpm [1/min] \n";
"%+5.0F%+5.0F%+5.0F%+5.0F%+5.0F%+5.0F%+5.0F\n",
$DG_actual_drive_rpm_X$/n=3/c,$DG_actual_drive_rpm_Y$/n=3/c,
$DG_actual_drive_rpm_Z$/n=3/c,$DG_actual_drive_rpm_4$/n=3/c,
$DG_actual_drive_rpm_5$/n=3/c,$DG_actual_drive_rpm_6$/n=3/c,
$DG_actual_drive_rpm_S$/n=3/c;
CURSOR=ON;
" S 9 8 7 6 5 4 Z Y X \n";
CURSOR=OFF;
"I2T Warning : %D %D %D %D %D %D %D %D %D %D\n",
$MG_I2t_S_pre_warning$/c,$MG_I2t_9_pre_warning$/c,
$MG_I2t_8_pre_warning$/c,$MG_I2t_7_pre_warning$/c,
$MG_I2t_6_pre_warning$/c,$MG_I2t_5_pre_warning$/c,
$MG_I2t_4_pre_warning$/c,$MG_I2t_Z_pre_warning$/c,
$MG_I2t_Y_pre_warning$/c,$MG_I2t_X_pre_warning$/c;
"I2T Limitation: - %D %D %D %D %D %D %D %D %D\n",
$MG_I2t_9_limitation$/c,$MG_I2t_8_limitation$/c,
$MG_I2t_7_limitation$/c,$MG_I2t_6_limitation$/c,
$MG_I2t_5_limitation$/c,$MG_I2t_4_limitation$/c,
$MG_I2t_Z_limitation$/c,$MG_I2t_Y_limitation$/c,

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 61


$MG_I2t_X_limitation$/c;
"Inverter Tmax : %D %D %D %D %D %D %D %D %D %D\n",
$MG_inverter_S_Tmax$/c,$MG_inverter_9_Tmax$/c,
$MG_inverter_8_Tmax$/c,$MG_inverter_7_Tmax$/c,
$MG_inverter_6_Tmax$/c,$MG_inverter_5_Tmax$/c,
$MG_inverter_4_Tmax$/c,$MG_inverter_Z_Tmax$/c,
$MG_inverter_Y_Tmax$/c,$MG_inverter_X_Tmax$/c;
"Drives ready : %D %D %D %D %D %D %D %D %D %D\n",
$MG_servo_drive_ready_S$/c,$MG_servo_drive_ready_9$/c,
$MG_servo_drive_ready_8$/c,$MG_servo_drive_ready_7$/c,
$MG_servo_drive_ready_6$/c,$MG_servo_drive_ready_5$/c,
$MG_servo_drive_ready_4$/c,$MG_servo_drive_ready_Z$/c,
$MG_servo_drive_ready_Y$/c,$MG_servo_drive_ready_X$/c;
"no Reference : %D %D %D %D %D %D %D %D %D %D\n",
$NP_M4018_S_no_reference$/c,$MG_reference_9_necessary_bit$/c,
$MG_reference_8_necessary_bit$/c,$MG_reference_7_necessary_bit$/c,
$MG_reference_6_necessary_bit$/c,$MG_reference_5_necessary_bit$/c,
$MG_reference_4_necessary_bit$/c,$MG_reference_Z_necessary_bit$/c,
$MG_reference_Y_necessary_bit$/c,$MG_reference_X_necessary_bit$/c;
"Axes Release : - %D %D %D %D %D %D %D %D %D\n",
$MG_axis_release_9_bit$/c,
$MG_axis_release_8_bit$/c,$MG_axis_release_7_bit$/c,
$MG_axis_release_6_bit$/c,$MG_axis_release_5_bit$/c,
$MG_axis_release_4_bit$/c,$MG_axis_release_Z_bit$/c,
$MG_axis_release_Y_bit$/c,$MG_axis_release_X_bit$/c;
"in Motion : %D %D %D %D %D %D %D %D %D %D\n",
$NP_M4017_S_controlled_in_motion$/c,$MG_axis_9_in_motion_bit$/c,
$MG_axis_8_in_motion_bit$/c,$MG_axis_7_in_motion_bit$/c,
$MG_axis_6_in_motion_bit$/c,$MG_axis_5_in_motion_bit$/c,
$MG_axis_4_in_motion_bit$/c,$MG_axis_Z_in_motion_bit$/c,
$MG_axis_Y_in_motion_bit$/c,$MG_axis_X_in_motion_bit$/c;

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 62


M_dia_wz.msk:

/* Diagnosis TC
------------
*/
CHARSIZE= AUTO;
"\n";
CHARSIZE= MEDIUM;
"DIAG TOOL CHANGE";
CHARSIZE=AUTO;
LINEDIST=LINEDIST-1;
"\n";
"(-1) : %s\n",S1/c;
CURSOR=ON;
"CASE(%2d): %s\n",$BG_step_toolchange$/c,S2/c;
CURSOR=OFF;
"(+1) : %s\n\n",S3/c;
"Standby Pocket : %4D\n",
$WG_TC_magazine_actual_pocket$/c;
"TOOL Pocket W262 : %4D\n",
$NP_W262_tool_pocket_number$/c;
"TOOL Number W264 : %4D\n\n",
$NP_W264_tool_number$/c;

"T Strobe M4073: %d T2 M4520: %d\n",


$NP_M4073_strobe_TOOL_CALL$/c,$NP_M4520_TOOL_CALL_2nd_strobe$/c;
"T0 M4521: %d\n",
$NP_M4521_TOOL_CALL_T_0_programmed$/c;
"T w Pocket M4522: %d\n",
$NP_M4522_TOOL_CALL_with_pocket_number$/c;
"T w/o Pocket M4523: %d\n\n",
$NP_M4523_TOOL_CALL_without_pocket_number$/c;

CURSOR=ON;
" X Y Z 4 5 6 7 8 9 \n";
CURSOR=OFF;
"PLC-Positioning : %d %d %d %d %d %d %d %d %d\n",
$PN_M4120_strobe_PLC_posit_axis_X$/c,
$PN_M4121_strobe_PLC_posit_axis_Y$/c,
$PN_M4122_strobe_PLC_posit_axis_Z$/c,
$PN_M4123_strobe_PLC_posit_axis_4$/c,
$PN_M4124_strobe_PLC_posit_axis_5$/c,
$PN_M4125_strobe_PLC_posit_axis_6$/c,
$PN_M4126_strobe_PLC_posit_axis_7$/c,
$PN_M4127_strobe_PLC_posit_axis_8$/c,
$PN_M4128_strobe_PLC_posit_axis_9$/c;

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 63


4 Torque Monitoring
Brief description

If the torque [%] entered in the PLC-VAL column of the tool table is exceeded, the feed rate
is reduced by a defined factor.

When operating with a digital spindle the actual torque [%] is determined via module 9166.
For analog spindles the utilization must be provided through an analog input (64 X48).

ActOverride[%]
OverrideF = ( MaxUtilization[%] − ActUtilization[%]) * Re ductionFactor + 100[%]) *
100[%]

Example:

MaxUtilization = 80%
ActUtilization = 84%
ActOverride = 90%
ReductionFactor = 1.5

90%
OverrideF = (80% − 84%) *1.5 + 100%) * = 84.6%
100%

Configuration

Oem.cfg
- CFG_Tool_specific_torque_monitoring = "active"

Requirements

- The "Torque" column must be added to the tool table


→ Run update rule "UpdateColumnTorqe.cfg".

Parameterization

PLC:\MP\MP_Data.tab:
- DG_S1/2_factor_feed_reduction
- DG_S1/2_min_torque [%]
- DG_S1/2_max_torque [%]

Tool table
- Tool-specific torque in "PLC-VAL" column

Sources

- TC_Autox.src
- T-Status.src
- Diagnos.src
- SPINDLE.SRC
- FEED.SRC

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 65


Sequence of actions

TC_AUTO01.SRC, TC_AUTO02.SRC, SPINDEL.SRC


TC_AUTO03.SRC
Analog spindle:
ToolCall chain of steps Current utilization =
analog input (64 X48)

WZ_STAT.SRC DIAGNOS.SRC

Read tool-specific utilization Digital spindle:


from tool table. Current utilization =
If no value stored, via module 9166
NP_DG_min_torque will be
used.

yes Monitoring active?


- Soft key ON/OFF
- M82/M83
no

Max. utilization = tool specific Max. utilization =


utilization from tool table NP_DG_max_torque

no
Cur. utilization > max. utilization &
spindle speed reached
yes

Reduction of feed rate by the factor from :


NP_DG_factor_torque_reduction
by adapting the feed rate override

FEED.SRC

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 66


5 Automatic Tool Changer
5.1 Fundamentals

Basically, two types of tool changers can be distinguished:

1. Tool changer with single grippers (pick-up)


• Tools with fixed pocket coding
• Next tool standby not possible
• Relatively long tool change times

2. Tool changers with dual grippers


• Tool change with free pocket coding
• Next tool standby possible
• Short tool change times

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 67


5.2 Tool Call

In the NC program a TOOL CALL block is defined as follows:

TOOL CALL 5 Z S1000

1. The tool number is transferred in W264 (tool data L, R ... from tool table.)

2. The related pocket number in the pocket table is transferred in W262.


W262: = 0 Tool already in spindle
>= 1 Pocket number of tool in magazine
= -1 Tool not in magazine

3. Additional information

M4073 Strobe TOOL CALL NP


M4074 Strobe TOOL DEF NP

M4093 Acknowledgment of TOOL CALL PN


M4094 Acknowledgment of TOOL DEF PN

M4520 TOOL CALL with 2nd T strobe NP


M4521 TOOL CALL T0 programmed NP
M4522 Tool programmed with pocket number NP
M4523 Tool programmed without pocket number NP

M4538 Geometry of tool from W264 PN


M4539 T highlighted in status display PN
M4540 Pocket no. of new tool before pocket no. PN
of old tool (if using fixed pocket coding)
M4541 Special tool with fixed pocket coding PN
despite variable pocket coding
M4542 Do not update pocket number in pocket table PN
M4543 Service life (TIME1) expired NP

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 68


5.3 Tool Table

Configuration of the tool table by MP7260 and MP7266

5.4 Pocket Table

Configuration of the pocket table by MP7261 and MP7267

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 69


5.5 Tool Change

To handle the four possible variants of tool change, four different tool types must be
distinguished:

• T0 Zero tool to empty the spindle


• Tauto Tool with variable pocket in the magazine
• Tspecial Tool with fixed pocket in the magazine
• Tman Tool without pocket in the magazine; to be replaced by hand

5.5.1 Tool change with single gripper (fixed pocket)

For a tool changer with single gripper (old tool is returned first), there are the following
eight change possibilities:

N O M I N A L T O O L

¦ ¦ ¦ ¦
¦ T0 ¦ Tauto ¦ Tmanu ¦
---------+-------------+-------------+-------------¦
¦ ¦ 1 ¦ 0 ¦
¦ not ¦ 0 ¦ 1 ¦
A T0 ¦ ¦ ¦ ¦
C ¦ available ¦ 0 ¦ 0 ¦
T ¦ ¦ (mP) ¦ (oP) ¦
U --------+-------------+-------------+-------------¦
A ¦ 0 ¦ 0 1 ¦ 0 0 ¦
L ¦ 0 ¦ 0 0 ¦ 0 1 ¦
Tauto ¦ ¦ ¦ ¦
T ¦ 1 ¦ 1 0 ¦ 1 0 ¦
O ¦ (mP) ¦ (mP) (mP) ¦ (mP) (oP) ¦
O ---------+-------------+-------------+-------------¦
L ¦ 0 ¦ 0 1 ¦ 0 ¦
¦ 0 ¦ 0 0 ¦ 1 ¦
Tmanu ¦ ¦ ¦ ¦
¦ 1 ¦ 1 0 ¦ 0 ¦
¦ (oP) ¦ (oP) (mP) ¦ (oP) ¦
---------------------------------------------------+

Legend:
+-------------> 1. TOOL CALL-strobe
| +--------> 2. TOOL CALL-strobe
-+---|----|----+
¦ 0 1 -------> M4522: TOOL CALL with tool pocket
¦ 0 0 -------> M4523: TOOL CALL w/o tool pocket
¦ ¦
¦ 1 0 -------> M4521: TOOL CALL T0 programmed
¦ (oP) (mP) -----> W262: oP - tool w/o tool pocket [==-1]
-+-------------+ mP - tool with tool pocket [>= 1]

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 70


5.5.2 Tool change with dual gripper

For a tool changer with dual gripper (new tool is taken from magazine first), there are the
following 15 change possibilities:

N O M I N A L T O O L

¦ ¦ ¦ ¦ ¦
¦ T0 ¦ Tauto ¦ Tspecial ¦ Tmanu ¦
---------+-------------+-------------+-------------+-------------¦
¦ ¦ 1 ¦ 1 ¦ 0 ¦
¦ not ¦ 0 ¦ 0 ¦ 1 ¦
T0 ¦ ¦ ¦ ¦ ¦
¦ available ¦ 0 ¦ 0 ¦ 0 ¦
¦ ¦ (mP) ¦ (mP) ¦ (oP) ¦
A ---------+-------------+-------------+-------------+-------------¦
C ¦ 0 ¦ 1 ¦ 1 0 ¦ 0 0 ¦
T ¦ 0 ¦ 0 ¦ 0 0 ¦ 0 1 ¦
U Tauto ¦ ¦ ¦ ¦ ¦
A ¦ 1 ¦ 0 ¦ 0 1 ¦ 1 0 ¦
L ¦ (mP) ¦ (mP) ¦ (mP) (mP) ¦ (mP) (oP) ¦
---------+-------------+-------------+-------------+-------------¦
T ¦ 0 ¦ 1 0 ¦ 1 0 ¦ 0 0 ¦
O ¦ 0 ¦ 0 0 ¦ 0 0 ¦ 0 1 ¦
O Tspecial ¦ ¦ ¦ ¦ ¦
L ¦ 1 ¦ 0 1 ¦ 0 1 ¦ 1 0 ¦
¦ (mP) ¦ (mP) (mP) ¦ (mP) (mP) ¦ (mP) (oP) ¦
---------+-------------+-------------+-------------+-------------¦
¦ 0 ¦ 0 1 ¦ 0 1 ¦ 0 ¦
¦ 0 ¦ 0 0 ¦ 0 0 ¦ 1 ¦
Tmanu ¦ ¦ ¦ ¦ ¦
¦ 1 ¦ 1 0 ¦ 1 0 ¦ 0 ¦
¦ (oP) ¦ (oP) (mP) ¦ (oP) (mP) ¦ (oP) ¦
-----------------------------------------------------------------+

Legend:
+-------------> 1. TOOL CALL-strobe
| +--------> 2. TOOL CALL-strobe
-+---|----|----+
¦ 0 1 -------> M4522: TOOL CALL with tool pocket
¦ 0 0 -------> M4523: TOOL CALL w/o tool pocket
¦ ¦
¦ 1 0 -------> M4521: TOOL CALL T0 programmed
¦ (oP) (mP) -----> W262: oP - tool w/o tool pocket [==-1]
-+-------------+ mP - tool with tool pocket [>= 1]

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 71


This overview helps to distinguish, whether

1. a tool must be replaced by hand (operator removes tool from spindle and puts it
someplace outside the magazine)
or
2. an automatic tool change must be performed
(tool gripper removes tool from spindle and places it in tool magazine).

In the PLC program, this was implemented as follows:

Ad 1: Tool change by hand

L NP_W262_tool_pocket_number
== KL_tool_without_pocket ;[-1]
ON MG_TC_auto_active
S MG_TC_manual

Ad 2: Automatic tool change

L NP_W262_tool_pocket_number
>= KL_tool_with_pocket ;[+1]
S MG_TC_automatic

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 72


5.6 Manual Tool Change

Functions (toolmanu.src):
• Manual tool change with operator guidance
• Touch probe recognition
• Activation of tool data

The module is activated by pressing the "Select TC" button in the Manual operating mode
or
by a TOOL CALL for a tool without pocket in the magazine (Tmanu). Instructions are then
displayed to exchange the tool by hand.

If in the tool table the #bit 0 of the PLC status is set (%00000001), the tool called by the
TOOL CALL is identified as touch probe (see Touch Probe module.)

The new tool data will be active after the tool change was confirmed and the NC Start
button pressed.

5.7 Automatic Tool Change

Functions:
• Automatic tool change with single gripper (Toolaut1.src)
• Automatic tool change with dual gripper (Toolaut2.src)
• Positioning of tool magazine (Toolmag1.src / Toolmag2.src)
• Touch probe recognition
• Activation of tool data

The module is activated by a TOOL CALL for a tool with a pocket in the magazine (Tauto).
If the tool in the spindle was unclamped without TOOL CALL since the last automatic tool
change, the operator must decide whether the tool change may be performed (yes/no).
The tool change process starts with a positioning of the magazine, a spindle orientation
and axis positionings to the tool change position.
Subsequently a dual gripper replaces the tools.
While the exchanged tool is clamped, its technological data is being activated. By pressing
NC Stop or by a system error the process can be interrupted. In addition to the error message
"TC timeout", additional text is displayed in the PLC window informing about the next step to
be performed. With NC Start the process can be continued; pressing NC Stop again aborts
the tool change. When a tool change was aborted, the pocket table must be checked (error
message).
If in the tool table the #bit 0 of the PLC status is set (%00000001), the tool called by the TOOL
CALL is identified as touch probe (see Touch Probe module.)

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 73


Example: Automatic tool change (dual gripper)

CM TC_auto_start ;00
CM Tool_spindle_ok ;01
CM T_mag_start ;02
CM S_start ;03
CM Z_start ;04
CM PW_door_open ;05
CM Z_in_TC_posit ;06
CM X_Y_start ;07
CM T_status_read ;08
CM PW_door_opened ;09
CM Magazine_in_pos ;10
CM T_pocket_put_out ;11
CM T_pocket_time ;12
CM S_in_TC_posit ;13
CM X_in_TC_posit ;14
CM Y_in_TC_posit ;15
CM Mag_full_empty ;16
CM Spi_full_empty ;17
CM T_pocket_pos_out ;18
CM T_arm_to_spindle ;19
CM T_arm_on_spindle ;20
CM T_gripper_close ;21
CM T_gripper_closed ;22
CM T_unclamping ;23
CM Tool_unclamped ;24
CM TC_auto_time ;25
CM T_arm_put_out ;26
CM Tnew_store ;27
CM T0_in_status ;28
CM T_status_ok ;29
CM T_arm_pos_out ;30
#if Middle_position_exchange = &active
CM Tool_Call_2nd ;31
CM Tool_Call_wait ;32
CM Jump_TC_arm ;33 ---> (1)
CM T_arm_to_middle ;34
CM T_arm_in_middle ;35
CM T_mag_start ;36
CM Magazine_in_pos ;37
CM T_pocket_put_out ;38
CM T_pocket_pos_out ;39
CM Mag_empty ;40
#endif ;
CM T_arm_to_cw_ccw ;41 ;31 <--- (1)
CM T_arm_in_cw_ccw ;42 ;32
CM T_arm_put_in ;43 ;33
CM T_arm_pos_in ;44 ;34
CM T_clamping ;45 ;35
CM Tool_clamped ;46 ;36
CM Spi_empty_full ;47 ;37
CM Tnew_in_status ;48 ;38
CM T_status_ok ;49 ;39
CM T_arm_to_basic ;50 ;40
CM T_standby_read ;51 ;41
CM T_arm_on_basic ;52 ;42
CM T_gripper_open ;53 ;43
CM T_gripper_opened ;54 ;44
CM T_pocket_in_out ;55 ;45
CM T_pocket_pos_ok ;56 ;46
CM PW_door_close ;57 ;47
CM PW_door_closed ;58 ;48
CM TOOL_CALL_quit ;59 ;49

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 74


CM TC_auto_end ;60 ;50
CM TC_auto_time ;reserved

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 75


5.7.1 Sequence of actions (single gripper)
Program abortion
Change of operat- Waiting position for
ing mode. 00 Tool change
EMERG. STOP (LBL TC_auto_start)

ToolCall programmed
(Actl. or noml. tool is of
Tmanu type)

Correct tool in spindle?


01 (only after a previous tool change via keys/soft keys)
NC-Stop (LBL Tool_in_spindle_ok)

Correct tool in spindle

Start Z1-positioning
02 (LBL Z1_in_out_start)

Z-positioning started

Start tool magazine

Z-axis positioned
03
(LBL TC_Magazin_1Start)

Tool magazine started


Magazine posi-
tioned

Orient spindle
04 (LBL S_start)

Z1 position reached?
05
(LBL Z1_posit_in_out)

Z1 position is reached
Spindle oriented

Magazine position reached?


06
(LBL Magazine_in_pos)

Magazine position is reached

Spindle in tool change position?


07
(LBL S_in_TC_posit)

Spindle is in tool change position

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 76


Magazine check
08
(LBL Mag_full_empty)
Error

Magazine check ok
(Initiators ok)

Check spindle status for


09
plausibility
Error (LBL Spi_full_empty)

Plausibility check ok
(Initiators ok)

active
Magazine to spindle
10
(LBL Mag_to_spindle)

TC_magazine_is_moving_to_spindle
Magazine in spindle position?
11
(LBL Mag_in_spindle)

Magazine is in spindle position

inactive
Start Y-positioning
10
(LBL Y_in_start)

Y-positioning started

Y-position reached?
11
(LBL Y_posit_in)

Y-position reached

Unclamp tool
12
(LBL T_unclamping)

Tool unclamped?
13
(LBL Tool_unclamped)

Tool is unclamped

Start waiting time


14
(LBL Time_put_out)

Waiting time expired

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 77


Status T0
15
(LBL T0_in_status)

Read tool status T_Status.src


16
(LBL T_status_read)

Start Z2-positioning
17 (LBL Z2_in_out_start)

Z-positioning started

Z2 position reached?
18
(LBL Z2_in_pos_in_out)

Z2 position is reached

Automatic tool programmed?


19
(LBL Jump_clamping)

Automatic tool programmed?


yes no

TOOLMAG1.SRC
Start tool magazine
20 TOOLMAG2.SRC
(LBL TC_magazine_2start)

Magazine is started

Magazine position reached?


21
(LBL Magazine_in_pos)

Magazine position reached

Magazine check
22
(LBL Mag_full)
Error

Magazine check ok
(Initiators ok)

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 78


Start Z3-positioning
23
(LBL Z3_on_start)

Z-positioning started

Z3 position reached?
24
(LBL Z3_in_pos_on)

Z3-position reached

Clamp tool
25
(LBL Tool_clamping)

Tool clamped?
26
(LBL Tool_clamped)

Tool clamped

Check spindle status for


27
plausibility
Error (LBL Spi_full_empty)

Plausibility check ok
(Initiators ok)

active
TC_magazine_is_moving_to_spindle

Move magazine to basic position


28
(LBL Mag_to_basic)

inactive
Start Y-positioning
28
(LBL Y_out_start)

Y-positioning started

Status Tnew
29
(LBL Tnew_in_status)

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 79


Read tool status T_Stat.src
30
(LBL Tool_status_reading)

active

TC_magazine_is_moving_to_spindle
Magazine in basic position?
31
(LBL Mag_on_basic)

Magazine is in basic position

inactive
Y position reached?
31
(LBL Y_posit_out)

Y position reached

ToolCall quit
32 (LBL Tool_call_quit)

ToolCall is quit

End of ToolCall
33
(LBL TC_auto_end)

Reset chain of steps


(LBL TC_auto_reset)

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 80


5.7.2 Sequence of actions (dual gripper)
Program abortion
Change of operat- Waiting position for
ing mode 00 tool change
EMERG. STOP (LBL TC_auto_start)

ToolCall programmed
(Actl. or noml. tool is of Tauto
type)

Correct tool in spindle?


01 (only after a previous tool change via keys/soft keys)
NC Stop (LBL Tool_in_spindle_ok)

Correct tool in spindle

TOOLMAG1.SRC
Start tool magazine TOOLMAG2.SRC
02
(LBL TC_magazine_1start)

Magazine started

Magazine positioned
Orient spindle S_ORIENT.SRC
03 (LBL S_start)
Spindle oriented

Start Z-positioning
04 (LBL Z_start)

Z-positioning started

Z-position reached?
05
(LBL Z_in_TC_position)

Z-position reached

Start X/Y-positioning
06
(LBL X_Y_start)
X/Y-axis positioned

X/Y-positioning started

Magazie position reached?


07
(LBL Magazine_in_pos)

Magazine position reached

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 81


Fold out magazine pocket
08
(LBL T_pocket_put_out)

TC_pocket_out_90_deg = &active

Spindle oriented
Start waiting time

X/Y-axis positioned
09 (LBL T_pocket_time)

Waiting time expired

Fold out magazine


Spindle in tool change position?
10 (LBL S_in_TC_posit)

Spindle in tool change position

X-postion reached?
11 (LBL X_in_TC_posit)

X-position reached

Y-postion reached?
12 (LBL Y_in_TC_posit)

Y-position reached

Magazine check
13
(LBL Mag_full_empty)
Error

Magazine check ok
(Initiators ok)

Check spindle status for


14
Plausibility
Error (LBL Spi_full_empty)

Plausibility check ok
TC_pocket_out_90_deg = &active

(Initiators ok)

Magazine pocket folded out?


15
(LBL T_pocket_pos_out)

Magazine pocket folded out

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 82


Move arm to spindle
16 (LBL T_arm_to_spindle)

Middle_position_basic = &active
Arm on spindle?
17 (T_arm_on_spindle)

Arm is on spindle

Close gripper
18
(LBL TC_arm_gripper_close)

TC_gripper = &active

Gripper closed?
19
(LBL T_gripper_closed)

Gripper closed

Unclamp tool
20
(LBL Tool_unclamping)

Tool unclamped?
21
(LBL Tool_unclamped)

Tool is unclamped

Start waiting time


22
(LBL Time_put_out)

Waiting time expired

Lift out TC arm


23 (LBL TC_arm_put_out)

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 83


TC arm lifted out?
24
(LBL TC_arm_put_out)

TC arm lifted out

Status T0
25
(LBL T0_in_status)

Read tool status T_STATUS.SRC


26
(LBL Tool_status_reading)

Tool with fixed pocket coding programmed?


27
(LBL Jump_TC_arm)

Tool with fixed pocket coding programmed?


yes no
Middle _position_exchange = &active

Move TC arm to center position


28
(LBL T_arm_to_middle)

TC arm in center position?


29
(LBL T_arm_in_middle)

TC arm in center position

Start tool magazine TOOLMAG1.SRC


30 (LBL TC_magazine_start) TOOLMAG2.SRC

Magazine started

Magazine position reached?


31
(LBL Magazine_in_pos)

Magazine position reached

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 84


32 Fold out magazine pocket
(LBL T_pocket_put_out)

Middle _position_exchange = &active


TC_pocket_90_degree_shift = &active
Magazine pocket folded out?
33 (LBL T_pocket_pos_out)

Magazine pocket folded out

34 Magazine check
(LBL Mag_full_empty)
Error

Magazine check ok
(Initiators ok)

Move TC arm to spindle


35
(LBL T_arm_to_cw_ccw)

TC arm at spindle position?


36
(LBL T_arm_in_cw_ccw)

TC arm at spindle position

Put in TC arm
37 (LBL TC_arm_put_in)

TC arm at put in position?


38 (LBL TC_arm_put_in)

TC arm at put in position

Clamp tool
39
(LBL Tool_clamping)

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 85


Tool clamped?
40
(LBL Tool_clamped)

Tool clamped

Check spindle status for plausibility


41
(LBL Spi_full_empty)
Error

Plausibility check ok
(Initiators ok)

Status Tnew
42
(LBL Tnew_in_status)

Read tool status T_STATUS.SRC


43
(LBL Tool_status_reading)

TC arm to basic position


44
(LBL TC_arm_to_basic_position)

Status request of tool to be placed in magazine (excess length)


45
(LBL T_standby_read)
Middle _position_exchange = &active

TC arm at basic position?


46
(LBL T_arm_on_basic)

TC arm at basic position

Open gripper
47
(LBL TC_gripper_open)

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 86


TC_gripper = &akiv
TC gripper open?
48
(LBL TC_gripper_open)

TC gripper open

Fold in magazine pocket,


49 if tool has excess length
(LBL T_pocket_in_out)

Magazine pocket folded in/outt?


50
(LBL TC_gripper_open)

Magazine folded in Magazine folded out


(tool with excess length) (tool without excess length)

Confirm ToolCall
51 (LBL Tool_call_quit)

ToolCall confirmed

End of ToolCall
52
(LBL TC_auto_end)

Reset chain of steps


(LBL TC_auto_reset)

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 87


5.7.3 Sequence of actions (dual gripper with cam disk)

Diagnosis Waiting positon for tool change


00
functions (LBL TC_auto_start)

ToolCall programmed
(Actl. or noml. tool is of
Tauto type)

Correct tool in spindle?


01 (only after a previous tool changed via keys/soft keys)
NC Stop (LBL WZ in Spindel OK)

Correct tool in spindle

Start tool magazine


02
(LBL TC_magazine_1start)

TOOLMAG1.SRC
Magazine started TOOLMAG2.SRC

Magazine positioned
Orient spindle S_ORIENT.SRC
03 (LBL S_start)
Spindle oriented

Start Z-positioning
04 (LBL Z_start)

Z-positioning started

Z-position reached?
05
(LBL Z_in_TC_posit)

Z- position reached

Start X/Y-positioning
06
(LBL X_Y_start)
X/Y-axis positioned

X/Y-positionierung started

Magazine position reached?


07
(LBL Magazine_in_Pos)

Magazine position reached

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 88


Fold out magazine pocket
08
(LBL TC_pocket_put_out)

TC_pocket_out_90_deg = &active

Spindle oriented
Start waiting time

X/Y-axis positioned
09 (LBL T_pocket_time)

Waiting time expired

Fold out magazine


Spindle in TC position?
10 (LBL S_in_TC_posit)

Spindle in TC position

X-postion reached?
11 (LBL X_in_TC_posit)

X-position reached

Y-postion reached?
12 (LBL Y_in_TC_posit)

Y-position reached

Magazine check
13
(LBL Mag_full_empty)
Error

Magazine check OK
(initiators OK)

Check spindle status


14
For plausibility
Error (LBL Spi_full_empty)

Plausibility check OK
TC_pocket_out_90_deg = &active

(initiators OK)

Magazine pocket folded out?


15
(LBL T_pocket_pos_out)

Magazine pocket folded out

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 89


TC arm to spindle
16 (LBL TC_arm_to_spindle_position)

Braking position was left

TC arm at spindle?
17 (TC_arm_on_spindle)

TC arm at spindle

Close gripper
18
(LBL Gripper_close)

T_gripper = &active

Gripper closed?
19
(LBL T_gripper_closed)

Gripper closed

Unclamp tool
20
(LBL T_unclamping)

Tool unclamped?
21
(LBL T_unclamped)

Tool unclamped

Start waiting time


22
(LBL Time_put_out)

Waiting time expired

TC arm to put out position


23 (LBL T_arm_put_out)

Braking position was left

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 90


Status T0
24
(LBL T0_in_status)

Read tool status T_STATUS.SRC


25
(LBL Tool_status_reading)

Fixed tool pocket programmed?


26
(LBL Jump_TC_arm)

Fixed tool pocket pro-


yes no

Center position reached?


27
(LBL T_arm_middle_stop)
Middle _position_exchange = &active

TC arm in center position

Start waiting time


28
(LBL TC_arm_delay)

Waiting time expired

TC arm in center position?


29 (LBL T_arm_in_middle)

TC arm in center position

Start tool magazine


30 (LBL TC_magazine_start)

Magazine started

Magazine position reached?


31
(LBL Magazine_in_pos)

Magazine position reached

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 91


32 Fold out magazine pocket
(LBL T_pocket_put_out)

Middle_position_basic = &active
TC_pocket_out_90_deg = &active
Magazine pocket folded out?
33 (LBL T_pocket_pos_out)

Magazine pocket folded out

34 Magazine check
(LBL Mag_full_empty)
Error

Magazine check ok
(Initiators ok)

TC arm to put in position


35
(LBL TC_arm_put_in)

Braking position was left

TC arm at put in position?


36
(LBL T_arm_pos_in)

TC arm at put in position

37 Clamp tool
(LBL Tool_clamping)

38

Tool clamped

39
Error

Plausibility check ok
(Initiators ok)

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 92


Status Tnew
40
(LBL Tnew_in_status)

Read tool status T_STATUS.SRC


41
(LBL Tool_status_reading)

Move TC arm to basic position


42
(LBL TC_arm_to_basic)

Status request
43
of tool to be placed in magazine (excess length)
Middle_position_basic = &avtive

TC arm in basic position?


44
(LBL TC_arm_on_basic)

TC arm in basic position

Open gripper
45
(LBL T_gripper_open)
WZ_Zange = &akiv

Gripper open?
46
(LBL T_gripper_opened)

Gripper open

Fold in magazine pocket,


47 if tool has excess length
(LBL T_pocket_in_out)

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 93


Magazine pocket folded in/out?
48
(LBL T_pocket_pos_ok)

Magazine folded in Magazine folded out


(Tool with excess length) (Tool without excess length)

ToolCall quit
49 (LBL TOOL_CALL_quit)

ToolCall is quit

End of ToolCall
50
(LBL TC_auto_end)

Reset chain of steps


(LBL TC_auto_reset)

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 94



Depending on the sensors the position of the cam disk is monitored and stored in non-volatile memory.

Basic position Spindle position Center position Spindle position


arm_basic_pos arm_on_unclamp arm_on_clamp

Sequence of actions (Changing arms)


Basic position
sensor

Spindle position
sensor

Center position
sensor

Brake position
sensor

To basic position - To spindle position - To center position - To spindle position -


Arm_to_basic TC_arm_to_unclamping_pos Arm_exchanging TC_arm_to_clamping_pos

Basic position Arm in unclamping position Arm in clamping position


00 (LBL TC_arm_basic_pos) 02 (LBL Arm_on_unclamp) 04 (LBL Arm_on_clamp)

Leave position Leave position Leave position

Arm to unclamping position Arm to clamping position Arm to basic position


01 03 05
(LBL Z_in_TC_posit) (LBL Arm_exchanging) (LBL Arm_to_basic)

Arm in position Arm in position Arm in position

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 95


5.8 Tool Magazine

Functions:
• Positioning of a tool magazine with a PLC axis (Toolmag1.src)
• Positioning of a tool magazine with counting pulse control (Toolmag2.src)

The tool magazine can be positioned by pressing external keys or by a TOOL DEF or a
TOOL CALL. When called by the NC program a direction logic controls the movement so
that the shortest path is used.
As soon as the target position is reached a 2nd redundant counter is evaluated.
In the event of an error referencing must be repeated.

5.9 Loading the Tool Magazine

Functions:
• Move the tool magazine by keys.

With the "Turn magazine" button the desired pocket can be selected for loading.
Press the button briefly to rotate the magazine by exactly one pocket at a time.
Otherwise the magazine rotates continuously until you release the button.

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 96


5.9.1 Sequence of actions (magazine as asynchronous axis)

Magazine waiting position


00
(LBL TC_mag_start)

Ready for operation


NC-STOP Manual/automatic
Change of magazine movement requested
operating mode
Time-out
Confirm ToolDef
01 (LBL Tool_def_quit)

ToolDef confirmed

Fold in magazine pocket


02 (LBL Pocket_put_in)

TC_pocket_out_90_deg = &active
Magazine folded in?
03
(LBL Pocket_pos_in)

Magazine folded in

Start magazine
04 (PLC positioning)
(LBL S_start)

Magazine in noml. position?


05
(LBL T_mag_in_position)

Magazine in noml. position

Finding the magazine pocket


06
(LBL Decode_P_no)
TC_pocket_out_90_deg = &active

Tool status request (excess length)


07 (LBL Standby_T_read)

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 97


Fold out magazine
08 (only if tool has not excess length)
(LBL T_mag_in_position)

Status request finished

Magazine pocket folded in/out?


09
(LBL Pocket_posit)

Magazine folded in Magazine folded out


(Tool with excess length) (Tool without excess length)

Magazine END
10 (only for tools w/o excess length)
(LBL TC_magazine_end)

Reset chain of steps


(LBL TC_magazine_reset)

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 98


5.9.2 Sequence of actions (magazine with counting pulse control)

Ready for operation


Magazine waiting position
NC-STOP 00
(LBL TC_mag_start)
Change of
operating mode
Time-out Manual/automatic
magazine movement re-
quested

Confirm ToolDef
01 (LBL Tool_Def_quit)

ToolDef confirmed

Fold out magazine pocket


02 (LBL Pocket_put_in)

TC_pocket_out_90_deg = &active
Magazine folded in?
03
(LBL Pocket_pos_in)

Magazine folded in

Determine direction of rotation of


04
magazine
(LBL S_start)

Unlock lock pin


05
(LBL Lock_pin_out)
TC_magazine_lock_pin = active

Lock pin unlocked?


06
(LBL Lock_pin_pos_out)

Lock pin is unlocked

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 99


Magazine positioning
- Start magazine
- Magazine velocity
Rapid traverse:
Magazine positioning
07 Noml. pos. – Actl. position > 1
(counting pulse control)
Creep rate:
(LBL Magazine_NOM_pos)
Noml. pos. – Actl. position <= 1

Magazine at nominal position Nominal position reached


- Stop magazine

Waiting time to start positioning


08
(LBL Time_exact_stop)

TC_magazine_lock_pin = active
Waiting time expired

Lock pin locked?


09
(LBL Lock_pin_pos_in)

Lock pin is locked

Check of magazine position


10
(LBL Mag_exact_stop)
TC_pocket_out_90_deg = &active

Magazine in position

Tool status request (excess length)


11 (LBL T_Vorwahl_Status)

Fold out magazine


12 (only for tools without excess length)
(LBL Pocket_in_out)

Status request finished

Magazine pocket folded in/out?


13
(LBL Pocket_posit)

Magazine folded in Magazine folded out


(Tool with excess length) (Tool without excess length)

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 100


Magazine END
14 (only for tools without excess length)
(LBL TC_magazine_end)

Reset chain of steps


(LBL TC_magazine_reset)

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 101


5.10 Tool Change Service

Functions:
• Execution of individual functions of the tool changer
• Monitoring of the basic position of the tool changer
• Non-volatile storage of outputs

With the HELP soft key a *.hlp file is activated to carry out individual functions of the tool
changer. This may be required if a tool change was aborted and the magazine must be brought
to basic position, or if an adjustment needs to be performed. The movements may be performed
continuously or in the jog mode. When the nominal position is reached and the related encoder
sends a confirmation, the message "FUNCTION OK!" is displayed.

Outputs whose last logic state must be retained when the power is switched off, must be
programmed non-volatile in the subdirectories "LBL Output_restore" and "LBL Output_backup".

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 103


5.11 Signal States during Tool Change

Logic diagrams of different tool-change variants (dual gripper)

M1100/M1101/M1102 = Bit 0/1/2 of W262 (pocket number)


M1120/M1121/M1122 = Bit 0/1/2 of W264 (tool number)

Tool-change sequence Tauto - Tauto (T2 J T1)

W262=2

W264=1/0/1

Tool-change sequence Tauto - T0 (T1JT0)

W262=1

W264=0

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 104


Tool-change sequence T0 - Tauto (T0 J T1)

W262=1

W264=1/0/1

Tool-change sequence Tauto - Tman (T1 J T3)

W262=1/-1

W264=0/3/0

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 105


Tool-change sequence Tauto - Tspecial (T1 J T3)

W262=3/1

W264=3/0/3

Tool-change sequence Tspecial - Tauto (T3 J T1)

W262=1/3

W264=1/0/1

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 106


6 Variants of Emergency Stop End Positions

1
24 V 24 V
EMERGENCY STOP EMERGENCY STOP

i a i a
24 V
End Position X End Position X
b e

24 V
End Position Y End Position Y
c f
24 V
End Position Z End Position Z
d g

K1 K1

Variant A Variant B
Emerg. stop end positions: Coded Emerg. stop end positions: Not coded

Legend:

a) I_emergency_button_unlocked
b) I_X_not_overtravelled
c) I_X_Y_not_overtravelled
d) I__X_Y_Z_not_overtravelled
e) I_end_posit_axis_X
f) I_end_posit_axis_Y
g) I_end_posit_axis_Z
h) I_guard_closed_locked
i) O_axes_motion_from_end_position

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 107


7 Test Functions of the Basic Circuit Diagram

Basis: HEIDENHAIN PLC basic program

The status of the inputs can be checked by means of the PLC table function.

Drive system: Modular structure with HEIDENHAIN UV and UM

The following LEDs of the UV are lit (all other LEDs are off):
U DC-LINK ON , READY, AXES, SPINDLE; in addition POWER MODULE READY of UV 120/140

LEDs of the UM units


I3 I32
(no clamped axes)

READY SH1 SH2

Control (and machine)


1 1 ⊗ Ο Ο
in operation

Press EMERGENCY STOP 0 0 Ο Ο ⊗

Release EMERGENCY STOP 0 0 Ο Ο ⊗

Control voltage ON 1 1 ⊗ Ο Ο

Press hardware limit switch


0 0 Ο Ο ⊗
(axis end pos.) for all axes

Control voltage ON 1 1 ⊗ Ο Ο

Working space: Unlock door 1 0 Ο Ο ⊗

Handwheel: Press permissive


1 1 ⊗ Ο Ο
buttons

Set marker that generates an


0 0 Ο Ο ⊗
EMERG. STOP via the PET table

Notes → see last page!

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 109


Drive system: HEIDENHAIN compact inverter UE 2xxB

The following LEDs of the UE 2xxB are lit (all other LEDs are off):
U DC-LINK ON , READY, PULSE RELEASE AXES, PULSE RELEASE SPINDLE and ...

Axis-specific LEDs
I3 I32 X111, X112, ...
(no clamped axes)

READY SH1 SH2

Control (and machine)


1 1 ⊗ Ο Ο
in operation

Press EMERGENCY STOP 0 0 Ο Ο ⊗

Release EMERGENCY STOP 0 0 Ο Ο ⊗

Control voltage ON 1 1 ⊗ Ο Ο

Press hardware limit switch


0 0 Ο Ο ⊗
(axis end pos.) for all axes

Control voltage ON 1 1 ⊗ Ο Ο

Working space: Unlock door 1 0 Ο Ο ⊗

Handwheel: Press permissive


1 1 ⊗ Ο Ο
buttons

Set marker that generates an


0 0 Ο Ο ⊗
EMERG. STOP via the PET table

Notes → see last page!

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 110


Drive system: HEIDENHAIN compact inverter UE 2xx

The following LEDs of the UE 2xx are lit (all other LEDs are off):
U DC-LINK ON , +5V, PULSE RELEASE AXES, PULSE RELEASE SPINDLE and ...

Axis-specific LEDs
I3 I32 AXIS 1, AXIS 2, ...
(no clamped axes)

READY RESET

Control (and machine)


1 1 ⊗ Ο
in operation

Press EMERGENCY STOP 0 0 ⊗ ⊗

Release EMERGENCY STOP 0 0 ⊗ ⊗

Control voltage ON 1 1 ⊗ Ο

Press hardware limit switch


0 0 ⊗ ⊗
(axis end pos.) for all axes

Control voltage ON 1 1 ⊗ Ο

Working space: Unlock door 1 0 ⊗ ⊗

Handwheel: Press permissive


1 1 ⊗ Ο
buttons

Set marker that generates an


0 0 ⊗ ⊗
EMERG. STOP via the PET table

Notes → see last page!

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 111


Notes:

- The LEDs must be lit as marked in the list!

- In the case of an EMERGENCY STOP no delay is permissible for switching off the input I32 ;
it must become zero immediately.
J The axes are braked by the CCU when the current limit is reached (the current limit is
steeper than the ramp that is used for braking in normal operation; MP1060. Braking is
executed by the MCU in this event.

- With EMERGENCY STOP the servo amplifiers switch from READY to SH2 after a certain delay
time.
Therefore, for a short time the servo amplifiers are still in a position to brake the motors.

- With the servo amplifier for the spindle the LEDs for READY and SH2 may be lit simultaneous-
ly, if. e.g. no M-function is active.
With clamped axes both LEDs may be lit at a time, too.

- With the analog interface HEIDENHAIN control → SIEMENS drive the pulse enable (drive
enable) is removed by an EMERGENCY STOP. → The drive logic is responsible for braking.

- For the holding brakes of the axes a PLC output must be used that can be switched off by
an EMERGENCY STOP (i.e. do not use O24 to O30)!

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 112


8 Basic Circuit Diagram

DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 113


DR. J. HEIDENHAIN GmbH Documentation PLC Basic Program 114

You might also like