LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Small Problem with Simple Labview Code. Please Help :(

Can you upload the VI in 2011

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 11 of 22
(580 Views)

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,

Tom L.
Message 12 of 22
(579 Views)

How do i do that? Sorry this is my first time.

0 Kudos
Message 13 of 22
(578 Views)

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.

0 Kudos
Message 14 of 22
(577 Views)

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?

0 Kudos
Message 15 of 22
(566 Views)

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

0 Kudos
Message 16 of 22
(559 Views)

@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.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
Message 17 of 22
(558 Views)

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.

0 Kudos
Message 18 of 22
(554 Views)

As you said multiplier can be changed

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 19 of 22
(551 Views)

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.

0 Kudos
Message 20 of 22
(549 Views)