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.
05-07-2014 06:10 PM
Hi,
I am using a state machine to increase temperature by changing resistance. I am using labview 8 and the libraries for the controller I'm using won't work so I am writing the commands. Each different state sets a different temperature. In the last state I have a stop if true button but when I run my program it doesn't stop after the last case. I have attached my program. Sorry about how messy and unorganised it is. I have been trying different ways to fix it and it's a bit all over the place.
Thanks.
Solved! Go to Solution.
05-07-2014 06:18 PM
Do you know if it even gets to state 20?
05-07-2014 06:35 PM
Hi,
Yeah it goes through all the states doing exactly what it's supposed to but after state 20 it returns to state 0.
05-07-2014 06:46 PM
Returns to state 0 and repeats the process I should have said
05-07-2014 06:55 PM
I dunno - works for me.
How did you confirm that it did go to 20 and start over?
05-07-2014 07:00 PM
Oh it worked for you? That's strange. I used highlight executuion and then I'm saving to a spreadsheet each iteration so there should just be 8 files but it just kept on running for me today. Is the way I am using the shift registers correct? (new to labview) I have a previous version where I hadn't started using them yet and it still works.
05-07-2014 07:11 PM
I know what your problem is. The way you have it set up, every iteration between 6 and 20 will use the "0, default" case, making it do more reports than you were expecting. Because you had so many long waits, you probably thought it was repeating itself. To avoid this, make an empty case for that range.
Don't forget to wire the empty case wires all the way through..
05-07-2014 07:12 PM
Oh I see. So could I delete case 20 and make a case 7?
05-07-2014 07:14 PM
@pagz wrote:
Oh I see. So could I delete case 20 and make a case 7?
Well, don't delete it. Just rename it to 7. 🙂
05-07-2014 07:17 PM
Hey, it's NOT BAD for a new LabVIEW programmer. If you could look around the NI Site and do some of the tutorials, you will see how to clean up your code and learn best practices. 🙂