Mitsubishi Electric MELSEC-F FX2N-1HC User Manual page 4

Special function block
Hide thumbs Also See for MELSEC-F FX2N-1HC:
Table of Contents

Advertisement

2) BFM #3, #2 Ring length
Stores the data that specifies the length of the
16-bit counter (default: K65,536).
X 002
D
T0
In the above example, K100 is written into BFMs #3 and
#2 of special block No.2 as a 32-bit binary value (BFM
#3 = 0, BFM #2 = 100). Permitted values: K2 to K65,536.
Note: Write counter data with (D) TO
Count data is always handled as a pair from two 16-bit values in this special function block. 16-bit 2's
complement value stored in the registers of the PLC cannot be used.
When you are writing a positive value between K32,768 and K65,535, the data should be treated as a
32-bit value even when a 16-bit ring counter is used.
When transferring counter data to/from this special function block, always use the 32-bit forms of the
FROM/TO instructions ((D) FROM, (D) TO).
3) BFM #4 Command
BFM#4
When '0'(OFF)
b0
Count prohibit
b1
YH output prohibit
b2
YS output prohibit
YH/YS independent
b3
action
b4
Preset prohibit
b5 to b7
Undefined
b8
No action
b9
No action
b10
No action
b11
No action
b12
No action
4) BFM #11, #10 Preset data
Data to used as the initial value when the counter starts to count.
Data becomes valid when b4 of BFM #4 is set to ON, and PRESET input terminal changes from OFF
to ON. The default value of the counter is zero. You can change it by writing a value into BFM #11 and
#10 or by using the command below.
The initial counter value can also be set by writing the data directly into BFM #21 and #20 (current
value of the counter).
5) BFM #13, #12 Comparison value for YH output, BFM #15, #14 Comparison value for YS output
After comparing the current value of the counter with the value
written in BFM #13 and #12, BFM #15 and #14, the hardware and
software comparator in the FX
result.
YH, YS output will not turn ON if you use PRESET or the TO
instruction to set the counter value equal to the comparison
value. It will turn ON only when a match occurs by the counting of
input pulses.
The YS comparison operation takes about 300μs, and if a match
occurs, the output goes ON.
Output occurs when the current value becomes equal to the compare value but only if b1 and b2 of
BFM #4 are ON. Once an output is set, it remains ON until it is reset by b9 or b10 of BFM #4. If b3 of
BFM #4 is ON, however, one of the outputs is reset when the other is set.
6) Counter current value (BFM #21, 20)
The current value of the counter can be read by the PLC. It will not be the correct value during
high-speed operations because of the communication delay. The current value of the counter can be
forcibly changed by writing a 32-bit value into the appropriate BFMs from the PLC.
7) Maximum count value (BFM #23, 22)
These store the maximum and minimum value reached by the counter. If the power is turned off, the
stored data is cleared.
8) Comparison status (BFM #26)
BFM#26
When '0' (OFF)
≤ current
b0 Set value
value
≠ current
b1 Set value
YH
value
Set value ≥ current
b2
value
BFM #26 is for reading only. Write commands from the programmable controller are ignored.
9) Terminal status (BFM #27)
BFM#26
When '0' (OFF)
b0
PRESET input is OFF. PRESET input is ON.
b1
DISABLE input is OFF. DISABLE input is ON.
K2
K2
K100
K1
When '1'(ON)
Count permit
YH output permit
YS output permit
Mutual reset
action
Preset permit
Error flag reset
YH output reset
YS output reset
YH output set
YS output set
-1HC outputs the comparison
2N
When '1' (ON)
Set value > current
value
Set value = current
value
Set value < current
value
When '1' (ON)
UP
98 99
DOWN
1
length K100 is specified, the value of
the counter changes as shown above.
1. When b0 is set to ON and the DISABLE input
terminal to OFF, the counter is permitted to
start counting input pulses.
2. Unless b1 is set to ON, YH (hardware
compared output) does not turn ON.
3. Unless b2 is set to ON, YS (software
compared output) does not turn ON.
4. When b3=ON, YS output is reset if YH output
is set, and YH output is reset if YS output is
set. When b3=OFF, YH and YS output act
independently, and do not reset each other.
5. When b4=OFF, preset function by the
PRESET input terminal is disabled.
6. When b8 is set to ON, all error flags are reset.
7. When b9 is set to ON, YH output is reset.
8. When b10 is set to ON, YS output is reset.
9. When b11 is set to ON, YH output is set ON.
10.When b12 is set to ON, YS output is set ON.
Coincidence output
BFM#26
When '0' (OFF)
≤ current
b3 Set value
value
≠ current
b4 Set value
YS
value
Set value ≥ current
b5
value
BFM#26 When '0' (OFF)
b2
YH output is OFF. YH output is ON.
b3
YS output is OFF. YS output is ON.
b4-b15 Undefined
0
1
0
99 98
W h e n
Current value
Current value
BFM #4
b9,b10
Coincidence output
When '1' (ON)
Set value > current
value
Set value = current
value
Set value < current
value
When '1' (ON)
r i n g
BFM #4
b9,b10

Advertisement

Table of Contents
loading

Table of Contents