Chapter 7 Backup and Transfer of Application Data
7.2 Data Storage Description
7.2.2 USER Volume
7.2.2.2 User Disk Application Segments Backup Handling
You can save User Disk Application Segments on the Advant Controller 400 Series for backup purposes. Using this function (User Disk Application Segments backup) is recommended. The function then automatically updates the backup of the User Disk Application Segments on the Advant Controller 400 Series each time either one of the commands SLTARG or TSESS is used. You can also update the backup manually using the command SUDAS.
A version identifier exists to check the consistency of the User Disk Application Segments and their backup on the controller. Each time you start a new session - that is after a SLTARG or after a TSESS command - and perform commands that will modify the User Disk Application Segments, the version identifier of the User Disk Application Segments will be incremented by one. When you generate now the backup copy with the SUDAS command, the version identifier of the User Disk Application Segments Backup Area on the controller will be the same as that of the User Disk Application Segments on the engineering station. If later on commands will again modify the User Disk Application Segments, the version identifier on the engineering station will be incremented, too. Then another SUDAS or an SLTARG or TSESS command is necessary for consistency.
The version of the User Disk Application Segments and of their backup on the Advant Controller 400 Series must be identical.
$03/&RQILJXUDWLRQ$GYDQW &RQWUROOHU6HULHV5HIHUHQFH0DQXDO 6HFWLRQ 86(59ROXPH
If, for any reason, they are not identical, the mismatch is detected and you define the data on the engineering station or the data on the Advant Controller 400 Series as the valid data. Using the command RUDAS, you can copy the data from the Advant Controller 400 Series manually to the engineering station. This procedure will update the version identifier, too.
In addition to the backup itself, an advantage of this function is that the User Disk Application Segments backup may be included in the DUAP dump, see Section 7.3, Total Backup. A further advantage is that the network and node number are compared to check that the correct node is selected on the engineering station, which makes your work more secure.
Advant Controller 400 Series configuration requires the following operations to activate the backup of User Disk Application Segments:
• Activate the Backup function (User Disk Application Segments backup function) with the DIMPC command.
• Be sure that the node selected on the engineering station (Node List) belongs to the connected Advant Controller 400 Series (working on the correct User Disk Application Segments).
• When you are loading source code (DB source code, PC programs or parts of PC programs) in order to exchange already existing source code, first delete the parts that already exist (command DS). In doing so, you also delete the variable names, document description headings and page divisions from the User Disk Application Segments. • Every time you want to transfer a dump, the User Disk Application Segments must also be
copied. This is not necessary for the DUAP dump, if the backup function was activated and the data were saved before performing the dump.
Dimensioning the Backup Area
The backup feature is switched off by default. When you activate the it with the DIMPC command you have to dimension the User Disk Application Segments Backup Area on the Advant Controller 400 Series. The size needed depends strongly
• On the size of your application programs, • On the number of PC variables used,
• On the length of the names of the PC variables • On the length and number of Instance names • On the number of PC programs.
The minimum size is 51 kilobytes to use the function.
As the *.SM segments may grow (see MSTABS) the area needed may grow, too. For each PC program add at least 1 kByte for the storage of the *.AP segments.
If you also want to save Type Circuits created by the Function Chart Builder, increase the memory space appropriate to the number of Type Circuits and their size (*.Ti, *.TB, *.TC). If the function is switched off, then the size is zero. See also Section 3.4, PC Dimensioning.
The amount of memory needed may be quite unclear when you start your application programming. Therefore it may be necessary to redimension this area later on. The redimensioning of the Backup Area can be performed in the following manner: • Dump the data base and the application programs with the DUTDB and DUTPT
commands.
• Perform a RECONFIG of the Advant Controller 400 Series. • Load the data base with the LOTDB command.
• Load the application programs with the LOTPT command and specify Redimension = yes. Enter a bigger value for the User Disk Application Segments Backup Area.
For more information see Section 7.4, Dumping and Loading for Redimensioning. CAUTION
The following operations can cause loss of data. When problems occur with the User Disk Application Segments, you can: • Use the RUDAS command (only if the backup is available).
• If you have a backup of your hard disk, try to get an older version of the User Disk Application Segments (see Section 7.2.2.4, User Disk Application Segments Mismatch). • Initialize the User Disk Application Segments contents (after RECONFIG or a cold start).
This can be performed in two alternative ways:
– Delete the PCMASS.SM, PCMASS*.AP and *.UI files on SYSTEM level (SLLEV SYST) on the USER volume.
– Create a new node with the Application Builder on the engineering station. The corresponding USER volume is in its initial state.
It is up to you to decide whether to use an earlier version of the User Disk Application Segments or to create new segments. Only you can estimate the difficulties arising, which depend on how many changes have been made to the earlier User Disk Application Segments since they were created.