PLC systems for EDM machines