Controllers and PLC based systems