I have a .zip package file containing my PLC program and a .pil file that is able to be run in the Runtime Utility Center. I was wondering if there is a way to call the .pil file from a C++ program running on Windows (connected to the PLC) to be able to install the PLC software programmatically? The .pil file has instructions to download and install the .zip package file on to the PLC.
to execute a *.pil, you need Runtime Utility Center (RUC).
But RUC has a command line interface that can be called from external programs: so calling RUC with automatically executing the pil instructions would be possible, yes.
Please have a look here in the online help for the command line options.
For example calling RUC from the command line like⦠PVITransfer.exe -silent -C:\Lists\Liste1.PIL
⦠will start executing the pil instructions in silent mode (RUC GUI is not shown).
I already use this interface to install RUC packages for automated testing.
The problem is that the installation sometimes fails. Does PVITransfer.exe have a CLI interface to get status information about the progress?
for example when calling PVITransfer via command line interface using the automatic option, after the end of execution you get the failure error code as return code of the process.
Parsing the output log file of RUC could also be a possibility, but as I know this will only work after the RUC process has finished.
Unfortunately, as I understood the consoleOutput option could not be used (by now) for getting process information since it canāt be read back via stdout, details see here:
I donāt know any more CLI interface options to get some ārunning process infoā. But you could for example output some information on your own while the PIL execution is running, for example by calling a external batch file from your PIL list and setting some environment variables, or appending some info to a file, or similar.
And itās possible to control the PIL execution behavior by using the āOnErrorā¦ā commands, to set an own return vaule after execution by using the āSetReturnCodeā command.
Thanks for your help. I also found we can use ā-autocloseā to display the progress and possibly status of the installation. There is a GUI displayed for the progress.