//WinPLC Example: Use GUI to change timestep speed
 
TIMESTEP = 80
TimeStep ON
LOADGUI "custom lightcomputer - gui.GUI"
CHANGEGUI 00 "Lightcomputer - speed: $timestep"
VAR1 = 1
MINIMIZE
 
 
LABEL WINPLC
     SETION 1111000000000000
     SETION 0000111100000000
     SETION 0000000011110000
     SETION 0000000000001111
GOTO WINPLC
 
 
SUB START
     VAR1 = 1
END SUB
 
SUB STOP
     VAR1 = 0
     LABEL WAIT_FOR_START
     IF VAR1 = 0000 Then GOTO WAIT_FOR_START
END SUB
 
SUB INCREASE
     //increase speed
     TIMESTEP = TIMESTEP - 10
     CHANGEGUI 00 "Lightcomputer - speed: $timestep"
END SUB
 
SUB DECREASE
     //decrease speed
     TIMESTEP = TIMESTEP + 10
     CHANGEGUI 00 "Lightcomputer - speed: $timestep"
END SUB

BACK TO SAMPLE OVERVIEW