B-56
7 Examples of Practical Programs
7.2 Program That Uses Convenient Functions
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, convenient functions, upper/lower limit error status data automatic transfer-to
data register number, over-scale status data automatic transfer-to data register number, and error
status data automatic transfer-to data register number are retained in the 4AD EEPROM. For this
reason, even if the sequence program is deleted, the previously set functions will still be valid.
M8002 FNC 12
MOV H3300 U0\G0
P
M8000 K50
T0
*1
T0
Input modes of channels 1 to 4 will be
specified.
The convenient functions will be set.
Initial pulse
The upper/lower limit error status data automatic
transfer-to data register will be set to D100.
FNC 15
BMOV U0\G10 D0 K4
RUN monitor
Reads the digital values of channels 1 to 4 from BFM#10
to #13 into D0 to D3.
FNC 12
MOV H01A2 U0\G22
P
FNC 12
MOV K100 U0\G 126
P
FNC 12
MOV K101 U0\G 128
P
FNC 12
MOV K102 U0\G 129
P
The over-scale status data automatic transfer-to dat a
register will be set to D101.
The error status data automatic transfer-to data register
will be set to D102.
X000 FNC 12
MOV H0003 U0\G99
P
Clearance of upper/lower
limit error data
Clearance of over-scale
data
X001 FNC 12
MOV K0 U0\ G28
P
Clearance of upper/lower limit error data
Clearance of over-scale data
M8000 FNC 12
MOV D100 K2Y000 The upper/l ower limit error status data of each channel
will be output to Y000 to Y007.
RUN monitor
FNC 12
MOV D101 K2Y010 The ov er-scale status data of each channel will be output
to Y010 to Y017.
D102.0 The error detection signal will be output to Y020.
Y020
Error detection
D102.8
Y021
Setting error detection
The setting error detection signal will be output to Y021.
*2
*2
*2
*2
*2