C1000 channel or function not found


Gorkhali
 Share

Recommended Posts

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share