I have setup my X90 to use FTP. I have tested the connection and can see the User root in my FTP client (using WinSCP). However, what I would like to do, is use this FTP connection to “install” a new deployment on the PLC. Once uploaded, user would then reboot PLC to run new version. Is this possible? If so, what are the steps to get this done? If not, what other options are available for remote install?
Hi,
I’m already away from keyboard, so I can’t provide a detailed explanation right now.
But in short: yes, that should be possible by preparing a installation package with Automation Studio or Runtime Utility Center, transferring this package via FTP to the PLC user partition, and execute the installation by code using the ArProject library, function block ArProjectInstallPackage
Hope that information helps already a bit,
best regards!
Cool. When you get a moment, would you provide detailed steps on creating the package and how to use the ArProjectInstallPackage? I have not used either of these in Automation Studio.
Hi,
which Automation Studio version you’re using?
For AS6, here’s a very good starting point in the online help describing it:
Even if this help page uses “USB stick” as example, the way of using it with “USER partition” is almost the same regarding the steps to do.
Best regards!
Generating the PIP (Project Installation Package) is done through Automation Studio. In AS6 top menu Project → Project Installation → Offline commissioning. Select the ArProject library as the type.
Then transfer the files to the controller.
If you are using ArProject library you can then use the ArProject Function blocks to read the currently running and available project installation package versions and install the PIP if desired. (The version shown is the “Configuration Version” in the CPU configuration).
You could also use mapp Backup for this, it does the same thing, but automatically. And the same PIP package also works for this.
mapp Backup: Installing a new software version on the machine
MpBackupCore Function block
You can also check this thread here in the community for some additional information:
Updating application on a remote machine: available procedures - Share Info & Ideas / How-To & Wikis - B&R Community
Thank you all for your input. We have this working, just as we had hoped. In preparation for the automated install, we setup our FTP and created a user for this purpose. We tested this user using WinSCP, by supplying the IP address of the PLC, username and password. Then we used the Offline Commissioning and setting the installation medium to ArProject library. Set the appropriate destination folder. Confirm this by viewing the folder contents after pressing the Generate installation package button. Then with an FTP client copy the files to the target directory on the PLC.
I did use the ArProjectGetInfo, ArProjectGetPackageInfo and ArProjectInstallPackage. The first two just to learn how to use the variables needed, especially the DeviceName and FilePath inputs. We are using the ‘USER’ for DeviceName, and '/pipconfig.xml’for FilePath. Then we just set the Execute to true for all three FBs (again, the first two really just for learning). Push this build to the PLC.
Now on each subsequent build, use the offline commissioning and FTP the directory contents to the PLC. (We also used the ups_ar_shutdown FB, with 01 for ShutDownMode, to trigger a restart of the PLC, after we FTP the new install). This way when the restart happens, and the PLC sees files in the User DeviceName, the new install takes place.
Works like a charm!
Hi @Ruben_Rascon,
sounds great!
Just a last small comment from my side:
as I remember, the AsUPS library is intended to use if a B&R UPS is connected to the serial interface.
If you just want to reboot the PLC by code, you can also use the function SYSreset from library SYS_lib.
If the reboot is wanted/needed just because of the project installation, I think you could even just set the "force reboot" setting when creating the installation package.
Best regards!
@alexander.hefner thanks for the input. I switched to the SYSreset, works great. I looked into the “force reboot” setting but it only shows up for the Transfer to Target Project Installation option. I don’t see it on the Offline Commissioning option. But no problem, its working as desired. Super slick, loving the AR environment.
Hi @Ruben_Rascon , looks like you were able to resolve your issue. Could you please select one of the comments (can be your last comment too) as the Solution to this topic? Thank you.
