Jump to content

Producer/Consumer Case Structure oddity


Recommended Posts

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.

Link to comment

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.

Link to comment

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.