LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Feedback Control Loop

Solved!
Go to solution

Hi all,

 

I have created a feedback control program in LV that I am trying to use with a power supply and rate monitor. I have it set up so that you can choose a set rate and voltage value, and by monitoring this rate in the feedback loop, the vi then controls and adjusts the current so as to keep the specified rate at a constant value.

 

I am using a Mastech HY3020MR power supply with a Sycon QCM rate monitor. The program seems to be communicating with both devices properly; however, I am having a few problems both with receiving data values back from the power supply as to what the actual voltages and currents are as well as stopping the actual feedback loop without using the hard stop.

 

I've spent a lot of time debugging and consulting with others, but no one seems to be able to figure out this STOP problem and why the vi wont pass true values in order to stop the loops.

 

The other problem seems easier to fix, but I still can't figure it out. In order to input voltage and current values, you need to input them before you begin running the program. Once you do this, there is no problem outputting the values to the power supply, however, there is still no return on what the actual values are.

 

I would greatly appreciate any help or suggestions anyone has to offer. I have attached a zip file with what should be all the necessary files. The file name for the VI that I am running is FBControlLoop-abctodbl.vi and is found in FBControlLoop-abctodbl Folder>My files

 

Thanks!

Will

0 Kudos
Message 1 of 6
(4,225 Views)

Does the program stop eventually after you press stop?  If not, your program may be stuck in an endless loop inside one of your sub VIs.  The problem with data entry of voltage and current may be related as well.  The fact that it excepts the data before it's run, but not during may indicate that your progam is getting hung up somewhere.  What do you see with highlight execution enabled?


@Will_F wrote:
as well as stopping the actual feedback loop without using the hard stop.

 

 What do you mean by this? Are you referring to the stop button on the fp?
-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 2 of 6
(4,216 Views)
Solution
Accepted by topic author Will_F

Well you made a minor blunder (commonly known as an infinate loop)

 

 You have no way to cause the Stop button to become T so the vi never finishes and the loop in your Top level vi never gets the outputs from HY3020.vi so you never iterate your loop to read the top level stop button. 

 

Remove the While loop in HY3020.vi.


"Should be" isn't "Is" -Jay
Message 3 of 6
(4,207 Views)

Thanks so much Jeff! That seems to have fixed the problem and the program now runs as it should, registering the proper voltage and current values as well as stopping when prompted. I really appreciate the help.

0 Kudos
Message 4 of 6
(4,180 Views)

Well unfortunately, it looks like I'm back to this post with a few new problems. The vi and loop seem to be running properly now, which is great news, but I am still running into a problem when turning the control on, allowing the program to regulate the current opposed to doing it manually. It would appear that everything runs properly and that the logical boolean statements do what they should in terms of adjusting the current accordingly, but as soon as we turn the control on, the current immediately drops off and then stays around 0.5, which is close to the zero it maintains at 0.3 for the current. Ideally, the current should remain in the range of 1 to 1.6 amps, which is where we begin it when manually adjusting before the automation is turned on. However, every time we start up the control, it then drops off. Does anyone have any suggestions as to why this is happening? I have attached the most recent version of the vi with all necessary subs. The main program is FBControlLoop-noPSloop.vi and the problem happens when the "Control on" option is selected. Thank you to anyone who can help.

0 Kudos
Message 5 of 6
(4,120 Views)

Hello Will_F

 

I will be happy to look into this matter but it may take me some time.  Thank you very much for your patience in this matter.

Sincerely,

Greg S.
0 Kudos
Message 6 of 6
(4,083 Views)