Справочник Пользователя для Mitsubishi Electronics MELSEC-F

Скачать
Страница из 504
J-25
4 Programming
4.8 Basic Program Example
FX
3G
/FX
3U
/FX
3UC
 PLC User's Manual - Analog Control Edition
FX
3U
-4AD-PTW-ADP (4-channel Platinum Resistance Thermometer Data Input)
A
Comm
on I
te
ms
B
FX
3U
-4AD
FX
3UC
-4
A
D
C
FX
3U
-4A
D
-A
D
P
D
FX
3G
-2A
D
-BD
E
FX
3U
-4DA
F
FX
3U
-4D
A
-AD
P
G
FX
3G
-1D
A
-BD
H
FX
3U
-3
A-
ADP
I
FX
3U
-4
A
D
-P
T
       
         
   -
A
D
P
J
FX
3U
-4A
D
-P
TW
     
        
      -
A
D
P
4.8
Basic Program Example
Create the following basic program example to read out the temperature measurement data.
• For  FX
3G
, FX
3U
, FX
3UC
 Series PLC
The following program will store the temperature measurement data (
°C) from channels 1 and 2 of the 3rd
*1
 
adapter to D100 and D101, respectively. The averaging time is set to "1" (immediate data) for channel 1, and 
"5" for channel 2.
Even if the temperature measurement data is not stored in D100 or D101, data register D8280 or D8281 can
be directly used in the arithmetic operation instruction or a PID instruction.
*1.
"1st " for the FX
3G
 PLC.
• For  FX
3U
, FX
3UC
 Series PLC
The following program will store the temperature measurement data (
°C) from channels 1 and 2 of the 1st
adapter to D100 and D101, respectively. The averaging time is set to "1" (immediate data) for channel 1, and
"5" for channel 2.
Even if the temperature measurement data is not stored in D100 or D101, data register D8260 or D8261 can
be directly used in the arithmetic operation instruction or a PID instruction.
M8002
Initial
pulse
M8001
M8000
Normally
ON
M8280
Sets the temperature unit to centigrade
(
°C).
M8002
FNC 12
MOV
K1
D8284
FNC 12
MOV
K5
D8285
Sets the averaging time to "1" for
channel-1 data.
Sets the averaging time to "5" for
channel-2 data.
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
temperature measurement data in the D100.
Stores the average value of the channel-2
temperature measurement data in the D101.
MOV
D8288
K4M0
MOV
K4M0
D8288
M8002
M8001
M8260
Sets the temperature unit to centigrade
(
°C).
M8002
FNC 12
MOV
K1
D8264
FNC 12
MOV
K5
D8265
Sets the averaging time to "1" for
channel-1 data.
Sets the averaging time to "5" for
channel-2 data.
RST
D8268.6
RST
D8268.7
Error status of 1st analog special
adapter
b6 = OFF (hardware error)
Error status of 1st analog special
adapter
b7 = OFF (communication data error)
M8000
FNC 12
MOV
D8260
D100
FNC 12
MOV
D8261
D101
Stores the current value of the channel-1
temperature measurement data in the D100.
Stores the average value of the channel-2
temperature measurement data in the D101.