10-28-2013 12:20 AM
Can you upload the VI in 2011
10-28-2013 12:21 AM
Hi Zoneator,
You currently have the maximum queue size set to one and an infinite timeout on your enqueue element. Once you enqueue the first element, your loop waits indefinitely for the one spot to become available. Due to dataflow dependencies (you shouldn't be wiring that stop button through to the parallel loop), your bottom while loop cannot execute until the first has finished and exited. You'll need to use a different mechanism (such as a local variable or a separate control) to stop your second loop.
Regards,
10-28-2013 12:21 AM
How do i do that? Sorry this is my first time.
10-28-2013 12:22 AM - edited 10-28-2013 12:25 AM
First i can't see any reson why upper while loop will execute only 2 times.
Second you need to learn dataflow ( you can not stop lower while loop with stop button wired like that )
third if you are not using event structure you are not doing your assignment correctly.
fourth read about every function from LabVIEW help before using it and see some example also.
Many more............
But most important is don't expect any code from as because it is your assignment.
Edit..
May be i saw it too quickly yes your bottom loop will not start executing until upper stops.
and you queue size is one so without dequeue it will stuck.
10-28-2013 12:31 AM
I've got it to work! Thank you so much tom. This is my solution. Tom and Ranjeet, do you guys think there is a way to incorporate an event structure into this?
10-28-2013 12:37 AM
Hi neos,
I found out the mistake. The wiring of the stops was a very amateur mistake (I don't know why i did that :/) I wasn't expecting any actual labview code, just verbal directions. My college research project involves labview and a ton of queueing (this assignment was just a verbal assignment from my grad student). I'm having a difficult time incorporating event structure for this. I don't see how to incorporate the value signaling property node into the event. Thanks
10-28-2013 12:38 AM
@Zoneator wrote:
I've got it to work! Thank you so much tom. This is my solution. Tom and Ranjeet, do you guys think there is a way to incorporate an event structure into this?
Yes better use event structure because in your case you gonna need to interact with user.
10-28-2013 12:41 AM
Ranjeet,
It doesn't need any user interaction. The event structure just needs to be triggered by a value change from the random number generator, so it can do its function which should be to multiply the random number by 3. I think this is supposed to be the purpose.
10-28-2013 12:43 AM
As you said multiplier can be changed
10-28-2013 12:45 AM - edited 10-28-2013 12:53 AM
Zoneator,
Now it is the time to learn the link Tom has given about Producer Consumer.
Make some actions like Start, Stop, Pause in producer loop with event structure and in consumer use a state machine.
Read it and give a try.
You can use user events.