07-31-2021 12:49 PM
Hello everyone,
I'm a student in Portugal and I'm using Labview in my Master's thesis and I'm having some difficulties.
I have this block diagram and my goal is for it to get values from a database and show them in a table. After that table, Labview chooses the maximum value of a specific column while showing the evolution over time in a graph.
This is all working but the problem is that when the program stops running, the graph values disappear and if I put the graph in a loop, it is always blinking as if reading the data. Can you help me?
Regards,
Inês
07-31-2021 09:32 PM
Hello, Inês.
I'd be happy to take a look at your code. Can you please attach your VI (not a picture of part of the code), and if you have multiple VIs (say, in a LabVIEW Project), compress the folder containing them and attach the resulting .ZIP file. This way, I (and other Forum users) can clearly see what you are doing, can actually try your code and see where it fails, and can help you learn to fix it.
Bob Schor
08-01-2021 10:04 AM
Obviously there are quite a few questionable code fragments, and if you see more issues when you place things in a loop, it would help to also show that code (I suspect you are having a greedy loop). A VI that stops running is in edit mode, so the data really no longer matters. Have a look at state machines.
Yes, attach both VIs (with and without loop) and also attach a small datafile.
Some glaring mistakes:
08-09-2021 11:59 AM
Hi!
I understand everything you said.
I send the version of the program corresponding to the photo I put here in the post, if you could take a look and help me, I would appreciate it 🙂
However, I'm going to do what you told me to fix the code and see some tutorials.
Thanks,
Inês
08-10-2021 08:38 AM
I'm attaching a Snippet (unfortunately, for LabVIEW 2019, as I don't have LabVIEW 2015 on this PC) showing some Basic Fundamentals of LabVIEW and Things You Should Know.
An important LabVIEW Principle is that of Data Flow -- Data "flows" through the "wires" that connect VIs and functions, and controls the sequencing of operations. Accordingly, especially when beginning to learn LabVIEW, you should never use the Sequence Structure, but should use the Error Line and Data Wires to "sequence" the order of operations. I was unable to connect the Error Out from the Input Express VI to the Error In terminal of the DB Tools Express VI (I didn't have this Toolkit installed on my machine), but you'll see the Error Line connecting other VIs (in a nice straight line). Notice that the Wire that goes to the Table indicator can be directly connected to the Index Array function. You also don't need two of them -- just branch the Numeric Array wire to go to both the Graph and to the Maximum function.
Bob Schor