Update global variable on front panel of another VI

I have a main VI that has the GUI for the operators that has several steps with multiple sub vi's. I want to display the status (where I am in the process) on the GUI. I am using global variables, and the status updates in the global variable front panel just fine, however it only outputs the last value to the operator GUI. I would like it to show the new status at each point in the code. I read something about action engines but I am not sure is that is the correct way. I attached some code just as an example of how I am doing it right now.  
Attachments:
example.vi ‏9 KB

lvuser333 wrote:
I have a main VI that has the GUI for the operators that has several steps with multiple sub vi's. I want to display the status (where I am in the process) on the GUI. I am using global variables, and the status updates in the global variable front panel just fine, however it only outputs the last value to the operator GUI. I would like it to show the new status at each point in the code. I read something about action engines but I am not sure is that is the correct way. I attached some code just as an example of how I am doing it right now.  
i would implement a state machine, in your case. and look into references to bring the info up to the main vi if need to....
Spoiler (Highlight to read)

Similar Messages

  • Timeline. How does (or does not) update global variables?

    Hello All,
    I am having problems to understand how a timeline updates values. In my case the timeline is supposed to change an index within a second always by incrementing it by one or decrementing by one. Basically I am trying to create a mosaic of images that when I press left key all the columns move to left and when I press right key all the columns move to right.
    To do this I have a deltaX constant that defines the translation.
    Then I have a global tracker initialized to 0 and then udated +1 if move to right, -1 if move to left.
    The Timeline is:
    public var tracker: Number = 0;
    var thumbnails: ImageView[] = bind for (column in [0..appModel.CATALOG_COLUMNS + 1]) {
                    for (row in [1..appModel.CATALOG_ROWS]) {
                        def imageView: ImageView =  ImageView {
                                    image: bind catalogData.dataAt(row, column)
                                    x:  bind (column - 1)*catalogData.maxThumbnailWidth + column*xSpacing
                                    y:  bind ySpacing + (row - 1) * (catalogData.maxThumbnailHeight + ySpacing)
                                    translateX: bind tracker*deltaX
                                    transforms:  bind [
                                        Rotate {
                                            angle: bind direction * rotation
                                            pivotX: bind imageView.x + imageView.boundsInLocal.width / 2
                                            pivotY: bind imageView.y + imageView.boundsInLocal.height / 2
        override public function create(): Node {
            return Group {
                        content: bind thumbnails
    public function rotateAndTranslateToRight(): Void {
            direction = 1;
            translateAndRotateTimeline.stop();
            translateAndRotateTimeline.play();
        public function rotateAndTranslateToLeft(): Void {
            direction = -1;
            translateAndRotateTimeline.stop();
            translateAndRotateTimeline.play();
        var translateAndRotateTimeline = Timeline {
            def initialValueTracker = tracker;
                    keyFrames: [
                        KeyFrame {
                            time: 0s
                            values: [
                                 rotation => 0,
                                 tracker => initialValueTracker
                        KeyFrame {
                            time: 1s
                            values: [
                                rotation => 360 tween Interpolator.LINEAR,
                                tracker => initialValueTracker + direction tween Interpolator.LINEAR
                }The problem is that if I first move to right the Timeline works correctly and tracker goes from 0 to 1 in one second, therefore I see a translation to right of tracker*deltaX pixels. So far so good.
    Then if I move to left, I am expecting the Timeline to change tracker from 1 to 0 in one second, but really it is changing tracker from 0 to -1... which of course messes up my translation to left.
    I thought Timeline updates global variables (define outside the Timeline in the context of the class the Timeline is defined) during the transition, but apparently from my observation it doesn't.
    Or maybe I am not defining correctly the Timeline itself and/or the tracker variables?
    Thanks.
    Edited by: sacchett88 on Jun 4, 2010 1:03 PM

    Thanks for the reply... but it didn't help me that much in finding the workaround. I wrote a simpler example to prove the point that can be easily copied and pasted and run. The example draw a circle and for every right key it should move the circle to right of a deltaX number of pixel. If left key is pressed then the circle should move to left of a deltaX number of pixels. The code is:
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.shape.Circle;
    import javafx.scene.paint.Color;
    import javafx.scene.input.KeyEvent;
    import javafx.scene.input.KeyCode;
    import javafx.animation.Timeline;
    import javafx.animation.KeyFrame;
    import javafx.animation.Interpolator;
    var deltaX: Number = 70;
    var direction: Number = 1;
    var tracker: Number = 0;
    var circle: Circle;
    var translate = Timeline {
        def initialValueTracker = tracker;
                keyFrames: [
                    KeyFrame {
                        time: 0s
                        values: [
                            tracker => initialValueTracker
                    KeyFrame {
                        time: 1s
                        values: [
                            tracker => initialValueTracker + direction tween Interpolator.LINEAR
    Stage {
        title: "Application title"
        scene: Scene {
            width: 900
            height:500
            content: [
                circle = Circle {
                    centerX: 100,
                    centerY: 100,
                    translateX: bind tracker*deltaX
                    radius: 40
                    fill: Color.BLACK
                    onKeyPressed: function (e: KeyEvent): Void {
                        if (e.code == KeyCode.VK_RIGHT) {
                            direction = 1;
                            translate.stop();
                            translate.play();
                        } else if (e.code == KeyCode.VK_LEFT) {
                            direction = -1;
                            translate.stop();
                            translate.play();
    circle.requestFocus();I understand how KeyFrame works. However the final value I'd like to be the initial value for next key press. I also tried to assign explicitely the final value to the tracker variable at the end of the timeline, but next time timeline still picks up the initial value 0 of tracker.
    Thanks.

  • How can i update the spreadsheet in front panel

    Hi all,
    I need to update the datas read from excel sheet in labview front panel in same format( as a spreadsheet).  I placed the spreadsheet in front panel from activeX object. but i could not insert the data inside it. Because the read data from spread sheet is 2D string array but the spreadsheet in block diagram is refnum indicator. what should  i do to place the data in Spreadsheet in labview front panel.
    Thanks in advance. 

    http://forums.ni.com/ni/board/message?board.id=170&message.id=26319&requireLogin=False
    .......^___________________^
    ....../ '---_BOT ____________ ]
    ...../_==O;;;;;;;;_______.:/

  • Programatically alther the properties of the front panel of another vi (vi server)

    hi all,
    check out the attached code (lv 8.6). this is a standard example of how to modify the properties of another vi (test.vi and test1.vi in this case). although the properties of the called vi are set, the front panel does not react accordingly. for example:i set fp.minimizable to false and double checked that the value is actually set. but the front panel still is minimizable. why? where is the error?
    thanks in advace
    labviewette
    p.s if you want to run the attached code, you have to create a test vi in the same directory in which the code is saved.
    Attachments:
    Setting Window Options.vi ‏22 KB

    Minor errors in your code :
    1 - set  "wait until done to false" when running Test.vi from your vi
    2 - connect "Show menu bar" to the case input instead of a constant 
    Then everything runs nicely. See modified vi below.
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Setting Window Options.vi ‏22 KB

  • Load a VI in the front panel of another VI

    When the first VI runs I would like the other VI appear in the front panel of the first VI with all its components.I don;t want to have two windows, just one.

    I am pretty sure that this is not possible, yet. It should be possible with ActiveX, but there is no implementation yet.
    -Jim

  • Update a front panel indicator from a loop inside a called vi. Without exiting

    I am looking for the best way to update some indicators from within loop within a called .vi.
    I need to update the front panle without exiting the loop.
    I am able to use functional global vi to update the values of front panel indicators from within my nested loops, but I am looking for the best way that these values can be read to update my indicators.
    Thanks

    Or a cluster of references, that way each reference can be named, and can be different types to match the respective indicator.
    There are also methods where you can just send in a VI reference, and in the subVI traverse all the controls and search for the appropriate references by name.
    Take a look at this long nugget.

  • Pass Global Variables to another forms(urgent)

    Hi,
    Can someone tell me what is the best way to pass a global variable from one form to another forms. I havn't trouble with that.
    Please advise.
    Thank you very much
    Tim
    null

    You can use a parameter.
    Helena
    null

  • LabVIEW ARM break after update Front Panel during debug

    I try to debug the vi by Ulink, the vi just show the LED blinking for 500ms on/off with while infinity loop, after click run button the loop continue working about 5 second and then break button actived with front panel update. Is this normal working?
    Thank you

    After I click Run button on the toolbar the vi start ranning, the LED blinking show on the hardware but not update to the vi front panel, around 3 second the vi stop (like a we click on Pause button on toolbar) and update the status LED to front panel.
    I used ULINK1 for this example, I don't know this cause of the problem or not.
    Thank you.
    Attachments:
    vi_stop.JPG ‏25 KB

  • Refresh graph properties (colors...) when front panel not opened

    I have a problem with setting the plot properties of a multiple xy-graph.
    I first pass the data (n plots, number variable) to the graph control, THEN I set the according properties like color, line style etc. by a property node beginning with "active plot" followed by the properties. So when I set them, the xy-graph is already initialized with n plots.
    Afterwards, I take the graph picture and save it to a bitmap-file.
    That works fine as long as the front panel is opened or the number of plots and their attributes stays constant. But if the panel is closed (which is the default of that VI) and the number of plots changes, I get only as many plots plotted correctly as there are shown in the plot legend
    - regardless of if the legend is shown or not.
    I don't like the idea of having a huge legend on the panel which still might be too small sometimes or having the legend scaled by it's height-property in pixels.
    What I need is something like a .refresh-method that forces the graph to update even if the front panel is closed. Any idea how to do this?
    Cheers & thanks, Daniel

    The issue you are seeing is because LabVIEW doesn't update the controls/indicator of a front panel that is not open. This is done to save computer resources. The simple way around this is to use VI server to open the front panel for it to update and then close it again. You can use the VI property FP.position to move the window offscreen where it can't be seen and perform the open/close. This will get you the results you are after while still allowing the illusion of a closed front panel.

  • Status with global variable

    Hello to you all,
    I would like to add a status bar using a global variable, unfortunately it does not work that way I thought.
    Pls see attachement: Status_test_global.vi contains the global variable that I used.
    What couses the problem and how can I solve it ?
    Every answer is appreciated.
    Br
    B.
    PS: Status_global.picture is a *.jpeg
    Solved!
    Go to Solution.
    Attachments:
    Statusbar_Test_global.vi ‏4 KB
    Status_bar.vi ‏10 KB
    status_global.jpg ‏223 KB

    There are some mistakes in your VI.
    1) You have not followed dataflow structure between updating global variable and delay time.
    2) You are not updating indicator (You have kept it outside loop hence it will update only one time)
    Do following correction
    1) Make functional global VI. (Take reference from forum if you don't know about functional global)
    2) make two while loop structure running parallel.
    3) From one loop update message in Functional global vi.( Keep sequence like -messageupdate-delay-messageupdate-delay..so on)
    4) Read functional global vi in another loop also keep some delay in this loop.
    Try this correction.
    Prashant
    CLAD
    Labview 6.1-2010
    KUDOS ARE WELCOMED
    PBP (CLAD)
    Labview 6.1 - 2014
    KUDOS ARE WELCOMED.
    If your problem get solved then mark as solution.

  • Using built-in with global variables

    I am trying to setup built-in source code control for LabVIEW. It seems to be OK except in one case:
    Is it possible to use built-in with global variables ?
    VIs that use a global variable are supposed to be updated automatically when global variable is modified but what happen when VIs are checked-in ? LabVIEW cannot updated them. Is it necessary to check out all VIs before modifying global variable ? This is not convenient if global variable is used in more than 100 VIs !
    Is there another solution ? Can Perforce resolve this problem ?
    Thanks for your help !
    David

    You can still use and update global variables while they are checked in to SSC. The default values will still be saved in SSC but they can still be modified and read by other vi's.
    goldie

  • Opening multiple sub VIs (front panels) in an application

    Hi, 
    I am working on a small process control application. The main VI represents a layout of various equipment (pumps, valves, heat exchangers). Each TYPE of equipment
    can be turned on/off through a particular subVI. The subVI is displayed when the operator clicks on the component.  At the moment only one subVI front panel can be loaded. I would like to have multiple panels open at the same time; this to include multiple instances of a same VI and different subVIs.
    I have tried to set properties in the WindowsApperance dialog box but cannot acheive the desired operation. 
    Any suggestions?
    Thanks

    Trust my personal experience: You do NOT want multiple dialog windows open.  The users will hate you and curse your name if you do.  You really want to use subpanels and limit what the user can do.  Subpanels are a way of inserting a VI's front panel into another VI's front panel.  So you want to have a section of your main front panel that the user can load whatever control subVI they need.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to create two front panels

    Hi in my application i am using two Monitors .. 
    so i like to use one monitor for Vision display and control operation (Front panel )
    And another For Motion Control Front panel .. is it possible to do this .. 
    (In this case How to split my Front panel of my Vi ..)

    Hi
    If we use Border Layout, the Panels which are added to the main panel are not displaying properly.
    Solution is to use BoxLayout with AXIS parameter. Statement looks like this:
    mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout(PAGE_AXIS));
    Thank You for giving Reply,

  • Copying Global variables

    Is there any easy way to copy a group of global variable from one job to another? I know I can insert the global variables one at a time but there must be a quicker way????

    Hi Richard,
    You might be interested in a new feature in the 12.0 release of Data Integrator (it's built on the Data Services XI 3.0 platform).  The feature is called "substitution variables", and allows you to have a single set of variables for a runtime environment.  They are static in nature (meaning you cannot change their value after you launch a job) but you can have different configurations of variable assignments.  You control all of this using system configurations -- it's a lot like using datastore configurations with system configurations today, except that you can define sets of substitution variable values to go along with a specific system configuration.
    You may want to talk to your account manager about migrating your license to an XI 3.0 license.  Also, the first service pack for 12.x will be released soon (Septemberish?), which is a good indication that the tool is ready for serious production usage.
    Thanks,
    ~Scott

  • Remote Front Panel Centralized

    Hello,
    I have different dedicated PC (8) that control dedicated experiment. I can monitor and control them using remote front panel troutgh a browser web page. Now I'd like to Centralized the web servers.
    Is it possible to publish (or manually  move&edit ) *.html generated by labview remote front panel in another LabVIEW web server of a Machine ( running LabVIEW 8.2)?
    Thanks

    You need to copy over the .html file to the computer that will be your server (in the www folder).  Copy over the .exe and/or .vi's, making sure they are in the correct folders (normally the SAME folder that they were in on the development pc).
    You will also need to change the link that points to the remote machine.
    Instead of : http://my_pc/my_program_My Computer_interface 3.html
    Change it to: http://server/my_program_My Computer_interface 3.html
    Run the .exe/vi and it should work now.
    Let me know if you have problems.
    As far as for the web server on the server computer, does the server computer have the development environment, or just the run time??  If you have the dev environment, you can change the webserver settings as you normally would, via the options.  If it is just the run-time, I believe that you have to change it progmatically using property/invoke nodes in your program (I could be wrong).  The main reason to change any webserver settings are when you need to change who has access to the program, want to change the port, or want to stop it, otherwise normally (in my opinion) you just leave it alone.
    Message Edited by Kenny K on 09-26-2007 07:34 AM
    Kenny

Maybe you are looking for

  • Can I take my OS on kernel patch backwards?

    Hi All, I know that this is a weird question. Can I take my OS one (or two) kernel patch backwards? Lets say from "Generic_120011-14" to "Generic_118833-36". ? is it possiblle? All this mass is beacuse of a testing team at my work. Thanks!!!!

  • LOV at create form page only

    Hi all, APEX 4.0 I have data entry form page with fields DEPTNO and EMPNO. These fields have parent LOV and cascading LOV respectively. I want these LOV to fire at "create" mode time for new rows only, and not when editing an existing row. Because wh

  • Linking iview to iview

    Hi We have three iviews we have the requirement to link those iviews 1) We have a button in one iview. after clicking that iview a Bex Report will appear which is created through BW Report iView. 2) and we are chaching the user information in other i

  • Passwords in mail

    After installing LION, Mail doesn´t seem to save mailpasswords for mail accounts. After a couple of minutes I have to give mail all passwords again and again. Does anybody have a solution? THX - Juergen

  • Can't get original InDesign to install on G5 running OS 10.5.8

    Bought original CS and installed on iMac G5. Recently the computer died a tragic death. I bought a used machine same vintage but Running OS 10.5.8. I was able to install Photoshop CS and Illustrator CS (after a few errors). But unable to get InDesign