Z-order on XY-graphs

OK quick question....
In LV 6.1, is there any way to influence the Z-order of the
plots?  I want to have a basic plot (it's a multiple-peak
spectrum) in the background with the area between the plot and zero
filled.  I then want to be able to superimpose the individual
peaks on this basic plot.  At the moment, if I place the basic
plot at index 0, it overwrites all others, and the individual peaks
become hidden (this is bad).  I've adapted to this and simply
reversed my order of plots (this is good).
The problem comes whan I have varying amounts of plots on my
graphic.  Setting and re-allocating the visual plot properties
each time I select or deselect a plot is really slowing down my
code.  What I really need to be able to do is simply set the
Z-order of the plots so that I can effectively send the basic plot to
the background, irrespective of it's order in the plot list.  I
also don't want to limit the number of plots as I don't like that
approach out of principle.  I like my code being able to take
whatever is thrown at it.
Here are a couple of pics illustrating my problem....
Thanks in advance
Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Attachments:
This is good.png ‏7 KB
This is bad.png ‏6 KB

Christian and Lynn,
Thanks for the replies.  I think I'll have to go the route
suggested by Christian since I kind of thought that changing the
Z-order of the graph rendering wouldn't be possible.
Lynn,  This is exactly what I'm doing at the moment.  I'm
basically reversing the array so that the last three plots are always
the same, and then setting the plot properties accordingly.  This
is working, but it's a real pain and it's also awkward to
maintain.  Speed isn't critical, but it takes around 500 msec to
allocate 17 plots.  This is already noticeable in an otherwise
zippy UI.
What I'll most likely do is the following:
When the spectrum is loaded, allocate plots for ALL data sets (This
part I won't limit in the number of plots, thus allowing for huge
amounts of data - no artificial limit).  I still have to do some
plot processing and setting display properties of the graph, but this
will be done on loading the data, so it's not TOO bad.
Then afterwards, as the individual plots are selected and deselected,
I'll simply hide the respective plots.  This makes at least the
handling of appearing and disappearing plots much easier.  This
means that all plots will be permanently visible on the Legend, but
that's not such a problem really.  Only cosmetically.  I need
to think about whether the legend is even neccessary.  I can't
limit the number of entries visible on the legend, because the most
important are at the end.  I have thought of creating a dummy XY
graph off-screen and using the legend from that instead of the legend
from the actual XY graph, but that's not really making things simpler.
EIther way, thanks for the help guys,
Does anyone know how things look in later versions of LV?  How
about the all-new super duper turbo-charged LabVIEW 8.0? (this post
will seem so silly in 5 years time when LabVIEW X is around).  Any
option to control the Z-order ot the graph rendering?
Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)

