Installation manual
CNC 8035
8.
PLC PROGRAMMING
Action instruction.
(SOFT M: V15.3X)
(S
OFT T: V16.3X)
·310·
8.5.4 Arithmetic action instructions
= MOV
It is used to move data from one PLC resource to another.
The programming format is:
The source and destination codes indicate the original and destination format (binary or BCD) of
the data. 4, 8, 12, 16, 20, 24, 28 or 32 bits may be transmitted.
If the codes and number of bits to be moved are not indicated, 32 binary bits will be moved bit to
bit (0032).
If the number to be converted from binary to BCD is larger than the maximum BCD, its value will
be truncated ignoring the most significant bits.
The maximum BCD value that can be converted is:
In these cases, it is recommended to make the move increasing the number of bits by using, if
necessary, registers or marks in intermediate steps.
Example: I11 = MOV I14 O16 108
If input I11 is "=1", the PLC moves the logic states of the 8 inputs (I14 plus the next 7) in BCD code
to the 8 outputs (O16 and the next 7) in binary code.
= NGU
Complements the bits of a register.
It changes the state of each one of the 32 bits of a register.
Example: I15 = NGU R152
If input "I15 is =1", the PLC changes the state of the 32 bits of register R152.
Origin Destination Source code Destination code Number of bits to
transmit
MOV I 1/512
O 1/512
M 1/5957
T 1/256
C 1/256
R 1/559
#
I 1/512
O 1/512
M 1/5957
R 1/559
(Bin)
1(BCD)
0(Bin)
1(BCD)
32
28
24
20
16
12
8
4
MOV I12 M100 0032 from Binary to Binary in 32 bits
MOV O21 R100 0012 from Binary to Binary in 12 bits
MOV C22 O23 0108 from Binary to BCD in 8 bits
MOV T10 M112 1020 from BCD to Binary in 20 bits
9 with 4 bits
99 with 8 bits
999 with 12 bits
9999 with 16 bits
99999 with 20 bits
999999 with 24 bits
9999999 with 28 bits
99999999 with 32 bits
R152 before 0001 0001 0001 0001 0001 0001 0001 0001
R152 after 1110 1110 1110 1110 1110 1110 1110 1110