Download Print this page

Mitsubishi FX2N-4AD-PT User Manual page 5

Fx2n series

Advertisement

7. SYSTEM BLOCK DIAGRAM
PLC
Command
information
write and
data status
read
24V DC
Power Source
8. EXAMPLE PROGRAM
In the program shown below, the FX
is the third closest block to the PLC). The averaging amount is four. The averaged values in degrees C of
input channels CH1 to CH4 are stored respectively in data registers D0 to D3.
M8002
FNC78
FROM
Initiali-
zation
FNC10
K2040 D10
Pulse
CMP
M8000
FNC78
FROM
RUN
monitor
M10
M1
FNC79
TO
or
M8000
FNC78
FROM
POWER
5V Power
LED
Supply
Buffer
TO
Memory
RAM
CPU
FROM
System
ROM
DC/DC
converter
FX
-4AD-PT Analog Block
2N
-4AD-PT block occupies the position of special block number 2 (that
2N
K2
K30
D10
K1
M0
This initial step checks that the special function block placed at position 2 is
actually an FX
-4AD-PT, i.e. its unit identification number is 2040 (BFM #30).
2N
This step is optional, but it provides a software check that the system has been
configured correctly.
K2
K29 K4M10 K1
Y010
This step provides optional monitoring of the FX
(#29). If there is an Error on the FX
This can be read by this program step, and output as a bit device in the PLC (Y010 in
this example). Additional Error devices can be output in a similar manner, i.e. b10 BFM
#29. (see below)
M8000
FNC78
K2
FROM
M10
M20
K2
K1
K4
K4
K2
K5
D0
K4
This step is the actual reading of the FX
the only program step which is needed. The "TO" instruction in this example, sets
the input channels, CH1 to CH4, to take the average reading of four samples.
The "FROM" instruction reads the average temperatures (BFM #5 to #8) for input
channels CH1 to CH4 of the FX
required BFM #9 to #12 should be read instead, ex.
FNC78
K2
FROM
special
FX
2N
block No.2
BFM number
Gain and offset
values are
stored in the
EEPROM
Photocoupler
Converted
data
Control
signals
±15V
5V
5V
24V
LED
Block No.2 BFM #30 → (D10)
Identification code
When (K2040) = (D10), M1 = ON
i.e. When identification code is K2040, M1 = ON
Block No.2 BFM #29 → (K4M10)
Transfer the error status to (M25 to M10).
When error is found, M10 = ON.
Represents b0 BFM #29
-4AD-PT, bit b0 of BFM #29 will be set on.
2N
K29
K4M10
K1
Y010
Y011
(K4) → (BFM #1 to #4)
Number of samples is changed to four on CH1 to CH4.
(BFM #5 to #8) → (D0 to D3)
Transfer the averaged temperature value in °C to the
data registers.
-4AD-PT input channels. It is essentially
2N
-4AD-PT. If direct temperature readings are
2N
K9
D0
K4
result
-4AD-PT
No. of
destination
words read
Analog Input
A/D
converter
Multiplexer
A/D
LED
Cyclic switching
-4AD-PT Error Buffer Memory
2N
Represents b0 BFM #29
Represents b10 BFM #29
CH1
CH2
CH3
CH4

Advertisement

loading