Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
12 Applied Instructions (High Speed Processing)
278
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
12.5 DHSCR / High Speed Counter Reset
S3: The FX3U and FX3UC PLCs only are applicable.
S4: The same counter of the device specified by can be used.
(See the program example.)
4. Specifying input and output variables
When handling 32-bit data in a structured program, a 16-bit device cannot be specified directly as in the case
of a simple project. Use a label to handle 32-bit data.
A 32-bit counter can be specified directly as it is a 32-bit long device.
Use a global label to specify a device.
5. Precedence of DHSCS, DHSCR and DHSZ instructions to one particular high speed counter
Refer to caution 6 in "Common cautions on using instructions for high speed counter" which is
described in Section 12.4.
6. Reset operation by an external terminal
Refer to caution 5 in "Common cautions on using instructions for high speed counter" which is
described in Section 12.4.
7. Other cautions on use
Refer to caution in "Common cautions on using instructions for high speed counter" which is
described in Section 12.4.
Program examples
1. Example of self-reset circuit
When the current value of C255 becomes "400", C255 is immediately reset. Its current value becomes "0",
and the output contact is set to OFF.
Reset value of DHSCR
400
Count-up value
300
Current value
of C255
Output contact
of C255
[Structured ladder/FBD]
M8000
RUN
monitor
DHSCR
EN
s1
s2
ENO
d
K400
CN255
CC255
OUT_C_32
EN
CCoil
CValue
ENO
CC255
K300
Comparison source
Comparison value
Output
destination
[ST]
OUT_C_32(M8000,CC255,K300);
DHSCR(M8000,K400,CN255,CC255);