Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weird problem with MSCOMM
Message
From
23/03/2004 20:42:03
 
 
To
23/03/2004 08:59:36
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00888798
Message ID:
00889079
Views:
18
Hi Jim,

Thank a lot for your advise.
Will look into your methods.
I also hate loop as it might be slightly longer or
short depending on the PC processor speed.

As for the Waitsec function using Win32 API, sleep,
hope I can find a way to replace it.

Hope we find a way to solve this issue.

>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
Best Regards
Virusim
Previous
Reply
Map
View

Click here to load this message in the networking platform