Save AutoTune and PID Parameters into FlashΒΆ

../_images/5ab66463f85080be0a317d314c36464d

Each PLC in AC500 range has a power safe internal flash data area which can be written, read and deleted from AC500 program. TECT_DATA_FLASH uses the internal flash to save and load the AutoTune results and PID parameters including:

  • Internal parameters: rKS, rTU, rTG and wCoolFact_Tune
  • Machine set parameters: wCoolFact, rKP, rTI, rTD, rT1

The user can perform the following operations by using this Function Block in the flash memory: Read, Write, Delete, Check Read, Delete Write and Check Write.

WRITE

The user can save the above variables into flash by the WRITE operation by selecting the flash segment. When the WRITE command is enabled the parameters, which are listed above, will be copied and stored in the flash memory of the PLC. If the PLC is restarted or a cold reset is done these data will still be retained. Before a fresh set of data is written to the flash memory, it has to be cleared. Hence delete operation has to be executed before rewrite of the flash data.

READ

The user can copy the data from the flash memory of PLC into the structure TEMPZONE_DATA by this command. When the READ operation is used, based on the flash block and segment configuration, it will read the data from a respective location. This is useful to restore/ load the settings of tune values.

DELETE

This operation will clear all the data in the flash memory. It will delete data in the complete selected flash segment. Before a fresh set of data is written to the flash memory, it has to be cleared. Hence delete operation has to be executed before rewrite of the flash data.

DELETE_WRITE

This operation is a combination of operation DELETE and WRITE. It will clear the complete segment first and then write the set of data into flash.

CHECK_READ

This operation is used, when data read has to be restricted. It will check if the values of AutoTune results in Zone Data are valid. Only if they are invalid, it will read the values from flash memory to the Zone Data structure, otherwise the operation will do nothing.

CHECK_WRITE

This operation is a combination of above two operations CHECK_READ and DELETE_WRITE. When this operation is executed, it will check if the values of AutoTune results in Zone Data are valid. Only if they are invalid, it will read the values from flash memory to the Zone Data structure. After that, it clears the flash with DELETE operation and write the set of data into flash.

In total they are 32 bytes which a data block in the flash is used for one zone. As one segment has 1927 data blocks, the maximum number of zones supported for the TECT_DATA_FLASH is 1927.

For a new data write processing to flash, the flash needs to be deleted first. This can be done with TECT_DELETE before TECT_WRITE is to be executed. As an alternative, TECT_DELETE_WRITE combines the two operations in one. TECT_DATA_FLASH: Read, Write or Delete AutoTune Data on Flash