LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with producer consumer architecture

I have tried implementing an almost calculator design using queue-string based state machine . I am trying out the same with Producer consumer architecture , though i am not able to achieve the same using UI event in one loop and states(case structure) in the other. Can someone help me with the deployment or algorithm to proceed ? 

0 Kudos
Message 1 of 6
(2,968 Views)

A producer consumer architecture uses two loops, not one: http://zone.ni.com/devzone/cda/tut/p/id/3023.  You seem to have tried to merge a state machine with a producer consumer, though it's not clear why. As for your specific problem, the issue is that you are using the "Use Default if Unwired" option for the output tunnel that is connected to the string. This is for the tunnel out of the event structure and the case structure. If you turn that off in both places you will find the error. Hint: Look at the Timeout case.

0 Kudos
Message 2 of 6
(2,950 Views)

Yes, the one i have enclosed is just a state machine , i wanted to implemented with two loops one having event handler and other having case structure(string based State machine) but i dont know how to transfer the data from event case to case structure for the arithmetic operations .

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

I found this tutorial to be very helpful in understanding how to model the P-C pattern in LabVIEW.

 

HTH,

zeeed

 

0 Kudos
Message 4 of 6
(2,941 Views)

Thanks , i tried myself and got the answer. I have enclosed the VI , although it has some minor tweaks.

0 Kudos
Message 5 of 6
(2,931 Views)

Most of your button still have the wrong mechanical action.

I don't think you need the timeout case at all. It is just shoveling hot air.

0 Kudos
Message 6 of 6
(2,922 Views)