LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Feedback Control Advice

Solved!
Go to solution

I'm trying to create a closed loop for my system, but I'm having some trouble figuring out how to implement it. Currently, I'm just doing something simple where I command a current (gets transformed to voltage by a linear relationship), and sends this to the power suppply. The power supply then responds with a current. For example, if I give it an input of 1A, I will read 0.97A from the power supply. I have also added a range to check whether the output is within 1% of the input. If not, then I update the input with the error term to send it more current (i.e 1A actually sends 1.05 to get closer to the 1A output as expected). 

I'm having some issues figuring out how to do this properly, as I want the user to be able to manually change the input current and my control system to respond accordingly. Currently, I believe my control system and input current are interfering with each other causing unstable results as they are "competing". Please let me know what you suggest I change. Thank you 

 

LabVIEW.PNG

 

 

 

0 Kudos
Message 1 of 7
(3,698 Views)

If I told you to go east and someone else told you to go west, which one are you going to listen to?  You obviously can't listen to both of us.  Either your power supply automatically outputs a programmed value from the control loop or it outputs a value from the user.  You could have a boolean select that tells the control where to get its input value.  of you could do a compare and if the user value is different than the control value, use the user value. 

 

It's really difficult to tell what you are doing because the block diagram is so large and the image is small. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 7
(3,690 Views)

Yeah, that makes sense. I just didn't know how to solve the east vs west issue without having to change a lot of my diagram and I'm also new to LabVIEW so i'm still trying to grasp all the functionality.

 

In terms of the picture, would uploading my vi file help?

 

0 Kudos
Message 3 of 7
(3,686 Views)

Yes the VI would be helpful.  Even more helpful (for those of us that have older versions of Labview, 2012 to be exact) is to create a VI Snippet....from the Edit menu.  The Labview code is embedded in the PNG file and can be dropped onto a block diagram.  It's a very useful tool for sharing code on forums.  

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 4 of 7
(3,673 Views)

Awesome, thanks! I didn't know the sniplet tool existed.

I have attached a sniplet and my VI file.

There's probably a way easier way to do what I'm trying to accomplish...

Download All
0 Kudos
Message 5 of 7
(3,660 Views)
Solution
Accepted by riahim

I would create a subVI that acts as a PID function (if you don't have access to the PID addon).  Basically this subVI would have a process variable input (which is the DAQ value that is read from your device) and a setpoint input value.  Inside this subVI is where you will scale the values and calculate a new setpoint based on the current value.   Something similar to the image below....what goes in the PID VI is up to you.  You'll want to put the code that clamps your program value to +/-1% in this subVI. 

Capture.PNG

 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 6 of 7
(3,626 Views)

Thank you very much for your help, I appreciate it.

0 Kudos
Message 7 of 7
(3,619 Views)