LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graphing Value vs. Epoch

Solved!
Go to solution

Capture.PNG

So basically I want to graph the 'Error Value' with respect to epochs (iterations of the while loop) and I can't seem to get it to hook up right (it's been awhile since I've used the graphs in labview).  I'm not sure if I should be using an XY Graph or a Waveform graph, or how it needs to be hooked up (arrays, clusters, etc).  Does the graph node need to be outside of the while loop?

 

Any help is greatly appreciated! (and of course rewarded with kudos 😃

0 Kudos
Message 1 of 9
(3,655 Views)
why don't you attach the complete VI, is the for loop inside the while loop?
Message 2 of 9
(3,653 Views)

Here is the complete vi

Capture.PNG 

0 Kudos
Message 3 of 9
(3,649 Views)
Solution
Accepted by topic author cmersits

I actually expected you to attach the VI file.

 

Anyway, I have attached a picture of what you need. Untitled.jpg

Note that this is not exactly your exmaple, but I have given you what you exactly need, taking the XY graph outside the while loop, and adding 1 to the i terminal of the while loop, since the epoch will start at 1.

 

Also,  I notice that you are working on neural network, in my opinion, I always use MATLAB neural network, then use LabVIEW as the graphical user interface.

Message 4 of 9
(3,633 Views)

Is there anyway to get the XY Graph to update in real time?  Instead of having it update when you press stop?

 

I'm a newbie at ANNs so I decided to build one from scratch for a class project using Labview,  I assumed Matlab was a better tool for implementing such a concept, but I don't really have a lot of Matlab experience (and we are not allowed to use the neural network tool box).

0 Kudos
Message 5 of 9
(3,624 Views)

Yes, it is possible, but you will need some adjustments.

Normally, you use waveform chart for real time plots, but the time index starts at zero. 

 

 Epoch have to start at 1, but the waveform chart starts at zero.

 

The picture below uses waveform chart, which is the only easy way to graph a function in real time. Untitled.jpg

 

So you can take  these addional steps, for an attractive result.

 

1. right click the waveform chart, then under the plot tab, in the middle, where you see all those line, and dots, click on any dot below the "none", the default is none( but you do not want the none).

 

2. under the scale tab, for the X axis, below the autoscale, uncheck the autoscale, if it is already selected, and under "min", type 1, since the epoch must start at 1.

Message 6 of 9
(3,617 Views)

I think there is an XY-chart (what you are after) in the LabVIEW examples.

 

 Here is another example.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 7 of 9
(3,607 Views)
Is it possible to have the waveform chart outside of the while loop and be continuously updating?  It seems the chart only updates whenever I stop the while loop.
0 Kudos
Message 8 of 9
(3,594 Views)

If the chart only updates after you stop the while loop, then it should be a problem with the for loop.

 

Make sure enable indexing is active at the border of your for loop.

 

You can not place the chart outside the while loop, because, until you stop the while loop,  data will not leave the loop.

Message 9 of 9
(3,580 Views)