From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with my while loop

The loop doesn't seem to be working for me. I have ran it a couple times but can't seem to find the problem. The output value is also not the same. It also does not run continuously, for me. I even went through the block diagram and it looks like it should work, but I can't seem to see why it doesn't.

 

I also attached the pump_repeat file you sent me. I may have misdownloaded it. So I want to see if you can open it on yours and see if it has the same issue. What I did when you sent me the file was: I downloaded the statemachine.ctl from you and saved it. Then I opened the vi with a reference to the statemachine.ctl. See if you have the same issue.

 

If anyone can offer some insight that would be great!

 

Thank You

Download All
0 Kudos
Message 11 of 14
(359 Views)

@Jerome1288 wrote:

The loop doesn't seem to be working for me. I have ran it a couple times but can't seem to find the problem. The output value is also not the same. It also does not run continuously, for me. I even went through the block diagram and it looks like it should work, but I can't seem to see why it doesn't.

 

I also attached the pump_repeat file you sent me. I may have misdownloaded it. So I want to see if you can open it on yours and see if it has the same issue. What I did when you sent me the file was: I downloaded the statemachine.ctl from you and saved it. Then I opened the vi with a reference to the statemachine.ctl. See if you have the same issue.

 

If anyone can offer some insight that would be great!

 

Thank You


Weird. I didn't have any problem opening the VI and the .CTL. I made a small change to the shutdown condition in the new VI I am attaching with this post. In your pump data picture, when you say your VI, you are referring to your VI from your original post?

 

 


Kudos are the best way to say thanks 🙂
Download All
Message 12 of 14
(347 Views)

Yes that is correct.

 

Also, when I change the frequency, it's supposed to revert back when I stop and then start the vi again, right? But if I change it while the vi is running, nothing happens to the output...

 

Sorry for all the trouble.

 

Thank you so much for all your help.

0 Kudos
Message 13 of 14
(337 Views)

@Jerome1288 wrote:

Yes that is correct.

 

Also, when I change the frequency, it's supposed to revert back when I stop and then start the vi again, right? But if I change it while the vi is running, nothing happens to the output...

 

Sorry for all the trouble.

 

Thank you so much for all your help.


Ok, I made a small mistake on the code. That's what happens when I write code in a hurry 🙂

Go ahead and wire the frequency wire through the "running" case.

 

$163F4B2F93C73A62.jpg


Kudos are the best way to say thanks 🙂
Message 14 of 14
(331 Views)