ABSTRACTA popular gantry-type placement machine includes several interconnected, autonomously operating component placement modules and the machine was designed so as to able to use different kinds of placement heads and vacuum nozzles in the modules, which can be easily changed. Although this increases the flexibility of the production line, the reconfiguration phases of the modules may be unproductive and one should keep them to a minimum. In addition, the production times can be shortened by balancing the workloads of the machine modules. Here, a two-step optimisation method for the machine reconfiguration and workload balancing in the case of multiple Printed Circuit Borad (PCB) batches of different sizes and PCB types is presented. The objective is to minimise the total production time, and keep the machine configuration the same for all batches. The proposed algorithm is iterative and it applies integer programming for the workload balancing along with an evolutionary algorithm that searches for the best machine configuration. In experiments, for single PCB types the proposed algorithm obtained optimal or near optimal solutions. For multiple PCB types the solutions favour the PCB types that have a bigger production time due to greater batch sizes, but the total production time is still close to optimal.