ateori

RS485 hyperterminal connection

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?

Share this post


Link to post
Share on other sites

There are a number of posts on this forum on how to do this, and it depends a bit on what the code is and what the response is.  Here's one for example:

If you can provide more detail about what you send and what you get in response I can better help.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now