Download Print this page

Mitsubishi Electric FX2N-1HC User Manual page 5

Special function block (counter module) fx2n series
Hide thumbs Also See for FX2N-1HC:

Advertisement

10) BFM #29 Error status
Error status in the FX
-1HC can be checked by reading the contents of b0 to b7 of BFM #29 to
2N
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. When outside of K0 to K11
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
The identification number for a Special Function Block is read by using the FROM command.
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
K0
Initial
pulse
D
T0
K2
K2
K1234
X 014
T0
K2
K1
M8002
D
T0
K2
K12
K1000
D
T0
K2
K14
X 010
M10
M8000
M11
to
M13
X 011
M14
X 012
PLS M18
X 013
PLS M19 and M20
M8000
T0
K2
K4
RUN
monitor
D
FROM K2
K20
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
:Goes on/off as φA, φB input turn ON/OFF. It can be checked by rotating the encoder
slowly.
UP , DN
:Lights up to indicate whether the counter is going up (UP) or down (DN).
PRESET and DIS:The appropriate LED lights up when the PRESET terminal or the DISABLE terminal
is ON.
YH, YS
:The appropriate LED lights up when YH/YS output is turned on.
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).
Error status
-1HC unit is K4010.
2N
-1HC matches to that of the software.
2N
1. K11 is written into BFM #0 of special function block
K11
K1
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)
K1
The ring length can be specified when a 16-bit
counter is specified.
3. UP/DOWN direction should be specified for 1-phase
K1
K1
1-input software determined UP/DOWN counter.
4. K1000→BFM #13, #12
K1
Set the compare value for YH output.
5. K900→BFM #15, #14
K900
K1
Set the compare value for YS output (not necessary if
only YH output is used).
Count allowed
Output allowed
6. Note that counting only occurs if count prohibit is
Mutual reset
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
Preset allowed
and YH/YS output before you start. The mutual reset
and preset initialization commands can be used as
required.
Error flag reset
YH YS output reset
7. (M25 to M10) →BFM #4 (b15 to b0) command
K4M10
K1
8. BFM (#21, #20)→Reads the current value to the data
D 2
K1
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 K31
-1HC unit. Other instructions to
2N
registers D3 and D2.
-1HC are properly connected.
-1HC. Check that there is no
2N

Advertisement

loading