Can I apply for a patent on the PLC program? Does anyone have a sample of this that I can take a look at?

Pure PLC programs are methods of intellectual activity and do not grant patent rights.

If you want to apply for a patent in this area, you must apply together with the hardware.

You can enter PLC in the "Name" column in the "Home Page> Patent Search" of the State Intellectual Property Office website to search and download the full text of the relevant patent.