Magical use of power-down retention register when PLC is repaired

Electrical engineers found in PLC maintenance work that when designing a small PLC control system, in order to meet the needs of the production process, it is often necessary to change the data inside the PLC outside the PLC, such as the value of Counter, Timer or Data. At the same time, it is also required that these data can continue to be stored in the PLC after the system is shut down, so that the data can be recalled for continued use after the next startup.

In the PLC repair work, we have a way to solve this problem, and hope to provide you with some valuable references.

Many small PLCs now provide power-down retention registers to varying degrees, so that when the PLC is powered off, the data that users want to save can be saved. But most of the time, in order to save costs, PLC manufacturers do not provide a sufficient number of power-down holding registers for system designers to use, so when the adjusted data item exceeds the number of power-down holding registers inside the PLC, we can only Reduce the adjusted data items (fixed or unused) or buy a PLC with more power-down holding registers. In this way, the product grade is reduced or the cost is increased, and the production machinery lacks flexibility and adaptability for circuit board maintenance.

Example:

Panasonic FP0-C16T PLC, the adjusted data is 16, and the number of internal power-down holding registers in the PLC is 10, including 8 data registers (8 DT1652-DT1659, 16Bit) and 2 words of internal relays (WR61, WR62, 16Bit). According to the conventional method that one adjusted data occupies one data register, this obviously cannot adjust 16 adjusted data, but only adjust 10 adjusted data. Therefore, we analyzed the data adjustment range of 16 adjusted data and found that most of the adjustment range of these data only needs to be from 0 to 255, that is, 0 to 28-1; and the internal data size of the power-down retention data register DT1652 is 216 -1, that is, 256×256-1; so we can only use the low 8 bits of the data register for an adjusted data, and DR repairs the high 8 bits of the data register to store another adjusted data. List the PLC maintenance procedures of this part:

1. After power-on, merge the data of the other two data registers into the upper 8 bits and lower 8 bits of the power-down holding register:
R9014 is a Panasonic FP0 series PLC internally stipulated, when the PLC goes from the program state to the run state, the first Two pulse relays that start to operate during the PLC scan cycle.

The instruction F66 is a word or instruction, which performs word OR between the data in the general data register DT20 and the data in the general data register DT0, and the result is sent to the power-down holding register DT1655. The instruction F121 is a left shift instruction without carry, K8 is left shift 8 bits. 2. When powering on, separate the high 8 bits and low 8 bits of the power-down holding register to the other two data registers: Among them, R9013 is specified in the Panasonic FP0 series PLC, and only one PLC will act when the PLC is from the program state to the run state.

Pulse relay for scanning period. Instruction F65 is a word and instruction. Its function is to perform word AND between the data in the power-down retention data register DT1655 and the hexadecimal number FF, and then send the result to the general data register DT0, so that the power-down can be separated The lower 8 bits of the data in the data register DT1655 are retained; the words and instructions in the second row can be separated into the upper 8 bits of the data in the power-down retention data register DT1655. The F120 instruction is a right shift instruction without carry, that is, when the data word is shifted to the right, zero is added to the high bits. K8 means right shift by 8 bits.

The command F0 is a word transfer command, which is to transfer the data in the general data register DT10 to the general data register DT1. The purpose of the above program segment is to divide the data in the power-down retention data register DT1655 into two adjusted data when starting up. Shanghai Sanguang Digital Technology Co., Ltd. has obvious advantages in the maintenance industry.

In addition to its strong technical force, it also cooperates with Hong Kong Hengfa Technology Co., Ltd. to completely solve integrated circuits, colder chips, current sensors, voltage sensors, and current transmitters. , Voltage transmitter, switching power supply and various common electronic components supply problems.

It can be seen from the above PLC maintenance procedure that when the PLC is running, the data in the general data registers DT0 and DT1 can be changed arbitrarily, and these changes are also sent to the power-down holding register DT1655, so that when the PLC is powered off, The adjusted data is also saved.

In the usual PLC maintenance work, through the same method, we can flexibly use each bit of the power-down holding register according to the size of the adjusted data, so that we can repair the PLC without increasing the cost. , Improve the performance of small PLC control system. In automatic control, clock and time control are often used. For example, the automatic bell and automatic control equipment for school and school are controlled by H period and time. Some PLCs have a real-time clock function.

