PLC program for running sinusoids