PowerBuilder Support

Accelerate development with PowerBuilder, the market’s favorite 4GL RAD tool.

Shameem

Reading datas from Serial Port\ RS232

How can it is possible to read datas from Serial Port\ RS232 ( in pb 6 / 7 ) , Actually i want to scan datas from electronic weighing mechine.

Reply to This

Replies to This Discussion

You can use FileOpen(), FileRead() and FileClose() to access a COM port. The FileRead() call will block your application until it successfully reads data. For asynchronous access, you have to delve into API calls including CreateFileA(), CreateEvent(), WaitForSingleObject() and several others.

I would strongly suggest the first option. If trying that proves not to work, let me know and I'll try to gather up the code that I borrowed when I did this.

Reply to This

Thank u,
Let me try this.

Reply to This

FileOpen to read data from com port? Never heard of this. Why not mscomm.ocx?

Reply to This

Gotta love programming. There's always several ways to solve a problem. Personally, I don't like using OCX or ActiveX controls. (So says the guy that built a wrapper for the MS Agent control. Hah!) If you Google the newsgroups for this, you'll find information about all three approaches.

Reply to This

I think you need to hookup your Machine to a com port and configure its as an input device.There after no coding in PB.

Reply to This

I have preciously used a library from
http://www.wcscnet.com/ worked for me, though as Benjamine mentioned you can do it with mscomm.ocx as well.

Reply to This

RSS

About PowerBuilder Support

Jason Fenter Jason Fenter created this social network on Ning.

Create your own social network!

PowerBuilder Support Badge

© 2008   Created by Jason Fenter on Ning.   Create your own social network

Badges  |  Report an Issue  |  Privacy  |  Terms of Service