LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help! Charge/Discharge of capacitor

Hi Everyone,

I am in need of assistance with a VI I am creating for a class. I have done as much as I can figure out, or at least what I think should be done. The requirements for the VI are:

A.  Theoretical Calculations

a. Calculate and display time constant of the circuit
b. Calculate voltage and current up to 10 time constants both for charging and discharging.
B.  Design of the VI 
a. Display time constant of the circuit.
b. Display voltages and currents both for charging and discharging in arrays.
c. Display voltages and currents both for charging and discharging in graphs.

The circuit design used for the Vi is:

A 200-micro farad capacitor C charging and discharging circuit with 50 k-ohm resistor R and 10-V power supply V0 in series. Switch SW can be either in position A or position B

This instructor provided a "hint" from his VI design:

However, I prefer to use the formula node for most math, and the instructor has no problem with this. However would it be easier for this VI if I actually used math functions like in his example?

 

I have attached my VI for what I currently have.

I really really appreciate any help!

have a good day 😉

0 Kudos
Message 1 of 3
(3,063 Views)

How sad to be given an assignment with "Design the VI" from an Instructor who has so little experience in LabVIEW (I seriously doubt whether he, or she, could pass the Certified LabVIEW Associate Developer exam (anyone who has seriously studied the LabVIEW Tutorials and has had a little bit of guidance with the "ideas" behind LabVIEW, such as Data Flow, and seen example VIs that show good LabVIEW Style should have no trouble getting the CLAD Certification).

 

What version of LabVIEW are you using?  The oldest I have installed on my Laptop is LabVIEW 2016, and by that time, NI had removed the "Stacked Sequence" (that your Instructor asked you to use) from its Structure on the Block Diagram Palette for Good Reasons (which we don't need to go into here).

 

This could be such an interesting example.  You could have used First Principles from EE001 (Kirchhoff's Laws, plus how an "ideal Resistor" and "ideal Capacitor" respond to Voltage and Current, and how Time enters into this, the relationship between Charge and Current, What is a Derivative), and could have simulated the circuit using LabVIEW's For Loop to generate, say, milliseconds and simple VIs to simulate derivatives, maybe even putting the LabVIEW Wait (ms) function inside the For loop to actually see the voltages change over the 10 seconds and letting you "play" with various values of R and C to get "time constants" of 1, 2, 5, and 10 seconds ...

 

Oh, well.  So you won't learn LabVIEW from this instructor, I'm sorry to say.  If you are interested in learning LabVIEW (it's a lot of fun, and makes a wonderful Laboratory Virtual Instrument Engineering Workbench), there are numerous Tutorials available (if your school has a LabVIEW Academic License, you have access to NI's on-line Tutorials, otherwise there are Tutorials mentioned on the first page of this Forum).

 

Bob Schor

0 Kudos
Message 2 of 3
(3,049 Views)

I prefer to use the math functions because you can't make a syntax mistake that way.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 3
(2,988 Views)