From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

capacitor tester

Solved!
Go to solution

anyone?

0 Kudos
Message 11 of 25
(969 Views)

You are not approaching this in a reasonable manner. Why don't you set up a state machine that continuously reads the values and takes time points. At program start, place the starting tick count into a shift register and apply 5V. Once 65% is reached, take a second tick count and subtract the two. Calculate the end time (5 tau) and run the VI until that time has elapsed. Then remove the 5V and go back to the idle state. All you need is a single outer loop, a few shift registers, and a few case structures.

 

You had plenty of time since the last activity here. What did you try since then?

Message 12 of 25
(958 Views)

well I was actually looking at state machines at the moment, and digging trough the material supplied by school etc, I did expand my vi so that it meets with a few other demands, It calculates the value of the capacitor (but only by using the one measurement of one tau) and an indicator lights up if it meets within the tolerance which can be manually set.

 

I will try to work with the state machine now like you and "Proven Zealot" suggest. You supplied some good tips now, thanks, I'll dig into that and hopefully a working vi will be the result.

 

I was just thinking that adjusting the VI from school a bit by putting all the steps I want in a flat sequence should've been enough and I thought that I only needed to have a solution for that one frame and I'd be sorted, just a different way to connnect that 'read' "library function node" to make that frame give the signal it's finished and move on to the next frame, and the next etc without stopping.

0 Kudos
Message 13 of 25
(947 Views)
Solution
Accepted by topic author Mark1357

@Mark1357 wrote:

 by putting all the steps I want in a flat sequence should've been enough 


Yes, using a flat sequence is too inflexible.

 

Here is a very quick a dirty draft (not tested!) to give you some ideas.

Message 14 of 25
(937 Views)

...deleted

0 Kudos
Message 15 of 25
(927 Views)

wow that looks quite neat and basic, just like you said, a while loop and  case structures, thanks so much, you're a great help!

 

the thing is they haven't thaught us about state machines though, just the very basics (custom_basic_V70 is the name of the labview document we're working with.)

0 Kudos
Message 16 of 25
(919 Views)

You mentioned in an earlier post that the school provided you with a VI as a starting point. When I looked at your VI and tried to guess which parts were in that starting point VI, I thought that it looks like the instructor is probably a text-based language programmer who has taught himself (or herself) a bit about LabVIEW.

 

NI is very supportive of education. If you can do so without offending the instructors, please suggest that they join the Forum and contact their local NI representative to find out what resources are available.

 

Lynn

0 Kudos
Message 17 of 25
(910 Views)

well yea, I have seen a few sample vi's that didn't quite do exactly as described, but we're not really learning to be programmers, these excercises are more to get a little taste of it, just to get the general idea.

0 Kudos
Message 18 of 25
(900 Views)

We do not want you to get a "bad taste" because the examples were put together poorly.

 

Lynn

Message 19 of 25
(894 Views)

Hi everyone

 

I'm nearly done now, I just have one more quick question, I need to save data from an array to an excel document, it doesn't work with the "writespreadsheetfile"

 

if you look at the screenshot you can see what I got set up, the "build text" is just there as an attempt to work as a converter but how do I wire this together?

 

thanks.

 

 

0 Kudos
Message 20 of 25
(852 Views)