START NEW FILE EACH MONTH


william

Recommended Posts

I tried using the example for starting a new log file each month using the example given in DAQ help ..

I received the following error C1058 No) found:LOGGING Line 3 - Uncaught error in sequence LOGGING.

 

Attached is screenshot.

 

Pleas advise what needs to be changed to get the example top work.

 

Thanks

Bill

NEW_FILE NAME.pdf

Link to comment
Share on other sites

It seems the last set of () is missing from line 3 and 4

 

Sems to be running, now havew to see if it changes the file name at the end of the month.

 

Do you have a easy way to check this out????

 

Thanks

Bill

Link to comment
Share on other sites

Your script is more complicated than it needs to be.  All you need is:

while(1)
   logging.myLogging.strFileName = "MyData_" + FormatDateTime("%y_%m.csv", systime())
   delay(1)
endwhile

Then just let that run.  It will change the file name every time the month / year changes.

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.