Mitsubishi Electric melsec q00ujcpu User Manual page 582

Programmable controller
Hide thumbs Also See for melsec q00ujcpu:
Table of Contents

Advertisement

(c) Program after replacement
In the sequence program after replacement, two programs are required as shown below.
<Before transition>
Main routine
program
END
1) Main routing program
• Set "0" in the input data area on the rising edge of the execution instruction ("M0" in the program below)
and initialize the program.
• Execute the CALL instruction on every rising edge of the strobe signal ("X108" in the program below) so
that a subroutine program is called.
• In the subroutine program, input codes are added to the input data area and the completion status is
checked.
• Pass the following data to the subroutine program at execution of the CALL instruction.
1) ASCII code input values from the input module (Xn0 to Xn7)
2) Number of digits to be input
3) Indirect address of the input data area (Use the ADRSET instruction to acquire the indirect
address for the input data area.)
4) Bit devices to be turned on when input is completed
<After transition>
Main routine
program
FEND
P2
Subroutine
program
RET
END
Figure App.16 Program execution
Figure App.17 Sample program
Initial processing
ASCII code is added to the input data area.
The input data area is initialized.
A subroutine program is called at
the rising edge of the strobe signal.
APPENDICES
1
2
3
APPEN-
DIX
6
7
8
App - 38

Advertisement

Table of Contents
loading

Table of Contents