Download Print this page

Example Program - Mitsubishi Electric MELSEC FX-2DA User Manual

Special function block
Hide thumbs Also See for MELSEC FX-2DA:

Advertisement

5
5.1 Basic program
In the following example, channel CH1 is set to voltage output, while CH2 is set to current output. The FX-
2DA unit is connected at the position of special function block No.1. If the programmable controller is
changed to the STOP mode, the last data sent will remain and the outputs will hold.
M8000
FROM(P)
RUN
monitor
CMP
M1
TO(P)
Set CH1 setting to D0
Set CH2 setting to D1
TO
FROM
M10
M18
NO
READY
error

EXAMPLE PROGRAM

K1
K30
D4
K1
K3010
D4
M0
K1
K0
H10
K1
(-2,000 to +2,000)
( 0 to +1,000)
K1
K1
D0
K2
K1
K29
K4M10
K1
M20
M3
Output
range
normal
The ID code for the special function block at position
"1"is read from BFM #30 of that block and stored at
D4 in the FX base unit. This is compared to check the
block is an FX-2DA, if OK M1 is turned ON. These
two program steps are not strictly needed to perform
an analog output. They are however a useful check
and are recommended as good practice.
The analog output channels (CH1, CH2) are set up
by writing H10 to BFM #0 of the FX-2DA.
(D0 → BFM #1 (output to CH1))
(D1 → BFM #2 (output to CH2))
The operational status of the FX-2DA is read from
BFM #29 and output as bit devices at the FX base
unit.
Output data normal

Advertisement

loading