LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with Graph multi-scale.

Solved!
Go to solution

Hi,

I how can solve this problem automatically, When the Y axis shifts,Knowing that I also use a method to plot a multi-scale Y graph.
My multi scale in graph works at first time but after some test He does that to me.

ss.png
Sans titre.png

the solution is to ceat a new graph.
Here is my code:
extrai.png

Thank you .

0 Kudos
Message 1 of 4
(3,246 Views)
Solution
Accepted by topic author Sarah_LAB

Sarah,

 

     I took a look at your VI, and started to "fix it up" (mostly so I could look at it), but decided it would be much more useful to you to make some recommendations and have you implement the changes.

  • Front Panel has several arrays showing hundreds of elements, taking up so many screens that you have to scroll and scroll just to find the graph!  Change those huge arrays to much shorter arrays that show, say, 5 elements in pull-down mode, then right-click the Array, choose Visible Items, and turn on the Vertical Scroll Bar.  Now you can scroll your array without scrolling your entire Window.
  • Instead of dropping a blank Property Node and wiring an XY-Graph Reference to it, right-click the Graph, choose Property Node, and use that, instead.  Much simpler, probably faster.
  • Get rid of the Frame Sequence.  Use the Error Lines to sequence (most) things (such as the Property Nodes).  Remember the Principle of Data Flow -- structures don't run until all of their Inputs have been "fed".
  • You have one Control and three Indicators, yet you are using your Indicators as though they were Controls by using Local Variables to read from them.  This makes no sense.  Try not to use Local Variables unless absolutely necessary -- they cause problems for beginners.
  • The initial Frame does three things -- it initializes the XY Graph Value property, initializes some parameters for Active Plot 0, and initializes some parameters for Active Plots 1 through 11.  This should be done with two XY Graph Property Nodes -- one setting the Value to your initialization Array and setting the parameters for Active Plot 0, the other (inside a For Loop) setting the other Active Plots.  Connect the Error Lines (use either a Shift Register or a non-indexed Output Tunnel with the For loop).
  • Try to keep your wires straight and parallel.  Getting rid of the Frames will help.  Don't be afraid to use Block Diagram Cleanup (the Broom icon).
  • The first Comment about a huge Front Panel also applies to your Huge Block Diagram.  It's actually not that big, but several indicators-without-wires (you use, instead, Local Variables, a Bad Idea) are wayyyy off the page and very hard to find.  Try to keep your entire Block Diagram the size of a Laptop Screen.  If you see it getting too large, this should be a signal to create sub-VIs (to hide the Messy Details).

I hope these suggestions are helpful.  If you implement these changes so that there's a bit more "reason" to your code, I'd certainly be willing to take another look.  Two things would be helpful:  attach your VI, rather than a PNG Snippet, and attach some data (or the means to simulate some data) so we can "see what you see".  Note if you are developing your code using LabVIEW Project (and I do hope that you are!), you can compress the folder holding the Project file and all of the VIs and attach the resulting .zip file, instead.

 

Bob Schor

0 Kudos
Message 2 of 4
(3,195 Views)

You may want to try...

 

On the Front Panel right-click the graph and choose

 

Advanced >>> Auto Adjust Scales

 

to deselect that option.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 4
(3,192 Views)

Thank you PROVEN ZEALOT,

0 Kudos
Message 4 of 4
(3,186 Views)