Search code examples
plcbr-automation-studio

B&R Automation Studio avoid restarting PLC when building the same source code in different locations or machines


When building the same source code for B&R PLC's in different paths on your PC it wants to restart the PLC, since the programs are laid out differently on in the new build. This is also an issue when building the same source on another PC after fx pulling down code from a repository.

Is there a way to configure Automation studio, or connect to the running plc and get the binaries from the PLC and not having to restart it?


Solution

  • The build and transfer with AS has several stages. At some point binaries are created, which in turn are then transformed to data objects (*.br files). The latter has a CRC and some encryption (I believe). So every task will end up being a data object (sometimes called module).

    The data objects are what is actually transferred to the PLC. With the Runtime Utility Center (RUC) you can in theory download the data objects from the PLC, but this will not help you for your issue.

    If you want to avoid a warmstart for simple changes you need to have the binaries and data objects in your project directory. Notably the Temp and Binaries folders. Otherwise AS will consider your next build a rebuild which requires a warmstart after transfer.

    If you have a buildchain together with your repository you might consider storing the Binaries etc. as artifacts. I know of some companies doing exactly this.

    The option which I have used in the past is to utilize the RUC to transfer only the programs you have modified. First build your project after modifying it. The open the RUC and select Create, modify and execute projects. Here you can basically do some scripting. In the toolbox you can find Module Functions which allows you to download data objects to the PLC after establishing a connection. Just select the task you want to transfer in the binaries folder of your project.

    It might also be possible to modify the Transfer.lst, also located in the Binaries, but I haven't tried this myself.

    I hope this helps.