LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stopping a For Loop, part 2


@JÞB wrote:

OK,

This is one of those times I will "Chime in"  and, you might wish to duck... duck "Grey duck"

 

Yes, I have also used angle worms and made a hot-dish in a cassarole.  Just making the text blue does not attach the files!


Sorry Sir, was there something wrong with my attachments? Smiley Embarassed

0 Kudos
Message 11 of 14
(785 Views)

@altenbach wrote:

@ceilingwalker wrote:
You are autoindexing way too many thing between the two FOR loops I was doing this to create a data dependency, at least that was my thought process behind it. As far as the physical channels and VISA refnums, I did it this way so I didn't create more controls for the front panel. Being my first project, I am very certain my logic is flawed, this is why I like posting here and getting feedback from

 You have many visa sessions that (hopefully) never change during the execution of the loops, so why woold you turn them into an array of 11 identical elements just to autoidex them out again at the next loop. Change the tunnels to no autoindexing and things would look cleaner. Why are these session controls inside the loop? Are you expect them to be changeable during loop execution or would that screw up the results?

 

Wounld't it be easier to simply create an up&down ramp once and use a single FOR loop, autoindexing on the ramp? You have way too much duplicate code!!!

 

 If you don't want the second loop to run when the first one is ended prematurely with the stop button, put it in a case structure I tried a Case structure for the second For Loop. I couldn't find a way to change conditions that didn't affect the Vi's overall performance.

 

Then show us what you tried! That should be trivial to implement. Why would a case structure affect performance? Makes no sense!

 


 

 


To tell you the truth Sir, I thought an Event Structure appeared the best way to go for my entire project but I havne't figured out entirely how to use them. I studied the material online and have observed the example Vi's that came with my online training as well as the LabVIEW, I just can't seem to wrap my head around how to use them yet.

0 Kudos
Message 12 of 14
(781 Views)

@ceilingwalker wrote:
To tell you the truth Sir, I thought an Event Structure appeared the best way to go for my entire project but I havne't figured out entirely how to use them. I studied the material online and have observed the example Vi's that came with my online training as well as the LabVIEW, I just can't seem to wrap my head around how to use them yet.

It is very difficult to maintain a reasonable discussion if you constantly change topics in mid-sentence. Why are you suddenly talking about event structures? It is not even mentioned in the quoted text!

 

Can we please focus on the current problem with the FOR loop? We can discuss general code architecture elsewhere.

 

Message 13 of 14
(776 Views)

@altenbach wrote:

@ceilingwalker wrote:
To tell you the truth Sir, I thought an Event Structure appeared the best way to go for my entire project but I havne't figured out entirely how to use them. I studied the material online and have observed the example Vi's that came with my online training as well as the LabVIEW, I just can't seem to wrap my head around how to use them yet.

It is very difficult to maintain a reasonable discussion if you constantly change topics in mid-sentence. Why are you suddenly talking about event structures? It is not even mentioned in the quoted text!

 

Can we please focus on the current problem with the FOR loop? We can discuss general code architecture elsewhere.  Yes Sir. No more event structure talk for this post.

 


 

0 Kudos
Message 14 of 14
(773 Views)