From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-29-2020 09:45 AM
I have to loops in my program and when I exit the first loop and go into the second loop. Once the second loop executes I want to go back into the first loop and repeat that cycle until I hit a stop button.
does and one know how to do that or is it even possible?
thanks
Tristan
12-29-2020 10:06 AM
It sounds like you have very little programming experience, so I would recommend you learn more about LabVIEW from here. How to Learn LV
When you describe something as going being multiple steps, it sounds like you want to be using a "state machine" architecture. But before you attempt that, you need to learn the basics about loops.
12-29-2020 10:34 AM
I have attached a picture of my program below, I'm creating Ramping up a signal and a ramping down signal. So far it's working but once it ramps up and down I can't get it to ramp back up automatically I have to restart the programme. I'm only new to LabVIEW and to programming. Any suggestions or point me in the right direction? would be great!
thanks
12-29-2020 10:56 AM
Well, you could put a while loop around the entire code. That isn't what I would do, but it would do exactly what you described in your original post.
A tip:
That initialize while loop with a start button in it. We call that a CPU burner. It will run as fast it possibly can just polling the start button. You might have noticed your PC's fans ramp up to the speed of a jet engine until you hit the start button. Put a small wait function inside that loop.
12-29-2020 12:17 PM - edited 12-29-2020 12:18 PM
As has been said, you need exactly one loop and a case structure containing one case for each of the three states.
Use a shift register for the count to disconnect from the iteration terminal and start counting from zero again when states change. Delete the sequence structure. Give your terminals reasonable names, your output is typically NOT a "number (0 to 1)", etc. Use a shift register to keep track of the current state and increment if needed.