LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble getting a subvi to update a graph in real-time on the front panel

 


@ModusPwnens wrote:

Is there a way I can group controls and pass them in like you did?


 

 

I assume you are talking about the cluster in the first state machine example above. You can either create a cluster as a block diagram constant, or you could even use a cluster of controls on the front panel.

 

 


@ModusPwnens wrote:

If not, what would be an efficient way of writing to a control without having to create local variables everywhere?


 

To write to a control, you need to use a local variable as simplest approach. Of course if you only update it programmatically (and never manually), you should make it an indicator instead ... no local needed!

 

Don't use front panel objects for data storage unless their value is meaningful for the operator.

 

0 Kudos
Message 21 of 36
(1,739 Views)

Hmm...is it still okay to use flat sequence structures? I have places where I want to insert a wait time into my code for various reasons. 

0 Kudos
Message 22 of 36
(1,727 Views)

You can use a single-frame flat sequence, such as shown here.

0 Kudos
Message 23 of 36
(1,719 Views)

@ModusPwnens wrote:

Hmm...is it still okay to use flat sequence structures? I have places where I want to insert a wait time into my code for various reasons. 


I often have a use for a Wait function where I need to enforce data flow.  What I did was to create a Delay subvi that has a Wait function and Error In and Error Out.  Well, just like this:  The No Error is optional.  But this VI will allow you to insert a wait without having to use a flat sequence to enforce data flow.

 

19573i11331CB3687CECBC

- tbob

Inventor of the WORM Global
Message 24 of 36
(1,712 Views)

@tbob wrote:
But this VI will allow you to insert a wait without having to use a flat sequence to enforce data flow.

or the one from OpenG or the Express VI "Time Delay"

 


@ModusPwnens wrote:

Hmm...is it still okay to use flat sequence structures? I have places where I want to insert a wait time into my code for various reasons. 


The fact that you are asking a question about one of the only valid reasons to use the flat structure tells me you have learned a lot from this thread. Good job.
Richard






0 Kudos
Message 25 of 36
(1,686 Views)

I have learned a lot! Unfortunately, I am still at square one as far as my original problem goes =/. 

0 Kudos
Message 26 of 36
(1,659 Views)

 


@ModusPwnens wrote:

I have learned a lot! Unfortunately, I am still at square one as far as my original problem goes =/. 


As I demonstrated in my example above, this should work just fine. You must be making a subtle mistake.

 

0 Kudos
Message 27 of 36
(1,655 Views)

Is there anyway I could PM you the files? I really don't want to leave them up publicly on the internet...

0 Kudos
Message 28 of 36
(1,644 Views)
You could try my forum name at gmail, might just work...
0 Kudos
Message 29 of 36
(1,639 Views)

Ok, I sent it to you.

0 Kudos
Message 30 of 36
(1,632 Views)