-
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
-
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\"#"]
-
Thanks Bruce
Thanks Bruce every bit of knowledge helps
Cheers
Lyn