Way to plot two variables on a chart by selecting the two variables on the front panel?

Hello,
I have created a VI to control a tensile tester which controls/outputs the following variables: time, load components in 6 directions, tensile displacements, displacements measured by a capacitance sensor.  
Is there a way such that there would be only one plot on the Front Panel, and there will be buttons on the front where I can select the variable for the x and y axis when the program is running?  
I only know how to make a plot using Chart Buffer using only two fixed variables.  The only way I think of doing this is making a plot for every single permutation of variables, then put those plots in Tab Control...is there an easier way?
Thanks! 

I have done this a lot in applications to save realestate and simplify the UI.  Basically, I create an enum (or typedef) describing the x or y-axis values I would like to display on a graph.  Using an event structure, you can watch for a change in these selector and re-plot your graph.  You store your data somewhere (possibly in an array) and simply index into that array based on what you want to show.  I attached a short example to illustrate this implemenation.  Hope this helps.  (LV2009)
-cb
Attachments:
Select from multiple curves and axis to plot.vi ‏19 KB

Similar Messages

  • What is the best way to zero a 'custom voltage with excitation' sensor from the front panel?

    What is the best way to zero a 'custom voltage with excitation' sensor from the front panel?
    Thanks for any help

    Hi Donavan,
    There are two options for zeroing with the NI-9237.  You can perform offset nulling and shunt calibration with a strain task, or if you use custom excitation you can use software compensation.
    See the Bridge Balancing, Offset Nulling section in  the Load, Force, and Torque Measurements tutorial. Take a measurement before the strain is applied and subtract this from all subsequent measurements.  See the above tutorial to consider the tradeoff in accuracy between these two options.
    Hope this helps,
    Jennifer O.
    Applications Engineer
    National Instruments

  • Is it possible to display the color map of a 3D Surface plot on the Front Panel?

    This would be a very useful feature to include, especially if you are just displaying the top-down (XY) projection of your plot (otherwise there's no way to visualize the amplitude that a given color represents). I know that the Intensity Graph allows you to display the Z-axis color map, but I want to use the 3D Graph control for some of the other features it offers...

    I had the same question. After quite a bit of playing around with properties, methods, color ramps, viewing examples and reading a bit about it, I discovered a way to do this. Basically use the ColorMapValues and ColorMapColors properties from the 3D graph and modify them slightly and feed these into the ZScale.Marker.Vals[] on an intensity chart or the Scale.MarkerVals[] on the color ramp. See the attached example.
    I think the diagram is self-documenting and pretty darn simple. I have a couple of notes on the front panel that help explain the vi.
    Good luck.
    Attachments:
    3D_Intensity_ColorMap_Example.llb ‏51 KB

  • Is there a way to use the built-in Datalogging and programmatically log the front panel while the vi is running?

    I would like to use the built-in Data Logging feature. There is the "Log at Completion" option, but is there a way to programmatically make a new log record while running? I looked around in VI server and couldn't find any methods that would do that. Currently, I am grabbing all of the front panel control references using VI Server and if there are any changes, the changed values are written to a log file along with a date/time stamp. I'm mostly dealing with buttons, which simply change from 0 to 1 or 1 to 0, so it's not too hard to visualize what was pressed. It works okay for reconstructing what happened, but it would be much nicer to use the built-in fe
    ature because you can "replay" directly onto the front panel and actually see what the changes were. However, without being able to programmatically make a new log, it won't work for me.

    Jake,
    There are several options here.
    I would suggest using your own code for datalogging. The datalogging you are referring to is primarily for debug, and one shot datalogs of front panel indicators (and controls?), not including graphs, etc.
    If you go to the file functions, you will see a menu for datalogging. These functions will allow you to save your data, as you need it, simply, and in a compact format.
    I recommend opening the datalog file, doing all your file operations, and closing the file before the program is complete. There are several examples of this in the examples database.
    Good luck

  • How can I display a changing variable in a subvi on the front panel of the main vi as the subvi is excuting

    In the document attached the vi on the right is sub to the vi on the left. On the subvi on the right the variable "Field Reading" is continuously updated on the front panel of the subvi as the "for" loop is executed, but only the last value of the variable is updated on the main vi front panel which is what is expected. My question is how can I display the changing value of "Field Reading" on the main vi front panel as the "for" loop in the subvi is running?
    Thank you.
    Solved!
    Go to Solution.
    Attachments:
    Doc2.docx ‏554 KB

    Hopefully I can explain it well enough. It really is simple.
    1) Create an empty global variable and call it something like User Interface References.vi
    2) For each and every control and indicator on your front panel, right-click and select Create/Reference
    3) Place these references wherever you like (I use a series of Event cases to perform my initialisation and these all live in one of these event cases). They can be placed anywhere in the main vi.
    4) For each of the references, right-click and select Create/Indicator
    5) Moving to the front panel, Cut all the indicators and Paste them in the global variable (eg. User Interface References.vi)
    6) Moving back to the block diagram, wire the global variable to each of the references and select the same named global variable.
    All the hard work is now done (until you add another user interface terminal). You should now have something that look as shown below, [except the reference labels would be to the left (not sure why the snippet put them above)]. In my latest program I have 82 references!
    Done. You can now access all your front panel controls and indicators anywhere in your program as shown below.
    You can just select Value in most cases, but in this particular case I wanted to fire off an Event to do some things (log the alarm) as well as just update the value. So, this is another bonus with the method.
    Hopefully this all makes sense. If not, let me know.

  • Is there a way to create a button on the front panel that would automatically open the txt file data is being stored to?

    I am saving data read from FieldPoint to a .txt file. Is there a way to create a button on the front panel so that when the user pushes this button it automatically opens the .txt folder in notepad? I want to bypass the user having to find the file in the computer in order to open it.

    Hi jem,
    I suggest that you break this up into three seperate questions and re-post to this list. That way you get more ideas from others that may have better insites than myself.
    Re:the sysexec
    The Sysexec will allow you to execute a dos command. This is the equivalent of going to
    Start>>>Run
    What you should do is find the proper DOS command sysntax that is required to open a text file in notepad or your favorite editor. Once you know what a good DOS command is, you should pass that string to the Sysexec.VI. The Sysexec has an input that allows you to choose if the code waits for the command to complete or if it should just start the program and let it run in the background. Sysexec will open its own window to run the command you speci
    fiy.
    Ben
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Is there any way to prevent excess rows from being added to a table on the front panel?

    Whenever I programmatically add rows through a property node I can still go into the front panel and keep adding additional rows through the table. Is there any way to prevent this "excess scrolling"? Maybe grey out the rows or something? 
    At least I have chicken

    Hello Labviewleroy,
    You should be able to right click on the table on the front panel and select
    Visible Items>>Horizontal Scrollbar or Vertical Scrollbar
    You could also consider changing their visibility programmatically using a property node for the control or indicator that you are referencing. You can create the property node by right clicking on the control on the block diagram and selecting
    Create>>Property Node>>Visible Items>>Horizontal Scrollbar or Vertical Scrollbar
    Cheers,
    -Joel
    Motion PSE
    National Instruments

  • Is there a way to rotate an array on the front panel?

    Is there a way to rotate an array on the front panel?  For example, I want element [0] to be at the bottom of an array that's expanded to show the elements vertically.
    Thanks in advance.

    I do not think that there is any way to make an array control or indicator display that way.
    You might be able to reverse the array, creating an upside down display. If you also need the user to index it, then it gets trickier.  Hide the array index display.  Create another numeric control to look like the index control.  When the value of the new control is changed, subtract the value from the last index of the array and use the difference to index the array.  You may need to adjust by +/-1, so try it to be sure.
    Lynn

  • Looking for a way to programmatically set the visible portion of the front panel when a subVI opens

    I am looking for a way to programmatically set the visible portion of the front panel when a subVI opens.  Haven't found any posts that relate, but I'm not sure how to ask the right question.  To be clear, I want to write a helper VI to go through a list of subVIs to make sure the background images are all in the same place when their respective subVIs open.  I hate manually playing with scroll bars before I save each of the VIs...  I'm figuring I need to find the top/left location of the background image (know how to do this already) and then set a VI FP property to  these values or some offset, but I can't find the relevant property. FP:run-timeposition:custom looked promissing, but only affects the location of the window, not the area of the front panel the window is displaying.
    Solved!
    Go to Solution.

    Cool.  Getting closer.  The way I implemented your suggestion affects the subVI only if it is open.  I can use this to do what I'm after, perhaps putting the code into each subVI.  Maybe open all subs, run the helper, and save.    Seems like I'm missing the elegant version...
    My proof of concept code:

  • Is there a way the user to change the equation in the formular node from the front panel on the fly, dynamically?

    Is there a way the user to change the equation in the formular node from the front panel on the fly, dynamically?

    Try the Parser VIs (also known as LV Mathematics VIs, or simply GMath VIs) located under the Analyze>>Mathematics palette (not in the Base package). You might want to start with the "Eval Formual Node.vi" located in the Analyze>>Mathematics>>Formula palette. There are many differences between these G-based, dynamic formula VIs and the LabVIEW formula node, but these VIs often prove quite useful when your formula changes on the fly. For more detail on the differences, see the LabVIEW Help file (Cntrl-Shift-? from within LabVIEW) under the topic "Mathematics VIs, parser differences with Formula Node".

  • Is there a way the user can change the equation in the formular node from the front panel on the fly, dynamically?

    Is there a way the user can change the equation in the formular node from the front panel on the fly, dynamically?

    Sorry, I don't think so. That would be pretty cool if you could create a property node for a formula node and then enter a formula on the front panel and use it to update the formula. But you can't create a property node for a formula node and the only way of modifying the formula is by typing it into the formula node on the diagram. And you can't modify a diagram of a running VI.
    You could create a VI which is only a formula node with the maximum number of inputs and outputs you expect. Have a button on the calling VI to Edit Formula. When the button is pressed, use a VI server to display the front panel on the formula VI, display a dialog box telling the user how to display the diagram of the formula VI, then stop the calling VI. (You can't edit a sub-VI while t
    he calling VI is running). The user will then need to rerun the calling VI to use the new formula.
    You might be able to do something by calling MatLab or something like that to get an interactive formula window.

  • Switching between two tables in the front panels

    Hi
    I am working on an application,which has two "Tables"
    in the front panel. Both the tables do get updated
    simultaneously from the same test,
    Table-A displays
    A short summary report while the test is beign executed, and result.
    Table-B displays
    A detailed report of the test and its condition and parameter
    along with results.
    My front end is a simple display table, along with couple of
    Button controls,like "START","ABORT","DeTAIL DISPLAY" and "QUIT"
    ofcourse.
    All these buttons are used in Event driven case structures except
    "DeTAIL DISPLAY"
    as the execution beigns, on the press of start button,
    there are number of tests in which i have to pass, parameters to
    DLL and get back the result parameters.
    The end customer requires to switch the display between the TABLE-A  & TABLE-B during execution.
    so i have a, seperate while loop,where in a case structure is wired to "DeTAIL DISPLAY"
    button, and if true, visible is set to true to TABLE-B, and false to TABLE-A,
    and vis-versa. as per the logic this while loop should take care of switching between the
    tables.
    The other while loop Takes care of the entire test.
    My problem is that, while i execute the switching of tables are not fast.
    it waits till the tests are over,and event case structure is in idle state, and then switches to the other table.
    Also some times i am unable to click on button"DeTAIL DISPLAY", as the event control
    case structure, is not responding till end of the execution.
    How to over come this problem
    rags

    Hi,
    Have you tried using notifiers in master slave architecture?
    check this out
    Attachments:
    Notifier.vi ‏45 KB

  • What is the most efficient way to have full access to the front panel on RT Labview?

    I have a RT machine that needs to do its job and also port the front panel to an external machine over the network. What is the most efficient way to do it? Using as little of the RT time as possible but providing full functionality to the RT front panel.
    So far I have been using it directly from Labview - running the VI on a remote (RT) and have the front panel on local Labview (WINDOWS). I know I can do it with also through WWW (not very happy with that though).
    LV2009 SP1.
    Thanks

    Running a compiled executable on the RT target, rather than running it within the development environment, is probably slightly more efficient but limits you to the web interface.  If you're running within the LabVIEW environment, I doubt there's a noticeable difference in efficiency from the RT perspective between the web server and the LabVIEW front panel, although that's mostly a guess (I would expect the RT system to send identical data in each case, once the front panel is loaded).  Those are your only options in modern LabVIEW versions.  In LabVIEW 7.1 you could build an executable that acted as the front panel for an RT system, but that feature does not exist in recent versions.  However, a quick search turned up this document with code to approximately duplicate that behavior, perhaps it will work for you?

  • Using Shared Variables and Initialize Front Panel Binding (to PSP)

    Hi,
    I use LV DSC RT 8.2.1
    I have a Vacuum System That includes signals from - Pumps failure, Valves status, Vacuum gauge, start Pump ...
    Each signal is read by a FieldPoint. 
    All the relevant FieldPoint Channels are read by the Server (a computer in the Ethernet Network) and published to the network in the form of Shared Variables.
    I have a client VI that is reading the Shared Variables published by the Server using Front Panel Binding.
    Problem : 
    Some of the Bindings are in the mode 'Write &Read' and that causes some initialization problems.
    For example - Valve #1 is Open, and then a User start running the Client VI, (the Valve #1 Status mode is 'Write & Read")
                           if in the VI the status of Valve #1 is closed (before running it) then the Valve status is changing to Closed.
    I want the Client VI to first read the Physical status of the instrument and then to change the Value if the User changes it.
    But that's seems to be a problem when using Front Panel Binding... (is it?)
    I know I can Deploy a lvlib in the Client Side and Item Bind to the Shared Variables or Use DataSocket.
    (Is DataSocket is a Reliable method when connecting to Shared Variables? What are the disadvantages when using DataSocket?) 
    What is recommended by those of you that are experienced or by NI ?
    Sincerely Yours,
    Amitai Abramson.

    Amitai Abramson,
    Hello and thanks for using the NI Forums.
    I'm glad that you've read the Using the LabVIEW Shared Variable Tutorial on our website. Check out these other resources:
    Network Variable Technical Overview
    Troubleshooting Network-Published Shared Variables
    Why Do I See Unexpected Value Change Events for Shared Variables Using LabVIEW DSC?
    All You Need to Know About Shared Variables
    Creating a Value Change Event for Shared Variables
    Alternative Method for Using Shared Variables Between Systems in LabVIEW 8.x
    What Is The Difference Between Using Shared Variables And DataSocket VIs To Access OPC Tags?
    The issue that you are seeing by having "Write & Read" bound items on both the server and client side is essentially a race condition, you don't know which one is being read/written at what time. To resolve this issue I would take a look at some of the documents below.
    Using a Local, Global, or Shared Variable in Parallel Loops Can Cause Race Conditions
    Using Local and Global Variables Carefully
    Tutorial: Local Variable, Global Variable, and Race Conditions
    Locking a Shared Resource or Variable in LabVIEW Using Semaphores
    You mentioned not wanting to have two sets of shared variables (one on each side), but this is a great method to resovle this issue, that, or you can develope some sort of hand shaking to prevent these race conditions.
    I would suggest that in the future when using these forums you try to ask only one question per thread and make it more concise. It's hard to tackle multiple questions and such broad questions as "I want to know all the ways that I can connect to Shared Variables, and I want to know the advantages and disadvantages." I suggest this because we want you to get your questions answered and more concise questions will result in quicker and better answers. 
    Message Edited by Ben S on 10-01-2009 06:05 PM
    Ben Sisney
    FlexRIO V&V Engineer
    National Instruments

  • Can I build a XY chart control to define a spline on the front panel

    Dear LabView users,
    I would like to replace a 2d numeric array control with a XY chart where the users could drag data points on the chart to create the spline of their choice. Is this possible?
    best regards
    Richard Elliott
    Cardiff University

    I think you will be better off using an XY graph and events for mouse clicks.
    http://sine.ni.com/apps/utf8/niepd_web_display.display_epd4?p_guid=E64297151FA72B7DE034080020E74861

Maybe you are looking for