Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RS232C Serial Port Communication using Powerbuilder

1,219 views
Skip to first unread message

christian

unread,
Sep 17, 2007, 3:11:10 PM9/17/07
to
I am working on a project right now which requires me to read from a serial
port and write to a file however I dont believe that the PowerBuilder API
has any functions for this type of communication I just wanted to know if
anyone has any suggestions or exprience using powerbuilder with serial port
communication. Or does anyone know of any third party tools that might offer
this functionality for PowerBuilder.

Jim O'Neil [Sybase]

unread,
Sep 17, 2007, 3:55:16 PM9/17/07
to
I've used IO Control ActiveX from JSPayne for several years, from PB5
through 9 with success.

On 17 Sep 2007 12:11:10 -0700, "christian"

Juan Carlos Marin R.

unread,
Sep 17, 2007, 4:59:02 PM9/17/07
to
I use COMM-DRV (Lib), 4 years old and is very good.


"christian" <chri...@myvisionexpress.com> escribió en el mensaje
news:46eed14e$1@forums-1-dub...

Vipul

unread,
Apr 21, 2008, 2:12:47 PM4/21/08
to
Do you know if it works on Vista?


"Jim O'Neil [Sybase]" <jon...@sybase.com> wrote in message
news:vrmte3t2lkn8bg5ts...@4ax.com...

Tyler Cruse

unread,
Apr 21, 2008, 2:30:04 PM4/21/08
to
Well, the normal fileread and filewrite work, but have some real
limitations. First, they work differently for different hardware. So, what
works for COM1 with on motherboard UART may or may not work with smart ports
(DigiBoard, EdgePort, USB based port cables, etc).

For a "write only" solution you can get by with fileopen, filewrite,
fileclose and use the applet in the control panel to set port parameters.
This "could" work for read also, but read will generally throw characters
away if the application does not keep up with the import data and will hang
on receive if no data is present and flow control allows the open to
complete.

You can find several OCX controls that will allow a reasonsable serial
interface or write your own c/c++ dll that has spawns a thread to read from
the port to fill a buffer and PB calls to read from the buffer. There are
also easy calls to set port parameters and flow control. Examine the
signals etc.

In the same vane, I suspect that it would be easy to use some of the .net
framework calls and deploy as a winform.


"Vipul" <sp...@myvisionexpress.com> wrote in message
news:480cd91f@forums-1-dub...

Jason 'Bug' Fenter [TeamSybase]

unread,
Apr 21, 2008, 3:21:34 PM4/21/08
to
Inline...

Tyler Cruse wrote:
> Well, the normal fileread and filewrite work, but have some real
> limitations. First, they work differently for different hardware. So,
> what works for COM1 with on motherboard UART may or may not work with
> smart ports (DigiBoard, EdgePort, USB based port cables, etc).

I have used FileRead with the EdgePort, but on XP and not on Vista. on
XP, though, it works well.


> For a "write only" solution you can get by with fileopen, filewrite,
> fileclose and use the applet in the control panel to set port
> parameters. This "could" work for read also, but read will generally
> throw characters away if the application does not keep up with the
> import data and will hang on receive if no data is present and flow
> control allows the open to complete.

I'm working on a wrapper for this. The wrapper spawns a thread that
polls the port for data. A 100 millisecond polling interval seems to be
working well and my implementation doesn't experience any data loss. The
only thing keeping me from posting this on CodeXchange or as a PBDJ
article is that it crashes if you destroy the object in the middle of a
poll. (You can stop the polling, then destroy the object with no problems.)


> You can find several OCX controls that will allow a reasonsable serial
> interface or write your own c/c++ dll that has spawns a thread to read
> from the port to fill a buffer and PB calls to read from the buffer.
> There are also easy calls to set port parameters and flow control.
> Examine the signals etc.
>
> In the same vane, I suspect that it would be easy to use some of the
> .net framework calls and deploy as a winform.

I haven't looked very deeply, yet, but at a first glance, I didn't see
any framework components for communicating with an RS232 port. If
someone else finds something, please let me know. I'd like to move from
Win32 API to .NET if I could.

fisher

unread,
Apr 21, 2008, 3:53:46 PM4/21/08
to
I've never used it but in Toolbox you can find a SerialPort

which is coming from System.IO.Ports.SerialPort.

Regards
Jason 'Bug' Fenter [TeamSybase] pisze:

Tyler Cruse

unread,
Apr 23, 2008, 3:44:04 PM4/23/08
to

"Jason 'Bug' Fenter [TeamSybase]" <jason....@teamsybase.com> wrote in
message news:480ce93e$1@forums-1-dub...

> I have used FileRead with the EdgePort, but on XP and not on Vista. on XP,
> though, it works well.
>
It appears that Zebra printers and built in UART code on some DELL pc have
an issue. The Edgeports and KeySpan adapters do not seem to have an issue.
I was using Vista 32 bit at the time.

0 new messages