Mapp Backup - Automatic update

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:
image

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

What is the error number on the Logger entry that says “Could not load data (from …)” The error number is cut off in the image, so I can’t see it.

Sorry I did’nt pay attention to that
It’s 20708 > File does not exist.


A little weird, because I can read the package configuration on the FTP (using ArProjectGetPackageInfo)

It looks like the issue is that you’re pointing mapp Backup to the pipconfig.xml file directly. Instead, you should point it to a folder that contains the folder created by AS for a project installation package. More details can be found here:
Installing an update

1 Like