Hi David,
There are two ways I interpret this question:
- Is there any way to prevent unauthorized edits to the source code?
- Can I prevent unauthorized changes to the programs actually running on a PLC?
For point 1, there are a couple of previous threads on the topic that I’ll link here:
In summary, the best practice in this case is to put the code you want to protect within a library. You can then export that library in binary format. Anyone who has this library will not have the human readable source code but only machine code. If you’re concerned about unauthorized changes, then I recommend using a version control system like GitHub. This allows you to track changes by user so you can always be sure of who last edited the source code you’re working with.
For point 2, there are some settings you can use. Keep in mind that B&R systems contain only compiled machine code. This means that no one can connect to the target and find your source code, so in order to transfer changes they’ll need your Automation Studio project. You can prevent unauthorized transfers by:
- Not allowing USB installs or updates (set in the CPU Configuration). Keep in mind that if someone is physically able to access the target and put it into BOOT mode, they’ll still be able to use a USB stick to wipe the target and install a project.
- Disabling SNMP in the Ethernet settings. This will require anyone connecting to the PLC via Ethernet to know the IP address rather than allowing them to browse for the target.
- Requiring authentication (username and password) to establish an ANSL connection to the target from Automation Studio
- Disabling ANSL communication altogether. This will prevent anyone from being able to connect to the PLC from Automation Studio. This should only be used in extreme cases because if you do this and you need to make a change, your only option will be a USB install.