Mitsubishi Electric MELSEC FX Series User Manual page 145

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
comple-
tion
M8000
FNC 79
K 0
K 0
H409F
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
H31
MOV
Program as follows
in the same way.
MOV H32 D202
MOV H33 D203
MOV H34 D204
MOV H35 D205
MOV H36 D206
MOV H37 D207
MOV H38 D208
MOV H39 D209
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
K 1
→BFM#0)
(409F
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
M 1
Send command
Send byte count
D 200
(K9→D200)
D 201
( 1 )
( 2 )
( 3 )
Send data (as many as 9 bytes)
( 4 )
[ 1 2 3 4 5 6 7 8 9 ]
( 5 )
( 6 )
( 7 )
( 8 )
( 9 )
Transfer of send byte count and send data
K 10
D200(K9)→BFM#1000 D205( 5 )→BFM#1005
D201( 1 )→BFM#1001 D206( 6 )→BFM#1006
D202( 2 )→BFM#1002 D207( 7 )→BFM#1007
D203( 3 )→BFM#1003 D208( 8 )→BFM#1008
D204( 4 )→BFM#1004 D209( 9 )→BFM#1009
Send/receive enable
M 0
Read of status
(BFM#28 b15 to b0→M25 to M10)
Number of
transfer points
Y 0
Status monitor (upon necessity)
Y 1
M 3
Error reset
Read of receive buffers
K 8
BFM#2001→D301 BFM#2005→D305
BFM#2002→D302 BFM#2006→D306
BFM#2003→D303 BFM#2007→D307
BFM#2004→D304 BFM#2008→D308
Receive completion reset command
M 2
Transfer of command
K 1
(M3 to M0→BFM#1 b3 to b0)
FX
-232IF 10
2N
10
10-25

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rs-232cRs-422Rs-485

Table of Contents