Download  Print this page

Mitsubishi Electric Artisan MELSEC-Q Series Manual Page 148

General-purpose programmable controllers, large/small.
Hide thumbs

Advertisement

(2) When using index register as 32-bit (2-word) data
The index register numbers and their combination will change after converting the ACPU program to QCPU.
It is necessary to modify the program.
ACPU program
X0
0
18
Replacement QCPU program
X0
0
12
Modified/corrected QCPU program
X0
0
12
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
7.3 Use index register as a 32-bit (2-word) device
/P
Z1 does not interfere with the division instruction.
/P
Z1 is not stored in the proper location because Z1 is overwritten
by the remainder of the division instruction.
/P
Since Z1 is overwritten by the remainder of the division
instruction, change it to an unused index register.
145
D0
K10
Data to be
divided
Quotient is stored in Z and remainder
is stored in V.
MOVP
V
INCP
D0
K10
Data to be
divided
Quotient is stored in Z0 and remainder
is stored in Z1.
MOVP
Z1
INCP
D0
K10
Data to be
divided
Quotient is stored in Z0 and remainder
is stored in Z1.
MOVP
Z1
INCP
Z
R0Z1
Remainder data
save destination
Z1
END
Z0
R0Z1
Remainder data
save destination
Z1
END
Z0
R0Z2
Remainder data
save destination
Z2
END

Advertisement

Table of Contents

   Related Manuals for Mitsubishi Electric Artisan MELSEC-Q Series

Comments to this Manuals

Symbols: 0
Latest comments: