ateori Posted February 1, 2019 Share Posted February 1, 2019 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? Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted February 1, 2019 Share Posted February 1, 2019 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. Quote Link to comment Share on other sites More sharing options...
ateori Posted February 4, 2019 Author Share Posted February 4, 2019 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 Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted February 5, 2019 Share Posted February 5, 2019 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. 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.