Using RxCheck
Hello
I put this code in my software hoping that the software will check for data and then move on. Unfortunately it still seems to get hung up. Is there something I am doing wroing with
rxCheck ?
Thanks,
Greg
if USB.rxcheck
comd:= USB.rx
if comd == "O" 'Status Command
OverPressure:= true
I put this code in my software hoping that the software will check for data and then move on. Unfortunately it still seems to get hung up. Is there something I am doing wroing with
rxCheck ?
Thanks,
Greg
if USB.rxcheck
comd:= USB.rx
if comd == "O" 'Status Command
OverPressure:= true

Comments
if (comd := USB.rxcheck) <> -1 ' do somethingIn many objects rxCheck returns -1 is no character is received but if there is a character it will be returned. So do something like:
result := USB.rxCheck if result <> -1 ' do something with character stored in result."comd" needs to be a long, right?
Thank you kuroneko.
That's just want I wanted to know. I didn't know one could do it that way.
ch := coms.rxcheck
if ch+1 ' a -1 becomes 0 or false
' do something
but in this case ch was declared as a local variable so I guess it works because it is a long