E L C P r o g r a m m i n g M a n u a l
F o r m o r e i nf o r m a t i o n v i sit :
w w w. e a t o n . c o m
MN05003003E
3-22
3.
Moving K1M0, K2M0, K3M0 to a 16-bit register clears the upper unused bits in the destination
word. It’s the same as for K1M0, K2M0, K3M0, K4M0, K5M0, K6M0, K7M0 to 32-bit registers.
The upper bits not included in the move are cleared in the 32-bit destination value.
4.
The unused upper bits will be 0 if K1 to K3 is used in a 16-bit operation or K1 to K7 is used in a
32-bit operation. Therefore, the operation result is a positive decimal value
M0
K2X0
D0
MOV
The state of input bits X0-X7 will be assigned to
the lower 8 bits of D0. Each of the upper 8 bits
of D0 will contain 0
Assign Continuous Bit Numbers
As already explained, bit devices can be grouped into 4 bit units. The “n” in KnM0 defines the
number of groups of 4 bits that are used for this data operation. For data register D, consecutive D
registers refers to D0, D1, D2, D3, D4…; For bit devices with Kn, consecutive numbers refers to:
K1X0 K1X4 K1X10 K1X14…
K2Y0 K2Y10 K2Y20
Y2X30…
K3M0 K3M12 K3M24 K3M36…
K4S0 K4S16 K4S32
K4S48…
Note:
When moving bits to a word or a double word, realize that the upper bits of the destination
that are not included in the source, i.e. n=1, 2 or 3, will be filled with 0s. For example, if K4M0 is
moved to a double word using a DMOV instruction, the upper word will contain all 0s after the
DMOV is executed.
Floating Point Operation
When performing integer math, the decimal point from a division operation for example will be
discarded. In other words, 40 ÷ 3 = 13, remainder is 1 and the decimal point will be discarded. But
using floating point math, the decimal point is used.
The application instructions related to floating point operation are shown in the following table.
FLT DECMP
DEZCP
DMOVR
DRAD
DDEG DEBCD
DEBIN DEADD
DESUB
DEMUL DEDIV DEXP DLN
DLOG
DESQR DPOW INT
DSIN
DCOS
DTAN DASIN DACOS
DATAN
DSINH
DCOSH DTANH DADDR DSUBR DMULR
DDIVR
Binary Floating Point
The ELC controllers use the IEEE754 method to represent floating point numbers with 32-bits:
Содержание ELC-PB
Страница 1: ......
Страница 5: ...For more information visit www eaton com MN05003003E iv...
Страница 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Страница 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Страница 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Страница 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...