The output of the Match Pattern is a signed integer. If what you're looking for is not found the "offset past match" is -1. The documentation states this. In general, you would use it as shown in the attached image.
That said, just so I get this straight, since I've noticed in your posts you tend to only give partial information which negate previous suggestions. You have a big while loop set up in which you're building a bunch of commands and you send them out to the PIC. The last one you send is "s". You then read from the serial port. I'm assuming you're expecting to see a "d" there to indicate that the PIC is done with the set of commands that you've sent? Regardless of what's on the serial port, you then go around the loop again and do the same thing. What happens if you don't receive anything on the serial port from the first iteration? You would merrily go around the loop a second time sending out the commands as before. Presumably this means the PIC goes through another processing phase, at which point you may get the "d" from the first set of commands. Don't you want to wait
until you get a "d"? Why issue the commands again if you have not verified the PIC has completed its task?
You said "
The delay kept inside the while loop can be adjusted so that structure loop executes fully before next "d" comes in." What delay? Are you talking about the 4.333 wired to the "Wait" function? If that's what you're referring to, that's not going to give you the delay you want, because that can execute at any time since you have no data dependency on it. In fact, it can execute while you're creating your commands. When is this delay supposed to happen?
Message Edited by smercurio_fc on 06-01-2007 03:58 PM