Mitsubishi Electronics MELSEC-F Manuel D’Utilisation

Page de 504
K-27
4 Programming
4.9 Basic Program Example
FX
3G
/FX
3U
/FX
3UC
 PLC User's Manual - Analog Control Edition
FX
3U
-4AD-PNK-ADP (4-channel Resistance Thermometer Data Input)
K
FX
3U
-4A
D
-P
NK
          
         
-A
D
P
L
FX
3U
-4AD
-TC
        
        
   -
A
D
P
M
PI
D
 In
st
ru
ctio
n
           (F
N
C
 88
)
4.9
Basic Program Example
Create the following basic program to read out the temperature measurement data.
• For  FX
3G
, FX
3U
, FX
3UC
 Series PLC
The following program will select Pt1000 and will store the temperature measurement data (
°C
) of channels 1 
and 2 of the 3rd
*1
 adapter in the D100 and the D101, respectively. The averaging time will be set to "32" for 
channel 1, and "128" for channel 2.
Even if the temperature measurement data is not stored to D100 or D101, data registers D8280 or D8281 can 
be directly used in the arithmetic operation instruction or a PID instruction.
*1.
"1st" for the FX
3G
 PLC.
M8002
M8001
M8280
Sets the temperature unit to
centigrade (
°C)
M8002
FNC 12
MOV
K32
D8284
FNC 12
MOV
K128
D8285
Sets the averaging time to "32" for
channel-1 data
Sets the averaging time to "128" for
channel-2 data
M8281
Selects Pt1000
RST
M6
RST
M7
Error status of 3rd
*1
 analog special
adapter
b6 = OFF (hardware error)
Error status of 3rd
*1
 analog special
adapter
b7 = OFF (communication data error)
M8000
FNC 12
MOV
D8280
D100
FNC 12
MOV
D8281
D101
Stores the current value of the
channel-1 measurement
temperature data to D100.
Stores the current value of the
channel-2 measurement
temperature data to D101.
M8000
Normally
ON
Initial
pulse
MOV
D8288
K4M0
MOV
K4M0
D8288