BrianMiles
Technical User
I am trying to make a script that will listen on the com port for certain messages and then call a process. I tried this:
While 1
when target 0 " String 1 " call myproc
when target 0 " String 2 " call myproc
when target 0 " String 2 " call myproc
endwhile
myproc
...
endproc
It didn't pick up on these messages all the time just once in a while.
Am I doing this the right way to look for certain messages from what is received on the com port?
Is there a better way? Maybe the Switch command?
While 1
when target 0 " String 1 " call myproc
when target 0 " String 2 " call myproc
when target 0 " String 2 " call myproc
endwhile
myproc
...
endproc
It didn't pick up on these messages all the time just once in a while.
Am I doing this the right way to look for certain messages from what is received on the com port?
Is there a better way? Maybe the Switch command?