Questions tagged [tcomport]

TComPort is an opensource Delphi/C++ Builder serial communications components

51 questions
3
votes
1 answer

Delphi 7 TComPort OnRxChar not fire

I'm using TComPort I use the OnRxChar event to control when byte are arrived. I receive 3 bytes word for each command i send, but sometimes, OnRxChar receive only 2 bytes the remaining byte is not received, even if sent correctly 3 byte at time. I…
Mex
  • 196
  • 4
  • 16
3
votes
2 answers

Reading data in python from a COM port

import serial while True: ser=serial.Serial(port='COM30',baudrate=9600) print "try" s=ser.read(100) #reading up to 100 bytes print s ser.close() Device Manager: I am trying to read data from port using python. But it show the…
Abhishek Bhatia
  • 9,404
  • 26
  • 87
  • 142
2
votes
1 answer

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

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…
Marco van de Voort
  • 25,628
  • 5
  • 56
  • 89
2
votes
1 answer

How to cancel the last AT command ( Delphi - TComport )?

I send this command "AT+CUSD=1,"*511#",15", the answer is: '+CUSD: 1,"Points Noudjoum 1: Mes points 2: Convertir en Units 3: Convertir en cadeaux physiques 4: Points Bonus 5: Catalogue 6: Conso Tapez 1-6",15' Here I need to send again the…
Clay
  • 213
  • 1
  • 2
  • 9
2
votes
1 answer

Delphi TComPort WriteAsync

I am trying to send a string through TComPort component asynchronously, but everything is sent synchronously. The issue is that the app will be blocked and wait until the transmission is over. My code: procedure TForm1.Button1Click(Sender:…
Gallean
  • 23
  • 2
1
vote
1 answer

String with Hex Codes Problem with Charset TComPort

I'm using Delphi 10.3 Community Edition and Add TComPort, but my problem is that when I'm sending 9E I see 17E msg : String; msg := #$40+#$03+#$00+#$00+#$00+#$00+#$00+#$00+#$00+#$00+#$9E+#$E1+#$0A; SendFPMessage(msg); procedure…
1
vote
1 answer

Tcomport in console application with Delphi 10.3

I am using TComPort (4.11f) in a simple Delphi 10.3 console application, see below, but I do not get any data. Using the same code in a VCL application works fine. Any thoughts? My guess is that I am not connecting the ComDataPacket1 and ComPort1…
na38
  • 109
  • 2
  • 12
1
vote
1 answer

Java: serialport exception- port is busy

I have a bill validator attached to PC through com port. I try to send data to bill validator and receive output (bill validator communicates through ccnet protocol ) here is my code - public static void main(String[] args) throws…
1
vote
0 answers

Read Hex values Cport Library Delphi

I have a problem reading the values from a Comport, is there any solution how to read hex value from comport? I already tried: var Variable 1 : AnsiString; begin Comport1.Read(variable1,10); edit1.text := variable1; end But comes an error: [DCC…
1
vote
1 answer

Read data from Mitutoyo gauge

I need to write a program that will read the data from the indicator once a minute. Unfortunately, I can not find the communication protocol for this indicator (the official representative responds extremely unqualified and there is no way to get at…
1
vote
1 answer

Signal readyRead() does not execute slot

I have a relatively gross device (two computers are connected through COM port) and I must get it work by QSerialPort. The idea is simple: data is going to send from one comp to another per COM-port. Transmitter is working okay, which was checked…
John
  • 451
  • 6
  • 21
1
vote
1 answer

Asynchronous event through generic interface

I have to connect several measurement devices to my app (ie. caliper, weight scale, ...), not being tied to a specific brand nor model, so on client side I use interfaces with generic methods (QueryValue). Devices are connected on COM port and…
paradise
  • 336
  • 2
  • 15
1
vote
1 answer

Windows 10: ERROR_NOT_FOUND when opening a virtual serial port even though it exists?

Our Delphi Win32 application has been successfully pairing Bluetooth devices (using the Windows Bluetooth API) with the computer and using the resulting serial port. After installing Windows 10, the virtual serial port resulting from the pairing…
X-Ray
  • 2,816
  • 1
  • 37
  • 66
1
vote
0 answers

TComPort inside a Thread

How can i use TComport, from inside a thread (e.g OTL or Jedi Thread) to catch incoming strings? What the "SyncMethod" of TComport actually does? This is my code: procedure TForm5.ComPort1RxChar(Sender: TObject; Count: Integer); var Str:string; …
Dim
  • 41
  • 4
1
vote
2 answers

Comport readstr

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…
Drift89
  • 69
  • 1
  • 1
  • 6
1
2 3 4