07-21-2010 05:46 PM
@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.
07-21-2010 06:06 PM
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.
07-21-2010 06:21 PM
You can use a single-frame flat sequence, such as shown here.
07-21-2010 06:37 PM
@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.
07-22-2010 07:41 AM - edited 07-22-2010 07:45 AM
@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"
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.
@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.
07-22-2010 11:13 AM
I have learned a lot! Unfortunately, I am still at square one as far as my original problem goes =/.
07-22-2010 11:26 AM
@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.
07-22-2010 11:40 AM
Is there anyway I could PM you the files? I really don't want to leave them up publicly on the internet...
07-22-2010 11:52 AM
07-22-2010
12:02 PM
- last edited on
07-22-2010
02:49 PM
by
Support
Ok, I sent it to you.