So how to set up the power-off data retention function for S7-1200?
During operation, an unexpected power outage may occur, and the equipment operators hope that certain key data can be preserved in such cases to ensure the normal operation of subsequent production. The S7-1200 series PLC features a retained storage area that can be used to set power-off retained data. In this article, we will discuss how to set up the power-off data retention function for S7-1200.
First, let's understand the composition of the internal storage area of the S7-1200 series PLC: The internal storage area of the S7-1200 includes the Load Memory, Work Memory, and Retain Memory.
Load Memory: This is a non-volatile storage area, similar to a computer's hard disk. The Load Memory is used to store user project files (user programs, data, and configurations). When no memory card is inserted, users use STEP 7 software to download projects directly into the Load Memory. In addition to user programs and data, symbol names and comments in the project are also downloaded into the Load Memory, greatly facilitating users' later debugging and maintenance.
Work Memory: This is a volatile storage area, similar to a computer's RAM. When the CPU executes a user program, it copies some project contents from the Load Memory to the Work Memory. The contents of the Work Memory are lost after a power outage and cannot be extended.
Retain Memory: This is a non-volatile storage area. When the CPU detects that the voltage drops to a certain level, it saves the data set as power-off retained from the Work Memory to the Retain Memory.
The S7-1200 series PLC supports setting data from bit memory, instance DB (Instance Data Block), and global DB (Global Data Block) as retentive.
Setting the bit memory always starts from the 0th byte, as follows:
In the PLC tags, click on the "battery" icon, as shown below:
The following dialog box pops up: