EasyManuals Logo

Mitsubishi MELSEC QCPU User Manual

Mitsubishi MELSEC QCPU
285 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #265 background imageLoading...
Page #265 background image
6 - 114 6 - 114
MELSEC-Q/QnA
6 BASIC INSTRUCTIONS
The count processing performed on the present value is as shown below:
-32768 -32767 -2 -1 0 1 2 3276732766
When counting up
When countin
g
down
(4) Count processing based on the UDCNT1 instruction starts the count when the count command
goes from OFF to ON, and suspends the count when it goes from ON to OFF.
When the count command goes from OFF to ON once again, the count is restarted from the
value in effect when it was suspended.
(5) The RST instruction clears the present value of the counter designated at
D
and turns the
contact OFF.
POINTS
(1) The UDCNT1 instruction registers the argument device data to the work area of the CPU
module and the actual counting operation is processed as a system interrupt.
(The device data registered to the work area of the CPU module are cleared when the
command input is turned OFF or when the CPU module is STOPped and then RUN.)
Therefore, to count pulses, it is necessary to provide their ON and OFF time as long as the
interrupt time of the CPU module or longer.
The interrupt time of individual CPU module is shown below:
CPU module Type Name Interrupt Time
High Performance model QCPU, Process CPU 1ms
QnACPU 5ms
(2) The setting values cannot be changed during a count based on the UDCNT1 instruction
(while the command input is ON)).
To change the setting values, first turn the command input off.
(3) Counters which have been designated by the UDCNT1 instruction cannot be used by other
instructions. If they are used by other instructions, they will not be capable of returning an
accurate count.
(4) The UDCNT1 instruction can be used as many as 6 times within all the programs being
executed.
The seventh and the subsequent UDCNT1 instructions are not processed.
[Operation Errors]
(1) There are no operation errors associated with the UDCNT1 instruction.
[Program Example]
(1) This program uses C0 (up and down counter) to count the number of times X0 goes from off to
ON after X20 has gone ON.
[Ladder Mode] [List Mode]
Steps
Instruction
Device
[Operation]
X
0
X
20
X
1
Present
v
alue of COM
C0 contact
012345676543210-1-2-3-2-10 11
Down UpUp
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi MELSEC QCPU and is the answer not in the manual?

Mitsubishi MELSEC QCPU Specifications

General IconGeneral
BrandMitsubishi
ModelMELSEC QCPU
CategoryController
LanguageEnglish

Related product manuals