Program Example 3 (User Messages Plus Data Display) - Mitsubishi FX3U SERIES User Manual

Hide thumbs Also See for FX3U SERIES:
Table of Contents

Advertisement

FX
Series Programmable Controllers
3U
User's Manual - Hardware Edition

19.23.6 Program example 3 (user messages plus data display)

The following is a program example in which the counter's current value appears at the user message.
Note that user messages do not appear when a screen other than the "top screen (time display)" is displayed.
1. Operation
The message shown below appears when auxiliary relay M100 switches on.
In this program example, the system information is assigned from D50 to D90 and from M50 to M56.
< P r o
d u
c
T a r
g
e t
P r o d u
c
t
R e m
a
i n
i
n
*1.
The current values of the devices shown below appear as the target quantity, the production quantity,
and the remaining quantity.
Item
Target
Production C0
Remaining D201
2. Displaying a word device current value as a message
A numeric value can be displayed at the user message by combining BCD (FNC18), ASCI (FNC82), and
BMOV (FNC15) instructions, etc.
3. Character data
User message data to be displayed is created in GX Developer, and is assigned to file registers D1000 to D1031.
4. Program
M8002
Initial pulse
M101
M8000
RUN monitor
M100
Continued on next page
398
t
i o
n
>
*
1
i o
n
*
1
g
*
1
Device
D200
Specifies the C0 setting.
Counts the number of M101 ON operations.
Remaining (D201) = target (D200) - production (C0).
BMOV
BMOV
BMOV
Remarks
→ Refer to Subsection 19.23.7 for character data input.
MOV
K50
D8300
MOV
K50
D8301
MOV K10000 D200
D200
C0
SUB
D200
C0
D201
M54
D1000
D59
K32
MOV
D200
D100
CALL
P0
D140
D72
K3
MOV
C0
D102
CALL
P0
D150
D80
K3
19 FX3U-7DM (Display Module)
19.23 User Message Display Function
Sets system information (system
signal 1) at D50 to D90.
Sets system information (system
signal 2) at M50 to M56.
Specifies "10000" as the target
quantity
Production quantity count setting is
specified indirectly by D200.
Remaining quantity
User message display command.
Sets character data other than "Target",
"Production", and "Remaining".
Starts a sub-routine program that
adds a space (20H) to the target
quantity (D200) current value (5
digits) to generate 6-character data.
Saves the generated character data
at the user message display position.
Starts a sub-routine program that
adds a space (20H) to the production
quantity (C0) current value (max. 5
digits) to generate 6-character data.
Saves the generated character data
at the user message display position.

Advertisement

Table of Contents
loading

Table of Contents