//shows how to acuire data from winplc to excel
//(assuming .csv extension is assigned to excel)
//making 50 samples, then open excel
//sets the logfile (but give it .csv extension)
Timestep OFF
LOGFILE = "C:\file_to_import.csv"
VAR1 = 0
LABEL WINPLC
//wait 5sec between each mesurement
WAIT 1000
//write file to log in CSV format
WRITELOG ""$xtime","$ad01","$ad02""
VAR1 = VAR1 + 1
IF VAR1 < 0050 Then GOTO WINPLC
//open the logfile
OPENFILE "C:\FILE_TO_IMPORT.CSV"