//example on how to use an EVENT for the change of an AD channel
//if AD changes, this event will be logged
LOGFILE = "C:\adlog.log"
LABEL WINPLC
//flash I/O 1 during executing
INVERTIO 01
GOTO WINPLC
SUB EVENT_AD_CHANGED
//sub is only called when an AD changes
WRITELOG "<$xTIME> an ad channel changed of value"
INVERTIO 13
END SUB