LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview

Solved!
Go to solution

Hi there, i am doing college project and  i am stuck here need some help i have  to control the dc motor(pump) with LabVIEW. I am making grow box which have sensor output will be run the pump according the setpoint. 

There is no control and simulation toolbox  in our college labview so we have to use basic block diagram,as far i got its working as 2 step controller but project was asign us it has to work as proportional controller. 

0 Kudos
Message 1 of 23
(3,385 Views)

(Since every post here is about LabVIEW (note the correct lettercase), please have a moderator change the subject of your post. I am sure you can come up with a better description)

 

Proportional control typically involves PID, so start looking into that. The example finder has some useful demos.

0 Kudos
Message 2 of 23
(3,365 Views)

We are no allow to use pid controller to the control speed of dc motor. We have to use basic case structure like, not sure yet. 

0 Kudos
Message 3 of 23
(3,354 Views)

PID is part of LabVIEW full, so at least look at the examples to give you some ideas. Then substitute your own code..

 


@Bk1980 wrote:

We have to use basic case structure like, not sure yet. 


A case structure does not control anything and there is only one type (not e.g. basic and acidic versions ;)). Please find out what the rules are and post again once you are sure.

0 Kudos
Message 4 of 23
(3,334 Views)

I already made pid controller in my laptops. When i present to my supervisor he rejected it. said due to  we are not using  control simulation  so i have use different way. no idea what to do now. 

0 Kudos
Message 5 of 23
(3,328 Views)

I suspect you are supposed to do something simpler (I will avoid a remark about "more basic" for fear of an acidic response 😉 ) and with regards to the Case Structure perhaps you can read about a State Machine.

 

Your general idea probably involves taking the current value, determining if it is more or less than the setpoint, and then turning on or off the motor in response to this finding.

 

This can be done with a relatively small number of simple nodes, like Greater Than, Less Than, perhaps Select?


GCentral
Message 6 of 23
(3,298 Views)

Thanks. I will try this way in next class. just wondering is any way we can make own pid with first principle without having pid control toobox

0 Kudos
Message 7 of 23
(3,248 Views)

Edit: I see you didn't specify if you are controlling flow rate or simply on/off, so perhaps you already have an analog output. Please keep that in mind when reading below...

 

It's certainly possible. 

 

The "algorithm" I described is not truly a PID controller at all - it is none of Proportional, Integral or Derivative dependent.

 

However, you have only a binary output in the form you described.

 

If you instead had an analog output (e.g. flow rate from pump, controlled by voltage or similar) then you could adjust your control value (flow rate) based on your measured value.

 

To build a proportional controller, you'd calculate the difference between your measured value and your target value, then multiply this by some constant (sometimes written k_p, where _ implies a subscript) and use that as your new control value.

 

To add the I and D terms, you'd look at the trending value over time and the change vs time. The Wikipedia page on PID controllers can give you a lot more detail.


GCentral
0 Kudos
Message 8 of 23
(3,233 Views)

@Bk1980 wrote:

Thanks. I will try this way in next class. just wondering is any way we can make own pid with first principle without having pid control toobox


Of course you can make a PID controller without using ashipped-with-LabVIEW PID controller.

 

It's just math in there, not magic: PID_controller

 

I wander if that is what your teacher means though. If he really said you have to use "control simulation" he might be referring to actually using system identification to make a good controller (where PID is sufficient at best).

0 Kudos
Message 9 of 23
(3,114 Views)

Hi there, As I discussed before, I'm controlling the pump speed depending on the moisture level in the flower pot. I got the calibrated output from the moisture sensor and fed it to the DAQ anologue input channel. In the labview, when I subtracted the measure value from the setpoint level and mulitiplied it with the constant value, which I calculated by the pump flow rate versus voltage.

But the problem is, that I am not using select block (on and off) from labview, I can't stop the pump. Even the very small errors. The pump keeps running, hope you understand this time and I really appreciate your help. 

0 Kudos
Message 10 of 23
(2,685 Views)