1. Lee Eichenberg
  2. PowerBuilder
  3. Thursday, 27 May 2021 18:15 PM UTC

Chris,

 

Trying to read com port 3 to capture streaming data from an indicator. Used a code sample you provided

 

where when you open the file it substitute "COM3:" for the file name and it always returns -1. Using PB 2019 R3.

 

Was hoping I could do this without utilizing a 3d party library. Any thoughts?

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 27 May 2021 18:27 PM UTC
  2. PowerBuilder
  3. # 1

Hi Lee;

   Yes, I remember that example. I think that was circa W7 (or before). I wonder if W10 is blocking that route? However, before we dig deeper on that aspect. Have you tried running your PB App "As Admin" to see if that works for COM port access?

Regards ... Chris

Comment
  1. Chris Pollach @Appeon
  2. Friday, 28 May 2021 14:20 PM UTC
Is COM3 a real serial port or instead, a USB port?
  1. Helpful
  1. Lee Eichenberg
  2. Friday, 28 May 2021 19:34 PM UTC
it's plugged into a usb port, but it shows as COM3 through Putty
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 28 May 2021 20:33 PM UTC
Hi Lee ... have you tried this code yet? Its for a Barcode reader but it should be able to read your COM port (I think).

http://community.appeon.com/index.php/qna/q-a/how-to-scan-qr-code-bar-code-from-powerbuilder-application

  1. Helpful
There are no comments made yet.
Lee Eichenberg Accepted Answer Pending Moderation
  1. Friday, 28 May 2021 13:36 PM UTC
  2. PowerBuilder
  3. # 2

as a follow up Chris, I am able to use PUTTY which is a tool for this kind of thing to see the data stream coming across COM3. So I don't think W10 is blocking this, but who knows. I am just unable to open this like a file.

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.