EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Other Convenient Instructions; Counter 1-Phase Input up or down

Mitsubishi Electric MELSEC-Q/L
1084 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
Loading...
334
6 BASIC INSTRUCTIONS
6.8 Other Convenient Instructions
6.8 Other Convenient Instructions
Counter 1-phase input up or down
UDCNT1
*1 Only the X device can be used for (S). However, the X device can be used only in the range of number of I/O points (the number of
accessible points to actual I/O modules).
*2 Local devices and the file registers set for individual programs cannot be used.
Processing details
When the input designated at (S) goes from OFF to ON, the present value of the counter designated at (D) will be updated.
The direction of the count is determined by the ON/OFF status of the input designated by (S)+1.
When the count is going up, the counter contact designated at (D) goes ON when the present value becomes identical with
the setting value designated by n. However, the present value count will continue even when the contact of the counter
designated at (D) goes ON.
When the count is going down, the counter for the contact specified by (D) turns off when the current value reaches the set
value - 1.
The counter specified by (D) is a ring counter. If it is counting up when the present value is 32767, the present value will
become -32768. Further, if it is counting down when the present value is -32768, the present value will become 32767. The
count processing performed on the present value is as shown below:
The UDCNT1 instruction triggers counting when the execution command is turned OFFON and suspends counting when
the execution command is turned ONOFF. When the execution command is turned OFFON again, the counting
resumes from the suspended value.
The RST instruction clears the present value of the counter designated at (D) and turns the contact OFF.
(S): (S)+0: Input number for count input (bits)
(S)+1: For setting count up/down (bits)
OFF  Count up (add numbers when counting)
ON  Count down (subtract numbers when counting)
(D): Number of the counter to be enabled to start counting with the UDCNT1 instruction (Device name)
n: Value to set (BIN 16 bits)
Setting
data
Internal device R, ZR J\ U\G Zn Constant
K, H
Others
Bit Word Bit Word
(S) (Only X)
*1

(D) 
*2
(Only C) 
n
*2
*2
*2
OFF: Count up (counts by adding to the present value)
ON: Count down (counts by subtracting from the present value)
Basic
Redundant
Process
High
performance
Universal
LCPU
Command
UDCNT1
n
UDCNT1 S D
32768 32767 2 1 0 1 2 3276732766
When counting up
When counting down

Table of Contents

Related product manuals