EasyManua.ls Logo

Mitsubishi Electric MELSEC FX Series - Page 637

Mitsubishi Electric MELSEC FX Series
838 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
7 Applied Instructions
7.20 Character String Control
635
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
1
Outline
2
Instruction List
3
Configuration of
Instruction
4
How to Read
Explanation of
Instructions
5
Basic Instruction
6
Step Ladder
Instructions
7
Applied
Instructions
8
Interrupt Function
and Pulse Catch
Function
A
Relationships
between devices
and addresses
Program examples
In the program below, the 16-bit binary data stored in D10 is converted into a character string in accordance
with the digit specification by D0 and D1 when X000 is set to ON, and then stored in D20 to D23.
[Structured ladder] [ST]
X000
Data to be converted
is set.
The number of all
digits is set.
The number of digits
of the decimal part is set.
STRP
EN ENO
d
s1
s2
MOVP
EN
s
ENO
d
D10
K12672
MOVP
EN
s
ENO
d
D0
K6
MOVP
EN
s
ENO
d
D1K0
D10
VAR_01
*1
VAR_02
*2
*1. VAR_01 is a global label and is defined as D0.
*2. VAR_02 is a global label and is defined as D20.
MOVP(X000,K12672,D10);
MOVP(X000,K6,D0);
MOVP(X000,K0,D1);
VAR_02:=STRP(X000,VAR_01,D10);
12672
6
0
D10
D0
D1
Number of all digits
Number of digits of decimal part
16-bit binary data
12672"
"
b15 b8 b7 b0
D20 31H(1)
36H(6)
0000H
20H(Space)
34H(2)
32H(2) 37H(7)
D21
D22
D23

Table of Contents

Other manuals for Mitsubishi Electric MELSEC FX Series

Related product manuals