This article intends to discuss how to set and display time in various PLCs, how to realize time control, and talk about some simple insights. 1 Clock calibration and time data call 1 . 1 PLC without clock function. PLC clock establishment. Machines with no internal clock can obtain the clock control function. 1I has to compile a clock program by itself. If you want to select the storage period before programming. Month, day, hour, minute, second storage unit, and then use the internal time base as the standard timing pulse, for example, use the second pulse to add 1 to the second working unit, return to zero when it is added to 60s, and enter 1 to the sub-working unit 1 hour 6O minutes, 1 day 24 hours, Taiyue 3l days, Xiaoyue congee days, Poisonous dance soup, February plus 1 day in leap years, 1 year and 12 months. The time correction and time data access of this self-made clock is similar to the built-in clock, so I won’t repeat the maintenance of Toshiba CT. Switch on and make sure that the red and green lights emit H{flashing. 1.2 PLCs with clock functions and clock commands.

Many PLCs have clock functions and related commands, such as Siemens’ LOGO! Mitsubishi’s a controller and other microcomputers. This type of machine has the internal clock after power-on. It automatically enters the running state, and the time value can be displayed and set on the screen of the machine. Figure 1 is a section of the program that LoGO! uses the castration programming language to complete. The box marked in the figure is called a time switch in the LOGO! command, and there can be multiple sets of time settings at the same time

The setting value of the time switch in this program is to turn ON at 09:00 from Monday to Friday and turn OFF at 18:30; turn ON at 14:30 on Saturday and turn OFF at 22:30; change at 7:30 on Sunday When it is ON, it turns to OFF at 2:30 , which is an example of a switch used for 3 different time period control. In addition, LOOO! also has an annual clock command, which can be used to control month and item time. In this kind of PLC, the time zone setting and the correction of the internal clock can be adjusted using the programming buttons attached to the machine, which is as convenient as adjusting an electronic watch. The $7-200 and s7-300 series PLCs produced by Siemens also have a clock function.

The difference with LOGO! is that when using the clock function, you must first transfer the real-time time value to a certain data unit, and use the set clock command to specify these storage units as the year, month, day, hour, minute, second, and week of the clock. Dedicated unit. After this setting, the values ​​of these units change according to the law of time. When you need to use time information, you also need to use the read time instruction to read the time value into a certain storage unit before it can be used. X-ray machine maintenance Figure 2 is an example program of a PLC clock establishment and readout. The 8 storage units VB210~VB217 have been sent a certain time data in advance.

The time correction of this kind of clock can be realized by sending new time data to these storage units. In time control involving only hours, minutes, and seconds, you can use the method of fixed edge time to connect a time calibration button to the input port of the machine, write a program to transmit time calibration data in the software, and use this button as the program The execution conditions. It is stipulated that 8 o’clock in the morning is the proofreading time. When the standard time is 8 o’clock, click the time adjustment button to complete the time adjustment function. To realize the random timing function, it is necessary to add special data input equipment, such as programmer matrix switch, data unit or graphics unit and other inverter maintenance. 1.3 Acute audio signal when QF is tripped by relay protection action.

In order to attract the attention of the staff on duty, a bee detector was installed. In order to avoid starting the accident sound device during manual tripping, closing and automatic reclosing. In practice, the method of connecting two pairs of contacts in the control switch in series is used. That is, 1-3 and 19-17 are only connected to the power supply for maintenance after the switch is closed, and the states of the cases are all connected at the same time. 2 Flash signal

At present, the on-site flash signal is provided by a flash relay, but after switching to PLC, the flash signal can be realized only by using its internal two timers to form an oscillation circuit, thus eliminating the trouble of external wiring. The specific realization is shown in the ladder diagram 3 and the PLC I/0 allocation is shown in Table 13. The notice signal notice is to help the staff on duty to judge the faulty equipment and its nature, so as to take timely measures to deal with it, and prevent the accident from further expanding.

In order to save the PLC contacts , Use the contact of the forecast signal outlet relay to drive the PLC to output eight terminals X(x), output terminals Y(Y.), Y. Drive or indirectly drive light signs and alarm bells. The conclusion shown in Figure 2 is due to the superior PLC performance. So that the accuracy and reliability of the central signal action is guaranteed. Although the price of PLC is higher than the ZC-23 type impact relay currently used on site, it is easy to use, less maintenance, and simple in the secondary circuit.

Although this experiment failed to output A and output more accidents and warning signals, The input letter is verified, and the output result fully meets the requirements of the site. If put into application, only need to expand the contact of PLC through expansion unit and expansion module, or directly select PLC with multiple I/0.

Leave a Reply