//Power WinPLC 6 Example: using the "+" and "-" keyboard buttons for actions
//Press + and - to increase/decrease DAC channel 01 output level
Timestep OFF
DAC01 = 33
LABEL MAIN
//continious scan
IF KeyPressed = 107 Then CALL INCREASE
IF KeyPressed = 109 Then CALL DECREASE
GOTO MAIN
SUB INCREASE
//increase DAC channel
DAC01 = DAC01 + 1
WAIT 250
END SUB
SUB DECREASE
//decrease DAC channel
DAC01 = DAC01 - 1
WAIT 250
END SUB