1. systems tcc
  2. PowerBuilder
  3. Saturday, 29 August 2020 09:21 AM UTC

Hi all,

We are using Power Builder 2017 R3 Build 1858. 

Has anyone accessed the com port from a datawindow. I would like to access the com port and collect the weighment values sent to the com port from the weighment software.

Any sample codes would be highly helpful

 

Thanks

 

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Saturday, 29 August 2020 16:45 PM UTC
  2. PowerBuilder
  3. # 1

Hi TCC;

     You can read the datum directly from a Com Port. However, you'll need to then parse out the data stream via PowerScript & then populate the DW that way.

Example

Example2

HTH

Regards ... Chris

Comment
There are no comments made yet.
Brad Mettee Accepted Answer Pending Moderation
  1. Saturday, 29 August 2020 14:35 PM UTC
  2. PowerBuilder
  3. # 2

You can't directly access a com port from a datawindow. You'll need to write code on a button, or other event, to pull data from the device. If you're lucky, the data exchange will be in text and not binary. If it's in text, you'll be able to do all the work from within PB script with relative ease. If it's in binary, you'll need to use BLOBs, or other specially formatted data structures (and it may be easier to write in a diff language and call a DLL function).

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.