LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Understanding a PID-to-PWM control loop (and learning to understand LabVIEW as a non-engineer)

Solved!
Go to solution

I have two questions:

 

  1. First, I am trying to understand the attached and linked VI that details a PID controller leading to a PWM output (original link found here). I think this example (and others) is a good launching point for my own simple project: controlling temperature of an experimental vessel via a furnace. I have read dozens of posts about temperature controllers with dozens of answers - I am still learning what is the simplest, most fool-proof solution for me (a grade-A fool). I do not have the hardware required for this project yet; until my team gets the money to purchase it, I am taking the time to learn LabVIEW and build a good UI for us. It'll likely be a cRIO setup with two 9213s (temperature inputs from 22 thermocouples, 11 furnaces), one 9201 (for measurements from pressure transducers), and one 9474 (digital output).

    The idea here is that using the linked example, the True/False PWM output would connect to a digital output module (the 9474) that sends signal to a SS relay (3-32VDC input), closing the connection on a power cable to the furnace.

    My question is regarding the constant input values in this VI. Are these supposed to be plant values? I've watched the program run with "Highlight Execution" on and still can't understand what they are doing.

    (I suppose I can also ask here if this is actually a good way to go about achieving my goals.)
  2. This is more of a broad question. I am an aqueous geochemist by training, never taken an engineering course. Sure, I love to tinker, but everything I know of all the stuff relevant to LabVIEW is both very little and self-taught. I have spent lots of time watching videos and reading articles provided here and elsewhere, but very quickly I get confused with concepts that are assumed to be common knowledge. My progress, therefore, is slow and arduous. Does anyone, especially those who are also non-engineers, have any advice on how to build up a better knowledge base, or approach learning in a more productive way?
0 Kudos
Message 1 of 4
(1,541 Views)

A follow up question:

 

Is there any reason why I couldn't just use one of the example VIs for, let's say, an autotuning PID controller copy/pasted into my program? Of course, I'd have to modify some parts like the process variable and data output type. I don't want to have to re-invent the wheel, so is that a common or recommended thing to do as a beginner?

0 Kudos
Message 2 of 4
(1,497 Views)
Solution
Accepted by topic author imantelli

Yes, studying LabVIEW Examples is often helpful.  Be sure, when you open them, you do a "Save As" and make a copy on your Desktop or in your My Documents, close LabVIEW, and open your new Copy to prevent "messing up" the Example.

 

Being an "example", NI often "overloads" the code -- don't be afraid to simplify, replacing "choices" with the "value I plan to use" and getting rid of "Cases I'm not using" -- you can always go back to the Original Example.

 

I'm doing a project involving a Stepper Motor (new to me).  I'm using a USB-6212 to generate the Stepper Pulses -- haven't done much with Counter/Timers, so I used the DAQmx example to get me started.  [Shows even Knights sometimes need Squires to get them up on their horses].

 

Bob Schor

0 Kudos
Message 3 of 4
(1,436 Views)

Bob, thank you for your reply. It sounds like one way to learn is to take these over-the-top examples, and break them down (or break them entirely) to learn what makes them tick. I expect there will be some challenges without physically having the equipment I need to properly test my code, but hopefully with this practice now that transition will go smoothly.

 

I had a proper giggle at your title. Thanks for that too.

0 Kudos
Message 4 of 4
(1,431 Views)