Digital system based on PLC