This manual contains text, diagrams and explanations which will guide the reader in the correct installation
and operation of the FX-1HC special function block and should be read and understood before attempting
to install or use the unit.
Further information can be found in the FX PROGRAMMING MANUAL and FX SERIES HARDWARE
MANUAL.
1
●
The FX-1HC hardware high-speed counter block is 2-phase 50 kHz high-speed counter. It is a special
function block for the FX, FX
2C series PC. The FX-1HC counts at a higher speed than the built-in high-
INTRODUCTION
speed counter of the PC (2-phase 2 kHz, 1-phase 10 kHz) and performs comparisons and outputs
directly.
●
Various counter modes, such as 1-phase or 2-phase, 16-bit or 32-bit modes, can be selected using
commands from the PC. Allow the FX-1HC unit to run only after setting these mode parameters.
●
The source of your input signal should be a 1 or 2 phase encoder. A 5V, 12V, or 24V power source can
be used. An initial value setting command input (PRESET) and a count prohibit command input (DISABLE)
are also available.
●
The FX-1HC has two output. When the counter value coincides with an output compare value, the
appropriate output is set ON. A PNP and an NPN output transistor is provided for both outputs to allow
either sink or source connection methods.
●
FX PCs versions 2.0 or later (those with serial number 13XXXX or larger) are required as these units have
the TO/FROM applied instructions in their instruction set. Data transfer between the FX-1HC and the FX PC
is by buffer memory exchange. There are 32 buffer memories (each of 16 bits) in the FX-1HC.
●
The FX-1HC occupies 8 points of I/O on the FX or FX2C expansion bus. The 8 points can be allocated
from either inputs or outputs.
1.1 External dimensions
weight : Approx 0.5 kg (1.1 lbs) Dimensions : mm (inches)
Accessories : Self-adhesive labels special block number identification.
567
4
3
2
1
DISABLE terminal (M3.5 (0.14) screws)
YH•YS terminal (M3.5 (0.14) screws)
Extension cable and connector
POWER LED
φA,φB terminal (M3.5 (0.14) screws)
PRESET terminal (M3.5 (0.14) screws)
UP LED
φA LED
φB LED
8
12
9
10
11
125 (4.92)
140 (5.51)
13
15
16
63 (2.48)
73 (2.87)14
17
10 (0.39)
95 (3.74)
DN (Down) LED
PRESET LED
Mounting hole 2- φ5.5 (0.22)
Attachment groove for 3.5 (1.38) wide DIN rail
DIN rail clip
DIS (DISABLE) LED
YH LED
YS LED
2
Encoder
Phase A
Phase B
Phase Z
+24VCOM
NPN output encoders can also be used.
Shielding wire
OUT
COM
E
OUT
COM
E
OUT
COM
E
START
φA
φB
PRESET
DISABLE
Shielding wire
Shielding wire
Shielding wire
Wiring
φA24
φA12
φA5
COMA
φB24
φB12
φB5
COMB
XP24
COMP
XD24
COMD
12 to 24V inputtable
XP5
XD5
3.3k
1.5k
0.5k
0.1k
1.5k
0.5k
0.1k
12 to 24V
inputtable
DC24V+
*1
YHP
*1
YHN
DC24-
DC24V+
*1
YSP
*1
YSN
DC24-
*2
+24V0V
External power source
DC5V, 12V, 24V
〈〈
〈Using the solderless termination
〈〈
6.8 mm
(0.27 inches)
or less
6.8 mm
(0.27 inches)
or less
Class 3
grounding
(<100 Ω)
For
M3.5
(0.14
inches
PC
●
●
)
●
Extension
〉〉
〉
〉〉
SG
FX-1HC
cable
*1. Do not connect YHP and
YHN, or YSP and YSN
together.
*2. Connect SG and the gro-
unded terminal at the PC
side as required.
External power source
DC12 to 24V
+24V0V
Use crimp terminals of the dimensions specified in the left figure.
Secure the terminals using a tightening torque of 0.5 to 0.8 N•m (5
to 8 kg•cm).
Wire only to the module terminals discussed in this manual. Leave
all thers vacant.
3
SPECIFICATIONS
3.1 Environmental specifications
The environmental specifications for the FX-1HC are the same as those for your FX series PC.
3.2 Performance specifications
Input signal
Counting
specifi-
cation
Item
Signal level
MAX. frequency
Pulse shape
Format
Range
Comparison Type
1-phase input
1 input2 inputs
5V, 12V, or 24V ±10% (selected by terminal connection) 7mA
50 kHz
t1t1
t2
t3
t3
Automatic UP/DOWN (however, when on 1 phase 1 input mode, UP/DOWN is
determined by a PC command or an input terminal.)
When 32-bit is specified: -2,147,483,648 to +2,147,483,647
When 16-bit is specified: 0 to 65,535 (upper limit can be user specified)
Each output is set when the present value of the counter matches with the compare
value (which is transferred from the PC), and is switched OFF by a reset command
from the PC.
: Direct output processed by hardware.
YH
YS
: Software processed output with worst delay time of 300µs.
(Therefore, when the input frequency is 50 kHz, there is a worst case delay of 15 input
pulses.)
t2
1 edge count
t1 : Rise/fall time is 3µs or less
t2 : ON/OFF pulse duration 10µs or more
t3 : Phase difference between phase A and phase B
is 3.5µs or more
PRESET (Z phase) input 100µs or more
DISABLE (count prohibit) input 100µs or more
2-phase input
4 edge count2 edge count
25 kHz12.5 kHz
YHN
Output
signal
Power from base
Types of outputs
Output capacity
I/O occupation
YHP
YSN
YSP
DC 12V to 24V 0.5A
8 point taken from the FX, FX2C expansion bus (can be either inputs or outputs)
DC 5V 70mA
: NPN transistor output for YH output
: PNP transistor output for YH output
: NPN transistor output for YH output
: PNP transistor output for YH output
Counter mode K0 to K11
DOWN/UP command (1-phase 1-input mode)
Ring length Upper/Lower
Command
Preset data Upper/Lower
YH compare value Upper/Lower
YS compare value Upper/Lower
Counter current value Upper/Lower
Maximum count value Upper/Lower
Minimum count value Upper/Lower
Compare results
Terminal status
Error status
Model identification code K4010
The counter mode is selected form the PC. As
shown below, values between K0 and K11 are
written to buffer memory BFM #0 form the PC.
When a value is written to BFM #0 the contents
of BFM #1 to BFM #31 are reset to default values.
When setting this value use a TOP (pulsed)
instruction use M8002 (initial pulse) to drive the
TO instruction.
A continuous command is not allowed.
A 32-bit binary counter which executes UP/DOWN counting will change
from the lower limit to the upper limit or the upper limit to the lower limit
when overflow occurs. Both the upper and lower limits are fixed values:
the upper limit is +2,147,483,647, and the lower limit is -2,147,483,648.
16-bit counter modes
(b)
A 16-bit binary counter handles only positive values from 0 to 65,535.
Changes to zero from the upper limit or to the upper limit from zero when
overflow occurs; the upper limit is determined by BFMs #3 and #2.
+2,147,483,647
Upper limit
Lower limit
-2,147,483,648
Ring length
(BFM #3, #2)
(c)
1-phase 1-input counter (K8 to K11)
●
Hardware UP/DOWN (K8, K9)
●
Software UP/DOWN (K10, K11)
Phase A
OFFON
ON
Phase B
OFF
Current
UP
value
(d)
1-phase 2-input counter (K6, K7)
Phase
A input
Phase
ON
OFF
ON
B input
OFF
1 2 3 3 3 2 1 0
2-phase counter (K0 to K5)
(e)
●
1 edge-count-counter (K0, K1)
DOWN
UP/DOWN is
determined by
input phase A
(ON/OFF).
Phase A input -1 at
OFF→ON.
Phase B input+1 at
OFF→ON.
BFM #1
Phase B
Current
value
K0K1
ON
OFF
UP
UP/DOWN is determined by the
contents of BFM
#1, (K0/K1).
DOWN
If both phase A and phase B inputs are received
simultaneously, the counter value dose not
change.
●
2 edge-count counter (K2, K3)
Phase A
Phase B
+1+1-1
Phase B inputOFF
→ON while phase
A input ON Count
up by 1.
●
4 edge-count counter (K4, K5)
Phase B input ON
→OFF while phase
A input ON Count
down by 1.
Phase A
Phase B
UP COUNT :DOWN COUNT :
Phase A input
Phase B input
+1+1+1+1
Phase A input
Phase B input
+1+1-1
Phase B input OFF
→ON while phase
A input ON Count
up by 1.
Phase B input ON
→OFF while phase
A input ON Count
down by 1.
-1
-1-1
-1
(2) BFM #3, #2 Ring length
Stores the data that specifies the length of the
16-bit counter (default: K65,536).
X002
K1(D) TOK2K2K100
In the above example, K100 is written into BFMs
#3 and #2 of special block No.2 as a 32-bit binary
UP
989901
DOWN
109998
When ring length K100 is specified, the value
of the counter changes as shown above.
value (BFM #3 = 0, BFM #2 = 100). Permitted
values: K2 to K65,536.
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 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
2.
BFM #4
b0
b1
b2
b3
b4
b5 to b7
b8
b9
b10
b11
b12
When b0 is set to ON and the DISABLE input terminal to
1.
OFF, the counter is permitted to start counting input pulses.
When ‘0’ (OFF)
Count prohibit
YH output prohibit
YS output prohibit
YH/YS independent action
Preset prohibit
Undefined
No action
No action
No action
No action
No action
Error flag reset
YH output reset
YS output reset
YH output set
YS output set
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.
(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
Current valueCurrent value
#14, the hardware and software comparator in the FX1HC outputs the comparison result.
●
YH, YS output will not turn ON if you use PRESET or
Current valueCurrent value
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
BFM #4
b9, b10
BFM #4
b9, b10
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
Coincidence outputCoincidence output
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 PC. 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 PC.
(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
YHb0b1
b2
When ‘0’ (OFF)
Set value ≤ current value
Set value ≠ current value
Set value ≥ current value
When ‘1’ (ON)
Set value > current value
Set value = current value
Set value < current value
BFM #26
YSb3b4
b5
When ‘0’ (OFF)
Set value ≤ current value
Set value ≠ current value
Set value ≥ current value
When ‘1’ (ON)
Set value > current value
Set value = current value
Set value < current value
BFM #26 is for reading only. Write commands from the programmable controller are ignored.
(9) Terminal status (BFM #27)
BFM #27
b0
b1
When ‘0’ (OFF)
PRESET input is OFF.
DISABLE input is OFF.
When ‘1’ (ON)
PRESET input is ON.
DISABLE input is ON.
BFM #27
b2
b3
b4 to b15
When ‘0’ (OFF)
YH output is OFF.
YS output is OFF.
Undefined
When ‘1’ (ON)
YH output is ON.
YS output is ON.
(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 auxiliary
relays of the PC.
Error status
Set when any of b1 to b7 is ON.
Set when the value of the ring length is written incorrectly (other than K2 to K65,536).
Set when the preset value is written incorrectly.
Set when the compare value is written incorrectly.
Set when the current value is written incorrectly.
Set when the counter overflows the upper limit.
Set when the counter overflows the lower limit.
When the upper or lower limit is exceeded on a 32bit counter.
When value ≥ ring length in 16-bit counter mode.
Set when the FROM/TO command is used incorrectly.
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-1HC unit is K4010.
By reading this identification number, the user may create built-in checking routines to check whether the
physical position of the FX-1HC matches to that of the software.
BFM #29
b0
b1
b2
b3
b4
b5
b6
b7
b8 ~ b15
4
EXAMPLE PROGRAM
Please use the following program as a guide whenever you use the FX-1HC unit. Other instructions to
read the current value of the counter, status etc. can be added as required.
M8002
Initial
pulse
X014
M8002
X010
M8000
X011
X012
X013
M8000
RUN
monitor
(D) TO
TO
(D) TO
(D) TO
M10
M11
M14
PLS
PLS
TO
(D)FROM
K2K0K11K1TO
K2
K2
K2
K2
M18
M19 and M20
K2
K2
K2
K1
K12
K14
M13
K4
K20
K1234
K1
K1000
K900
Count allowed
Output allowed
Mutual reset
Preset allowed
Error flag reset
YH YS output reset
K4M10D2K1
K1
K1
K1
K1
K1
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 1phase 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).
Note that counting only occurs if count prohibit is
6.
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.
(M25 to M10)→ BFM #4 (b15 to b0) command7.
8. BFM (#21, #20)→ Reads the current value to the
data registers D3 and D2.
5
5.1 Preliminary checks
(1) Check that the I/O wiring and extension cable of the FX-1HC are properly connected.
(2) 5V 70mA power is supplied from the base or extension units for the FX-1HC. Check that there is no
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-1HC may help you to troubleshoot the unit.
●
φA, φBGoes 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
●
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 PC. Error contents are shown in
section 3.3 (10).
:
:
is ON.
:
DAIGNOSTICS
6
SYSTEM BLOCK DIAGRAM
Counter mode BFM #0
TO
Ring upper limit value
BFM #3, #2
DOWN/UP command
BFM #1
φB
φA
DISABLE
φZ
PRESET
TO
Preset data
BFM #11, #10
TO
BFM #4 b0
Direct initialization
Count pulse
BFM #4 b4
Count start
Initiali-
zation
16-bit
counter
1-phase
1-input
counter
DOWN/UP
Counter
16/32-bit
1-phase/
2-phase
Current value
register
BFM #21, #20
Error status
BFM #29
for YH output
Comparisor
TO
data
BFM #13, #12
for YS output
Comparison
TO
data
BFM #15, #14
*1
Sampling cycle
300µs
Reset
BFM #4 b8
Matched
Matched
BFM #4 b1
BFM #4 b2
BFM
#4 b11
BFM #4 b9
BFM
#4 b12
BFM #4 b10
S
R
BFM #4 b3
S
R
YH
YS
Maximum
value
BFM #23, #22
Minimum
Model code
BFM #30
value
BFM #25, #24
Compare
results
BFM #26
Terminal
status
BFM #27
*1. Comparison is made at
the next sampling point
after an input count.
Guidelines for the safety of the user and protection of
the FX-1HC special function block
●
This manual has been written to be used by trained and competent personnel. This is defined
by the European directives for machinery, low voltage and EMC.
●
If in doubt at any stage during the installation of the FX-1HC always consult a professional
electrical engineer who is qualified and trained to the local and national standards. If in doubt
about the operation or use of the FX-1HC please consult the nearest Mitsubishi Electric distributor.
●
Under no circumstances will Mitsubishi Electric be liable or responsible for any consequential
damage that may arise as a result of the installation or use of this equipment.
●
All examples and diagrams shown in this manual are intended only as an aid to understanding
the text, not to guarantee operation. Mitsubishi Electric will accept no responsibility for actual
use of the product based on these illustrative examples.
JY992D53001A
Manual number : JY992D53001
Manual revision : A
Data : Febrary 1996
HEAD OFFICE : MITSUBISHI DENKI BLDG MARUNOUCH TOKYO 100 TELEX : J24532 CABLE MELCO TOKYO
HIMEJI WORKS : 840, CHIYODA CHO, HIMEJI, JAPAN
Effective FEB. 1996
Specifications are subject
to change without notice.
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.