Sure you can. Code is code. I took a machine without brush cleaning for transfer sheets and hand-tapped, mounted motors and controllers and brush assemblies, ran the connections into the PLC, install and connect the power relays, reflashed the PLC firmware with custom code, BAM it works.
As long as you have room in memory, you can add functionality.