Hello,
I want to use the mapp Backup to update the PLC, the boot files are in an FTP server.
When I use the function MpBackupCore_0() I got errors in the StatusID.
Here is what I found on the logger:
Do you have any idea about this ? Am I missing something here ?
Note: I can read the package configuration using ArProjectGetPackageInfo() and the update works fine using the function ArProjectInstallPackage().
You will find the details of my code below.
My Backup configuration:
My program is quite simple:
PROGRAM _INIT
//File device definition - FTP server on C30
DevLink_0.enable := TRUE;
DevLink_0.pDevice := ADR('BCKPDEV');
DevLink_0.pParam := ADR('/SIP=192.168.0.20 /PROTOCOL=ftp /USER=***User1 /PASSWORD=****19*3');
////Mapp Backup configuration
MpBackupCoreConfig_0.MpLink := ADR(gBackupCore);
MpBackupCoreConfig_0.Enable := TRUE;
MpBackupCoreConfig_0.Configuration := ADR(MpBackupCoreConfigType_0);
//Mapp Backup definition on the FTP
MpBackupCore_0.MpLink := ADR(gBackupCore);
MpBackupCore_0.Enable := TRUE;
MpBackupCore_0.DeviceName := ADR('BCKPDEV');
bckpName := 'Default_PPC3x/pipconfig.xml';
END_PROGRAM
PROGRAM _CYCLIC
//Mapp Backup config
MpBackupCoreConfig_0();
//Mapp Backup function block call
MpBackupCore_0.Name := ADR(bckpName);
MpBackupCore_0();
//Read current configuration
ArProjectGetInfo_0();
//Read package configuration on the FTP
ArProjectGetPackageInfo_0(DeviceName := 'BCKPDEV', FilePath := bckpName);
//FTP package installation
ArProjectInstallPackage_0(DeviceName := 'BCKPDEV', FilePath := bckpName);
// IHM
IF MpBackupCore_0.Info.Automatic.Update.IsAvailable THEN
(* # NOT DONE *)
ELSE
(* # NOT DONE *)
END_IF
END_PROGRAM
Thanks,
Best regards,
Mohammed Ali