04-22-2014 02:55 PM
Hi All,
Can somebody help me?
For some reason if I use Loop structure with a working code and I want to use/indicate the genereted data, the VI does not do that. It is constantly showing 0.
Thank you in advance.
Best regards,
Adam2
04-22-2014 03:05 PM - edited 04-22-2014 03:11 PM
Hi Adam,
when you're talking about those "element" and "numeric" indicators: they only show values after the loop has finished - due to DATAFLOW!
THINK DATAFLOW!
You also should learn how/when to use BuildArray nodes as well as IndexArray functions:
This does the same as your VI, I just removed unneeded functions.
I didn't change the behaviour at all as I didn't understand the goal you want to reach with this VI…
04-22-2014 03:16 PM
I'm not trying to pick on you but. for illustative purposes lets try a picture comparing your code with equivalent code that did not run amok through the Rube-Goldberg factory.
Now comes the hard part. Understanding WHY those two code segments are identical. The help file and the getting started tutorial will help a lot.
04-22-2014 03:59 PM
Hi GerdW,
I have just started using Labview and yes you are right I need to learn each and every basic functions to use properly Labview but unfortunately my time is running out and now only the results are important.
Anyway my goal is to save and compare the data of the two indicators (without the multiplication) on each step through the whole loop. And based on the results some more actions should be done.
i hope i could explain myself.
And thanks for the lectures.
Regards,
Adam
04-22-2014 04:14 PM
04-23-2014 02:17 AM
Nobody knows everything especially when learning a new language. At least I can't.
Also know that when somebody asks a silly question you just can not beleive it (I feel the same, not with Labview of course), but I beleive, learn without questions is kind of impossible.
("Sometimes you have to fall before you can fly.")
If my program just works fine I do not care how much power it is consuming and how it looks like.
Sorry for asking silly questions, I can not do anything with it until I understand everything.
Thanks your comment, critics help you develop.
04-23-2014 02:29 AM
Hey Adam
What did you mean by use/indicate the genereted data ?
or rather when do you want to use the data ? (after the loop is done executing or while the loop is running )
04-23-2014 08:29 AM
Its not that the question was silly its that even after resolving the code to the simplest terms that generate the same data in the same manner we can't understand what you really wanted to do. There is nothing in your post to tell us why the outputs you have are not what you want the vi to do.
What are the requirements for the vi?
04-24-2014 01:54 PM
Hello,
Meanwhile I started to think, and I have realized I truly asked a "no-answer" question.
I have almost finished the program, only saving is missing. I attached the VI.
This time my question is: Is it possible to save into a file (readable by excel) which includes the followings?
- Coloumns: the same as in the cluster, rows: iteration steps (first row: headers showing the names of the indicators in the cluster)
- two different files: one for the "auto" diagram, and one for the "user" diagram
How should I think to solve this problem? (last time the DATAFLOW, and reading again the basics really helped.)
Thanks for your help.
Adam
04-25-2014 11:36 AM
After a long day, I managed to make the VI to create the file I wanted.
Problem solved. 🙂