Data logging with different Title


Hemendra

Recommended Posts

You can't with a logging set alone.  You can with an export set, or by using file. functions to do the logging yourself.   You also can create the file before starting the logging set by using file. functions to create the file and write the first line, then start the logging set.  You'll have to change the logging set to not Include Headers.

Link to comment
Share on other sites

hi Guru,

with your further help and guidelines it was made ok with below code;

while(1)
   private string newFileName = "C:\DATA\DAQ\Test programs\DATA_" + FormatDateTime("%y_%m_%d_%H.csv", systime())
   
   if (logging.L2.strFileName != newFileName)
      endlogging(L2)
      Private FileHandle = File.Open(newFileName,0,1,0,1)
      Private string strText = "TheTime,Pressure,Temp D55,KWH,NA0H"
      File.Write(FileHandle,strText)
      File.Close(FileHandle)      
      logging.L2.strFileName = newFileName   
   endif   
   
delay(1)
beginlogging(L2)
 
endwhile


Thank you

Link to comment
Share on other sites

Archived

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