Mitsubishi Electric Artisan MELSEC-Q Series Manual page 140

General-purpose programmable controllers, large/small
Table of Contents

Advertisement

7.1 Replace instructions with different QCPU instruction format (excluding AnACPU/AnUCPU dedicated instructions)
(3) Program replacement example
ACPU "ASC" instruction program
* Up to 8 characters of ASCII codes are stored in D0 to D3.
M0
0
* Up to 8 characters of ASCII codes are stored in D10 to D13.
* 5 characters are specified. Higher byte of D12: 20H, D13: 2020H.
M1
14
28
Replacement QCPU program
(Unconvertible instructions are replaced with SM1255)
* Conversion to character string instruction, ASC, is unconvertible and replaced with "SM1255".
M0
0
* Conversion to character string instruction, ASC, is unconvertible and replaced with "SM1255".
M1
3
6
Modified QCPU program using "$MOV" instruction
8 characters are specified, and ASCII codes are stored in D0 to D3.
Since "00H" is added after the last character, "0000H" is stored in D4.
When the program is replaced, make sure that D4 is not used elsewhere for other purposes.
M0
0
Stores ASCII code of up to 32 characters in D10.
The last occupied device is D25 when 32 characters are specified.
However, "0000H" is stored in D26 because "00H" is added after the last character.
M1
103
203
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
ASC
ASC
$MOVP
"ABCD1234"
$MOVP
"1234567890123456"
137
ABCD1234
D0
XYZ789
D10
END
SM1255
SM1255
END
D0
D10
END

Advertisement

Table of Contents
loading

Table of Contents