|
-
Sep 30th, 2013, 10:27 AM
#10
Re: SerialPort VB.NET : Write/buffer/timing and Data Received Event (VS2010 and VS200
 Originally Posted by LiamC
...
QUESTION:
1. Is this correct or close to ?
2. I guess step1 should be started in the SIGNALED STATE (=AutoResetEvent (True)) if I want to have a loop around SerialPort.Write() ?
3. Are the Waithandles the best way to have all these other tasks working separately and at the right time, the way you did with the first 2 (to return the string in the TxtBox) ?...
Your analysis seems correct, but then your question 2 confuses me. The autoreset event indicates data was received.
Question 3: as good as any IMHO.
This is what I think you/system is trying to do.
- Open the port
- Send a command that causes the object to move
- When it stops you take a picture - I am assuming that there is some data received that indicates stop
- Repeat 2-3 some number of times
Can you, with minimal changes to the code I provided, send one move, take a picture, and then stop?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|