Example Program; Preliminary Checks; Error Checking - Mitsubishi Electric MELSEC-F FX2N-1HC User Manual

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

Advertisement

10) BFM #29 Error status
Error status in the FX
auxiliary relays of the PLC.
BFM#29
b0
Set when any of b1 to b7 is ON.
b1
Set when the value of the ring length is written incorrectly (other than K2 to K65,536).
b2
Set when the preset value is written incorrectly.
b3
Set when the compare value is written incorrectly.
b4
Set when the current value is written in correctly.
b5
Set when the counter overflows the upper limit.
b6
Set when the counter overflows the lower limit.
b7
Set when the FROM/TO command is used incorrectly.
b8
Set when the counter mode (BFM#0) is written incorrectly.
b9
Set when the BFM number is written incorrectly.
b10-b15
Undefined
There error flags can be reset by b8 of BFM #4.
11) Model identification code number BFM #30
This BFM stores the identification number for FX
The identification number for the FX
By reading this identification number, the user may create built-in checking routines to check whether
the physical position of the FX

4. EXAMPLE PROGRAM

Please use the following program as a guide whenever you use the FX
read the current value of the counter, status etc. can be added as required.
M8002
T0
K2
Initial
pulse
D
T0
K2
X 014
T0
K2
M8002
D
T0
K2
D
T0
K2
X 010
M10
M8000
M11
X 011
M14
X 012
PLS M18
X 013
PLS M19 and M20
M8000
T0
K2
RUN
monitor
D
FROM K2
5. DIAGNOSTICS

5.1 Preliminary checks

1) Check that the I/O wiring and extension cable of the FX
2) 5V 90mA power is supplied from the main or extension units for the FX
power overload from this and other extension blocks.
3) The counter works correctly only when data such as the counter mode (set with a pulse command),
the TO command, the compare value, etc. are appropriately specified. Remember to initialize the
count (BFM #4 b0), preset (BFM #4 b4), and output (BFM #4 b2, b1) prohibits. Reset the YH/YS
outputs before you start.

5.2 Error checking

The following LEDs on the main panel of the FX
φA, φB
UP , DN
PRESET and DIS:The appropriate LED lights up when the PRESET terminal or the DISABLE terminal
YH, YS
You can check the error status by reading the content of BFM #29 to the PLC.
Error contents are shown in section 3.3 (10).
Note that inputting the pulse higher than the maximum frequency may cause mis-counting to
1HC or a FROM/TO error to the PLC main unit.
-1HC can be checked by reading the contents of b0 to b7 of BFM #29 to
2N
2N
-1HC matches to that of the software.
2N
K0
K11
K1
K2
K1234
K1
K1
K1
K1
K12
K1000
K1
K14
K900
K1
Count allowed
Output allowed
to
M13
Mutual reset
Preset allowed
Error flag reset
YH YS output reset
K4
K4M10
K1
K20
D 2
K1
:Goes on/off as φA, φB input turn ON/OFF. It can be checked by rotating the encoder
slowly.
:Lights up to indicate whether the counter is going up (UP) or down (DN).
is ON.
:The appropriate LED lights up when YH/YS output is turned on.
Error status
-1HC.
2N
-1HC unit is K4010.
1. K11 is written into BFM #0 of special function block
No.2. The counter input is 16-bit 1-phase. Please use
a pulse command for this initialization.
2. K1234→BFM #3, #2 (special function block No.2)
The ring length can be specified when a 16-bit
counter is specified.
3. UP/DOWN direction should be specified for 1-phase
1-input software determined UP/DOWN counter.
4. K1000→BFM #13, #12
Set the compare value for YH output.
5. K900→BFM #15, #14
Set the compare value for YS output (not necessary if
only YH output is used).
6. Note that counting only occurs if count prohibit is
OFF. Also, outputs will not be set from the counting
process at all if the relevant output prohibit are set in
the command register. Please reset the error flags
and YH/YS output before you start. The mutual reset
and preset initialization commands can be used as
required.
7. (M25 to M10) →BFM #4 (b15 to b0) command
8. BFM (#21, #20)→Reads the current value to the data
-1HC are properly connected.
2N
-1HC may help you to troubleshoot the unit.
2N
When value ≥ ring length in
16-bit counter mode.
When the upper or lower limit is
exceeded on a 32-bit counter.
When outside of K0 to K11
When outside of K0 to K31
-1HC unit. Other instructions to
2N
registers D3 and D2.
-1HC. Check that there is no
2N

Advertisement

Table of Contents
loading

Table of Contents