From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Question about graphs

Hello,

I ask you for your help about ny application.

This is my problem:

I have a Courants.vi which contains a list of differents courants.I
must
check the differents currents which I want to display, and choice the
location of the curve between figure1 or Figure 2 and finalement
click on
the button Valider.

At this moment, I'd like just know if my Block Diagram is correct, or
if
It will have a simple solution for make it.

My second question is:

We suppose that I manipulate just the currents Isa, Isb and Isc.

For example, I'd like to display the 3 curves: Isa et Isb in the
figure1
and Isc in figure 2, what I do ?

I suppose at this moment that the curve Isa is sin(x)/x ,Isb is Sin(x)
and
Isc is cos(x).I think that the the number of elements of Build array
is
not fixed, it 's depend of my choice.Your help is very important for
me.Thanks you very much
0 Kudos
Message 1 of 6
(2,399 Views)
One major desing flaw in your program (courants.vi) is the fact that you have event structures within case structures within event strucuture. Tihis means the "inner" event structures cannot be serviced unless the big event structure gets triggered, and even then only if the booleans match. If the booleans match, the program gets stuck in the inner events until all "courbe ISx" controls change their value.

See if you can change your code such there is only one main event structure. I don't think you need the inner three event structures at all.
Message 2 of 6
(2,381 Views)
Hello,
First, I'd like to thank you for your help, I am still beginner to labview.
I bring some modification for the manipulation of the even Sructure but I am not sure that it is correct.Can you visualize my courants.vi.
My second question is not resolved unitil now:
We suppose that I manipulate just the currents Isa, Isb and Isc.

For example, I'd like to display the 3 curves: Isa et Isb in the
figure1 and Isc in figure 2, what I do ?

I suppose that at this moment the curve Isa is sin(x)/x ,Isb is Sin(x)
andIsc is cos(x).I think that the the number of elements of Build array (in the XY Multi Plot1.vi)is not fixed, it 's depend of my choice where I'd like to put my curve.Your help is very important for
me.Thanks you very much
0 Kudos
Message 3 of 6
(2,374 Views)
I still don't quite understand what you want to do, so I made some simple guesses:

  • The checkboxes (Isx) indicate if a certain plot should be graphed at all.

  • The ring control (Figurex) selects which plot should contain the trace

  • Once [Valider] is pressed, the two figure windows should pop up, containing the selected traces


  • First of all, you ONLY need an event for valider and another event for stop. All other controls just set some logic. Whenever [Valider] is pressed, the code reads all other controls to compose the correct graphs. Your graph subroutines need some information on which traces to show. There are many possibilities to do this, I choose a boolean array via a connector. Have a look at the attached code for some simple ideas.

    Let me know if the attached code makes sense to you (I modified all three VIs and saved them in a VI library). Maybe it will give you some ideas. 🙂

    Happy wiring!
    0 Kudos
    Message 4 of 6
    (2,363 Views)
    Hello,
    Thanks you very much for your help.I'm very happy because , your idea is interesting and easy or resolve my problem.
    I have some question, but I don't know if you can help me:

    I have a figure1.vi, I use a Multi-plot for tracing instead of waveform Graph.I realize that I can't make my window of the graph look bigger. What I make to enlarge my window or modify the scale?
    Can I replace this by waveform graph without change thes structure of the Block Diagram.
    For running this vi: first I choice the parameters which I'd like display, and I click on the button Valider
    My second question is I'd like to save the last parameters of displaying which I draw because I'd like to load it at the time of next running of my vi.
    What is the method to save them?
    Thanks you very much for your help, and I am sorry for my english-writting.
    I send you the file figure1.vi
    0 Kudos
    Message 5 of 6
    (2,338 Views)
    Yes, you can make the graph any size you want. You need to (1) wire the desired dimensions to the "Plot multi XY" terminal and (2) make the picture indicator the correct size. Attached is an example with 400x400.

    A waveform graph needs all traces the same length but in your case some a zero length if they are not displayed. Instead you can use an XY graph and feed it directly with the cluster output from the small FOR loop.

    To keep the current settings:
    (1) If you call the same VI multiple times within the same run, the settings are retained (just don't reset them with a local variable as you did in the stop event case).
    (2) If you want to have certain traces checked by default when you first run it, edit the VI, select the desired traces, then right click on the boolean array "data operations...make current values default". Now save the VI.
    0 Kudos
    Message 6 of 6
    (2,316 Views)