IncludeAllTime


BH2114

Recommended Posts

Will the logging.mylogset. IncludeAllTime  varible turn off the "theTime" column in the logging set?

I have tried it and cant get it to work that way.

I want to be able to turn the time column off programatically before starting the logging set,

Can you give an example of the correct syntax for this?

I also want to change the logging fixed interval as well if you could give an example of how that is done.

Link to comment
Share on other sites

Here is the code that starts the logging file. It almost works, everything writes fine, except the section that creates SecondHeaderOutputString presently produces a header line that starts with the time and is enclosed in quotes.

I need to figure out a way to log that line without the leading time column and get rid of the quotes on the beginning and end of the one logged line,

 

	private string x = (stripStringA(CustomerName))
private string Path="C:\Test Data\IGB\"
private string FileExt=".csv
delay(.1)
	Customer_Name=CustomerName
//Makes the file name
try
	logging.IGB_Log.strFileName =  path+ x +"_"+(format("%.0f" ,customer_name.Time[0]))+fileext
catch()
System.ErrorMessage(strLastError)
endcatch
	delay(.1)
//clears, then loads channels to log
logging.IGB_Log.ClearChannelList()
Logging.IGB_Log.AddChannel("Customer_Name",12)
Logging.IGB_Log.AddChannel("Job_Number",12)
Logging.IGB_Log.AddChannel("Test_Reason",12)
Logging.IGB_Log.AddChannel("Operator",12)
Logging.IGB_Log.AddChannel("Type_Oil",12)
Logging.IGB_Log.AddChannel("ATP",12)
Logging.IGB_Log.AddChannel("Dummy_Inter_SN",12)
Logging.IGB_Log.AddChannel("Dummy_Tail_SN",12)
Logging.IGB_Log.AddChannel("Test_Tail_SN",12)
Logging.IGB_Log.AddChannel("Test_Inter_SN",12)
delay(.1)
//sets the logging interval
   logging.IGB_Log.refreshRate = 3
   Logging.IGB_Log.Start()
delay(.1)
//loads data into the channels
Customer_Name=CustomerName
Job_Number=JobNumber
Test_Reason=TestReason
Operator=Operator1
ATP=ATP1
type_Oil=TypeOil
Dummy_Tail_SN=DummyTailSN
Dummy_Inter_SN=DummyInterSN
Test_Inter_SN=TestInterSN
Test_Tail_SN=TestTailSN
//starts logging
Logging.IGB_Log.Start()
delay(4)
//stops logging
   Endlogging(igb_log)
logging.IGB_Log.ClearChannelList()
	// Start section that needs to be fixed writes new header information..this is the section that I want to write without time or quotes
delay(.1)
   Logging.IGB_Log.AddChannel("secondHeaderOutputString",2)
	//The next line does not work
//logging.Igb_log.IncludeAllTime=0
	delay(.1)
header2="Time,Torque,Speed,TGB Input Inner Brg,TGB Oil Sump,TGB Output Inner Brg,TGB Output Mid Brg,IGB Input Outer Brg,IGB Output Outer Brg,Phila Input Brg,Phila Output Brg,Phila Rear Brg,Facility Air Temp,Horsepower"
   Logging.IGB_Log.Start()
SecondHeaderOutputString=header2
delay(4)
   Endlogging(igb_log)
   //ends logging the header after one line
   //end section that needs to be fixed
   
delay(.1)
//clears and sets new logging channels
logging.IGB_Log.ClearChannelList()
Logging.IGB_Log.AddChannel("torqueOutput",2)
Logging.IGB_Log.AddChannel("SpeedOutput",2)
Logging.IGB_Log.AddChannel("temp1",2)
Logging.IGB_Log.AddChannel("temp2",2)
Logging.IGB_Log.AddChannel("temp3",2)
Logging.IGB_Log.AddChannel("temp4",2)
Logging.IGB_Log.AddChannel("temp6",2)
Logging.IGB_Log.AddChannel("temp7",2)
Logging.IGB_Log.AddChannel("temp8",2)
Logging.IGB_Log.AddChannel("temp9",2)
Logging.IGB_Log.AddChannel("temp10",2)
Logging.IGB_Log.AddChannel("temp21",2)
Logging.IGB_Log.AddChannel("Horsepower",2)
//Changes the logging interval
   logging.IGB_Log.refreshRate = 300
   
//The next line does not work
//logging.Igb_log.IncludeAllTime=1
Delay(.1)
//starts logging
   Logging.IGB_Log.Start()
Delay(.1)
//Adds Values to the channels for test purposes
TorqueOutput.addvalue(1)
SpeedOutput.addvalue(1)
Temp1.addvalue(60)
Temp2.addvalue(60)
Temp3.addvalue(60)
Temp4.addvalue(60)
Temp5.addvalue(60)
Temp6.addvalue(60)
Temp7.addvalue(60)
Temp8.addvalue(60)
Temp9.addvalue(60)
Temp10.addvalue(60)
Temp21.addvalue(60)

 

Link to comment
Share on other sites

Archived

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