Brief analysis of Mitsubishi PLC high-speed counter and encoder application

Publisher:真诚的友谊Latest update time:2023-12-28 Source: elecfansKeywords:Mitsubishi Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Ordinary counter

Let's learn about ordinary counters first, taking C0 as an example. See the figure below. When X0 has a rising edge, C0 will count once. When C0 counts to 1000, it will stop counting and the C0 counter switch will act. When programming, it is recommended to use the RST instruction to reset C0, otherwise C0 will be in an overflow state after the count exceeds the limit.

513254ae-9355-11ee-939d-92fbcf53809c.jpg 513d1cea-9355-11ee-939d-92fbcf53809c.jpg

2. High-speed counter

The difference between high-number counter and ordinary counter is:

1. High-frequency counting can identify pulses with higher frequencies

2. The high-speed counter can be called. The input terminal X will not be reflected in the program. For example, in the following table, after calling the counter C235, there will be no X0 input terminal in the program. Just connect the wires at the input terminal.

As shown in the following table, this is our single-phase high-speed counter

515e7dae-9355-11ee-939d-92fbcf53809c.jpg

If I connect the photoelectric sensor to X0, then C235 is its dedicated counter. Every signal sensed by X0 will be counted by C235. We can use the following program to store the number of pulses sensed by X0 into D235. (Similarly, C236 records the number of pulses of X1; C237 records the number of pulses of X2...),

Before starting the counter, there are generally two programs to write:

To start the special register corresponding to the counter (for example, C235 corresponds to M8235, C236 corresponds to M8236, etc.), you need to define the direction first, whether it is count up or count down.

It is recommended to reset C235 before starting. (Someone asked if C235 can still count after overflow. The answer is that it can still count, but it is 32 bits, so it can only count to 32 bits)

516f6718-9355-11ee-939d-92fbcf53809c.jpg

5182ec34-9355-11ee-939d-92fbcf53809c.png

Of course, the counting frequency of the counter has a limit. The receiving speed of the ordinary FX series X point is 50KHz, which means that it can receive and conduct 50,000 times in 1 second.

3. Use of encoder (taking incremental encoder as an example)

The incremental encoder can use the principle of photoelectric conversion to output three groups of square wave pulses A, B and Z; the phase difference between the two groups of pulses A and B is 90 degrees, which can determine the rotation direction of the motor, and the Z phase outputs one pulse per revolution for reference point positioning. The principle of this encoder is simple, mechanically averaged, and has a service life of tens of thousands of hours. It has strong anti-interference ability and high reliability. However, it cannot output the absolute position information of the shaft rotation.

519ffba8-9355-11ee-939d-92fbcf53809c.jpg

According to the encoder principle, we connect the encoder to the PLC, as shown in the following figure (the figure below takes C251 as an example)

51bc7698-9355-11ee-939d-92fbcf53809c.jpg

51cb1450-9355-11ee-939d-92fbcf53809c.jpg

Two-phase high-speed counter (C251~C255) The A-phase and B-phase signals determine whether the counter counts up or down. When the A-phase is ON and the B-phase changes from OFF to ON, it counts up; when the A-phase is ON and the B-phase changes from ON to OFF, it counts down.

51e04d34-9355-11ee-939d-92fbcf53809c.jpg

The following figure shows the basic instructions for counting using C251.

The first instruction: Before starting C251, perform a reset operation

The second instruction: X12 is used to start the C251 counter. X12 is not used for data collection (X1 and X2 are used for data collection and cannot appear in the program).

The third instruction: After C251 counts overflow, start Y2 operation

The fourth instruction: M8251 is the forward and reverse flag. For example, when the encoder runs in the forward direction, M8251 is connected, and vice versa.

51f3ad98-9355-11ee-939d-92fbcf53809c.jpg

Note: After the C251 counter overflows, it can continue counting.


Keywords:Mitsubishi Reference address:Brief analysis of Mitsubishi PLC high-speed counter and encoder application

Previous article:Application cases of frequency converters in water equipment control systems
Next article:12 Practical Knowledge Sharing of Frequency Converter

Recommended ReadingLatest update time:2024-11-16 11:30

Modbus to Profinet gateway connects to Mitsubishi inverter Botu quick configuration
This case will share how to use Xingda Easy Control's modbus to profinet gateway (XD-MDPN100) to connect Siemens 1200 series plc and realize the 485 communication compatibility conversion of Mitsubishi inverter to modbusTCP communication. By configuring in Botu, we can achieve connection and communication between de
[Embedded]
Modbus to Profinet gateway connects to Mitsubishi inverter Botu quick configuration
Convert PLC ladder diagram into STL program
I want to convert the PLC ladder diagram into an STL program, but how can I prevent the STL program from being restored to a LAD program? A: ---------A relatively simple method is that after you convert the program into STL, you can group multiple STL programs into one program segment, such as the method
[Embedded]
What are the advantages and disadvantages of PLC motor control
PLC (Programmable Logic Controller) is a modern, miniaturized computer controller widely used in the field of automation control. PLC motor control is a widely used control method. Its advantages, disadvantages, applications and other aspects are worth exploring. 1. PLC motor control methods There are ma
[Embedded]
How to make PLC output a series of pulses with a specific frequency?
When using PLC to control stepper motor, PLC output pulse is required to control stepper motor driver. Pulse output may also be used in many other occasions. The pulse output instruction of Siemens S7-200SMART series PLC is PLS. How to use this instruction? How to make PLC output a series of pulses with a specific f
[Embedded]
How to make PLC output a series of pulses with a specific frequency?
Summary of Common Programming Instructions for Siemens S7-200 SMART PLC
01 1. Timer 1. The S7-200 SMART CPU provides three timers: on-delay timer (TON), hold-on delay timer (TONR), and off-delay timer (TOF). 2. Timer number and resolution 3. Timer example analysis ① Turn on the delay timer TON ②Retention type on-delay timer TONR
[Embedded]
Summary of Common Programming Instructions for Siemens S7-200 SMART PLC
How to realize local data acquisition and cloud data acquisition of S7-200smart series PLC?
S7-200 SMART is a cost-effective small PLC product tailored by Siemens for Chinese customers. Combined with Siemens SINAMICS drive products and SIMATIC human-machine interface products, the small automation solution with S7-200 SMART as the core will create more value for customers. S7-200 SMARTCPU supports multiple
[Embedded]
How to realize local data acquisition and cloud data acquisition of S7-200smart series PLC?
Design of Mechanical Press Control System Based on PLC
1 Introduction Industrial robots, programmable controllers and CNC machine tools are known as the three pillars of the automation industry and have been widely used in various fields of industrial production. Machine tools are one of the indispensable equipment in the machinery manufacturing industry. The preci
[Embedded]
Design of Mechanical Press Control System Based on PLC
Detailed comparison between MCU and PLC
To understand the similarities and differences between MCU and PLC, we must first clarify what is MCU and what is PLC. In this regard, it may be helpful for us to briefly review the development history of computers. According to the original definition of computer experts, the computer system consists of five parts: c
[Microcontroller]
Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号