08-31-2015 03:27 PM
Can you save it as LV 2014 or lower? LV 2012 might be good so more people can see it.
08-31-2015 03:46 PM - edited 08-31-2015 03:51 PM
08-31-2015 04:09 PM
09-01-2015 09:19 AM
I would like to know how i can add sequence in an event structure. Assume, after the number is < the random number generate, I want to start another sequence say 1+ 1 = 2 or something. How do I make a sequence in this? I tried using a flat sequence but then realized that it cannot be stopped in between.
Attached is the vi saved under previous version.
Thanks.
09-01-2015 09:23 AM
@vsrinivasan wrote:
I would like to know how i can add sequence in an event structure.
If you're saying this, you need to stop coding and start taking some of those training links that were posted on the first page.
1) You need to break this reliance on the Sequence Structure. You're abusing it. It's a lot like if you learn to use a hammer and then use it in every situation. You've got a screw? Hit it in with a hammer. You've got a zipper? Smack it with a hammer.
2) Events are meant to handle quick pieces of code. If your code is complex enough it requires a sequence structure, it doesn't belong in the event structure.
Learn dataflow. This is how you control order of execution in LabVIEW.
09-01-2015 10:30 AM - edited 09-01-2015 10:52 AM
@vsrinivasan wrote:
I would like to know how i can add sequence in an event structure. Assume, after the number is < the random number generate, I want to start another sequence say 1+ 1 = 2 or something. How do I make a sequence in this? I tried using a flat sequence but then realized that it cannot be stopped in between.
Learn about state machine architecture.
Have you looked at my code yet?
09-01-2015 10:36 AM - edited 09-01-2015 10:45 AM
@vsrinivasan wrote:
I would like to know how i can add sequence in an event structure. Assume, after the number is < the random number generate, I want to start another sequence say 1+ 1 = 2 or something. How do I make a sequence in this? I tried using a flat sequence but then realized that it cannot be stopped in between.
Attached is the vi saved under previous version.
Thanks.
You're having trouble with this idea because it won't work. If you have a "sequence" of operations within an event case then the program can't be stopped until that sequence finishes. The way to code this is to trigger another case that does the step 1 of the sequence and then trigger another case that does step 2 of the sequence.
Here's a broad example of how a state machine works:
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'