Some touch screens of Siemens such as TP/OP177 KTP178 TP/OP277 adopt soft-clock panel. After power-off, the system time will return to the factory setting state. Some high-end hard clock panel touch screens will also appear when the battery is exhausted. The problem. This brings inconvenience to many projects in the project that require time to record. Now introduce a solution when communicating with the S7-200 series plc.
First of all, the S7-200 series PLC CPU224 or higher version contains the internal clock card. The PLC 222 has no internal clock card. You need to install another clock card to achieve this function. The method is that after the system is powered on, the touch screen reads the hardware clock in the PLC, and can perform time modification and correction on the touch screen to realize time synchronization between the PLC and the touch screen.
Specific steps are as follows:
First, the cycle call "READ_RTC" function is added to the PLC program to periodically read the PLC hardware clock and store the clock in the V memory area, such as VB100. Then set a standard variable to connect to the "Set Confirmation Button" in the touch screen, such as V20.0. Used to trigger "SET_RTC" as shown below:
The last item in the program is to ensure that the setting on Sunday is not "0".
A time setting confirmation button is established in the touch screen to connect with V20.0 to confirm the modification of the time. And establish 6 numerical input keys, corresponding to VB70-VB75 (year, month, day, hour, minute, second) data type is hexadecimal "BYTE" variable.
After the first power-on after the establishment is completed, the time proofing must be performed in the touch screen window, and then confirmed. Also, don't forget to set up the clock address connection "VW100" when configuring the touch screen. For details on the picture of the accessory, if you need the original program, please leave your email number in the blog!
48V20Ah Lithium Ion Battery,48V 20Ah Lithium Iron Electric Bicycle Battery,48V20Ah Electrict Scooter Battery,Lifepo4 Lithium Battery 48V20A
Jiangsu Zhitai New Energy Technology Co.,Ltd , https://www.zhitainewenergy.com