Mitsubishi Electronics FX3G User Manual

Page of 964
352
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 Series
Programming Manual - Basic & Applied Instruction Edition
13 High-Speed Processing – FNC 50 to FNC 59
13.4 FNC 53 – HSCS / High-Speed Counter Set
2) FX
3S
/FX
3G
/FX
3GC
 PLCs
When the HSCS instruction is used in FX
3S
/FX
3G
/FX
3GC
 PLCs, the total frequency of each counter is affected.
Refer to the counting operation described below, and select according to the contents of control whether to use
the HSCS instruction or a general-purpose comparison instruction.
a) Case to select the HSCS instruction
-
When the output should be given if the counting result becomes equivalent to the comparison value
regardless of the scan time of the PLC
b) Cases to select a general-purpose comparison instruction
-
When counting is regarded as important, but the effect of the scan time can be ignored in operations
according to the counting result
-
When one instruction is executed in 7 or more positions at the same time
2. Device specification range
Only high-speed counters (C235 to C255) can be specified as 
.
3. Only 32-bit operation instructions are available.
Because instructions for high-speed counters are dedicated to 32 bits, make sure to input "DHSCS (FNC 53)".
4. Priority order in operation among HSCS (FNC 53), HSCR (FNC 54), and HSZ (FNC 55) 
instructions for the same high-speed counter
→ For details, refer to "6. Priority order in operations among HSCS (FNC 53), HSCR (FNC 54), and HSZ (FNC
55) instructions for the same high-speed counter" in Subsection 13.4.1.
5. Reset operation by an external terminal
→ For details, refer to "5. Reset operation by an external terminal" in Subsection 13.4.1.
6. For other cautions on using HSCS instruction, refer to the description later.
→ For details, refer to the next page.
Program example
With regard to the current value of a counter, different outputs (Y) are arbitrary set to ON by two values.
FNC229
LDD<=
K100
C251
SET
Y010
Y010
K8
FNC 50
REF
   
S
M8000
C255
K2,147,483,647
FNC 53
DHSCS
K100
C255
Y010
C255 = K100 
→ Y010 = ON
Set the maximum counting value of
high-speed counter.
FNC 53
DHSCS
K150
C255
Y011
C255 = K150 
→ Y011 = ON
RUN monitor
Comparison
value
Comparison
source
Output
destination
S
1
 
S
2
 
S
1
 
S
2
 
C255
Y010
Y011
0
… 99
100
101
… 149
150
151