Whatever approach you use, you have no guarantee the device will ever respond, or in what time frame. In the case of your original code, you are testing for the presence of an ETX in the stream. I would use that to set a form property to TRUE, which would then run ASSIGN code for that property and display the result. If you start a timer with the command click, you can set a timeout period to display an error to the user. If the ETX arrives, great, disable the timer. Just one approach. I hate delay loops :-)
>Hi Jim,
>
>Thank for your advise and code.
>Beside using this way, any other better way to
>wait for my device to reply before checking my
>result ?
>
>I hope that after sending my command to MyFare reader,
>I just wait for its reply and show it.
>Maybe my code is not well written. I sure there must
>be some better way to solve this issue.
>
>Thank you
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only