Current Value Update Timing And Comparison Of Current Value - Mitsubishi Electric MELSEC-Q Structured Programming Manual

Hide thumbs Also See for MELSEC-Q:
Table of Contents

Advertisement

FXCPU Structured Programming Manual
[Device & Common]
2.7.4

Current value update timing and comparison of current value

1. Current value update timing
A high speed counter executes up-counting or down-counting when a pulse is input to its input terminal, but
the current value of the high speed counter is updated at the timing shown in the table below.
When the current value of a high speed counter is used as it is in the MOV instruction, CMP instruction or
applied instruction for data comparison, etc., the current value update timing is affected by scans as shown in
the table.
Hardware counter
Software counter
2. Comparison of the current value
The following two methods are available to compare and output the current value of a high speed counter.
Some instructions are not supported in some PLCs.
1) Using the comparison instruction (CMP), zone comparison instruction (ZCP) or data comparison
instruction
When the comparison result is not necessary during counting operation, comparison may be smoothly
executed in the main program
(CMP or ZCP) or data comparison instruction.
*1.
If it is necessary to execute comparison and update an output contact (Y) at the timing at which the
current value of a high speed counter changes, use a comparison instruction for high speed counter
(DHSCS, DHSCR, DHSZ or DHSCT).
2) Using a comparison instruction for high speed counter (DHSCS, DHSCR, DHSZ or DHSCT)
A comparison instruction for high speed counter (DHSCS, DHSCR, DHSZ or DHSCT) executes
comparison and outputs the comparison result while the target high speed counter is counting.
The number of times of using these instructions is restricted as shown in the table below.
When an output relay (Y) is specified for the comparison result, the comparison result is directly reflected
on the ON/OFF status of the output without regard to output refresh executed by the END instruction.
Mechanical operation delay (about 10 ms) cannot be avoided in a relay output type PLC.
Use a transistor output type PLC.
Instruction
*1
FX
DHSCS
FX
*1
DHSCR
used up to 6 times.
*1
(FX
DHSZ
This instruction can be used only once.
*1
(FX
DHSCT
instruction.)
*1.
When a comparison instruction for high speed counter is used, the maximum response frequency and
total frequency of software counters may be restricted.
→ For the maximum response frequency and total frequency of software counters, refer to
Current value update timing
When OUT or HCMOV instruction is executed for counter
When counting input is given
→ Refer to the FX Structured Programming Manual [Basic & Applied Instruction].
*1
if the DHCMOV instruction is used just before the comparison instruction
Restriction of number of times of using instruction
/FX
PLCs: These instructions can be used up to 32 times including the DHSCT instruction.
3U
3UC
/FX
/FX
/FX
/FX
/FX
/FX
0S
0
0N
1S
1N
1NC
/FX
/FX
/FX
/FX
/FX
0S
0
0N
1S
1N
1NC
/FX
/FX
/FX
/FX
/FX
0S
0
0N
1S
1N
1NC
/FX
/FX
/FX
/FX
/FX
U
2C
2N
2NC
3S
PLCs do not support the DHSZ instruction.)
/FX
/FX
/FX
/FX
/FX
/FX
U
2C
2N
2NC
3S
2 Devices in Detail
2.7 High Speed Counter [C]
/FX
PLCs: These instructions can be
3G
3GC
/FX
PLCs do not support the DHSCT
3G
3GC
Subsection 2.7.10.
1
2
3
4
5
6
7
77

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-lMelsec-fFx3sFx3gFx3gcFx3u ... Show all

Table of Contents