01-05-2014 09:36 AM
anyone?
01-05-2014 10:29 AM
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?
01-05-2014 11:01 AM - edited 01-05-2014 11:03 AM
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.
01-05-2014 11:44 AM
@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.
01-05-2014 12:57 PM - edited 01-05-2014 12:58 PM
...deleted
01-05-2014 01:05 PM
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.)
01-05-2014 01:42 PM
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
01-05-2014 02:23 PM
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.
01-05-2014 02:35 PM
We do not want you to get a "bad taste" because the examples were put together poorly.
Lynn
01-09-2014 05:47 AM
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.