06-19-2009 03:10 PM
Hello all,
I am having an issue with a particular VI I am working on. (FYI this is in Labview 8.0)
The VI is set up to run a current source, voltmeter, and thermometer and then record and graph data in various ways that are selectable by the user.
Everything seems to be working fine except one particular graphing method. When I try to graph Current vs. Voltage, the current value is gettiing lost. Within a case structure the current and voltage are combined into a cluster and then exit the case structre to be later appended to a cluster array.
However, the value of the cluster is being lost when the graph is set for Current vs. Voltage. Any other method and it is working properly.
I can't seem to figure out why this is happening as it does not make much sense that the other methods of graphing work but this one doesn't when it is coded the exact same other than having different variables.
I have attached the VI with added indicators showing that the cluster value is being lost once it exits the case structure. Any help would be much appreciated.
Thank you very much and I apologize for my extremely messy VI.
- Nathan Cernetic
Solved! Go to Solution.
06-19-2009 03:56 PM
I don't see a current vs. voltage, but I do see a voltage vs. current in a case "2"?
There is no way for me to decod what you are trying to do. I don't know if anyone else could.
You'll have to figure this one out yourself. I recommend dropping probes on wires, along with additional indicators. Set breakpoints and use highlight execution to step through the code and watch the data flowing down the wires until you can figure out where and why your data is disappearing.
06-19-2009 04:01 PM
Sorry, yes it is case 2 that I am having an issue with. I have already determined where the data is lost. It occurs when the cluster within case 2 leaves said case structure. I have indicators showing the cluster value both inside and outside the case and that value resets to 0 it seems once it leaves the case structre.
The other cases do not have this problem and the cluster values pass through properly.
I was wondering if anyone know of any instance where this has happened to someone else?
06-19-2009 04:08 PM - edited 06-19-2009 04:18 PM
Hi Nathan,
"I apologize for my extremely messy VI" - you really have to...
First:
Could you attach a stripped down version of this vi with only the problematic part using constants as input and without all those missing subvis! I couldn't spot the part you were speaking of, there's a "voltage vs. current"but no "current vs. voltage"?
Second:
Clean up the vi. Use autoindexing instead of "index array" and loop iterator. Use "+1" and "-1" functions. Use integer datatypes for case selector inputs. Your for loops used for building the file content don't make much sense without auto-indexing. You surely have more problems than just a graph "method"!
Edited:
I find only one case "2", but there is no cluster "leaving" that case, only inputs to that case...
06-19-2009 05:37 PM - edited 06-19-2009 05:39 PM
You really need to boil this down to something we can run and reproduce the issue.
Have you tried to break a few relevant connections and rewire? Maybe something is corrupt.
Beside being a mess, your VI has quite a few glaring mistakes.
Let's have a look at the structures in the upper right:
Others: You constantly hammer all your property nodes. The only need to be called when things change. Again, you have way too many instances. For example in the case structure where you are having problems, the same property nodes exist in all cases. A single instance of the property node belong outside the case and only the string constants inside each case. Whenever code is the same in all cases of a case structure, that code belongs outside!