10-02-2020 03:17 PM
Hi, please view the pic below. I have a air-heater system controlled with a PID controller. It has been tested and works perfectly. I am trying to transfer temperature measurement data I am plotting on a chart to an SQL database. I manage to do so, but my Labview program stops after 1 second.It runs for a second transmits one measurement than stops.
10-02-2020 03:29 PM
Upload your VI, not a photo of your VI. None of us will debug a photo.
10-02-2020 03:30 PM
What do you mean "program stops"? Your code indicates that it only stops when the stop button is pressed. Has the button been pressed? Is code execution stuck inside one of the subVIs? Did the code abort execution with some error code? You'll have to provide more information than just "the program stops".
10-02-2020 03:32 PM
The code just stops. It executes for one second transmits one temperature measurement and than aborts. There are no errors. Seems like something is resetting the execuation. I have tested the air-heater with the PID controller, works perfect. I started getting problems when implementing SQL connection blocks. Seems like they are resetting the loop or something, at least what I am suspecting. Not sure though....
10-02-2020 04:59 PM
@adis82 wrote:
The code just stops. It executes for one second transmits one temperature measurement and than aborts. There are no errors. Seems like something is resetting the execuation. I have tested the air-heater with the PID controller, works perfect. I started getting problems when implementing SQL connection blocks. Seems like they are resetting the loop or something, at least what I am suspecting. Not sure though....
Just based on your picture and description (since that's all we have...):
On your front panel, is your stop button set to "Switch" instead of "Latch"?
But for us to be able help more, you should really upload your .vi.
-joeorbob
10-05-2020 08:57 AM
Why do you have two different wait functions in that loop? I don't think that is what is causing your problem (unless the value of Time Step is really large), but you don't need both waits. Based on what you've said I see two likely scenarios. 1. As joeorbob suggested your Stop button is set to TRUE, which I find more likely. The other is that you're getting stuck in that SQL vi (but that would get stuck and nothing would happen, not stop the vi - you would have to use the Abort button to stop the vi from running).