Sequence Not Starting


Recommended Posts

We are using the sequence below to log a TOC analyzer to DAQFactory. However, it is giving me an 'uncaught error' in line 4.

 

device.TOCOutput.purge()
while(1)
   try
      private string datain = device.TOCOutput.ReadUntil(13)
 
      // Modifying string for IC
      private string vIC = delete(datain,1,32)
      vIC = delete(vIC,5,17)
 
      //Modifying string for TC
      private string vTC = delete(datain,1,36)
      vTC = delete(vTC,5,13)
 
      //Modifying string for TOC
      private string vTOC = delete(datain,1,27)
      vTOC = delete(vTOC,5,22)
      delay(1)
endwhile
Link to comment
Share on other sites

Here you are:

 

Rx (16:16:38.243): \084\117\114\098\111\044\049\048\032\074\085\078\032\050\048\049\052\044\049\054\058\049\053\058\052\049\044\049\053\049\044\050\051\052\044\051\056\053\044\050\046\048\044\050\046\048\044\078\047\065\013\010

Link to comment
Share on other sites

So I am using the following right now but not yet creating a logging file on the computer.

 

device.TOC.purge()
while(1)
   try
      
      // Modifying string for IC
      vIC = parse(datain,4,",")
 
      //Modifying string for TC
      vTC = parse(datain,5,",")
 
      //Modifying string for TOC
      vTOC = parse(datain,3,",")
      
//Adds Channels for each output
      IC.AddValue(StrToDouble(vIC))
      TC.AddValue(StrToDouble(vTC))
      TOC.AddValue(StrToDouble(vTOC))
   catch()
      ? strLastError
      delay(0.01)
   endcatch
endwhile
 
while(1) 
   logging.TOC.strFileName = "c:\DAQFactoryData\TOCOutput.csv_" + formatdatetime("%m.%d.%y",systime()) + ".csv" 
   delay(1) 
endwhile
Link to comment
Share on other sites

Try just deleting the logging set and creating a new one.  Its possible you changed one of the settings that is causing it to appear not working.  By creating a new logging set you'll get the defaults which work.  Alternatively you can post your .ctl file.

Link to comment
Share on other sites

Archived

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