RS485 hyperterminal connection


ateori
 Share

Recommended Posts

I would like to receive data from the MetONe R4805 product.
I added a device (9600/8/None/1)RS485 ASCII . When I send A code from the monitor screen, the value is displayed. But I could not transfer this value to the channel as I wanted. How can I do that?

Link to comment
Share on other sites

I did the transaction according to the forum help topics, but I get error.

On the monitor screen;

Tx (15:59:44.683): A
Rx (15:59:44.697): A! 010193 012704 0000 0.5 000000 5.0 000000 LOC 000001 C/S 0009C2\013\010

Codes;

device.terminalisim.Purge()
While(1)

   device.terminalisim.Write("A" + Chr(13))
   Private string Data_In = device.terminalisim.ReadUntil(35)
   Private string Data_Parsed = parse(Data_In,-1," ")
   Private Data_Value = strtodouble(Data_Parsed)
   deger1.AddValue(Data_Value[0]) // deger1, channel name
   deger2.AddValue(Data_Value[1])
   deger3.AddValue(Data_Value[2])
  
   Delay(.5)

EndWhile
 

Command/ Alert Message:

C1136 Timeout: kod1 Line 5 - Uncaught error in sequence kod1

Link to comment
Share on other sites

Why are you doing readUntil(35)?  ASCII 35 is the # mark and I don't see a hash mark in your input stream.  You should be doing ReadUntil(10) which is the last character in your input string, a line feed character.  You are getting Timeouts because DAQFactory is waiting for the # which never comes.

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