tcomport

Reading the last line in a Tmemo in delphi

跟風遠走 提交于 2020-01-16 18:06:11
问题 After trying for a very long time .... decided to ask for help. I'm trying to read the last line sent to a Tmemo in Delphi. I'm sending lines of code one by one to a dev. board the dev. board needs different lines of code sent to it every time. My end goal is to read back the last line the dev. board sends back. E.G Set ATT = 7 --->> \sent to dev. board Dev. Board replies O.K <----- \ received from dev. board send next line of code. Or E.R.R send "set att = 7" command again. So far, I've got

Weighbridge data output format [closed]

蓝咒 提交于 2020-01-14 06:47:10
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I'm developing a weighbridge software for my client using vb.net 2008. As I don't have a weighbridge device to test, I don't know the output data format which is sent to COM port by the weighbridge device. So please tell me how can I resolve the problem and get the weight value

Using the Events in a serial port component TComPort (v4) from a thread in Delphi?

孤街醉人 提交于 2019-12-11 00:38:49
问题 A few years back for one of my applications I moved my serial handling to a thread when a certain app had to respond very quickly to certain serial events. It was in BDS2006, with an older version (some 3.x?) It was done by having code like this in the tthread.execute: while ... begin events:=[evRxChar]; { Prepare a stop event for killing a waiting communication wait. } try comport1.WaitForEvent(events,stopevent.handle,500); if evRxChar in events then ComPort1RxChar(comport1,comport1

Comport readstr

穿精又带淫゛_ 提交于 2019-12-08 06:54:41
问题 I'm trying to reading a simple string from host on Serial line RS232. The parameters of receive - transmission are the same for both: Baudrate: 9600; Data: 8bit; Parity: None; Stop: 1bit; Flow Control: None; I've tried to send this string: !A243B324C213D300# I use '!' and '#' as header and finish to be sure the string will be received at all. The problem is that I can receive the string until the 15th character (3). I know this because if I use this code: procedure TForm1.ComPort1RxChar