08-31-2009 06:32 AM
I have a small problem with serial implementation. The requirement is
1) Initially I have to send 4 characters say (A,B,C,D) only one time ,
2) Then after I have to send 3 characters E,F,G continuously until the program ends
3) There is a place in the window, user can press some buttons, if he press that button, those values also should be sent with part (2) values
All the things will happen sequentially, which means First come First Out Basis. Could you please guide me to develop a sample application? Specially third part, because it is like a event generation. Since I don't have any experience on this
Thank you,
Best Regards,
Rathan
08-31-2009 06:55 AM
08-31-2009 06:59 AM
Thanks Harold Timmi, but the problem is combining second part with third part (event generation). Is there any samples for that?
Thank you,
Best Regards,
Rathan
08-31-2009 09:38 AM
A state machine can handle events. You could also use the producer-consumer loop to separate the event handling from the consumer, which would implement the state machine. I would recommend reading these two articles:
Application Design Patterns: State Machines- Developer Zone - National Instruments
Application Design Patterns: Producer/Consumer - Developer Zone - National Instruments
08-31-2009 09:07 PM
09-01-2009 01:01 PM