Operation & Software Manual
34
Direct Drives & Systems
Chapter A: Internal functioning & architecture
ETEL Doc. - Operation & Software Manual # DSC2P 903 / Ver. F / 3/6/05
6.5.2
Examples of use
This chapter is dedicated to examples which show how to set a register and to read the value contained in it.
To set a register with an immediate value or with a value contained in any other register (K, X or M) or even
adding a value of one register to the one of another register, etc, is possible
Do not forget that it is not possible to write a value in
a monitoring M and those depths are only defined
for parameters K.
Take parameters K4 and K1 of axis 1 and K4 and
K32 of axis 2, each containing the values shown in
this table. Examples are gathered in the table below
and divided into two groups, the first with register
value reading examples, and the second with
register setting examples.
The controller always sends in response the line entered by the user unless the register has an alias which is
sent back in this case.
Remark:
Refer
for more information about the mathematical ope, -, *, /, ~, &, l, &~, l~, >>
and <<, .
Input command Controller response
Comment
Read
ing
r
e
giste
r v
alue
K1.1
K1.1=1000
Reads the value contained in the K1 user register of the axis 1 at depth 0
K4:0.2
K4:0.2=4
Reads the value contained in the K4 user register of the axis 2 at depth 0.
K32:2.2
K32:2.2=2
Reads the value contained in the K32 register of the axis 2 at depth 2.
M4.2
M4.2=32
Reads the value contained in the M4 register of the axis 2.
K32:1.2, K4:2.2 K32:1.2=3, K4:2.2=5
Simultaneous reading of two registers. This function only works when both
registers belong to the same axis.
M73.1
SER.1=1245
The M73 register contains the serial number of the controller. Since the SER alias
is defined for this register, the controller responds with the alias.
R
egist
er sett
ing
K4.2=15
K4.2=15
The immediate value 15 is stored at depth 0 (by default) of the axis 2 and replaces
the value 4.
K4:2.2=23
K4:2.2=23
The immediate value 23 is stored at depth 2 of the axis 2 and replaces the value 5.
K4:1.1=K32:3.2
K4:1.1=K32:3.2
The value contained in register K32 of axis 2 at depth 3 is copied in register K4 of
the axis 1 at depth 1. 12 replaces 8.
K4:3.1+=M4.2
K4:3.1+=M4.2
The K4 register of the axis 1 contains at depth3 the value 33=1+32
K1:1.1/=7
K1:1.1/=7
The K1 register of axis 1 contains at depth 1 the value 3=23/7.
It is the integer part of the division.
K4
K1
K4
K32
M4
Depth 0
0
1000
4
1
32
Depth 1
8
23
0
2
Depth 2
0
37
5
2
Depth 3
1
9
0
8
Axis 1
Axis 1
Axis 2
Axis 2
Axis 2