Newbie - Advise Please


Closed Thread
Results 1 to 3 of 3
  1. #1
    tracking's Avatar
    tracking Guest

    Question Newbie - Advise Please

    hELLO
    Started using PBP with Codedesigner and trying to learn would appreciate help on the following:

    What I'm trying to do is:

    SerIn2 pinin,16572,200,start,[STR tempStr\12\"#"]
    This seems OK

    but how do I use whats in the string for example

    IF tempStr = "abcd" Then - This will not work
    got loop
    EndIF


    Advise Please

    Thank You

    Lyn

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    You have to test individual elements in your string array.
    Code:
    IF tempStr(0) = "a" then
       IF tempStr(1) = "b" then
          IF tempStr(2) = "c" then
            IF tempStr(3) = "d" Then
              goto loop
            End If
          End If
       End IF
    End If
    Unfortunately, PBP will not test the whole string as a single argument.

    You could also use the wait modifier to wait until ASCII characters abcd
    arrive, then receive the remainder of your data packet in the array.

    SerIn2 pinin,16572,200,start,[WAIT("abcd"), STR tempStr\8\"#"]
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3
    tracking's Avatar
    tracking Guest


    Did you find this post helpful? Yes | No

    Default Thanks Bruce

    Thanks Bruce every bit of knowledge helps

    Cheers

    Lyn

Similar Threads

  1. Newbie making an ignition timer
    By ChrisHelvey in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 5th August 2012, 17:45
  2. Newbie problem :)
    By sokrad in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 25th January 2008, 10:34
  3. Newbie: Temperature measurements
    By Budda in forum General
    Replies: 10
    Last Post: - 30th March 2007, 09:56
  4. PIC Newbie
    By azmax100 in forum Schematics
    Replies: 7
    Last Post: - 23rd February 2007, 04:52
  5. request for a newbie forum
    By nimonia in forum Forum Requests
    Replies: 1
    Last Post: - 20th May 2006, 09:01

Members who have read this thread : 0

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