02-23-2010 12:55 PM
Hi,
I have a while loop with a counter (shift register), in wich Im able to choose how many times its gonna count. This loop is used to enable savings of data in another loop via an local variable to the enable on the "write to messurement" VI.
Now, I would like my counter loop to count to the chosen number and then stop, until I press some enable button on the front panel.
My idea is to use the "wait for front panel activity" in the counter loop, to "stop" the loop when the cunted number is reached, and then continue, when a button is pressed.
But I cant really figure out how to make it work 😞
Solved! Go to Solution.
02-23-2010 01:39 PM - edited 02-23-2010 01:41 PM
Would this work?
02-23-2010 01:41 PM
OOPS...
Before you run that set the counts to some number ... change the comparison to =>
sorry...
Hummer1
02-23-2010 01:50 PM
02-23-2010 02:32 PM
Well,
I made a program, put it with the message...then checked it and it blew up...so I edited the message and pulled the program.
Give me a bit...I still think there is a cute way to do this.
Hummer1
02-23-2010 02:34 PM
My strategy is going to be to use a button (RESET) on the front panel to cause an event that will change the value of the "Enable" variable to T...
Try that and see how it works.
Send the example too if you can....thanks.
Hummer1
02-23-2010 03:08 PM
Ok, here is my test code, the saving part is only to test it, there will be a bigger part with datas to be saved. Im not quite sure how to make the case, but I guess that you mean:
case 1 "reached number" = true (stop vi), case 2, Pressed reset (enable loop)?
02-23-2010 03:27 PM
02-23-2010 03:34 PM
I think this one will work.
See what you think.
Hummer1
02-24-2010 09:15 AM
Hi,
Thanks it look like something that I can use. I have tried to implement my own program, cause I need to use the functions that my counting loop can do (edge trigger af dp/dt).
I tried to hook it on your counter, but it dosnt seems right. Im not quite sure how to implement it when im using shift registres? A Idea?
I have also tried to figure your code out, and made some comments in each loop on how I think it works 🙂 Please correct or add comments 🙂
Thanks 🙂