WriteBootProject (FB)
FUNCTION_BLOCK WriteBootProject EXTENDS AbbETrigAsync
Function block to permanently load a new boot project. The files for the new boot project have to be available e.g. on the memory card or on the user disk. The required files can be generated by using Automation Builder. They are created on exporting the PLC application (“Boot project and firmware (SD card)…”). After triggering this export they are available in the folder “USERDATA\USERPRG” on the memory card. The files have the suffixes .app and .crc. Both files are required.
Note
Make sure that the file names are identical to the application name as shown in Automation Builder device tree!
Note
Important: After successfully executing this function block a reboot of the PLC is required to start using the new boot project.
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
ExecuteBOOLFALSE
A rising edge starts a single operation, the output Busy goes to TRUE. In the first cycle all other inputs are read and stored, afterwards they are ignored. A falling edge does not stop the operation. After Done = TRUE or Error = TRUE and Execute = FALSE all outputs will be reset. For executing another operation the Execute input needs to be retriggered by another rising edge!
AbbETrig3
Output
DoneBOOLFALSE
Operation is completed without error (while outputs Busy and Error are FALSE). This output is TRUE for at least one cycle or until Execute is set to FALSE
AbbETrig3
BusyBOOLFALSE
Operation is running (while outputs Done and Error are FALSE)
AbbETrig3
ErrorBOOLFALSE
Operation is stopped with error (while outputs Busy and Done are FALSE). This output is TRUE for at least one cycle or until Execute is set to FALSE. The output ErrorID gives more details about the error.
AbbETrig3
Input
szNameSTRINGName of the boot project without suffix, e.g. if the file names are “MyApplication.app” and “MyApplication.crc”, szName has to be set to “MyApplication”
szPathSTRING(255)Path to the folder, where the boot application files are stored, e.g. “$$sdcard$$/some/subfolder” for files on the memory card or “$$userdisk$$/some/subfolder” for files on the user disk or “$$flashdisk$$/some/subfolder” for files on the flash disk (PM5670 only)
Output
ErrorIDERROR_ID.NO_ERROR
Error code that describes the occured error
AddErrorIDUDINTadditional description of error, meaning depends on value of output ErrorID
Methods:
SetOutputs
Structure: