Graeme Posted May 29, 2009 Report Share Posted May 29, 2009 Hi all, I have a Producer/Consumer architecture, somewhat new to me I should say, that I'm developing. In the Consumer loop there is code in the True case of a Case Structure which has a True constant wired to its selector terminal, so that the code should always run, and it appears to do so. However, remove the Case Structure in toto, so the code that was in the Case Structure should still always run, but certain aspects of the code now fail - so, code in the case that must execute, runs, code out in the open, which surely still must execute, doesn't run properly. The attached VI with its FP guidelines demonstrates this better than I can in words here. Can anyone help? Regards, GGT. Quote Link to comment
jdunham Posted May 29, 2009 Report Share Posted May 29, 2009 QUOTE (Graeme @ May 28 2009, 03:12 PM) I have a Producer/Consumer architecture, somewhat new to me I should say, that I'm developing. In the Consumer loop there is code in the True case of a Case Structure which has a True constant wired to its selector terminal, so that the code should always run, and it appears to do so. However, remove the Case Structure in toto, so the code that was in the Case Structure should still always run, but certain aspects of the code now fail - so, code in the case that must execute, runs, code out in the open, which surely still must execute, doesn't run properly. What happens if you replace the case structure with a single-frame sequence structure? I didn't run your VI, but for sure if you remove the case structure, then anything not dataflow-dependent on the queue element will execute long before you drop a message into your producer. Quote Link to comment
Graeme Posted May 30, 2009 Author Report Share Posted May 30, 2009 jdunham, you are quite right, it is a data flow problem. There is no oddity at all, other than my brain! In the abscence of the case structure, the simple act of wiring the Dequeue Element function's error cluster to the first of the property nodes yields desired behaviour. Doh! Thank you for pointing me in the right direction. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.