2 plc example – HEIDENHAIN TNC 335 Technical Manual User Manual

Page 268

Advertising
background image


8/95

TNC 360

10 Electronic handwheel

4-171

10.3.2 PLC example

In the following example the currently selected axis is evaluated so that this axis can be moved with
the +/

keys. This example is for the X axis (MP7640=4, MP7641=0 and MP7645.0 = 0).

Key on HR 332

PLC input or output

+ Key

I170

– Key

I169

+ LED

O105

– LED

O106

;Main program
LBL 1
PS
CM
PL

K+9
9035
B0

Interrogate the selected handwheel axis with 9035

L

K+0

Erase the 8 Markers for "manual"

B=

M2456

traverse of the axes X to IV

L

K$FF

Set the 8 complement markers

B=

M2472

A

MO

Erase the PLC outputs

ON

MO

O100 to O106.

R

O100

All LEDs except the

R

O101

LED of the selected

R

O102

axis are switched off.

R

O103

R

O104

R

O105

R

O106

Case

B0

Evaluate the selected handwheel axis

CM

10

X axis

CM

11

Y axis

CM

12

Z axis

CM

13

IV axis

ENDC
EM

LBL 10

X axis

LN

M2457

If X– is not active

A

I170

and the + key is pressed,

S

M2456

the axis moves in X+

R

M2472

direction.

S

O105

LED on the + key lights up.

LN

M2456

If X+ is not active

A

I169

and the – key is pressed,

S

M2457

the axis moves in X–

R

M2473

direction.

S

O106

LED on the – key lights up.

EM

Advertising