This Technical Manual for the HEIDENHAIN TNC 122 straight cut control applies for the
NC software version 246 117 08 and is subject to change without notice.
Page 3
Foreword
The HEIDENHAIN TNC 122 is a compact, three-axis straight cut control for machine tools with
central drive. It has been developed as the successor model for the TNC 121, to which it is
compatible for installation. The TNC 122 has an expanded range of functions.
This Technical Manual is intended for all machine tool builders and machine tool distributors, and for
retrofitting companies who wish to replaced an installed TNC 121 with a TNC 122. It provides the
information required for mounting, electrical connection and commissioning the control.
For information on the new and improved operating features, please refer to the User's Manual.
Languages
Max. traverse
Max. traversing speed
Position encoders
PLC cycle time
Control inputs
Control outputs
Data interface
Straight cut control for 3 axes
and paraxial positioning
Memory for up to 500 NC blocks,
20 NC programs
Compact control for panel mounting
7-segment LED for actual position display
LED dot matrix 5 x 7 for preset display
One tool for length and radius compensation
Manual operation
Positioning with manual data input
Program run single block
Program run automatic
Programming and editing
Manually through TNC keyboard
Through RS-232-C/ V.24
1 µm or 5 µm (0.000 05 in., 0.000 2 in.)
Nominal position in absolute or incremental dimensions
Subprograms, program section repeats
Tool radius compensation R+/RBolt-hole circle, hole circle segment, linear hole pattern
Feed rate / rapid traverse
M functions
Dutch, English, French, German, Spanish
± 9999.999 mm
30 000 mm/min
Incremental HEIDENHAIN position encoders, optionally
with distance-coded reference marks
16 µA
Grating Periods: 4, 10, 20, 40, 100, 200 µm
24 ms
3 position encoder inputs (sinusoidal inputs)
15 PLC inputs +1 PLC input for a control-is-ready
acknowledgment
One analog output (for central drive)
15 PLC outputs + 1 PLC input for control-is-ready signal
RS-232-C/ V.24, up to 38 400 baud
/40 µAPP selectable
PP
4TNC 1221 Specifications4/97
Page 6
Power supply
Power consumption
Ambient requirements
Weight
Primary-clocked power supply 100 V to 240 V
19 W
Operation : 0° to +45° C
Storage : –30° to +70° C
Relative humidity, mean annual: < 75%, for max. 30 days
per annum, naturally distributed: < 95%
Approx. 3 kg
4/97TNC 1221 Specifications5
Page 7
2 Hardware
Id. Nr. 284 083 xx
3 Software
Software versions
The NC software 246 117 07, together with the PLC software 277 938 13 of the TNC 122 replaces
the following software versions of the TNC 121:
Software Version of TNC 121
205 438
205 443
205 444
205 446
205 455
205 456 unipolar standard
205 457 bipolar standard
205 430
6TNC 1222 Hardware4/97
Page 8
4 EPROM Sockets
IC-P1 NC
IC-P2 PLC
The PLC EPROM is a 2 MB or 4 MB chip.
Danger of electrical shock!
Unplug the power cord before opening the housing.
Danger to internal components!
When handling components that can be damaged by electrostatic discharge (ESD),
observe the safety recommendations in DIN EN 100 015. Use only antistatic packaging
material. Be sure that the work station and the technician are properly grounded during
installation.
4/97TNC 1224 EPROM Sockets7
Page 9
5 Power Supply
The voltage must comply with specifications:
ComponentPower supplyVoltage rangeMax. power
Power consumption
consumption
NCPrimary clocked
power supply
100 – 240 V
(–15% to +10%)
—Approx. 19 W
48 – 62 Hz
PLC24 V
(with basis
insulation
according to
Lower limit
20.4 V__....
Upper limit
31 V __....
1)
Max. 10 mA per input
Max. 100 mA per output
EN 50 178)
1)
Voltage surges up to 36 V __.... for t < 100 ms are permissible.
All small contactors and relays must have a quenching diode.
PLC power supply
The PLC (PLC inputs and outputs) of the TNC 122 is powered from the 24 V machine control voltage
supply.
Danger to internal components!
Connect inductive loads only with a quenching diode parallel to the inductance.
Superposed AC components as they arise from a three-phase bridge rectifier without smoothing
(see DIN 40110/1075, Section 1.2) must not exceed 5%. This results at the upper limit in the
absolute value 33.4 V and at the lower limit the absolute value of 18.5 V.
U
32.6 V
31 V
20.4 V
18.5 V
t
To increase the noise immunity, connect the ground terminal on the rear panel to the
central ground point of the machine.
(Minimum cross-section: 6 mm
The 0 V line of the PLC power supply must be grounded with an earth lead (∅≥ 6 mm
2
)
2
) to the main
frame ground of the machine.
8TNC 1225 Power Supply4/97
Page 10
4/97TNC 1226 Grounding Diagram9
Machine-Encoders
321
6 Grounding Diagram
Line voltage
100 - 240V
Line frequency
50 - 60 Hz
PLC supply voltage
with basic insulation
3
X51
TNC 122
L1
N
PE
+24V-
0V
X1X2X3
SI
SI
1
stab. power
supply
0V
X21
Adapter
V.24
X41/23
Motor controller
with nominal value
0V
difference input
Pot. for
feed rate
X41/9
X41/33
0V +24V-
15 outputs
0,1A
EMERGENCY STOP
0,1A
16 inputs
X41
X41/10
X41
6mm
Optoc.
SI
2
B
1
0
6mm
6mm
6mm
6mm
2
2
2
2
C
C
Test point 1
(Fault voltg. 0V/
housing)
V
C
L
C
L
B
X41/22
V
Test point 2
(Fault voltg. with
grounded nominal
value input)
X41/48
X41/24
X41/47
CC
If nominal value input is grounded,
a ground loop will result. Therefore
be sure that 0 V and ground wire
are short and configured for low noise.
17O3 Output for Z axis enable18
18O2 Output for Y axis enable20
19O1 Output for X axis enable22
20O0 Output for Manual operating mode16
21not assigned
22
0 V
Analog voltage8
23+/– 10 V Analog voltage (depending on MP 70)9
24Feed rate override (wiper
ended, acknowledge with M36)
28I3 Input for control-is-ready acknowledgment
29I4 not assigned
30I5 not assigned
31I6 High=M23/ Low=M33
32I7 High=M28/ Low=M29
330 V PLC6
12TNC 1228 Pin Layout4/97
Page 14
X41TNC 122Connection-assignmentTNC 121
continued
The assignments are in accordance with the PLC Standard Program Id. Nr. 277 938 13!
ContactContact
34O14 M04 right spindle ON/ M05 OFF or High=M16/
Low=M17
35O12 M08 coolant ON/ M09 OFF
36O10 High=M22/ Low=M23 or M09
37O8 High= M26/ Low=M27
38O6 High=M32/ Low= M33
3924 V for neg. traverse direction output12
4024 V for rapid traverse output10
4124 V for Z axis enable output17
4224 V for Y axis enable output19
4324 V for X axis enable output21
4424 V for “manual“ / “not manual“ output15
45“Not manual” output (inverted O0)14
46not assigned
47Feed rate override 0 V3
48Feed rate override 15 V5
The 24 Vdc power supply is monitored for reverse polarity and overvoltage. Reverse
polarity blows a fuse (F 2.0 A). Overvoltage above 47 V destroys the damping diode and
blows the fuse. Maximum current load is 300 mA.
PLC outputs: Inductive loads are permitted only with anti-surge diode!
Change of the I/O assignment only if Program 205 430 is active:
With the M functions M02 an M30 the output is switched to zero. Through the M function M36 the
output O5 is switched to 1 and is used to start the erosion process. Through input I2 the function
M36 is acknowledged and indicates that erosion has ended. In this case the feed-rate potentiometer
is without function.
4/97TNC 1228 Pin Layout13
Page 15
Installation of the Potentiometer:
6OLGHU
6OLGHU
Internal-source voltage for pot
External-source voltage for pot
14
TNC 1228 Pin Layout4/97
Page 16
X21 Data Interface
The TNC 122 is equipped with an RS-232-C/V.24 data interface for operation in FE or EXT mode (see
the User's Manual). Programs and a list of the machine parameters can be output though this
interface. An RS-232-C adapter must be provided for a peripheral unit, such as a PC, FE 401, or
printer, to be connected to the control panel. The following drawing illustrates how to connect the
adapter block to X21.
HEIDENHAIN guarantees that, if properly connected, the RS-232-C/V.24 serial interface will reliably
transmit data between the TNC and a peripheral unit up to a distance of 20 meters.
HEIDENHAIN provides a standard cable 3 meters in length (Id.-Nr. 274 545 01) for connecting
peripheral units.
The data format in FE and EXT mode is fixed at 7 data bits, 2 stop bits and even parity. The FE mode
operates with ACK/NAK handshake, the EXT mode with DC1/DC3 handshake and RTS/CTS. The
data transfer rates are 9600 baud in FE mode and 2400 baud in EXT.
Peripheral
unit
GND
TXD
RXD
RTS
CTS
DSR
GND
DTR
3 m
Id.-Nr. 274 545 01
WH/BNWH/BNWH/BN
•
1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
•
7
8
9
10
11
12
13
14
15
16
17
18
19
20
•
WH/BN
GN
YL
GY
PK
BL
RD
BN
V.24-Adapter Block
Id.-Nr. 239 758 01
•
•
•
•
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
10
10
11
11
12
12
13
13
14
14
15
15
16
16
17
17
18
18
19
19
20
20
•
1
••
2
3
4
5
6
7
8
9
10
10
11
11
12
12
13
13
14
14
15
15
16
16
17
17
18
18
19
19
20
20
Id.-Nr. 239 760..
•
1
2
3
4
5
6
7
8
9
max. 17 m
YL
GN
PK
GY
BN
RD
BL
•
1
•
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
10
10
11
11
12
12
13
13
14
14
15
15
16
16
17
17
18
18
19
19
20
20
X21 RS-232-C/V.24
GND Chassis
RXD Receive data
TXD Transmit data
CTS Clear to send
RTS Request to send
DTR Data terminal ready
GND Signal ground
DSR Data set ready
The interface complies with the recommendations in EN 50 178 for separation from line
power.
4/97TNC 1228 Pin Layout15
Page 17
9 Machine Integration
9.1 Encoders
You can continue to use the same incremental position feedback encoders on the TNC 122, as you
used on the TNC 121.
Signal period
The signal period of the linear encoder is entered in machine parameter MP330.x (in µm). On linear
encoders with sinusoidal output signals, the signal period is the same as the grating period:
Signal period (~) = Grating period
The standard linear encoders from HEIDENHAIN have a grating period of 20 µm. Older encoders
have a grating period of 40 µm.
If linear position feedback is carried out with a rotary encoder on the ballscrew, then to calculate the
signal period you must consider not only the line count of the encoder (see the technical data for the
encoder) but also the pitch of the ballscrew:
Signal period (~) =
MP330
MP330.0Axis 1
MP330.1Axis 2
MP330.2Axis 3
Machine parameter MP7320 can set the encoder amplitude so that older encoder models (on
machines with TNC 121) can be adapted to the TNC 122.
MP7320
Signal period
Input values: 4, 10, 20, 40, 100, 200 [µm]
Switchover of encoder input amplitude
Input values: 0 to 7
Bit 0Axis X+0 = 16 µA
Bit 1Axis Y+0 = 16 µA
Bit 2Axis Z+0 = 16 µA
Screw pitch [mm] · 1000 [µm/mm]
Line count
+1 = 40 µA
+2 = 40 µA
+4 = 40 µA
16TNC 1229 Machine Integration4/97
Page 18
Traverse direction
Machine parameters MP210 and MP1040 define the axis traverse direction. The traverse directions
for the axes on numerically controlled machine tools are specified in DIN.
MP210 defines the counting direction of the encoder signals. The counting direction depends on the
mounting configuration of the encoders.
MP210
MP1040 defines the polarity of the nominal voltage for positive direction of traverse.
MP1040
Assignment of encoder inputs
The individual axes can be assigned to the encoder inputs X1 to X3 with machine parameter MP110.
MP110
Counting direction of encoder signals
Input values: 0 to 7
Bit 0Axis X+0 = positive
+1 = negative
Bit 1Axis Y+0 = positive
+2 = negative
Bit 2Axis Z+0 = positive
+4 = negative
Polarity of the nominal voltage with positive direction of traverse
Input values: 0 to 7 (must be "0" if MP70 is on "1" or "2")
Bit 0Axis X+0 = positive
+1 = negative
Bit 1Axis Y+0 = positive
+2 = negative
Bit 2Axis Z+0 = positive
+4 = negative
Assignment of axes to encoder inputs
Input values: 0 to 2
0 = encoder input X1
1 = encoder input X2
2 = encoder input X3
MP110.0Axis 1
MP110.1Axis 2
MP110.2Axis 3
9.2 Traverse Ranges
The traverse ranges are set with machine parameters. The traverse ranges are defined by software
limit switches. The input values for the software limit switches are based on the scale datum.
If the machine moves to a software limit switch, the following error message appears:
LIMIT SWITCH <axis>...
and the corresponding marker is set (M2624 to M2629).
For workpiece machining, the datum setting procedure assigns a unique position value (coordinate)
to each axis position. Since the actual position values are generated incrementally by the encoder,
this relationship between axis positions and position values must be restored each time the power is
interrupted.
HEIDENHAIN linear encoders are provided with one or more reference marks. When a reference
mark is traversed, a signal is generated that identifies that position as a reference point. After a
power interruption, crossing over the reference marks will restore the relationship between axis
slide positions and position values that was last established through the datum setting procedure.
Crossing over the reference marks also restores all machine-based references.
Since it is inconvenient to move the axes over large traverses to restore the reference point,
HEIDENHAIN recommends position encoders with distance-coded reference marks. On these
encoders the absolute position value is available after crossing two reference marks.
18TNC 1229 Machine Integration4/97
Page 20
9.3.1 Traversing the Reference Marks
The reference marks of the axes should be traversed after the control is switched on. Machines
with the TNC 121 are usually equipped with scales that have a reference mark at each end. To
prevent the software limit switch ranges from being shifted, always traverse the reference mark
upon which the software limit switches are based.
If referencing is not desired, it can be deactivated with machine parameter MP1340.x or by pressing
the NO ENT key.
To traverse the reference marks, press the machine axis direction buttons. The sequence of axes is
determined by the user.
When the reference marks are crossed over,
the software limit switches are activated
•
the datum point last set is restored
•
If the position encoders have distance-coded reference marks, the machine datum is based on the
scale reference point (on linear encoders the scale reference point is the first reference mark after
the start of the measuring length; on angle encoders the scale reference point is marked).
Manual execution (standard process)
The reference mark is traversed with the axis-direction keys.
Automatic execution (not in TNC 122)
The direction of traverse and the speed when crossing over the reference marks is defined with
machine parameters (MP1320.x, MP1330.x). The sequence of functions when crossing over the
reference marks can be defined separately for each axis with MP1350.x.
A trip dog for the reference end position is necessary to prevent the traverse range from being
exceeded when the reference marks are crossed over. Install the trip dog at the end of the traverse
range. The trigger signal line from the trip dog is connected to a vacant PLC input. In the PLC
program, this PLC input is combined with the markers for “Reference end position” (M2556 to
M2558)
Encoders with distance-coded reference marks
Machine parameter MP1350.x=0
Reference marks
Trip dog
Closed
Open
Traverse direction MP1320.x
4/97TNC 1229 Machine Integration19
"Reference end position"
Page 21
Sequence for “Automatic reference mark traverse” (pressing the machine START key).
MP1350.x = 0
Press the external START key
NoYes
"Reference end position"
Machine moves
in direction from
MP1320.x
Trip dog
"Reference end position" is
closed before two successive
reference marks are
traversed
No
Two successive reference marks traversed
Trig dog
closed?
Ye s
Machine moves in inverted
traverse direction from
MP1320.x
Is the machine
outside the software
limit switch range?
No
Machine stops
software limit switch
Ye s
Machine moves to
20TNC 1229 Machine Integration4/97
Page 22
Encoders with one reference mark
Machine parameter MP1350.x = 1
Reference marks
Closed
Open
Trip dog
"Reference end position"
Traverse direction MP1320.x
4/97TNC 1229 Machine Integration21
Page 23
Sequence for “Automatic reference mark traverse” (pressing the machine START key).
MP1350.x = 1
Press the machine START key
NoYes
Machine moves
in direction from
MP1320.x
Trip dog
"Reference end position"
is closed before reference
mark is passed over
No
Reference mark is passed over
Trip dog
"Reference end position"
closed?
Ye s
Machine moves in
inverted direction from
MP1320.x
Is the machine
outside the software
limit switch range?
No
Machine stops
software limit switch
Ye s
Machine moves to
22TNC 1229 Machine Integration4/97
Page 24
MP1320Traverse direction for crossing over the reference marks with EXT start
Input values: 0 to 7
Bit 0Axis X+0 = positive
+1 = negative
Bit 1Axis Y+0 = positive
+2 = negative
Bit 2Axis Z+0 = positive
+4 = negative
MP1330Feed rate for crossing over the reference marks
Entry range: 80 to 30 000[mm/min]
MP1330.0 Axis X
MP1330.1 Axis Y
MP1330.2 Axis Z
MP1340Sequence when crossing over the reference marks
Input values: 0 = no reference mark evaluation
1 = 1st axis
2 = 2nd axis
3 = 3rd axis
MP1340.0 Axis X
MP1340.1 Axis Y
MP1340.2 Axis Z
MP1350Sequence for crossing over reference marks
Input values: 0 = encoder with distance-coded reference marks
1 = encoder with one reference mark
MP1350.0 Axis X
MP1550.1 Axis Y
MP1350.2 Axis Z
SetReset
M2556Reference end position for axis XPLCPLC
M2557Reference end position for axis YPLCPLC
M2558Reference end position for axis ZPLCPLC
4/97TNC 1229 Machine Integration23
Page 25
9.4 Position Feedback Control of the NC Axes
The TNC 122 operates according to the principle of closed-loop control with servo lag. Servo lag
means that there is always a difference (trailing error) between the nominal position commanded by
the NC and the actual position of the axes. Closed-loop control would not be possible without this
difference.
The k
factor (position loop gain) must be matched to the machine (see also “Characteristic kink”). If
v
a very high k
machine axis. If the k
The maximum feed rate (not the rapid traverse) is defined in machine parameter MP1010.0–2. It
represents the feed rate at an analog voltage of 11 V at the servo input.
The acceleration can be entered in machine parameter MP1060.x. It determines the ramp gradient
of the rising edge (MP1060.0–2) and the approach to the position (MP1060.3–5).
To improve the positioning behavior, machine parameter MP1051.x can be used to define a bottom
voltage below which the control will not go.
When the axis is in position (the positioning window has been reached) the “axis in position” marker
is set. The PLC program must then disable the position controller for the axes to come to a stop.
factor is chosen the servo lag will be very small, but this may cause oscillations in the
v
factor is too small, the new position will be reached too slowly.
v
The optimum k
behavior at different k
factor must be determined empirically. The following diagram illustrates traversing
v
factors:
v
U [V]
kv correct
kv too large
kv too small
MP1810
MP1060.0-2
MP1060.3-5
t [s]
The kv factor (MP1810) is generally determined by the maximum feed rate of the machine (MP1010)
and the servo lag according to the following formula:
Ve
=
k
k
v
s
a
= position loop gain [
v
ve = maximum feed rate [
= servo lag [mm]
s
a
m/min
mm
m
min
]
]
or
Ve
s
=
a
k
v
24TNC 1229 Machine Integration4/97
Page 26
Rapid traverse control
For operation at rapid traverse, both programmed and manually actuated, MP80 determines the
analog supply voltage for the motor controllers. The machine's circuit diagram will indicate whether
the controller input should be supplied by external analog voltage or the analog voltage of the
control, and whether amplified tachometer signals are used.
Programming of rapid traverse: Select the axis, enter the value, press and hold the machine rapid
traverse button, confirm by pressing the "ENT" key.
External analog voltage for rapid traverse at the controller input (MP80 =1):
If MP80 = 1, the controller will be switched to external analog voltage supply when the machine
axes are moving at rapid traverse. The control loop remains closed although the control is not
monitoring it. The control does not begin monitoring the loop until the axis comes within a certain
distance to the target position. This distance is defined in MP4210 and is transmitted to the PLC. To
resume feedback control, the PLC resets the "rapid traverse" output (X41, pin 16).
In order to ensure that servo lag monitoring does not respond during rapid traverse, the control
operates internally with a rapid traverse from MP1010.3-5 and a “servo lag” is internally adjusted
such that it remains within the permissible range of servo lag monitoring (floating nominal value).
The servo lag internal adjustment is defined with machine parameter MP1850 such that no
oscillations result. The rapid traverse in MP1010.3-5 must correspond with the actual rapid traverse.
The correct setting for the internal adjustment can be checked in a special display (activated with
MP7322) showing the actual feed rate, the analog voltage of the control and the internal nominal
servo lag as a percentage of the actual servo lag.
If the display sways between 80% and 120% this results in oscillations within the control. These
oscillations can be prevented by properly setting MP1850. The setting in MP1010.x is correct if the
display remains stable at approx. 100%. The behavior of the floating nominal value can also be
measured at the analog output with an oscilloscope.
Analog voltage of the control for rapid traverse at the servo input of (MP80 = 2):
If the feedback input is supplied from the control during rapid traverse and the tachometer voltage
must be switched, then enter the value 2 in MP80. In MP1010.3-5 enter the same rapid traverse
rate as the machine had with the TNC 121.
MP1010Feed rate at 10 V analog voltage
Input: 80 to 30 000 [mm/min]
MP1010.0Axis X
MP1010.1Axis Y
MP1010.2Axis Z
Rapid traverse for amplified tachometer signals or external rapid traverse voltage
Input range: 80 to 30 000 [mm/min]
MP1010.3Axis X
MP1010.4Axis Y
MP1010.5Axis Z
4/97TNC 1229 Machine Integration25
Page 27
MP1050Analog voltage for rapid traverse
Input range: 4.5 to 11.0 [V]
MP1050.0Axis X
MP1050.1Axis Y
MP1050.2Axis Z
MP1051Lower limit of analog voltage
Input range: 0 to 35 [transformer increment]
(1 transformer increment = 2.93 mV)
MP1051.0Axis X
MP1052.1Axis Y
MP1053.2Axis Z
MP70Bipolar or unipolar analog voltage
Input: 0 or 2
0 = bipolar
1 = unipolar, traversing the position outputs 0 volt
2 = unipolar, traversing the position inverts the voltage
MP80Supply voltage for position controller during rapid traverse
Input range: 0 to 2
0 = Reserved
1 = Controller input supplied with external voltage (MP1850)
2 = Controller input supplied with analog voltage from the control
MP1060Acceleration during position approach
Input range: 0.001 to 3.0 [m/s
2
]
MP1060.0Axis X
MP1060.1Axis Y
MP1060.2Axis Z
Deceleration during position approach
Input range: 0.001 to 3.0 [m/s
2
]
MP1060.3Axis X
MP1060.4Axis Y
MP1060.5Axis Z
MP1810k
factor
v
Input range: 0.10 to 10.00 [
m/min
mm
]
MP1810.0Axis 1
MP1810.1Axis 2
MP1810.2Axis 3
26TNC 1229 Machine Integration4/97
Page 28
MP1850Proportion for internal adjustment of servo lag (if MP80 = 1)
Input range: 0 to 65535
Characteristic kink
To enable correct processing of the internal nominal value on machines that have a high rapid
traverse speed, the k
In such cases a characteristic kink can be entered, providing the following advantages:
factor must be adjusted to this speed range.
v
• a normal k
• a separate k
The position of this characteristic kink is defined in machine parameter MP1830. In the upper range
the k
v
U [V]
MP1830
The kink point must lie above the range of machining feed rates. Under these conditions the lag can
be calculated as follows:
Ve
s
=
a
k
100 [%] MP1820 · 100 [%]
factor for the machining feed rate
v
factor for rapid traverse
v
factor is multiplied by the factor in MP1820.
9
MP1810 · MP1820
MP1810 (= kv)
MP1830 [%] + 100 [%] – MP1830 [%]
·
[
v
sa
]
MP1820Multiplication factor for the kv factor
Input range: 0.001 to 9.000
MP1820.0Axis X
MP1820.1Axis Y
MP1820.2Axis Z
MP1830Characteristic kink
Input range: 0.000 to 100.000 [%]
MP1830.0Axis X
MP1830.1Axis Y
MP1830.2Axis Z
4/97TNC 1229 Machine Integration27
Page 29
Offset compensation
An offset error can be compensated. An offset error exists if the axis drifts when the controller input
is supplied with 0V analog voltage. If the axis does drift, an offset voltage must be output to prevent
the drifting. To define the analog offset voltage, press MOD and enter the code number 75 368 to
call the “AV OFFSET” dialog prompt. The optimum input value (a multiple of 2.93 mV = 1
transformer step) must be determined empirically. Before this, the bottom voltage must be set to
zero with MP1051. For bipolar drives, enter the proper algebraic sign for the voltage.
Feed rate enable
It is only possible to move the axes if the feed rate enable is present in marker M2451 and
complementary marker M2467. If the feed rate enable is removed, the analog voltage output is 0 V
and the axes stop moving immediately.
When the axes have reached the defined positioning window (MP1030.x), the “Axis in position”
markers are set by the NC. This is also done when the control voltage is switched on.
The markers will only be reset by the NC if the axes leave the positioning window when being
traversed. This also applies when the reference marks are crossed over.
SetReset
M2008Axis X in positionNCNC
M2009Axis Y in positionNCNC
M2010Axis Z in positionNCNC
Open the control loop
In order to lock or disengage an axis, the control loop must be opened by the PLC. As soon as the
“Axis in position” markers (M2008 to M2010) are reset, the control loop must be closed again so
that the axis can be moved. Before the control loop is closed, an actual and nominal value transfer
must be performed.
SetReset
M2544Open control loop axis XPLCPLC
M2545Open control loop axis YPLCPLC
M2546Open control loop axis ZPLCPLC
Actual/nominal value transfer
If markers M2552 to M2554 are set, the momentary actual position value is taken as the nominal
position value.
SetReset
M2552Actual/nominal value transfer axis XPLCPLC
M2553Actual/nominal value transfer axis YPLCPLC
M2554Actual/nominal value transfer axis ZPLCPLC
28TNC 1229 Machine Integration4/97
Page 30
9.5 Monitoring Functions
The NC monitors the axis positions and the dynamic behavior of the machine. If the fixed values in
the machine parameters are exceeded, an error message is displayed and the machine is stopped.
Position, standstill and movement are monitored.
Position monitoring
Machine parameters MP1720.x determine the range for the continuous position monitoring of the
machine (servo lag monitoring). Monitoring goes into effect as soon as the axes are under control of
the position control loop. If the limits in MP1720 are exceeded, the following blinking error message
appears:
POS. ERROR A <axis>
The control must be switched off to correct this error. Realistic input values are approximately 1 to
1.4 times the servo lag at rapid traverse.
MP1720
Movement monitoring
At short intervals (several control cycles) the path actually traversed is compared with the nominal
path as calculated by the NC. If the path traversed during this interval deviates from the calculated
path, the following blinking error message will appear:
Movement monitoring is not active below the voltage entered in machine parameter MP1140.
If 12 [V] is entered in this machine parameter, no movement monitoring will be in effect.
It is not possible to safely operate the machine without movement monitoring.
MP1140
Standstill monitoring
This monitoring goes into effect when the axes have reached the positioning window. The range
within which the axes may move is defined in MP1110. As soon as the position deviation is larger
than the value in MP1110, the following blinking error message is displayed:
The message will also appear during approach to a target position if an overshoot is larger than the
value entered in MP1110, or if the axis moves in the opposite direction at the beginning of a
positioning move.
Position monitoring
Input range: 0.001 to 200.000 [mm]
POS. ERROR C <axis>
Movement monitoring
Input range: 0.03 to 12.00 [V]
POS.ERROR D <axis>
MP1110
Positioning window
The positioning window defines the range within which the control considers a position to have
been reached. When the position has been reached, the control starts the execution of the next
block. The size of the positioning window is defined in MP1030.x.
4/97TNC 1229 Machine Integration29
Standstill monitoring
Entry range: 0.001 to 30.000 [mm]
Page 31
When the axes reach the positioning window, markers M2008 to M2010 are set.
MP1030
Positioning window
Entry range: 0.001 to 2.000 [mm]
MP1030.0Axis X
MP1030.1Axis Y
MP1030.2Axis Z
Encoder monitoring
Monitoring of the encoder signals must be activated with MP31.
If the signal amplitude is faulty the following error messages can appear:
ENCODER <axis> DEFECTIf the signal amplitude is no longer being evaluated
AMPL <axis> TOO SMALLIf the signal amplitude is too small
OVERLOAD <axis>If the signal amplitude is too large
MP31
Monitoring of the amplitude of the encoder signals
Input values: 0 to 7
Bit 0Axis X+0 = no monitoring
+1 = monitoring active
Bit 1Axis Y+0 = no monitoring
+2 = monitoring active
Bit 2Axis Z+0 = no monitoring
+4 = monitoring active
30TNC 1229 Machine Integration4/97
Page 32
9.6 Display and Operation
The position display can be set with MP7322 to show:
the actual position referenced to the currently set datum
•
the actual position referenced to the scale reference point
•
the current trailing error
•
the actual feed rates and the nominal voltage and % value for servo lag
•
MP7322
The display step for the axis positions can be selected with MP7290.
MP7290
Machine parameter MP7285 can be used to define whether the position of the tool tip or the face of
the spindle (zero tool) is displayed as the actual value.
MP7285
The TNC 122 can switched to different dialog languages with machine parameter MP7230.
Position display
Input values: 0 to 3
0 =Actual position referenced to the currently set datum
1 =Current servo lag
2 =Position referenced to scale reference point
3 =Actual feed rates, nominal voltage, % value for trailing error
Display step
Input values: 0 or 1
0 = 1 µm
1 = 5 µm
Take tool length into account in position display
Input values: 0 or 1
0 = position of tool tip is displayed
1 = position of zero tool is displayed
MP7230
4/97TNC 1229 Machine Integration31
Dialog language
Input values: 0 to 7
0 = German
1 = English
2 = French
3 = Dutch
4 = Spanish
5 to 7 =
reserved
Page 33
Machine parameters can select whether the RAM and the EPROM are to be tested when the
control is switched on. When commissioning it is recommended that the memory test be
deactivated. The message “Memory test” is displayed during the memory test.
MP7690
The TNC 122 can also be used when no machine is connected to it. MP7210 sets the modes it can
then be used in.
MP7210
Memory test at switch-on
Input values: 0 to 3
0 =EPROM and RAM test at switch-on
1 =EPROM test at switch-on
2 =RAM test at switch-on
3 =No memory test at switch-on
Programming station
Input values: 0 to 2
0 = Control
1 = Programming station, PLC active
2 = Programming station, PLC not active
32TNC 1229 Machine Integration4/97
Page 34
9.7 EMERGENCY STOP Circuit
The control has one PLC input (X41/28) and one PLC output (X41/10) with the designation “Control is
ready” for the EMERGENCY STOP routine.
If a malfunction is recognized in the control, the TNC switches the control-is-ready output off, a
blinking error message appears on the screen, the PLC program is halted and the outputs are reset.
This error message cannot be cleared. When the error has been corrected it is necessary to run
through the switch-on routine again.
If the control-is-ready input is switched off by an event outside the control, the following error
message will appear:
EMERGENCY STOP
The NC then sets markers M2190 and M2191. This error message cannot be cleared until the
control voltage is switched on again.
When an EMERGENCY STOP occurs all outputs are reset.
The control evaluates an external EMERGENCY STOP like an external and internal stop. If the
EMERGENCY STOP button is pressed while an axis is moving, the axis is brought to a stop. I
If the EMERGENCY STOP causes the servo amplifier to block, the output nominal values can
exceed the position monitoring defined by machine parameters. In such a case the following error
message will be displayed:
In case of a malfunction, the control-is-ready output should switch the 24 V supply voltage off.
Because this function is so critical, the TNC 122 checks this output each time the power supply is
switched on.
HEIDENHAIN recommends the following wiring:
TNC 122
Switch opens briefly when the control voltage
of each microprocessor is switched on
X41/10 X41/9 X41/28
"Control is
ready"
EMERGENCY
STOP
buttons
Control
voltage
on
If the control is not to be part of the EMERGENCY STOP circuit, output X41/10 must be shortcircuited with input X41/28.
k1
K1
24V not
interruptible
+ -
24 V
PLC
"Control ready"
feedback
k1
34TNC 1229 Machine Integration4/97
Page 36
9.7.2 EMERGENCY STOP Flowchart
The external electronics must fulfill the prescribed basic requirements. In particular, the
acknowledgment for “control is ready” must be received within 200 ms.
X41/10
X41/28
1 2 3 4 5 6 7 8 9
Display
1Waiting for control voltage.NO CONTROL VOLTG
2Recognition of the control voltage at X41/28 and reset control-
is-ready output at X41/10.
3Maximum time until control-is-ready signal at X41/28 must go
to 0 (t < 200 ms). If time limit is exceeded, error message:
4Recognition of acknowledgment, output X41/10 set.
5Waiting for control voltage.NO CONTROL VOLTG
6Normal control operation. Output and control-is-ready
acknowledgment are set.
7Control voltage switched off by external event.EMERGENCY STOP
8When the control voltage is switched on again the error
message can be cleared; then return to normal operation.
9If an error is detected, the control switches off the control-is-
ready output (X41/10).
EMERG STOP DEFEC
Blinking error message
4/97TNC 1229 Machine Integration35
Page 37
10 Exchanging the Control
The control should be exchanged only on machines that are recommended by HEIDENHAIN. If you
wish to retrofit other machines, contact your HEIDENHAIN service representative.
The PLC EPROM contains the appropriate machine parameters and the PLC program for the
following software types of the TNC 121. These are activated with a code number (see below).
The TNC 122 with standard PLC program can also replace a TNC 121 with SE 121
(see machine parameters MP4xxx for more information on this.)
Proceed as follows to replace the TNC 121 by the TNC 122:
Before removing the TNC 121
•Check the software number to see whether the PLC and NC software number of the TNC122
can perform the functions of the TNC 121 (see the above table). If there is any doubt, contact
your HEIDENHAIN service representative.
PLC software no.
TNC 122
277 939 14246 117 084
NC software no.
TNC 122
Code no.
5
6
7
8
•Determine the following parameters and functions of the machine with the TNC 121 still
installed:
What is the maximum feed rate? What is the analog voltage at the maximum feed rate?
Is the analog voltage for the rapid traverse supplied by the control or by an external source
(shown on wiring diagram)?
Are the drives bipolar or unipolar?
Axis lock yes/no?
Reference mark traverse desired yes/no?
•Determine the pin layout of the terminal board using the circuit diagram and mark the wires for
the connection to X41 of the TNC 122.
Removing the TNC 121
•Disconnect the power supply, disconnect the cable from the terminal board, remove the
encoder connector.
•Remove the mounting screws, remove the housing.
36TNC 12210 Exchanging the Control4/97
Page 38
Installing the TNC 122
•Insert sponge rubber gasket, slide unit into position, tighten screws.
Insert encoder connectors, wire connector X41 according to the documented layout of the
TNC 121 (see connector layout X41).
Connect power supply.
•Differences compared to TNC 121:
Connect signal ground to the central ground point of the machine.
Include control-is-ready output (X41/10) and control-is-ready input (X41/28) in the emergency
stop circuit (see Section 9.7).
Commissioning the TNC 122:
•Switch on the control.
•Activate the appropriate PLC program and machine parameters with the code number as
follows:
– Press the MOD key
– Enter code number 77 80 83
– Press the ENT key
– Press the MOD key
– Enter the appropriate code number from the above list
– Press the ENT key
Depending on the model of machine and its mechanical condition it may be necessary
to re-optimize the machine parameters that affect the control loop. especially
parameters MP1010, MP1030, MP1050, MP1051, MP1060, MP1810 and MP1850.
This requires checking the analog output and the tachometer voltage with an
oscilloscope.
•If desired, set the software limit switch ranges to conform to maximum permissible traverse.
Note:
The software limit switches are always referenced to a fixed reference mark!
Ensure that the same reference mark is always used for referencing.
Test all functions.
11 Machine Parameters
11.1 Entering and Changing Machine Parameters
A list of machine parameters is accessible through the MOD function
operation mode. To call the complete list of machine parameters, enter the code number 95148. A
subset of MOD functions is more readily available through the MOD function
machine parameters included in the user parameters are indicated in the following list with *). It is
possible to change these parameters.
The values of the machine parameters can be changed as follows:
•Select the list of machine parameters.
•Use the arrow key to select the desired machine parameter.
•Enter the new value.
•Confirm your entry by pressing ENT.
To leave the list of machine parameters, press DEL.
4/97TNC 12211 Machine Parameters37
Code number
User parameters.
in the manual
The
Page 39
11.2 Machine Parameter List
Machine
Parameter
MP 31Monitoring of encoder signal amplitude
MP 40Displayed axes
MP70Analog output bipolar or unipolar
MP80Analog voltage source for rapid traverse from
MP110.0-2Assignment of encoder inputs to the machine
MP210Counting direction of encoder signals
MP330.0-2Grating period
Function and inputInput value
Input values: 0 to 7
Bit 0 Axis X+0inactive
+1active
Bit 1Axis Y+0inactive
+2active
Bit 2Axis Z+0inactive
+4active
Input values: 0 to 7
Bit 0 Axis X+0not displayed
+1displayed
Bit 1Axis Y+0not displayed
+2displayed
Bit 2Axis Z+0not displayed
+4displayed
Input values: 0 or 2
0 = bipolar
1 = unipolar (ensure that MP1040 = 0!)
traversing the end position outputs 0 V
2 = unipolar, traversing the end position inverts
the nominal-value voltage
the control or from external source
Input values: 0 to 2
0 =
reserved
1 = analog voltage from external source
2 = analog voltage from control
tachometer signals
Input range: 80 to 30 000 [mm/min]
MP1010.0-2 normal rapid traverse for X, Y, Z
MP1010.3-5 increased rapid trav. for X, Y, Z
MP1030.0-2Positioning window
Input values: 0.005 to 2.000 [mm]
MP1040Polarity of nominal value voltage for positive
traversing direction
Input values: 0 to 7
Bit 0Axis X+0 = positive
+1 = negative
Bit 1Axis Y+0 = positive
+2 = negative
Bit 2Axis Z+0 = positive
+4 = negative
MP1050.0-2Analog voltage for rapid traverse
Input values: 4.5 to 11 [V]
MP1051.0-2Lower limit of analog voltage
Input values: 0 to 35 [ factor 2.93 mV]
MP1060.0-5Acceleration
Input values: 0.001 to 3.000 [m/s
2
]
1060.0 to 1060.2: accelerate
1060.3 to 1060.5: decelerate
MP1110Standstill monitoring
Input values: 0.001 to 30.000 [mm]
MP1140Motion monitoring
Input values: 0.03 to 10 [V]
MP1320Traverse direction when crossing over the
reference marks
Input values: 0 to 7
Bit 0Axis X:+ 0 = positive
+ 1 = negative
Bit 1Axis Y:+ 0 = positive
+ 2 = negative
Bit 2Axis Z:+ 0 = positive
+ 4 = negative
If MP70 = 1, then MP1040 must
equal 0.
10 V
4/97TNC 12211 Machine Parameters39
Page 41
Machine
Function and inputInput value
Parameter
MP1330.0-2Feed rate for crossing over the reference marks
Input values: 80 to 30 000 [mm/min]
MP1340.0-2Sequence of axes for crossing over the
reference marks
Input values: 0 to 3
0 = no reference mark evaluation
1 = Axis X
2 = Axis Y
3 = Axis Z
MP1350.0-2Type of referencing
Input values: 0 or 1
0 = encoder with distance-coded reference
marks
1 = encoder with one reference mark
MP1720Position monitoring with servo lag
(EMERGENCY OFF)
Input values: 0 to 200 [mm]
MP1810.0-2kv factor for operation with servo lag
Input values: 0.1 to 10 [1/min]
MP1820Multiplication factor for the kv factor
Input values: 0.001 to 9
MP1830Characteristic kink for the kv factor
Input values: 0 to 100 [%]
MP1850Factor for internal servo-lag adjustment with
external rapid traverse voltage
Input values: 0 to 65535
Only if MP80 = 1
40TNC 12211 Machine Parameters4/97
Page 42
Machine
Parameter
MP4110Time for timers T0 to T15
MP4110.0Waiting time controller enable X
MP4110.1Waiting time unclamp X start
MP4110.2Waiting time clamp X stop
MP4110.3Waiting time controller enable Y
MP4110.4Waiting time unclamp Y start
MP4110.5Waiting time clamp Y stop
MP4110.6Waiting time controller enable Z
MP4110.7Waiting time unclamp Z start
MP4110.8Waiting time clamp Z stop
MP4110.9SE pulse formation / duration
MP4110.10Waiting time O5 traverse
MP4110.11Delay time for rapid traverse
MP4110.12
MP4110.13
MP4110.14
MP4110.15
MP4120.0
to
MP4120.7
MP4210Setting a number in the PLC word range
MP4210.0X switch-off point for rapid trav.
MP4210.1Y switch-off point for rapid trav.
MP4210.2Z switch-off point for rapid trav.
MP4210.3Position control loop to XYZ potentiometer=0,
MP4210.4Number of D/A converter steps per PLC cycle
MP4210.5Multiplication factor for the feed rate
MP4210.6
MP4210.7Selection of code no. for software level for
MP4210.8
MP4210.9
Function and inputInput value
Input values: 0 to 65 535 [24 ms]
direction, delay erosion start M36
output O4 (night erosion switchoff)
Preset value for counters C0 to C7
Input values: 0 to 65 535
D768 to D804
Input values: –9 999.999 to +9 999.999 [mm]
Only with MP 4310.4 and .5 =1
NC stop, lag<0.5
Input approx. 0.4
with control by PLC
Input approx. 0.1 to 1.2
potentiometer
Potentiometer value * MP4210.5= NC % block
A change to the machine parameters MP4220.x only becomes active after a power
interruption.
42TNC 12211 Machine Parameters4/97
Page 44
Machine
Parameter
MP4310Setting a number in the PLC marker range
MP4310.0X trav. direction 0=neg., 1=pos.
MP4310.1Y trav. direction 0=neg., 1=pos.
MP4310.2Z trav. direction 0=neg., 1=pos.
MP4310.3Actual and nominal value transfer
MP4310.41 = open position control loop
MP4310.5Only effective if MP 4310.4 is active1 = no controller enable when
(M20/M21) and reset via M03,
M04, M13, M14;
M09 output via O10 (M22/M23)
and reset via M08, M13, M14
the SE outputs
1 = EMERGENCY STOP does not
cancel the SE outputs
0 = NC control
1 = PLC control
1 = M functions not active in MDI
control loop monitoring
block) is not switched when the
advance switch point is reached
A change to the machine parameters MP4310.x only becomes active after a power
interruption.
4/97TNC 12211 Machine Parameters43
Page 45
Machine
Parameter
MP7210 *)Programming station or machine control
MP7230 *)Dialog language
MP7285 *)Tool length is included in the position display
MP7290 *)Display step 1 µm or 5 µm
MP7320Encoder signal amplitude
MP7322 *)Position display mode
MP7680 *)Memory function for axis direction buttons
MP7690Memory test during switch-on or after reset
Function and inputInput value
Input values: 0 to 2
0 = control
1 = programming station, PLC active
2 = programming station, PLC not active
Input: 0 to 7
0 = German
1 = English
2 = French
3 = Dutch
4 = Spanish
5 = reserved
6 = reserved
7 = reserved
value for the tool axis
Input values: 0 or 1
0 = tool length is included
1 = tool length is not included
Input values: 0 or 1
0 = 1µm
1 = 5 µm
Input values: 0 to 7
0 = 16µA encoders
+1 = 40µA encoders on X-axis
+2 = 40µA encoders on Y-axis
+4 = 40µA encoders on Z-axis
Input values: 0 to 3
0 = display actual position
1 = display servo lag
2 = display reference position
3 = display actual feed rate and nominal value
voltage
Input values: 0 or 1
0 = not stored
1 = stored
Input values: 0 to 3
+0 = memory test during switch-on
+1 = no RAM test during switch-on
+2 = no EPROM test during switch-on
44TNC 12211 Machine Parameters4/97
Page 46
12 PLC Description
The TNC 122 features an integrated PLC for 15 inputs and 15 outputs. PLC programs for specific
machine models (see Chapter 10) have been prepared and stored by HEIDENHAIN in the EPROM.
If in rare cases the PLC program must be altered or rewritten, we recommend using the
programming software
, version 2.2 from HEIDENHAIN. This program can also generate the binary
PLC.EXE
code for the PLC EPROM (see the User's Manual for PLC.EXE).
The PLC program assigns fixed functions to the inputs and outputs at the X41 terminal block (see
Chapter 8 "Pin Layout."
In the TNC 122 the PLC program is run directly from the EPROM; there is no RAM memory for this
task.
For servicing purposes the logical status of the markers, inputs, outputs, timers and counters can be
transmitted through the RS-232-C/V.24 port to a computer. Transmission is activated by entering the
code number 807 667 in the TNC 122.
Under menu item "File/TNC 12x Monitor" the program PLC.EXE provides a function (PLCMONI.EXE)
for immediately displaying the logical status of operands, provided that the code number was
entered.
• Use the rightward cursor key on the TNC to scroll through the markers.
• Use the "R+/-" key on the TNC to scroll back through the markers.
• Press the NO ENT key to leave the display.
12.1 PLC EPROM
The PLC EPROM is a 2-MB or 4 MB chip with 16-bit data organization. It is programmed in Motorola
format, which means that the most significant byte of a word is located at the first (lowest) address.
Addresses:
$00000
...
$00400
$00402
$00403
$0000
...
PLC Program start address
Chip identifier (1 word)
PLC program length
$00405$0000
$00406
...
$0041C
$0041E
10th MP list
...
nd
2
MP list
st
1
MP list
$00420$0000
$007E0PLC Program in binary format
and
up to 10 machine parameter tables
$1C00020 PLC error messages in 7 languages
20 dialogs in 7 languages (30 characters each)
$1FF00PLC software number
$1FFFCChecksum
$1FFFEOne's complement checksum
4/97TNC 12212 PLC Description45
Page 47
The error messages and dialogs are filed in the individual languages in the sequence and syntax
('...',0). Each dialog can have up to 16 characters (see also the User's Manual for PLC.EXE).
German '..............................',0
English '..............................',0
French'..............................',0
12.2 PLC Commands
12.2.1 Load and store commands
LOAD (L)
Logic execution with the LOAD command
Operands: M, I, O, T, C
The addressed operand is copied into the Logic Accumulator. An L command is always used at the
start of a logic chain to enable subsequent gating commands.
Word execution with the LOAD command
Operands: B, W, D, K
The addressed operand (B, W, D) or a Constant (K) is copied or loaded into the Word Accumulator.
The sign is added if necessary. In contrast to logic execution, an L command must always be used
at the start of a word gating chain. It is not possible to use a gating command.
LOAD NOT (LN)
Logic execution with the LOAD NOT command
Operands: M, I, O, T, C
The complement of the addressed operand is loaded into the Logic Accumulator. A load command is
always used at the start of a logic chain to enable subsequent gating commands.
Word execution with the LOAD NOT command
Operands: B, W, D, K
The content of the addressed operands (B, W, D) or a Constant (K) is loaded into the Word
Accumulator as a complement. The sign is added if necessary. In contrast to logic execution, a load
command must always be used at the start of a word gating chain. It is not possible to use a gating
command.
LOAD TWO'S COMPLEMENT (L–)
Operands: B, W, D, K
The contents of the addressed operand (B, W, D) or a Constant (K) is loaded into the Word
Accumulator as a two's complement. The sign is added if necessary. The two's complement allows
negative numbers to be stored, i.e. if a number is loaded with L–, it appears in the Accumulator with
the opposite sign. This command can only be used with Word execution.
46TNC 12212 PLC Description4/97
Page 48
LOAD BYTE (LB)
Operands: M, I, O, T, C
The LB command copies 8 Markers, Inputs, Outputs, Timers or Counters with ascending numbering
into the Word Accumulator. Each operand occupies 1 bit in the Accumulator. The designated
operand address occupies the LSB in the Accumulator, the designated address + 1 the LSB + 1 and
so on. In this way, the last affected operand occupies the MSB. The sign is added if necessary.
LOAD WORD (LW)
Operands: M, I, O, T, C
The LW command copies 16 Markers, Inputs, Outputs, Timers or Counters with ascending
numbering into the Word Accumulator. Each operand occupies 1 bit in the Accumulator. The
designated operand address occupies the LSB in the Accumulator, the designated address + 1 the
LSB + 1 and so on. In this way, the last affected operand occupies the MSB The sign is added if
necessary.
LOAD DOUBLEWORD (LD)
Operands: M, I, O, T, C
The LD command copies 32 Markers, Inputs, Outputs, Timers or Counters with ascending
numbering into the Word Accumulator. Each operand occupies 1 bit in the Accumulator. The
designated operand address occupies the LSB in the Accumulator, the designated address + 1 the
LSB + 1 and so on. In this way, the last affected operand occupies the MSB.
ASSIGN (=)
Logic execution with the ASSIGN command
Operands: M, I, O, T, C
In conjunction with a Logic Operand (M, I, O, T, C), ASSIGN copies the contents of the Logic
Accumulator into the addressed operand. ASSIGN is only used at the end of a logic chain to ensure
that a gating result is available. The command can be used several times in succession.
Word execution with the ASSIGN command
Operands: B, W, D
ASSIGN in conjunction with a Word Operand (B, W, D) copies the contents of the Word
Accumulator into the addressed operand. In contrast to bit execution, ASSIGN can also be used
within a word logic chain. The command can be used several times in succession.
4/97TNC 12212 PLC Description47
Page 49
ASSIGN BYTE (B=)
Operands: M, I, O, T, C
ASSIGN BYTE copies 8 bits from the Word Accumulator to Markers, Inputs, Outputs, Timers or
Counters with ascending numbering. Each bit corresponds to one operand. The LSB in the
Accumulator is copied to the designated operand address, the LSB + 1 to the designated address
+ 1 and so on. The last affected operand is occupied by the MSB.
ASSIGN WORD (W=)
Operands: M, I, O, T, C
ASSIGN WORD copies 16 bits from the Word Accumulator to Markers, Inputs, Outputs, Timers or
Counters with ascending numbering. Each bit corresponds to one operand. The LSB in the
Accumulator is copied to the designated operand address, the LSB + 1 to the designated address
+ 1 and so on. The last affected operand is occupied by the MSB.
ASSIGN DOUBLEWORD (D=)
Operands: M, I, O, T, C
ASSIGN DOUBLEWORD copies 32 bits from the Word Accumulator to Markers, Inputs, Outputs,
Timers or Counters with ascending numbering. Each bit corresponds to one operand. The LSB in
the Accumulator is copied to the designated operand address, the LSB + 1 to the designated
address + 1 and so on. The last affected operand is occupied by the MSB.
ASSIGN NOT (=N)
Logic execution
Operands: M, I, O, T, C
In conjunction with a logic operand (M, I, O, T, C), ASSIGN NOT copies the complement of the
contents of the Logic Accumulator into the addressed operand. See ASSIGN (=) for the sequence of
operations.
Word execution
Operands: B, W, D
In conjunction with a word operand (B, W, D), ASSIGN NOT copies the complement of the contents
of the Word Accumulator into the addressed operand.
ASSIGN TWO'S COMPLEMENT (=-)
Operands: B, W, D
ASSIGN TWO'S COMPLEMENT copies the TWO'S COMPLEMENT of the contents of the Word
Accumulator into the addressed operand.
48TNC 12212 PLC Description4/97
Page 50
12.2.2 Set commands
SET (S)
Operands: M, I, O, T, C
The function of this command depends on the contents of the Logic Accumulator. If the Logic
Accumulator = 1, the addressed operand is set to 1; otherwise the operand remains unchanged. An
S command is used at the end of a logic chain so that the gating result influences the operand. The
command can be used several times in succession.
RESET (R)
Operands: M, I, O, T, C
The function of this command depends on the contents of the Logic Accumulator. If the Logic
Accumulator = 1, the addressed operand is set to 0; otherwise the operand remains unchanged. An
R command is used at the end of a logic chain so that the gating result influences the operand. The
command can be used several times in succession.
SET NOT (SN)
Operands: M, I, O, T, C
The function of this command depends on the contents of the Logic Accumulator. If the Logic
Accumulator = 0, then the addressed operand is set to 1; otherwise the operand remains
unchanged. An SN command is used at the end of a logic chain so that the gating result influences
the operand. The command can be used several times in succession.
RESET NOT (RN)
Operands: M, I, O, T, C
The function of this command depends on the contents of the Logic Accumulator. If the Logic
Accumulator = 0, then the addressed operand is set to 0; otherwise the operand remains
unchanged. An RN command is used at the end of a logic chain so that the gating result influences
the operand. The command can be used several times in succession
4/97TNC 12212 PLC Description49
Page 51
12.2.3 Logical Connective Operations
AND (A)
Logic execution with the AND command
Operands: M, I, O, T, C
This command functions in different ways depending on its position in the program:
a) At the start of a logic chain the command functions as an L command. That is, the logic state of
the operand is loaded into the Logic Accumulator.
b) Within a logic chain the contents of the Logic Accumulator and the logic state of the operand
(M, I, O, T, C) are gated with AND. The result of the operation is stored in the Logic Accumulator.
Word execution with the AND Command
Operands: B, W, D, K
The contents of the Word Accumulator and the contents of the operand (B, W, D, K) are gated with
AND. In accordance with the different sizes of operand (B = 8 bits; W = 16 bits; D = K = 32 bits),
8, 16 or 32 bits will be influenced in the Accumulator.
Thus: Bit 0 of the Accumulator is gated with bit 0 of the operand
Bit 1 of the Accumulator is gated with bit 1 of the operand, and so on.
AND NOT (AN)
Logic execution with the AND NOT command
Operands: M, I, O, T, C
This command functions in different ways depending on its position in the program:
a) At the start of a logic chain the command functions as an LN command. That is, the complement
of the operand is loaded into the Logic Accumulator.
b) Within a logic chain, the contents of the Logic Accumulator and the logic state of the operand
(M, I, O, T, C) are gated with AND NOT. The result of the operation is stored in the Logic
Accumulator.
Word execution with the AND NOT command
Operands: B, W, D, K
The contents of the Word Accumulator and the contents of the operand (B, W, D, K) are gated with
AND NOT. In accordance with the different sizes of operand (B = 8 bits; W = 16 bits;
D = K = 32 bits), 8, 16 or 32 bits will be influenced in the Accumulator.
Thus: Bit 0 of the Accumulator is gated with bit 0 of the operand
Bit 1 of the Accumulator is gated with bit 1 of the operand, and so on.
The result of the operation is stored in the Word Accumulator.
50TNC 12212 PLC Description4/97
Page 52
OR (O)
Logic execution with the OR command
Operands: M, I, O, T, C
This command functions in different ways depending on its position in the program:
a) At the start of a logic chain the command functions as an L command. That is. the logic state of
the operand is loaded into the Logic Accumulator.
b) Within a logic chain, the contents of the Logic Accumulator and the logic state of the operand
(M, I, O, T, C) are gated with OR. The result of the operation is stored in the Logic Accumulator.
Word execution with the OR command
Operands: B, W, D, K
The contents of the Word Accumulator and the contents of the operand (B, W, D, K) are gated with
OR. In accordance with the different sizes of operand (B = 8 bits; W = 16 bits; D = K = 32 bits),
8, 16 or 32 bits will be influenced in the Accumulator.
Thus: Bit 0 of the Accumulator is gated with bit 0 of the operand
Bit 1 of the Accumulator is gated with bit 1 of the operand, and so on.
The result of the operation is stored in the Word Accumulator.
OR NOT (ON)
Logic execution with the OR NOT command
Operands: M, I, O, T, C
This command functions in different ways depending on its position in the program:
a) At the start of a logic chain this command functions as an LN command. That is, the
complement of the operand is loaded into the Logic Accumulator.
b) Within a logic chain, the contents of the Logic Accumulator and the logic state of the operand
(M, I, O, T, C) are gated with OR NOT. The result of the operation is stored in the Logic
Accumulator.
Word execution with the OR NOT command
Operands: B, W, D, K
The contents of the Word Accumulator and the contents of the operand (B, W, D, K) are gated with
OR NOT. In accordance with the different sizes of operand (B = 8 bits; W = 16 bits; D = K = 32 bits),
8, 16 or 32 bits will be influenced in the Accumulator.
Thus: Bit 0 of the Accumulator is gated with bit 0 of the operand
Bit 1 of the Accumulator is gated with bit 1 of the operand, and so on.
The result of the operation is stored in the Word Accumulator.
EXCLUSIVE OR (XO)
Logic execution with the EXCLUSIVE OR command
Operands: M, I, O, T, C
This command functions in different ways depending on its position in the program:
a) At the start of a logic chain the command functions as an L command. That is, the logic state of
the operand is loaded into the Logic Accumulator.
b) Within a logic chain the contents of the Logic Accumulator and the logic state of the operand (M,
I, O, T, C) are gated with EXCLUSIVE OR. The result of the operation is stored in the Logic
Accumulator.
4/97TNC 12212 PLC Description51
Page 53
Word execution with the EXCLUSIVE OR command
Operands: B, W, D, K
The contents of the Word Accumulator and the contents of the operand (B, W, D, K) are gated with
EXCLUSIVE OR. In accordance with the different sizes of operand (B = 8 bits; W = 16 bits;
D = K = 32 bits), 8, 16 or 32 bits will be influenced in the Accumulator.
Thus: Bit 0 of the Accumulator is gated with bit 0 of the operand
Bit 1 of the Accumulator is gated with bit 1 of the operand, and so on.
The result of the operation is stored in the Word Accumulator.
EXCLUSIVE OR NOT (XON)
Logic execution with the EXCLUSIVE OR NOT command
Operands: M, I, O, T, C
This command functions in different ways depending on its position in the program:
a) At the start of a logic chain this command functions as a LN command. That is, the complement
of the operand is loaded into the Logic Accumulator.
b) Within a logic chain the contents of the Logic Accumulator and the logic state of the operand (M,
I, O, T, C) are gated with EXCLUSIVE OR NOT. The result of the operation is stored in the Logic
Accumulator.
Word execution with the EXCLUSIVE OR NOT command
Operands: B, W, D, K
The contents of the Word Accumulator and the contents of the operand (B, W, D, K) are gated with
EXCLUSIVE OR NOT. In accordance with the different sizes of operand (B = 8 bits; W = 16 bits; D =
K = 32 bits), 8, 16 or 32 bits will be influenced in the Accumulator.
Thus: Bit 0 of the Accumulator is gated with bit 0 of the operand
Bit 1 of the Accumulator is gated with bit 1 of the operand, and so on.
The result of the operation is stored in the Word Accumulator.
12.2.4 Arithmetic Commands
ADDITION (+)
Operands: B, W, D, K
With arithmetic functions the operand is first expanded to the size of the Accumulator (32 bits). Then
the contents of the operand are added to the Word Accumulator. The result of the operation is
stored in the Word Accumulator and can be processed further.
SUBTRACTION (–)
Operands: B, W, D, K
With arithmetic functions the operand is first expanded to the size of the Accumulator (32 bits). Then
the contents of the operand are subtracted from the contents of the Word Accumulator. The result
of the operation is stored in the Word Accumulator and can be processed further.
52TNC 12212 PLC Description4/97
Page 54
MULTIPLICATION (x)
Operands: B, W, D, K
With arithmetic functions the operand is first expanded to the size of the Accumulator (32 bits). Then
the contents of the operand are multiplied with the contents of the Word Accumulator. The result of
the operation is stored in the Word Accumulator and can be processed further. If the result of
multiplication causes an overflow, Marker M3168 is set; otherwise it is reset.
DIVISION (/)
Operands: B, W, D, K
With arithmetic functions the operand is first expanded to the size of the Accumulator (32 bits). Then
the contents of the Word Accumulator are divided by the contents of the operand. The result of the
operation is stored in the Word Accumulator and can be processed further. If division by 0 is
attempted, the Marker M3169 is set; otherwise it is reset.
REMAINDER (MOD) D
Operands: B, W, D, K
With arithmetic functions the operand is firstly expanded to the size of the Accumulator (32 bits).
Then the REMAINDER is determined by dividing the contents of the Word Accumulator by the
contents of the operand. The REMAINDER is stored in the Word Accumulator and can be processed
further. If the MOD command is not correctly executed then the Marker M3170 is set; otherwise it
is reset.
INCREMENT (INC, INCW)
INCREMENT operand (INC)
Operands: B, W, D
The content of the addressed operand is increased by one.
INCREMENT Word Accumulator (INCW)
The content of the Word Accumulator is increased by one.
DECREMENT (DEC, DECW)
DECREMENT operand (DEC)
Operands: B, W, D
The content of the addressed operand is decreased by one.
DECREMENT Word Accumulator (DECW)
The content of the Word Accumulator is decreased by one.
4/97TNC 12212 PLC Description53
Page 55
12.2.5 Comparisons
EQUAL TO (==)
Operands: B, W, D, K
With this command a direct transfer from Word to Logic processing occurs. The content of the
Word Accumulator is compared with the content of the addressed operand. If the Word
Accumulator is equal to the operand, the condition is true and the Logic Accumulator is set to 1. If
they are not equal, the Logic Accumulator is set to 0. The comparison takes place over the number
of bits corresponding to the operand, i.e. B = 8 bits, W = 16 bits and D = K = 32 bits.
LESS THAN (<)
Operands: B, W, D, K
With this command, a direct transfer from Word to Logic processing occurs. The content of the
Word Accumulator is compared with the content of the addressed operand. If the Word
Accumulator is smaller than the operand, the condition is true and the Logic Accumulator is set to 1.
If the Word Accumulator is greater than or equal to the operand, the Logic Accumulator is set to 0.
The comparison takes place over the number of bits in the operand, i.e. B = 8 bits, W = 16 bits and
D = K = 32 bits.
GREATER THAN (>)
Operands: B, W, D, K
With this command, a direct transfer from Word to Logic processing occurs. . The content of the
Word Accumulator is compared with the content of the addressed operand. . If the Word
Accumulator is greater than the operand, the condition is true and the Logic Accumulator is set to 1.
If the Word Accumulator is less than or equal to the operand, the Logic Accumulator is set to 0. The
comparison takes place over the number of bits in the operand, i.e. B = 8 bits, W = 16 bits and D =
K = 32 bits.
LESS THAN OR EQUAL TO (<=)
Operands: B, W, D, K
With this command, a direct transfer from Word to Logic processing occurs. The content of the
Word Accumulator is compared with the content of the addressed operand. If the Word
Accumulator is less than or equal to the operand, the condition is true and the Logic Accumulator is
set to 1. If the Word Accumulator is greater than the operand, the Logic Accumulator is set to 0. The
comparison takes place over the number of bits in the operand i.e. B = 8 bits, W = 16 bits and D = K
= 32 bits.
GREATER THAN OR EQUAL TO (>=)
Operands: B, W, D, K
With this command, a direct transfer from Word to Logic execution occurs. The content of the Word
Accumulator is compared with the content of the addressed operand. If the Word Accumulator is
greater than or equal to the operand, the condition is true and the Logic Accumulator is set to 1. If
the Word Accumulator is smaller than the operand, the Logic Accumulator is set to 0. The
comparison takes place over the number of bits corresponding to the operand, i.e. B = 8 bits,
W = 16 bits and D = K = 32 bits.
54TNC 12212 PLC Description4/97
Page 56
UNEQUAL (<>)
Operands: B, W, D, K
With this command, a direct transfer from Word to Logic execution occurs. The content of the Word
Accumulator is compared with the content of the addressed operand. If the Word Accumulator and
the operand are not equal, the condition is true and the Logic Accumulator is set to 1. If the Word
Accumulator is equal to the operand, the Logic Accumulator is set to 0. The comparison takes place
over the number of bits corresponding to the operand, i.e. B = 8 bits, W = 16 bits and D = K = 32
bits.
12.2.6 Parenthetical Expressions
Parentheses with logical commands
The execution sequence in an instruction list can be altered by using parentheses. The openparentheses command loads the contents of the Accumulator onto the Program Stack. If the Logic
Accumulator is addressed in the last command before an open-parentheses instruction, the content
of the Logic Accumulator is loaded into the Program Stack. By addressing the Word Accumulator,
the content of the Word Accumulator will be distributed.
The close-parentheses instruction initiates the gating of the buffered value from the Program Stack
with the Logic Accumulator and/or the Word Accumulator, depending on which Accumulator was
addressed before the open-parentheses instruction. The result is then available in the corresponding
Accumulator. The maximum nesting level is 16 parentheses.
AND [ ] (A[ ])
AND NOT [ ] (AN[ ])
OR [ ] (O[ ])
OR NOT [ ] (ON[ ])
EXCLUSIVE OR [ ] (XO[ ])
EXCLUSIVE OR NOT [ ] (XON[ ])
Parentheses with arithmetic commands
With arithmetic commands, only word execution is possible. The execution sequence in an
instruction list may be altered by using parentheses. The open-parentheses command loads the
content of the Word Accumulator onto the Program Stack. The Accumulator is then available for the
calculation of intermediate results. The close-parentheses instruction initiates the gating of the
buffered value from the Program Stack with the content of the Word Accumulator. The result is
again loaded into the Accumulator. The maximum nesting level is 16 parentheses.
The execution sequence in an instruction list can be altered by using parentheses. The openparentheses command loads the contents of the Word Accumulator onto the Program Stack. The
Accumulator is now available for the calculation of intermediate results.
The "close-parentheses" instruction initiates the gating of the buffered value from the Program Stack
with the content of the complete Word Accumulator. The result is again loaded into the
Accumulator. The maximum nesting depth is 16 parentheses.
A direct transition from Word to Logic execution takes place with comparison commands. If the
comparison condition is true, the Logic Accumulator is set to 1. If the condition is not true, the Logic
Accumulator is set to 0.
EQUAL TO [ ] (==[ ])
LESS THAN [ ] (<[ ])
GREATER THAN [ ] (>[ ])
LESS THAN OR EQUAL TO [ ] (<=[ ])
GREATER THAN OR EQUAL TO [ ] (>=[ ])
UNEQUAL [ ] (<>[ ])
12.2.7 Shift Commands
SHIFT LEFT (<<)
Operands: B, W, D, K
Since the sign bit (MSB) is included with this command, it is grouped in with arithmetic commands.
For this reason and out of time considerations, this command should not be used for the isolation of
bits. A SHIFT LEFT instruction causes the contents of the Word Accumulator to be multiplied by
two. For this purpose the bits in the Accumulator are simply shifted one place to the left. The result
must be within the range of –2 147 483 648 to +2 147 483 647, otherwise the Accumulator will
contain an undefined value. The number of shift operations is determined by the operand; the right
side of the Accumulator is filled with zeros.
SHIFT RIGHT (>>)
Operands: B, W, D, K
Since the sign bit (MSB) is included with this command, it is grouped in with arithmetic commands.
For this reason and out of time considerations, this command should not be used for the isolation
of bits. A SHIFT RIGHT instruction causes the contents of the Word Accumulator to be divided by
two. For this purpose the bits in the Accumulator are simply shifted one place to the right. The
number of shift operations is determined by the operand. The set bits, which are shifted beyond
the Accumulator to the right, are lost; the Accumulator is filled from the left-hand side including
the sign.
56TNC 12212 PLC Description4/97
Page 58
12.2.8 Bit Commands
BIT SET (BS)
Operands: B, W, D, K
With this command, each bit in the Accumulator can be accessed. The BS command sets the
addressed bit to 1. The selection (addressing) of the corresponding bit is derived from the content of
the specified Operand or a Constant. In the bit-numbering, bit 0 corresponds to the LSB and bit 31
corresponds to the MSB. For operand contents larger than 32, the operand value Modulo 32 is
used — that is, the integer remainder from the division (operand value)/32.
BIT CLEAR (BC)
Operands: B, W, D, K
With this command, each bit in the Accumulator can be accessed. The BC command sets the
addressed bit to 0. The selection (addressing) of the corresponding bit is derived from the content of
the specified Operand or a Constant. In the bit-numbering, bit 0 corresponds to the LSB and bit 31
corresponds to the MSB. For operand contents larger than 32, the operand value Modulo 32 is
used — that is, the integer remainder from the division (operand value)/32.
BIT TEST (BT)
Operands: B, W, D, K
With this command, the status of each bit in the Accumulator can be interrogated. With BT
commands, a direct transition from Word to Logic execution takes place. The BIT TEST tests the
status of a bit from the Word Accumulator and then acts correspondingly on the Logic Accumulator.
If the tested bit is 1, the Logic Accumulator is set to 1; if it is 0, the Logic Accumulator is set to 0.
The program continues in logic execution. The selection (addressing) of the corresponding bit is
derived from the content of the specified Operand or a Constant. In the bit numbering, bit 0
corresponds to the LSB and bit 31 corresponds to the MSB. For operand contents larger than 32,
the operand value Modulo 32 is used — that is, the integer remainder from the division (operand
value)/32.
12.2.9 Stack Operations
Load Data onto the Data Stack (PS)
Logic Execution with the PS Command
Operands: M, I, O, T, C
With the PS command, data is buffered by loading the addressed operand onto the Data Stack.
Since the Data Stack is 16-bit, a minimum width of one Word must be used when writing to it.
During this the operand value is copied into bit 7 of the current address in the Data Stack. The free
bits of the reserved memory are undefined or unused. If there is a stack overflow, an error message
will be issued.
4/97TNC 12212 PLC Description57
Page 59
Word execution with the PS command
Operands: B, W, D, K
With the PS command data is buffered by copying the addressed memory area (B, W, D, K) into the
current address of the Data Stack. With Word execution, two Words are reserved as standard on
the Data Stack per PS command. The operand is extended in the Stack with sign justification
corresponding to the MSB. If there is a stack overflow, an error message will be issued.
Load Logic Accumulator onto the Data Stack (PSL)
The Logic Accumulator can be buffered with the PSL command. For this purpose, the Logic
Accumulator is loaded onto the Data Stack. Since the Data Stack is 16-bit, it must be written to with
a minimum width of one Word. During this the content of the Logic Accumulator is copied into the
current address of the Data Stack. The free bits of the reserved memory are undefined or unused. If
there is a stack overflow, an error message will be issued.
Load Word Accumulator onto the Data Stack (PSW)
The content of the Word Accumulator can be buffered with the PSW command. For this purpose,
the Word Accumulator is copied into the Data Stack. The content of the Word Accumulator (32 bits)
reserves two Words on the Data Stack. If there is a stack overflow, an error message results.
Acquire data from the Data Stack (PL)
Logic execution with the PL command
Operands: M, I, O, T, C
The PL command complements the PS command. Data that have been saved with PUSH can be
taken from the Data Stack again with PULL. With logic execution, bit 7 is copied from the current
address of the Data Stack into the addressed operand with a PL command. If the Stack is empty, an
error message will be issued.
Word execution with the PL command
Operands: B, W, D
The PL command complements the PS command. Data that have been saved with PUSH can be
taken from the Data Stack again with PULL. With Word execution, two Words are copied from the
current address of the Data Stack into the addressed memory area with a PL command. If the Stack
is empty, an error message will be issued.
Acquire Logic Accumulator from the Data Stack (PLL)
The PLL command complements the PSL command. With a PLL instruction, bit 7 from the current
address of the Data Stack is copied into the Logic Accumulator. If the stack is empty, an error
message will be issued.
Acquire Word Accumulator from the Data Stack (PLW)
The PLW command complements the PSW command. With a PLW instruction, two Words are
copied from the Data Stack into the Word Accumulator. If the stack is empty, an error message will
be issued.
58TNC 12212 PLC Description4/97
Page 60
12.2.10 Jump Commands
Unconditional jump (JP)
Operands: jump address (LBL)
The JP command instructs the processor to continue the program at the specified jump address
(Label). This command interrupts a logic sequence.
Jump if Logic Accumulator = 1 (JPT)
Operands: jump address (LBL)
The JPT command is a conditional jump command. If the Logic Accumulator is 1, the program is
continued from the specified jump address (Label). If the Logic Accumulator is 0, the jump is not
processed. This command interrupts a logic sequence.
Jump if Logic Accumulator = 0 (JPF)
Operands: jump address (LBL)
The JPF command is a conditional jump command. If the Logic Accumulator is 0, the program is
continued from the specified jump address (Label). If the Logic Accumulator is 1, the jump is not
processed. This command interrupts a logic sequence.
Call Module (CM)
Operands: jump address (LBL)
CM instructs the processor to leave the main program and process the Module designated by the
jump address (LBL). Modules are independent subprograms and are terminated by the EM
command. They can also be called at multiple points in the main program. This command interrupts
a logic sequence.
Call Module if Logic Accumulator = 1 (CMT)
Operands: jump address (LBL)
The CMT command is a conditional module call. If the Logic Accumulator is 1, the Module with the
specified jump address (Label) is processed. If the Logic Accumulator is 0, the main program
continues without a module call. This command interrupts a logic sequence.
Call Module if Logic Accumulator = 0 (CMF)
Operands: jump address (LBL)
The CMF command is a conditional module call. If the Logic Accumulator is 0, the Module with the
specified jump address (Label) is processed. If the Logic Accumulator is 1, the main program
continues without a module call. This command interrupts a logic sequence.
4/97TNC 12212 PLC Description59
Page 61
End of Module, End of Program (EM)EM
Every program and/or every subprogram (Module) is terminated with an EM command. EM in a
Module initiates the return jump to the Call Module (CM, CMT, CMF). The program is continued with
the instruction following the Call Module. EM is handled as program end criterion; thus subsequent
program instructions can only be reached using a jump address.
End of Module if Logic Accumulator = 1 (EMT)
The EMT command only initiates the return jump to the Call Module (CM, CMT, CMF) if the Logic
Accumulator is 1.
End of Module if Logic Accumulator = 0 (EMF)
The EMF command only initiates the return jump to the Call Module (CM, CMT, CMF) if the Logic
Accumulator is 0.
Jump Label (LBL)
Operands: ASCII name (with up to 32 characters)
The jump label defines a program position as an entry point for the CM and JP commands. Up to
1000 jump labels per file can be defined.
The ASCII name of the jump label can be up to 32 characters long, although only the first 16
characters are used to differentiate between jump labels.
12.3 Classes of Markers and Bytes
MarkerApplication
M1000 to M1999To be assigned as desired. Settings erased after power interruption
(Reset).
M0 to M999To be assigned as desired. Settings erased after power interruption
(Reset).
M2000 to B3000Reserved for NC-to-PLC interface.
ByteApplication
B0 to B127To be assigned as desired. Settings erased after power interruption
(Reset).
B128 to B255To be assigned as desired. Settings erased after power interruption
(Reset).
B256 to B1023Reserved for NC-to-PLC interface.
60TNC 12212 PLC Description4/97
Page 62
12.4 Marker List
MarkerFunctionSetReset
M0000
to
M1499
M1500Rising edge I0 if M2497 setNCNC
M1501Rising edge I1 if M2497 setNCNC
M1502Rising edge I2 if M2497 setNCNC
M1503Rising edge I3 if M2497 setNCNC
M1504Rising edge I4 if M2497 setNCNC
M1505Rising edge I5 if M2497 setNCNC
M1506Rising edge I6 if M2497 setNCNC
M1507Rising edge I7 if M2497 setNCNC
M1508Rising edge I8 if M2497 setNCNC
M1509Rising edge I9 if M2497 setNCNC
M1510Rising edge I10 if M2497 setNCNC
M1511Rising edge I11 if M2497 setNCNC
M1512Rising edge I12 if M2497 setNCNC
M1513Rising edge I13 if M2497 setNCNC
M1514Rising edge I14 if M2497 setNCNC
M1515Rising edge I15 if M2497 setNCNC
M1700Falling edge I0 if M2497 setNCNC
M1701Falling edge I1 if M2497 setNCNC
M1702Falling edge I2 if M2497 setNCNC
M1703Falling edge I3 if M2497 setNCNC
M1704Falling edge I4 if M2497 setNCNC
M1705Falling edge I5 if M2497 setNCNC
M1706Falling edge I6 if M2497 setNCNC
M1707Falling edge I7 if M2497 setNCNC
M1708Falling edge I8 if M2497 setNCNC
M1709Falling edge I9 if M2497 setNCNC
M1710Falling edge I10 if M2497 setNCNC
M1711Falling edge I11 if M2497 setNCNC
M1712Falling edge I12 if M2497 setNCNC
M1713Falling edge I13 if M2497 setNCNC
M1714Falling edge I14 if M2497 setNCNC
M1715Falling edge I15 if M2497 setNCNC
M2008Axis X in positionNCNC
To be assigned as desiredPLCPLC
4/97TNC 12212 PLC Description61
Page 63
MarkerFunctionSetReset
M2009Axis Y in positionNCNC
M2010Axis Z in positionNCNC
M2045Strobe signal M CodeNCNC
M2050Operating mode: Programming and EditingNCNC
M2051Operating mode: ManualNCNC
M2054Operating mode: Single blockNCNC
M2055Operating mode: AutomaticNCNC
M2057Operating mode: Cross over reference marksNCNC
M2072M code bit 1NCNC
M2073M code bit 2NCNC
M2074M code bit 3NCNC
M2075M code bit 4NCNC
M2076M code bit 5NCNC
M2077M code bit 6NCNC
M2078M code bit 7NCNC
M2079M code bit 8NCNC
M2160Traversing direction (0 = positive, 1 = negative)NCNC
M2176Code operating mode (lsb)NCNC
M2177Code operating modeNCNC
M2178Code operating modeNCNC
M2179Code operating mode (msb)NCNC
M21801st PLC scan after power onNCNC
M2183Program interruption (control-in-operation symbol is blinking)NCNC
M2184Control in operation (control-in-operation symbol is on or
blinking)
M21851st PLC scan after an interruption of the PLC programNCNC
M2190Non-blinking error message is displayedNCNC
M2191EMERGENCY STOP error message is displayedNCNC
M2192
to
M2211
Can be set by MP4310.0 to MP 4310.19NCNC
NCNC
M2448NC startPLCPLC
M2449Rapid traversePLCPLC
M2450Memory function for axis direction keysPLCPLC
M2451Feed rate enablePLCPLC
M2456Manual traverse X+PLCPLC
M2457Manual traverse X–PLCPLC
M2458Manual traverse Y+PLCPLC
62TNC 12212 PLC Description4/97
Page 64
MarkerFunctionSetReset
M2459Manual traverse Y-PLCPLC
M2460Manual traverse Z+PLCPLC
M2461Manual traverse Z-PLCPLC
M2464Complement of NC-StartPLCPLC
M2465Complement of rapid traversePLCPLC
M2466Complement of memory function for axis direction keysPLCPLC
M2467Complement of feed rate enablePLCPLC
M2472Complement of manual traverse X+PLCPLC
M2473Complement of manual traverse X–PLCPLC
M2474Complement of manual traverse Y+PLCPLC
M2475Complement of manual traverse Y–PLCPLC
M2476Complement of manual traverse Z+PLCPLC
M2477Complement of manual traverse Z–PLCPLC
M2482Acknowledgment of M codePLCPLC
M2488NC stop (0 = stop)PLCPLC
M2497Activate the edge evaluation for PLC inputs
PLCPLC
Rising edges: Markers M1500 to M1659
Falling edges: Markers M1700 to M1859
M2544Open the control loop for axis XPLCPLC
M2545Open the control loop for axis YPLCPLC
M2546Open the control loop for axis ZPLCPLC
M2552Actual and nominal value transfer in axis XPLCPLC
M2553Actual and nominal value transfer in axis YPLCPLC
M2554Actual and nominal value transfer in axis ZPLCPLC
M2556Reference end position for axis XPLCPLC
M2557Reference end position for axis YPLCPLC
M2558Reference end position for axis ZPLCPLC
M2624Limit switch X+NCNC
M2625Limit switch X–NCNC
M2626Limit switch Y+NCNC
M2627Limit switch Y–NCNC
M2628Limit switch Z+NCNC
M2629Limit switch Z–NCNC
M2924
to
Error messages and dialogsPLCNC;
PLC
M2963
4/97TNC 12212 PLC Description63
Page 65
Word addresses
WordFunction
D288 to
Actual values in the X, Y and Z axes
D296
D300 to
Nominal values in the X, Y and Z axes
D308
D312 to
Reference values in the X, Y and Z axes
D320
D324 to
Servo lag in the X, Y and Z axes
D332
D360Current feed rate in mm/min
D364Maximum feed rate in mm/min
D768 to
Values from MP4210.0 to MP4210.9 (deceleration signal)
D804
W969 to
Values from MP4310.0 to MP4310.4
W968
W766% factor for feed rate override
64TNC 12212 PLC Description4/97
Page 66
13 Error Messages
PROCESSOR CHECK X
ENCODER <AXIS> DEFECT X
POS. ERROR X <AXIS>
X ⇒
X ⇒
X ⇒
0 = Checksum NC-EPROM incorrect
1 = CRC sum MP incorrect
2 = CRC sum NC memory incorrect
4 = Cross feed between data bits in the RAM
5 = Checksum PLC-EPROM incorrect
6 = Stack overflow
7 = Timeout EEPROM
A = Software error
B = Incorrect interrupt
C = Overflow time slice
A = Signal amplitude too low
B = Frequency exceeded
A = Servo lag monitoring
C = Movement monitoring
D = Standstill monitoring
Marker list 61
Memory test 32
Monitoring functions 29
Monitoring, encoder 30
Monitoring, movement 29
Monitoring, position 29
Monitoring, standstill 29
Movement monitoring 29
NO CONTROL VOLTG 35
Nominal voltage, polarity of 17
Offset compensation 28
Pin layout X1, X2, X3 11
PLC commands 46
PLC EPROM 7; 45
PLC EPROM addresses 45
PLC inputs 12
PLC outputs 12
POS. ERROR 33
Position display 31
Position feedback control 24
Position loop gain 24
Position monitoring 29
Positioning window 29
Power connector X51 11
Power supply 8
Programming station 32
Ramp gradient 24
Rapid traverse control 25
Rapid traverse, analog voltage 26
Reference end position 19
Reference marks 18
Reference marks, distance-coded 19
Removing the TNC 121 36
RS-232-C 15
Screw pitch 16
Servo lag 24
Servo lag, internal adjustment 25
Signal period 16
Software limit switches 17; 19
Software, ID number 6
Specifications 4
Standstill monitoring 29
Tool length in position display 31
Traverse direction 17
Traverse ranges 17
Trip dog 19
V.24 15
Voltage, bottom 24
4/97TNC 12215 Subject Index69
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.