Gorkhali Posted April 2, 2021 Share Posted April 2, 2021 My data format is: T, 2021,04,02,15,03,23\013 I can see the data comming inthe comm monitor but I am getting error: C1000 Channel or function not found: Line 7 The code I have written to parse this data is: global String datain device.Neph.Purge() While(1) try datain = device.Neph.ReadUntil(13) switch case(left(datain,1) == "T") Yr.AddValue(StrToDouble(Parse(datain,1,","))) MM.AddValue(StrToDouble(Parse(datain,2,","))) DD.AddValue(StrToDouble(Parse(datain,3,","))) HH.AddValue(StrToDouble(Parse(datain,4,","))) MN.AddValue(StrToDouble(Parse(datain,5,","))) SS.AddValue(StrToDouble(Parse(datain,6,","))) endcase catch() endcatch EndWhile What could be the possible error? Thanks! Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted April 7, 2021 Share Posted April 7, 2021 I am assuming line 7 is the case()? I'm actually surprised you get any error since you have a try/catch() with no error indication. You should almost always put a: ? strLastError inside your catch() so you know when there is some issue. I would add a ? datain after the readuntil(), or just add a breakpoint and look at the data. I don't see anything else really wrong. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.