Unlike the “Wake-on-LAN”, a common standard on computer hardware that uses predefined protocols, the “Sleep-on-LAN” is not predefined and cannot be relayed on general applications across units from different companies. To use the “Sleep-on-LAN” function, you have to install special software on each computer you want to turn off.
Either of the three below applications can be programmed to to listen either on an TCP/IP server or RS232 and transform that into PC actions like i.e. shutdown the PC or open an application etc.
For turning on the PC, have a look at this article.