Mitsubishi Electronics MELSEC-F Home Theater Server User Manual


 
B-59
7 Examples of Practical Programs
7.3 Program That Uses Data History Function
A
Common Items
B
FX
3U
-4AD
FX
3UC
-4AD
C
FX
3U
-4AD-ADP
D
FX
3G
-2AD-BD
E
FX
3U
-4DA
F
FX
3U
-4DA-ADP
G
FX
3G
-1DA-BD
H
FX
3U
-3A-ADP
I
FX
3U
-4AD-PT
-ADP
J
FX
3U
-4AD-PTW
-ADP
FX
3G
/FX
3U
/FX
3UC
PLC User's Manual - Analog Control Edition
FX3U-4AD/FX3UC-4AD (4-channel Analog Input)
2. Example of sequence program
•For FX3U, FX3UC Series PLCs
*1. After setting the input mode, set the data writing time (waiting time) to 5 seconds or more for each
setting.
After this, if the same input mode is used, it is not necessary to set the input mode and waiting time
(T0 K50) again.
*2. The set input mode and the sampling time are retained in the 4AD EEPROM. Therefore, even if the
sequence program is deleted, the previously set functions will still be valid.
*3. If a large amount of history data is read out, the scan time of the PLC will be become longer. If the
scan time exceeds 200 ms, the CPU error indicator lamp will illuminate, and the PLC will stop.
Insert WDT instruction (watchdog timer refresh) between BMOV instructions.
M8002
FNC 12
MOV
H3300 U0\G0
P
M8000
K50
T0
*1
T0
Input modes of channels 1 to 4 will be
specified.
The sampling time will be set to 100 ms.
Initial pulse
FNC 15
BMOV
U0\G10 D0 K4
RUN monitor
The digital values set for channels 1
to 4 will be read out to D0 to D3.
FNC 12
MOV
K100 U0\G198
P
Data history of all the channels will be
erased.
X000
FNC 12
MOV
H000F U0\G199
P
Clear data
history
*2
Data history of all the channels will be
temporarily stopped.
X001
FNC 12
MOV
H0F00 U0\G199
P
Temporarily stop
data history
Temporary stoppage of data history will be
canceled for all the channels.
FNC 12
MOV
H0000 U0\G199
P
Temporarily stop
data history
X001
T0
FNC 15
BMOV
U0\G200 D100 K100
FNC 15
BMOV
U0\G1900 D200 K100
FNC 07
WDT
FNC 07
WDT
FNC 15
BMOV
U0\G3600 D300 K100
FNC 15
BMOV
U0\G5300 D400 K100
FNC 07
WDT
FNC 07
WDT
Channel-1 history data (100 data samples)
will be read out to D100 to D199.
Channel-2 history data (100 data samples)
will be read out to D200 to D299.
Channel-3 history data (100 data samples)
will be read out to D300 to D399.
Channel-4 history data (100 data samples)
will be read out to D400 to D499.
The watchdog timer will be refreshed.
*3
The watchdog timer will be refreshed.
*3
The watchdog timer will be refreshed.
*3
The watchdog timer will be refreshed.
*3
*2