Similar Messages

  • Change sort order in line graph

    Sorry, my mistake !
    In one of the ColLabels i had placed the xsl:sort line ABOVE the xsl:for-each.
    So, now it is working.
    In a line graph I need to change the sort order of the elements in my XML file.
    I need the elements to be sorted by month number, so that january comes first, then february etc.
    I have an element in the XML file called DATE which has the format 'YYYYMMDD'
    I tried first to change the sort command for the Label.
    <ColLabels>
    <xsl:for-each select=".//XX_ROW" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:sort select="substring(DATE,5,2)"/>
    That worked fine, the label values are resorted as I wanted.
    Of course, I also have to set the same sort order for the data values.
    So I did that in the same way :
    <RowData>
    <xsl:for-each select=".//XX_ROW" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:sort select="substring(DATE,5,2)"/>
    But, to my surprise, I got an error :
    Caused by: oracle.xdo.parser.v2.XSLException: <Line 70, Column 45>:
    XML-22047: (Error) Invalid instantiation of 'xsl:sort' in 'RowData' context.
    Does anybody understand why this was not possible ?
    Is there another syntax for sorting in the RowData ?
    What's the use of being able to sort the X axis lable, if I am not able to sort the data ?
    Edited by: user792912 on 2011-maj-30 05:11

    This was an error I had made in the graph code.
    The xsl:sort line must be placed AFTER the xsl:for-each !

  • Legend ordering on a graph

    Hello Gurus
    I have a report with bar graph and it is placed in the dashboard with two state prompts 1. state prompt 2. state duplicate prompt which is placed next to each other and the bar graph will compare two state values at a time based on the prompt selection. The issue is the customer wants the legend in the order of the prompt place which means currently Legend shows two states now based on the alphabetical order
    For example Case 1: From the first state prompt i choose alabama and from the state duplicate prompt i choose california then the legend will show Alabama with blue color and California with red color Case 2: from the first state prompt i choose Colorado and the second state duplicate prompt i choose Alaska now the legend shows me Alaska first in blue and then Colorado in Red but the Customer wants Colorado to be first in blue and then Alaska in red instead i am getting it in alphabetical order. Please advise.
    Thanks
    RC
    Edited by: user1146711 on Sep 7, 2012 12:24 PM
    Edited by: user1146711 on Sep 7, 2012 12:25 PM
    Edited by: user1146711 on Sep 11, 2012 9:09 AM

    Thanks Veeravalli, it is an interesting option i tried it and it is not giving me the expected results. In my report criteria i have Product, state, Revenue and in the filters i have State is = @ A and State duplicate =@B(State duplicate is another variable but pointing to the same database table column as state) i have this report on the dashboard with state and state duplicate dashboard prompts.
    As i mentioned when i did what you said i am getting products and state in my narrative not what i am expecting two different states as in legend. I really need it on my legend as you know a little colored box next to the name blue box Alabama and then red box Alaska and so on based on the prompt position always state first prompt values has to show me blue in the legend and state duplicate values in red. Please letme know if it is not clear
    Thanks
    RC

  • Change order of wpf graph plots

    I'm trying to solve following issue. Let's say I'm sampling data once per second and showing it on the graph. I want to show history of the data, say last 20 plots using the same color with fading. What I do now:
    - create 21 plots, say Plots[0]..Plots[20] 
    - at meas 1, set Data[0] = data
    - set Plots[0] opacity to 1
    - at meas 2, set Data[1] = data
    - set Plots[1] opacity to 1, Plots[0] opacity to 0.5
    - at meas 3, set Data[2] = data
    - set Plots[2] opacity to 1, Plots[1] opacity to 0.6, Plots[0] opacity to 0.3
    - at meas 21, set Data[20] = data
    - set opacity to 0.1..1
    // we're fine as of now, here comes the tricky part
    - at meas 22 I need to remove the data of meas 0 (stored at Data[0]) and replace it with the new data
    - so I set Data[0] = data
    - set Plots[0] opacity to 1 (it's the newest result)
    - set other plots opacity 0.1..0.9
    // and here is the problem: Plots[0] is now at the bottom of the plot stack and is covered by 20 other plots, thus is barely visible
    so I somehow need to move Plots[0] to the top of the stack
    I've tried removing Plot and Data of the farthest plot and adding creating plot with the most recent data, but it leads to incorrect indices (Plot.Index grows all the time, but Data array stays the same)
    Another option would be to fix plots order and opacity in advance, and change data for all plots all the time. But I assume this would be very slow (think of 20-50 copies of the plot with say 1000 points).
    So, any bright ideas here?

    Idea 1) Pre-allocate all of the fade plots, use BeginInit/EndInit when updating the Data collection, and always apply the newest data to the last plot. In pseudo-code:
        // initial setup
        for( opacity = 0..1 )
            var renderer = new Renderer( opacity )
            graph.Plots.Add( new Plot { Renderer = renderer } )
        // on data update
        graph.BeginInit()
        for( i = 1..graph.Data.Count )
            graph.Data[i - 1] = graph.Data[i] /* shift old data down */
        graph.Data[20] = /* assign new data to the last plot */
        graph.EndInit()
    Idea 2) If you just want the historic data visible in the graph (i.e. you do not need to query or interact with the old data through the graph), and if your range is stable, then you could have one plot in the graph and use a PhosphorColorRamp to get the visual fade effect. In pseudo-code:
        // initial setup
        var brush = new SolidColorBrush( C )
        Graph.SetPhosphorMode( brush, Immediate )
        graph.Plots.Add( new Plot { Renderer = new Renderer( brush ) } )
        graph.RenderMode = Raster
        graph.PhosphorColorRamp = new FadeRamp { Color = C, Duration = 20, DurationKind = Frames }
        // on data update
        graph.Data[0] = /* assign new data to first plot */
    (Note that the phosphor effect is one of the areas being updated, so the syntax will be changing in the next release of Measurement Studio.)
    ~ Paul H

  • XY graphing with large amount of data

    I was looking into graphing a fairly substantial amount of data.  It is bursted across serial.
    What I have is 30 values corresponding to remote data sensors.  The data for each comes across together, so I have no problem having the data grouped.  It is, effectively, in an array of size 30.  I've been wanting to place this data in a graph.
    The period varies between 1/5 sec and 2 minutes between receptions (its wireless and mobile, so signal strength varies).  This eliminates waveform graph as the time isn't constant and there's alot of data(So no random NaN insertion).  This leaves me with an XY graph.
    Primary interest is with the last 10 minutes or so, with a desire to see up to an hour or two back.
    The data is farily similar, and I'm tring to possibly split it into groups of 4 or 5 sets of ordered pairs per graph.
    Problems:
    1.  If data comes in slow enough, everything is ok, but the time needed to synchrounously update the graph(s) often can exceed the time it would take to fully recieve the chunk of data which contains these data points.  Thinking asynchrounously is useless, as the graphs need to be reasonably in tune with the most recent data recieved.  I can't have the an exponential growth in the delta of time represented on the graph and the time the last bit of data was recieved.
    2.  I could use some advice on making older data points more sparse to allow for older data to be viewed, but with a sort of 'decay' of old data I don't value that 1/5 second resolution at all.
    I'm most concerned with solving problem 1, but random suggestions on 2 are most welcome.

    I didn't quite get the first question. Could you try to find out where
    exactly the time is consumed in your program and then refine your
    question.
    To the second question (which may also solve the first question). You
    can store all the data to a file as it arrives. Keep the most recent
    data in a let's say shift register of the update loop. Add a data point
    corresponding the start of the mesurement to the data and wire it to a
    XY graph. Make X Scrollbar visible. Handle the event for XY graph:X
    scale change. When the scale is changed i.e. the user scrolls the
    scroll bar, load data from the file and display it on the XY graph.
    This was a little simplified, it's a little more complicated.
    In my project, I am writing an XY graph X Control to handle a bit
    similar issue. I have huge data sets i.e. multichannel recordings 
    with millisecond resolution over many hours. One data set may be
    several gigabytes, so the data won't fit on the main memory of the
    computer at once. I wrote an X control which contains a XY graph. Each
    time the time scale is changed i.e. the scroll bar is scrolled, the X
    control generates a user event if it doesn't have enough data to
    display the time slice requested. The user event is handled outside the
    X Control by loading the appropriate set of data from the disk and
    displaying it on the X Control. The user event can be generated already
    a while before the X Control is out of data. This way the data is
    loaded a bit in advance, which allows seamles scrolling on the XY
    graph. One must notice that the front panel updates must be turned off
    in the X Control when the data is updated and back on after the update
    has finnished. Otherwise the XY graph will flicker annoingly.
    Tomi Maila

  • Power vs Temperature Graph

    I need to plot power/current  vs temperature on a graph from data collected by another program.  The program runs from -10C to 60C, back to -10C, then goes to 60C, and finally returns to 25C.  The collecting program stores time, temperature current, and power.
    I would like to plot power/current on the y axis and temperature on the x axis, but maintain the time reference.  Basically I would like to see the x axis read
    -10 -5 0 5.....55 60 55.....5 0 -5 -10 -5 0 5.....55 60 55...25
    When I use PlotXY or PlotLine the x axis plots -10 60 and the y axis plots back on itself.
    We can do the graph in Excel and have attached a pdf of a plot.
    Solved!
    Go to Solution.
    Attachments:
    SN 1177_Temperature_07272012_052950.pdf ‏63 KB

    Paul Knight wrote:
    The graph puts all the minus temperatures and their label to the left of zero.
    Paul,
    I am not sure I got you right - could it be that you didn't read my post carefully enough? In the line
    InsertAxisItem (panel, PANEL_GRAPH, 0, 10, item_label [10], 10.0 );
    the 10.0 is not meant to be your temperature, but the (double) index of the respective array element. This way the x axis values of your graph are monotonously increasing from left to right, but nobody knows because the x-axis values are labeled with your temperature values... So if your tenth temperature is +20 and your twentieth temperature is -60 degrees, it will be displayed in that order and the graph will not put 'the minus temperatures and their labels to the left of zero'
     (One might argue that item_label [ 10 ] should read item_label [ 9 ] but this is a cosmetic issue...)

  • Planned Order Capacity Requirement CM29

    Hi All
    This may be a trivial question for you guys, but I am couldnt find the problem, need your help again please:
    In CM29 my planned order and process orders are visible, and I am using the standard overall profile: SAPSFCG013.
    Earlier I use to see a continous red bar for length of the planned order / process order in the graph, but somehow now it just show up as a single line, irrespective of the order quantity.
    Can you please let me know how to resolve this!
    Thanks in advance!
    -Rahul

    Hi Vivek
    Here is the link for attached screen shot for CM29 with weekly and daily split:
    CM29 with weekly split:
    [CM29 Screenshot|https://picasaweb.google.com/110467857304221340164/CM29?authkey=Gv1sRgCNLYw_uHj8-lUA#5626401198199374018]
    CM29 with daily split:
    [DailySplit|https://picasaweb.google.com/110467857304221340164/Jul72011?authkey=Gv1sRgCLKtzPPn5_SARQ#5626402521518801586]
    I have trie changing hte qty to 1000 and more, the capacity (detailed capacity and roughcut capacity requirement) changes as expected but the graph does not moves
    Thanks in advance
    Rahul

  • Dispatch planned orders CM25

    Dear experts,
    Is it possible to dispatch planned orders in the capacity planning board CM25?
    In which profile do I change the settings to make this happen?
    Many thanks,
    Tim
    PS: will award points!

    the following  profiles can be used for viewing capacity over load
    SAPSFCG001     SFC: View work center/capacity (2 graf.)
    SAPSFCG002     SFC: View work cntr./capacity (tabular)
    SAPSFCG003     SFC: View order/capacity      (tabular)
    SAPSFCG004     SFC: View order/capacity     (graphical)
    SAPSFCG005     SFC: View Individual cap.    (graphical)
    SAPSFCG006     SFC: View work cntr/ind.cap.  (tabular)
    SAPSFCG007     SFC: View order/individual cap. (graph.)
    SAPSFCG008     SFC: View order/individual cap. (tabul.)
    SAPSFCG009     SFC: View line               (graphical)
    SAPSFCG010     SFC: View setup optimize     (graphical)
    SAPSFCG011     SFC: View work center/capacity (3 graf.)
    SAPSFCG014     SFC: GANTT view wkcntr/capacity (3 grph)
    SAPSFCG015     SFC: Evaluation, standard overview
    SAPSFCG016     SFC: WC/Capa (2 temp.save graphical)
    SAPSFCG020     SFC: Standard overview in work cntr view
    SAPSFCG021     SFC: Standard overview in order view
    SAPSFCG022     SFC: Standard overview in indiv.cap.view
    SAPSFCG023     SFC: Standard overview + actual cap.rqts
    Usually the following std profiles are used.
    SAPSFCG021     SFC: Standard overview in order view
    SAPSFCG022     SFC: Standard overview in indiv.cap.view
    <b>Dispatch of capacity is carried out in the following transaction</b>
    CM21, CM22
    CM27, CM28
    CM31, CM32

  • Is it possible to develop the control charts in WAD.

    Hi Gurus and Experts
    We need your suggestions to go futhure with our requirement.
    Right now KPI's are currently displayed in graphical form with the
    ability to drill down into WO's( Work orders) from the graph page. our
    new requirement is to get exactly the same set of information captured
    and presented in control chart form. This is to be an adjunct. to, not
    replace, the existing graphical set of data. Upper and lower control
    limits will be set initially by the business, and the same drill down
    functionality should be available from the control chart. The charts
    can be displayed seperately from the exisiting set of charts if this
    makes it easier.
    Can you please suggest us whether is it possible to develop the control
    charts and also have the functoinalities of the existing dashboards
    (example drill down of WO's using the control charts) in WAD or through
    viusal composer
    Waiting for your responses..
    Thanks
    Ravi...

    Hello dj_page!
    Thanks for the answer, but I know this already.
    My problem is, that the small picture in the side panel and the histogram in LR5 are bigger than in LR4.
    The two pictures are showing the difference between the versions.
    On the left hand (LR4) you can see a smaller preview and histogram than on the right hand (LR5).
    In each version you can change the size of the side panel only as small as the preview-window is.
    The pictures are also showing the smallest size of the side panel in each version.

  • Time Series Line Chart - Monthly Sales - Make $0 or "No Sales" show up - not skipped

    Post Author: kevinday17
    CA Forum: Charts and Graphs
    I have been messing with my chart for a while and I guess I'll just ask for help since I can't figure it out.  All I am trying to do is chart out monthly sales dollars by customer.  Simple enough...I have it working except I want to be able to see a $0 plotted on my graph when there were no sales in a month.  Currently it just skips over that month and goes to the next where there is data (month after i.e next group summary field)).  I've tried all sorts of ways of grouping.  If I use the "group by date, monthly," on the "Order Date" field, I can't chose it as the "On Change of" under Advanced chart (single arrow is greyed out).   So I ended up making a huge formula to make my own groups of months.  My GH2 is the customer (and my chart), GH3 is my Grouping for month and year, and the detail is every single sales order.  My graph points are based on summary data; sum of all the sales orders for that customer for that month. 
    How do I tell Crystal Reports that if there were no sales in December, then tell me 0.  Don't just ignore it.
    Maybe there is an option to make the X Axis Fixed with points (month-year, in order).  It would be nice to have it uniform for every customer.  I would love to see every graph that prints out have 36 x-axis coordinates; one for every month of the last 36 months (jan-05, feb-05, mar-05......dec-07) regardless of whether or not the customer had sales or not.
    Thanks so much in advance. 
    Kevin

    Post Author: V361
    CA Forum: Charts and Graphs
    I have CR XI, I created a formula and used it to create the chart section
    if (isnull ()) then 0 else
    So if your AMNT is a null value it should put 0, else the AMNT

  • Modifying version 6 VIs in version 8

    I am trying to modify a VI that was created using labview v6.0.  I am modifying it in v8.0.  The old program uses the Analogue input VI called 'AI Acquire Waveforms'.  It uses a device number to decide which instrument to use along with the appropriate count, rate and other settings.  Instead I want to use a VI in the Universal Library for LabView with version 8.0 program.  The VI I specifically want to use is called 'AInScFg' (Analogue In Foreground).  The VI is similar, it uses a 'Board number' instead of device number. 
    The main difference is that on the 'AI Acquire Waveforms' VI, the output wire type is a 2D array, an Actual period time, and an error out.  On the 'AInScFg' it has a single array of ADData type, an Actual rate, and an error out.  The 2D array must be transformed in order to be graphed.  So to ge to the point here, the old version uses the transform VI and then makes indices of the transform two times to create Array Index VIs for index 0 and 1(constants set for Array Index).  These indices are then put into a Build Array and sent to the Y part of a node for a waveform graph (the node has Xo, dX, Y parameters). 
     When i try to do this with 'AInScFg' the ADData indices are not arrays like they are with the previously mentioned indecies.  How can I create the same output using the AInScFg?  Thanks,
    -Tekky

    What is the "Universal Library for LabVIEW"? It sounds like the old program indexed the 2D array and created a waveform data type. I don't understand the reason why since AI Acquire Waveforms can optionally return a waveform data type anyway and if only a single waveform was required, AI Acquire Waveform (no 's') could have been used. What exactly is ADData type? If it's a cluster, what are the elements?

  • Version 6 AI in version 8

    I am trying to create modify a VI that was created using labview v6.0.  I am modifying it in 8.0.  The old program uses the Analogue input VI called 'AI Acquire Waveforms'  I just uses a device number with the appropriate count, rate and other settings.  Instead I want to use a VI in the Universal Library for LabView with version 8.0 program.  The VI I specifically want to use is called AI Sc Fgd i think.  Same sort of idea, uses a 'Board number' instead of device number.  The main difference is that on the 'AI Acquire Waveforms' VI, the output wire type is a 2D array, an Actual period time, and an error out.  On the other AI Sc Fgd it has a single array of ADData type, an Actual rate, and an error out.  The 2D array must be transformed in order to be graphed.  So to ge to the point here, the old version does the transform and uses two Array Index VIs for index 0,1.  How can I make the same output for the AI Sc Fgd?  Thanks,
    -Tekky

    Hello Tekky,
    I can't find the 'AI Sc Fgd' VI you referenced.  Can you tell us where its located on the function palette?  The AI Acquire Waveform VI is a Traditional NI-DAQ VI that is available in LabVIEW 8.0.  It is found in the functions palette under Measurement I/O > Data Acquisition > Analog Input.  If you don't have this palette, you may need to reinstall Traditional NI-DAQ 7.4.1 and make sure support is enabled for LabVIEW 8.0.  The AI Acquire Waveform VI can either output a 1D array of DBLs or Waveform data, and you can select which format to output data by right-clicking on the function and choosing Select Type.  The AI Acquire Waveform VI is a top level VI that contains the AI Waveform Scan subVI, which outputs a 2D array of DBLs.  The Index Array function is used to extract the first column of data, since its assumed that your only acquiring from a single input channel.  If the data from your function is already a 1D array, you should just be able to pass that directly to a waveform graph or numerical array indicator.
    Also, all these functions are Traditional NI-DAQ VIs.  Have you considered using the NI-DAQmx driver and function calls?  These functions are much easier to use and actually operate more efficiently.  More information about the NI-DAQmx functions can be found here:
    Learn 10 Functions in NI-DAQmx and Solve 80% of Data Acquisition Applications
    Also you can check to see if your DAQ device is supported under the DAQmx driver here:
    NI-DAQmx Driver Support Versions
    I hope this helps,
    Travis G.
    Applications Engineering
    National Instruments
    www.ni.com/support

  • Lots of channels to manage

    Hello Everyone,
    I have written a VI that will allow me to collect data from 200 different channels across 25 different wireless sensor nodes.
    I started a second vi that will access the files that I am writing the data to in order to generate graphs.
    What I want this VI to do?
    - First, i would like to select the channels that i would like to view on my graph.
    - Next, i want to access the files and build a new array with the parameters that i have selected.
    (my abilities are good to this point)
    - When it comes to putting these parameters to an XY Graph, I'm lost.  I'm not sure how to do it because the number of channels selected will vary each time i want to run a different graph.  I have attached the typical way that i generate a XY Graph just showing four channels and i'm not sure how to build a different sized array for the graph each time i select an additional parameter.
    Attachments:
    XY Graph.png ‏8 KB

    lockesmith,
    This code snippet shows how to choose the number of plots you want in your XY graph. Maybe this will get you going in the right direction.
    Ben Sisney
    FlexRIO V&V Engineer
    National Instruments

  • Custom sorting chart legend

    Hi all,
    i've got a chart, but want to customize the sorting from the legend fields with a "fixed" colour for a value.
    regards,
    Osman
    Edited by: Ossy81 on Sep 7, 2010 5:23 PM

    I've got a vertical bar (stacked) chart. I also want to change the order in the graph. Now it shows in 1 bar in this order:
    basic
    season basic
    season fashionIf you want to change the order then you need to change the order in criteria tab itself.
    And want to give a value a fixed colour. E.g. Basic should be red and Season Basic Green etc.You can do this by clicking on fifth icon from left in chart properties(Format chart data).Uncheck use default checkbox and pick colour accordingly.
    Hope this helps.
    Thanks
    Sandeep

  • Pop up dialog async call and forget

    Hello,
    I do not really have experience with dynamic VI calls, so I would like to ask for some help.
    Here is a (screenshot only) part of my MAIN VI, where I call a pop-up dialog VI using the "dynamic call and forget" method:
    I only pass one reference into this VI, the ref of the pop-up button, so when the user closes the pop-up window, I re-enable this button on the MAIN front panel. This pop-up dialog functions as a Graph monitor, it can update its Graph using an ActionEngine which is a buffer. So please ignore the missing type defs and the ActionEngines, they are not relevant in this case. Find this pop-up dialog attached.
    Actually my application just works, I only started to get some problems since when I included the "MGI Save & Restore Settings.vi" in this pop-up dialog, in order to save Graph settings to a config file (the application will be used as a built exe). When I close the pop-up VI, I can see the Graph settings are properly saved into the *.ini file under the "Documents" folder. However, when this file exists already, and I call this pop-up VI, I get the following error (so when the MGI VI is fired with the "Restore" action at the beginning of my dialog VI):
    I have three questions:
    What I do is it OK? I mean to pop-up such dialog, is it OK to use the "call and forget" method?
    When the user closes the panel of the pop-up VI, does it stay in the memory? Do I have a memory leak, or it closes properly? (I think not...)
    I do not understand the error produced by the MGI Toolkit VI, it has something to do with the dynamic call method? I even feed it with the static VI reference of the pop-up VI itself. Before I tried the "This VI" reference constant, but getting same error.
    Edit1: hmm, maybe the MGI toolkit is not compatible with Graphs with multiple Y-axis?..I will test it...
    Solved!
    Go to Solution.
    Attachments:
    popup_Graph_dialog.vi ‏46 KB

    Sam_Sharp wrote:
    A few points I noticed:
    - Using the call and forget method for launching custom dialogues is fine and something I do quite often - you just need to make sure that your called VI will shutdown correctly when your application closes (if they leave the dialogue open and close the software, for example)
    If you have a look at the attached VI, if the user closes the FrontPanel by the "cross at top right", the VI will finishes running, yes? If this dialog is open when the user closes the top level MAIN VI, how should I check it and close the pop-up VI? I could maybe check if the dialog is open via an invoke node? So maybe the best would be not to close the VI Reference after the dynamic call, but store it in a shift register, so I can use it later...hmm, I am not sure what is the most simple thing here...
    - I usually use a Strictly Typed Static VI reference (right click the Static VI Reference) for getting the name/path and the VI Type Specifier - it makes sure that your ACBR node always matches the VI you're calling and cleans up the block diagram slightly
    I will try this.
    - The references you're passing into the MGI functions: "This VI" is definitely the right reference to use as it returns the reference to the clone/instance of the VI that's running rather than a Static VI reference which refers to the Original VI. In your case you can only have one instance of the VI running (because it is non-reentrant) so I don't think it matters here (but I'm not sure?!). I think this will fix the issues with the MGI functions.
    Hmm, me neither sure what is going on But I already used the "This VI" constant, and the error was the same. Anyway, I try again, maybe I cannot remember
    - I also suspect an issue around closing the VI reference after the ACBR node and having a non-reentrant VI but I usually use reentrant VIs and allow multiple calls so I'm not exactly sure of what happens in the non-reentrant case.
    As the first point, I will only close this ref when I quit the MAIN application.
    Thanks for the suggestions! I will post back. (i hope using bold is OK

Maybe you are looking for