LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform Graph

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

inescruz32_0-1627753461979.png

 

0 Kudos
Message 1 of 5
(1,252 Views)

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

0 Kudos
Message 2 of 5
(1,224 Views)

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:

 

  • Delete the "table" local variable and branch from the wire going to the table indicator.
  • Now you can delete the entire sequence structure because execution order is fully determined by dataflow.
  • Why do you index out the third column twice in parallel and convert to numeric twice. Once is sufficient for both!
  • There is absolutely no need to convert a 1D array to dynamic data for graphing. That function cannot magically add timing information out of thin air.
  • Why are you converting to integers instead of floating point. Measurement data is typically DBL.
  • Your data is graphed vs index (I don't see if you set x0,dx of the x axis anywhere), so setting the range based on elapsed seconds is not guaranteed to show any data in the displayed range.
  • I recommend to start with a few basic tutorials.
0 Kudos
Message 3 of 5
(1,196 Views)

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

0 Kudos
Message 4 of 5
(1,127 Views)

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.

 

Progresso Snippet.png

Bob Schor

0 Kudos
Message 5 of 5
(1,109 Views)