Recent

Author Topic: Having trouble with serial ports  (Read 4654 times)

zogtrog

  • New Member
  • *
  • Posts: 20
Having trouble with serial ports
« on: November 15, 2013, 04:44:35 am »
Hi,
     I am using syanasers TBlockSerial to open a serial port with lazarus on win xp 32 bits. The strange thing is that the port won't open until I open and close the port using another program such as hyperterminal. After I open and close the port using hyperterminal everything works.  The problem reappears if the computer hiberates or my usb to serial converter is unplugged. My original vb6 program and hyperterminal program are unaffected by these actions.
 I have examined the TDCB structure within lazarus and it appears to be an old version of the structure and does not correspond with the one given within the current windows api.
 I am trying to port an old VB6 program to lazarus on windows and then recompile this program under linux
I also tried to find where TDCB was defined and I couldn't locate it.

Jack Taylor aka zog
« Last Edit: November 15, 2013, 04:50:09 am by zogtrog »

bambamns

  • Full Member
  • ***
  • Posts: 223
Re: Having trouble with serial ports
« Reply #1 on: November 15, 2013, 05:02:19 am »
Try with 5dpo http://wiki.freepascal.org/5dpo - I use it and it works
Lazarus 1.8.4 + FPC 2.6.4 x86 (rebuild) and Lazarus 2.0, Windows 7 x64, unless otherwise specified

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Having trouble with serial ports
« Reply #2 on: November 15, 2013, 10:26:15 am »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

zogtrog

  • New Member
  • *
  • Posts: 20
Re: Having trouble with serial ports
« Reply #3 on: November 15, 2013, 12:36:20 pm »
Thanks bambamns I replaced TBlockSerial with TsdpoSerial and it works now!
Tsdposerial has a very simple interface compared to TBlockSerial which it wraps making it a doddle to
program with compared to TBlockSerial.  Thanks a million for informing me about this component.  :D

 

TinyPortal © 2005-2018