Technical data

Technology functions
CPU 317T: Technology Functions
A5E00251798-03
6-223
MC_WriteParameter - Example: "Save absolute value encoder adjustment"
Editing parameters, based on the example "Saving absolute value encoder
adjustment"
The data of the absolute value encoder adjustment are saved to nonvolatile
memory of the Technology CPU. Hence, these data will be lost when you replace
the CPU.
The "MC_ReadSysParameter" and "MC_WriteParameter" technology functions
can be used to backup the data of your absolute value encoder adjustment to
Micro Memory Card, and to restore these to the nonvolatile memory of your
Technology CPU. Prerequisite is that you have set the "absolute value encoder"
type in your S7T Config configuration.
After you adjusted the absolute value encoder using the "MC_Home" technology
function, proceed as described below:
Create a backup copy of the data of your absolute value encoder adjustment
Step Description
1.
Read the current value of the absolute value encoder adjustment by means of the
"MC_ReadSysParameter" technology function, using the input parameters described below, for
example:
Axis = Technology DB of the relevant axis
Execute = positive edge to start the read operation
ParameterNumber = 4010 Parameter number of the absolute value encoder adjustment
ValueDword1 = DB1.DBD0 (temporary memory)
ValueDword2 = DB1.DBD4 (temporary memory)
2.
Use SFC 82 "CREA_DBL" to generate a DB in the load memory of the Technology CPU. The
DB is also generated in the RAM when you reset bit 0 of input parameter ATTRIB.
3.
Call SFC 84 "WRIT_DBL" to write the previously backed up data of the absolute value encoder
adjustment to the new DB.
Replacing the CPU and restoring the data of your absolute value encoder
adjustment
Step Description
1.
Replace the Technology CPU and inset your configuration MMC.
2.
The backup DB for the data of your absolute value encoder adjustment is stored to working
memory after the startup of your Technology CPU.
3.
Call the "MC_WriteParameter" technology function to restore the values of the absolute value
encoder adjustment to the nonvolatile memory of your Technology CPU. Use these input
parameters:
Axis = Technology DB of the relevant axis
Execute = positive edge to start the write operation
ParameterNumber = 4010 Parameter number of the absolute value encoder adjustment
ValueDword1 = DBx.DBD0 (x = number of the DB generated with SFC 82)
ValueDword2 = DBx.DBD4 (x = number of the DB generated with SFC 82)