Download Print this page

Mitsubishi Electric MELSEC FX-1HC User Manual page 7

Special function block
Hide thumbs Also See for MELSEC FX-1HC:

Advertisement

(2) BFM #3, #2 Ring length
Stores the data that specifies the length of the
16-bit counter (default: K65,536).
X002
(D) TO
K2
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.
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 PC 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
b3
YH/YS independent action
b4
Preset prohibit
b5 to b7
Undefined
b8
No action
b9
No action
b10
No action
b11
No action
b12
No action
1.
When b0 is set to ON and the DISABLE input terminal to
OFF, the counter is permitted to start counting input pulses.
(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).
K2
K100
K1
Write counter data with(D)TO
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
UP
98 99
0
DOWN
1
0
99 98
When ring length K100 is specified, the value
of the counter changes as shown above.
2.
Unless b1 is set to ON, YH (hardware compared
output) dose not turn ON.
3.
Unless b2 is set to ON, YS (software compared
output) dose 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.
1

Advertisement

loading