Mitsubishi PLC (Programmable Logic Controller) is a device widely used in the field of industrial automation. It controls machines or production processes through programming. In many applications, time control is an important function, and the timer is a key component to achieve time control. This article will introduce in detail how to use Mitsubishi PLC programming to read out the time timer.
1. Basic concepts of timers
A timer is a device used to measure time intervals. It can implement functions such as delay and timing in PLC programs. In Mitsubishi PLC, timers are generally divided into two categories: T (basic timer) and D (data block timer).
1.1 Basic Timer (T)
The basic timer is the simplest type of timer, which uses a 16-bit counter to implement the timing function. The main features of the basic timer are as follows:
-
Timing range: 0.1ms to 3276.7ms (for T0~T199).
-
Timing accuracy: 0.1ms.
-
Timer type: T0~T199.
1.2 Data Block Timer (D)
The block timer is a more advanced timer type that uses data blocks (such as D0, D1, etc.) to store timing values. The main features of the block timer are as follows:
-
Timing range: 0.1ms to 3276.7s.
-
Timing accuracy: 0.1ms.
-
Timer type: D0~D7999.
2. Timer programming instructions
In Mitsubishi PLC, timer programming mainly uses the following instructions:
2.1 ST (Start Timing)
The ST instruction is used to start the timer. Its basic format is as follows:
ST T#time{ DPL}
-
T#time: timer number and timing time.
-
DPL: Data block timer number.
2.2 DT (Stop Timing)
The DT instruction is used to stop the timer. Its basic format is as follows:
DT T{ DPL}
-
T: timer number.
-
DPL: Data block timer number.
2.3 PLS (Pulse Output)
The PLS instruction is used to output a pulse signal. Its basic format is as follows:
PLS T#time Y
-
T#time: timer number and pulse width.
-
Y: Output relay.
3. Timer Programming Example
The following is a simple timer programming example to implement a delay control function.
3.1 Example Requirements
Suppose we need to control a motor so that it stops after a delay of 5 seconds after starting.
3.2 Programming steps
-
Define input and output: Assume the start button is X0, the stop button is X1, and the motor control relay is Y0.
-
Write startup logic:
// When the start button is pressed, start the timer IF X0 THEN ST T#5000 END_IF END_IF
END_IF
-
Write the stop logic:
// When the stop button is pressed, stop the timer and turn off the motor IF X1 THEN DT T Y0 := OFF END_IF END_IF
END_IF
-
Write delay control logic:
// When the timer reaches the set time, turn off the motor IF T0 THEN Y0 := OFF END_IF END_IF
END_IF
4. Advanced Application of Timer
In addition to basic delay control, timers can also be used for more complex applications, such as periodic control, time accumulation, etc.
4.1 Periodic Control
Periodic control is the repetition of an action at a certain time interval. This can be achieved by using two timers: one to control the execution of the action and the other to control the interval between the actions.
4.2 Time Accumulation
Time accumulation is the process of adding up time over multiple time periods. This can be achieved by using multiple timers and accumulators.
5. Notes
-
Timer number: Make sure timer numbers are not repeated.
-
Timer Type: Select the appropriate timer type according to your needs.
-
Timer accuracy: Be aware of the timer's accuracy limitations.
-
Timer overflow: For basic timers, pay attention to the overflow problem of the 16-bit counter.
Previous article:How to use Mitsubishi PLC time to control
Next article:How to display timer time in Mitsubishi PLC
Recommended ReadingLatest update time:2024-11-15 15:58
- Popular Resources
- Popular amplifiers
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Looking for several wifi modules
- [Solved] GD32F307RCT6, soft reset cannot be completed during Ethernet initialization (SWR bit is always 1)
- TI - Standard Amplifier Functions in HEV/EV Battery Management Systems
- Follow the beautiful anchor into the Tektronix Laboratory live broadcast room to draw lots and win luxury gifts!
- EEWORLD University Hall----Intelligent Control System
- [RVB2601 creative application development] @fxyc87 RVB2601 unboxing + hello_world
- Body fat scale is broken, pry it open and see
- Morse Code Light
- What is the voltage input range of ADS1230?
- ADS Antenna Matching Simulation Design