Wait for a string on a serial port


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    951


    Did you find this post helpful? Yes | No

    Default Re: Wait for a string on a serial port

    Quote Originally Posted by richard View Post
    MAIN:
    SERIN2 DataIn,BdRate,[WAIT("Identifier"),Switch]
    IF Switch = $31 THEN TX_ON = 1
    IF Switch = $30 THEN TX_ON = 0
    GOTO MAIN
    END

    ...or in serialtool send Identifier#1...
    Thanks Richard, it works well expecting HEX values ($30 and $31) but it will not work with Identifier#1.
    Roger

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,695


    Did you find this post helpful? Yes | No

    Default Re: Wait for a string on a serial port

    Quote Originally Posted by flotulopex View Post
    Thanks Richard, it works well expecting HEX values ($30 and $31) but it will not work with Identifier#1.
    command parsing needs to be enabled in your transmit window

    [right click in tx window] to see menu
    Warning I'm not a teacher

  3. #3
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    951


    Did you find this post helpful? Yes | No

    Default Re: Wait for a string on a serial port

    Thanks Richard. I should have tried this...
    Roger

Similar Threads

  1. How to Serial comm. wait for a string?
    By elcrcp in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 29th December 2015, 11:25
  2. wait for a string
    By sahin5002 in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 3rd April 2009, 00:27
  3. grabbing a serial string and passing it
    By cpayne in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 4th March 2006, 00:39
  4. Serial String parsing
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 29th June 2005, 19:11
  5. serial string parsing
    By billybobbins in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 8th September 2004, 22:34

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts