LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sequence and events

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

0 Kudos
Message 1 of 6
(2,976 Views)
you could use either a state machine or possibly an event driven program there are examples of both if you search them in the example finder.
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 2 of 6
(2,967 Views)

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

0 Kudos
Message 3 of 6
(2,963 Views)

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

0 Kudos
Message 4 of 6
(2,933 Views)
Looks like the OP decided to recreate the same question here.
0 Kudos
Message 5 of 6
(2,905 Views)
We need not have a producer-consumer loop in this case. We can have a ( 2 State )state machine with Case 1(tranmitting A,B,C) as the first state. The second state will have an event structure with user controls. The Timeout case of the event structure will have the case 2(which transmits E,F). Let me know if this answers your question
0 Kudos
Message 6 of 6
(2,880 Views)