Mitsubishi Electric MELSEC FX Series User Manual page 141

Programmable logic controllers
Hide thumbs Also See for MELSEC FX Series:
Table of Contents

Advertisement

FX communication
3 ) Example program
M8002
FNC 79
Initial
pulse
FNC 79
FNC 79
FNC 79
FNC 79
FNC 79
X000
Send command input
M 1
FNC 79
M8000
M8003
RUN
Initial pulse NC contact
monitor
FNC 78
M10
Send completion
M13
Error occurrence
X001
Error reset input
M11
FNC 78
Receive
completion
M8000
FNC 79
K 0
K 0
H009F K 1
TO
Block No.
BFM No.
Transfer
source
K 0
K 2
K 8
TO
H02
K 0
K 4
(STX)
TO
H03
K 0
K 6
(ETX)
TO
H02
K 0
K 8
(STX)
TO
H03
K 0
K 10
(ETX)
TO
PLS
FNC 12
K 9
MOV
FNC 12
H3231 D 201
MOV
FNC 12
H3433 D 202
MOV
FNC 12
H3635 D 203
MOV
FNC 12
H3837 D 204
MOV
FNC 12
H0039 D 205
MOV
K 0
K1000 D200
TO
K 0
K 28 K4M10 K 1
FROM
Block No.
BFM No. Transfer
destination
K 0
K2001 D301
FROM
K 0
K 1
K1M0
TO
Transfer of communication format
→BFM#0)
(009F
H
Number of
transfer points
Transfer of receive upper limit byte count
K 1
(K 8→BFM#2)
Send header
K 1
→BFM#4)
(02
H
Send terminator
K 1
→BFM#6)
(03
H
Receive header
K 1
→BFM#8)
(02
H
Receive terminator
K 1
→BFM#10)
(03
H
Send command
M 1
Send byte count
D 200
(K9→D200)
( 2 1 )
( 4 3 )
Send data (as many as 9 bytes)
( 6 5 )
[ 1 2 3 4 5 6 7 8 9 ]
( 8 7 )
( _ 9 )
Unused
Transfer of send byte count and send data
D200(K 9)→BFM#1000
K 6
D201(2 1)→BFM#1001
D202(4 3)→BFM#1002
D203(6 5)→BFM#1003
D204(8 7)→BFM#1004
D205(_ 9)→BFM#1005
M 0
Send/receive enable
Read of status
(BFM#28 b15 to b0→M25 to M10)
Number of
transfer points
Y 0
Status monitor (upon necessity)
Y 1
Error reset
M 3
Read of receive buffers
K 4
BFM#2001→D301
BFM#2002→D302
BFM#2003→D303
BFM#2004→D304
Receive completion reset
M 2
command
Transfer of command
K 1
(M3 to M0→BFM#1 b3 to b0)
FX
-232IF 10
2N
10
10-21

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rs-232cRs-422Rs-485

Table of Contents