Announcement

Collapse
No announcement yet.

com (serial port) library behvior

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • com (serial port) library behvior

    I am trying to use pb in a rs485 environment and have 2 questions.

    1. Opened com port with option "rs" specified.
    Does this disable the functionality?
    aka: rts does not change states (on, off) before,
    during and after transmission of data?

    2. Is "print #n" blocking?
    aka: program control returns after data completely sent?

    Thanks
    Ed



    ------------------

  • #2
    1. Yes. If you have RS specified, its state is immaterial. RS
    will always be ignored. Ditto with CS, DS and CD.

    2. Control will probably be returned after writing the info
    to the comm buffer. Not necessairly to the port itself.

    Word of note: The com port(s) on a computer are RS-232. I don't
    know if they are compatable with RS-485 devices. If you have
    this configuration, you may need a converter for successful
    communication.


    ------------------
    There are no atheists in a fox hole or the morning of a math test.
    If my flag offends you, I'll help you pack.

    Comment


    • #3
      The RS option deals with "request to send", an outboard signal
      which is changing states apparently by the pb com driver.
      My RS485 device uses the RTS to control data flow...


      Originally posted by Mel Bishop:
      1. Yes. If you have RS specified, its state is immaterial. RS
      will always be ignored. Ditto with CS, DS and CD.

      2. Control will probably be returned after writing the info
      to the comm buffer. Not necessairly to the port itself.

      Word of note: The com port(s) on a computer are RS-232. I don't
      know if they are compatable with RS-485 devices. If you have
      this configuration, you may need a converter for successful
      communication.




      ------------------

      Comment


      • #4
        Originally posted by edward kaeufer:
        My RS485 device uses the RTS to control data flow...
        Then you need to NOT put the RS in the "open com:x" parameters.
        If you do specify the RS, CS, DS or CD in the "open" statement,
        these control signals will be ignored regardless of the com
        port pin state.

        Assuming your external device defaults to hardware flow control,
        just open the com port with the basic parameters:

        "Open "Com1:9600,n,8,1""

        should do the trick. Make sure your device is on before you
        bring up the program. Otherwise, you will probably get a device
        time-out error.


        ------------------


        [This message has been edited by Mel Bishop (edited June 11, 2003).]
        There are no atheists in a fox hole or the morning of a math test.
        If my flag offends you, I'll help you pack.

        Comment

        Working...
        X
        😀
        🥰
        🤢
        😎
        😡
        👍
        👎