LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

capacitor tester

Solved!
Go to solution

Hi everybody, 

 

I'm new at labview and was hoping if someone could help with a basic question.

 

I have to make a program that checks capacitors, the program uses a Velleman card VM110N or K8055.

 

I try to give is short and simple:

 

-Measure time.

-send 5 volts (255) to the card (which has a resistor and a capacitor wired up to it)

-measure the time it takes to get over 63% (this is 1 Tau)

-charge another 5 tau until fully charged.

 

the program also has to discharge, measure time etc again, calculate tau again, discharge another 5 tau, rinse and repeat, with the data you can calculate the capacity of capacitor and give approval or disapproval by a led lighting up and finally save it into an excel document.

 

but for now I'd like it to just charge, measure time until 63%, then I'd have 1 Tau,  (and then charge 5XTau.)

The rest I should be able to manage.

 

even if you don't have that velleman card I hope you can give some comments what I did wrong, I set it up pretty basic, remember I'm just a beginner, only the stuff in the flat sequence is mine, the rest was set up already, I've been at this for ages (really, I'm too embarrassed to even say how long), I'm sure it's quite simple, but if someone could just give me a clue or two.

 

Hope someone can help me, thanks so much in advance!

 

(ps I posted this somewhere else too, but I thought this was a better location for my question even though this thread is very old)

 

0 Kudos
Message 1 of 25
(3,531 Views)

Mark1357,

 

It would be better to start a new thread since this one is marked solved. Many people do not pay much attention to old, solved threads. This is probably the best Board for your question.

 

1. Please look at the online tutorials for Getting Started with LabVIEW.

2. With a state machine architecture you would only need one loop and no local variables. Multiple loops are not a problem although the way you have used them limits the flexibility of your program. Local variables may lead to race conditions. The Con local might be written before or after the terminal is written inside the loop. In practice it will amost always be written first but this cannot be guaranteed by your code. Similarly the 1 Tau local in the seqeunce structure might be read before or after the terminal is written.  These race condtions can produce unexpected results.

3. The Tick count in the first frame of the sequence structure executes in parallel with the CLFN (Output). No way to know which happens first.

If the DLL takes less than a millisecond to execute, it does not matter. It would be better to put the Tick Count in a separate frame after the CLFN node.

4. The one iteration loops could be eliminated by wiring the error clusters in and out. Learn how data flow works to your advantage.

5. There is no need to write the Scope property nodes every millisecond. Learn to use the event structure so that you only write to the property nodes if the x-axis length changes.

6. If the device is not connected the middle while loop still runs once and the inner loops will still wait for the user to press the end program (Stop) button. Better: Enclose the middle loop in the True case of a case structure.

7. There is no need for the 1 ms Wait in the outer loop when the inner loop has a 20 ms wait.

 

Lynn

Message 2 of 25
(3,512 Views)

Mark1357 wrote:

I'm new at labview and was hoping if someone could help with a basic question.


Please don't trigger duplication of our efforts and waste our time.

 

You already posted here and said you asked the moderator to move the thread (did you?). There is no need to start the same thing at the end of an unrelated thread that is already marked as solved.

 

No more discussion of your problem here, please. Thanks! 😄

0 Kudos
Message 3 of 25
(3,505 Views)

I had already posted this before you had responded to my thread.

 

I figured no one would see the origional thread anyway as it is in a topic about feedback on  the forum and not about actual labview questions.

 

anyway merging and moving is requested, sorry about the inconvience.

0 Kudos
Message 4 of 25
(3,493 Views)

Johnsold, thank you for your tips.

 

I used the 'body' if you will of a vi that is deliverd by school, I just deleted a sine/block wave creating bit with adjustable frequency out of the inner big loop in the middle, so only the flat-sequence bit is my creation, a method which I used before in a reaction time vi. in which it worked fine, so I'm confused why it doesn't work now.

 

I will try your tips tomorrow, now I need to go to bed.

 

 

0 Kudos
Message 5 of 25
(3,486 Views)

I took a snapshot to pinpoint my problem, I now got my VI to measure 1 Tau, but I had to wire it up to the stop buttons, but obviously I want it to keep running.

 

What can I connect the call library function node in the second frame to, so that the frame after that will register my time at 63% without stopping?

 

Thanks in advance.

 

 

0 Kudos
Message 6 of 25
(3,415 Views)

@Mark1357 wrote:

... but I had to wire it up to the stop buttons, but obviously I want it to keep running.


Sorry, I don't understand. Why did you "had to"? You have a choice not to wire to the termination condition (or terminate on a well defined set of other conditions), right?

0 Kudos
Message 7 of 25
(3,405 Views)

"Sorry, I don't understand. Why did you "had to"? You have a choice not to wire to the termination condition (or terminate on a well defined set of other conditions), right?"

 

Well this is the only way I got it to work, what could I wire it to instead?

 

 

0 Kudos
Message 8 of 25
(3,397 Views)

Mark1357 wrote:

Well this is the only way I got it to work, what could I wire it to instead?


Only the stop button (delete the OR). Then simply don't press the button until you really want to stop. 😄

 

(Also make sure the stop button is latch action. It is by default)

Message 9 of 25
(3,393 Views)

well that's not going to work, I just want to know how long it takes to charge the capacitor to 63% then it needs to continu charging for another 5 tau, then discharge and measure 1 tau again by measuring time until 37%.

 

but all I want to know is how do I get the second frame set up so that I can measure how long it takes to get to 63% (=161)

0 Kudos
Message 10 of 25
(3,381 Views)