factory for creating PLCs from configuration file