static reference with the global variable

Hi, I used a static reference to a Subvi where I change a global variable before (3-4 years ago) and do not remember how I did it.

It was something like these attachments, but now I'm using LabView 2013 instead of LV 8.6.

The change in the overall operating system sees only not in the main vi (looks like the invoke node run vi does not work with globals).

In addition the vi close with the invoke node close vi but not if I put the custom in the Subvi properties to automatically close.

dkfire wrote:

Why not call the sub vi as usual, just with the setting to display the front panel, when it is called?

Use the connector pane to transfer the value of the sub vi Ok button when done.

That's what I recommend.  If this is not possible for some reason, then you will need to use a flat Structure of the sequence to force the reading of the global variable after the Subvi is complete.

Tags: NI Software

Similar Questions

  • formula with the global variable node

    Hello

    I'm tring using node formula with global variables as an entry and exit.

    but this is where I see the SW hangs forever.

    Either way, I am a novice to the labview.

    Can some give me advice why this is happening?

    Thank you in advance,

    Do

    As smercurio mentioned, if you described what you wanted to do, we could show you things that can be done using LabVIEW.

    For example, loops For may not be not necessary if you are trying to extract or manipulate data in tables.

    It is good that you have a job, but it would be better to learn the power behind LabVIEW.  Who knows, you can actually walk away from C code...

  • Replacement of a URL with a Global Variable - syntax error

    I had a link URL address as following 30 places for printing the reports. That's why I decided to replace this URL with a global variable.

    The code was like this:

    Select ' < a href = "http://oasdev.oh.gov/reports/rwservlet?GDMS_ACR & Y ='|" : P106_YEAR | "& B =' | : P100_BUSINESS_UNIT_ID | "& C =' | : P106_COMMISSION_ID | "& d =('||) To_char(sysdate,'MMDDYYYYhhMISS') |') ...

    When I replaced it with the global variable like this:
    Select ' < a href = "GLOBAL_URL/reports/rwservlet. GDMS_ACR & Y =' | : P106_YEAR | "& B =' | : P100_BUSINESS_UNIT_ID | "& C =' | : P106_COMMISSION_ID | "& d =('||) To_char(sysdate,'MMDDYYYYhhMISS') |') ...

    It does not provide the value of the global variable. It shows that Web page not found error. Can anyone help?

    Thanks in advance
    Gouri

    Hello Kawa,

    When you say variable overall, do you mean to say the element of application level? If Yes, then you need to refer to that element, the same way that you reference level page elements using the: syntax.

    Change your query to something like this...

    Select '

    Thanks,
    Machaan

    href=" "="">
  • How to get the value of the global variable to test in the user interface of labview?

    Hello.

    Can someone please share examples and tell me how access the global variable to test using the interface labview user.

    I found some references and obtained from the method.

    I sent the link below

    https://decibel.NI.com/content/docs/doc-5501

  • How to pass the global variable...

    Hello

    I have a report in a page and form in another page...

    If I clicked on the icon change in the report page it navigates to the form in another page...

    In this im report have "bill_amount" as one of the column, if I clicked on the icon change report page means, it will go to the form in another page...

    This form consist of one text field which is "bill_amount"...

    Since the report that I bill_amount for each entry, if I clicked on the icon change the means of the respective row, it does not appear automatically the respective bill_amount in the text in the form field...

    I created a report separately on the sql_query table... I created a form with a single field 'bill_amount '...

    Given that I na not create a report and a form based on the table... If I have created as it means if I clicked on the icon change it will show the datas respective in the form... since I created a report and form separately...

    If it is possible to create a global variable... who will bring the value of the "invoice amount" in the relationship and you will go the respective value in the form field on the next page...

    I don't want to put the value in the form field by restricting by request... She must take through the global variable...

    How can I reach it...

    It is urgent...

    concerning
    Mini

    Hello

    In her edit link column u give, the respective form field name, and the name of the column in the report inside...

    So that the value in the report of the corresponding column will be inserted into the corresponding field in the form...

    (IE) like this

    > p1_item_name---> #corresponding report name column #.

    Concerning
    GTA...

  • How to use the global variable in the table target?

    Hello

    I am trying to load several files into a single interface. the data is loaded successfully. 92. the files are there. for this I used variables and package.

    My requrement is 92 files of data loaded into the target table. I want to know what data from file.

    to this I added a column (filename) to the existing target table.

    If I used joints (not same condition), its totally wrong. all file names are coming.

    Please see the following screenshots.

    err27.jpg

    exit; target table.

    err26.jpg

    in fact in the target table. first 10 lines are coming from file.i.e first _ACCOUNT_LIMIT_511.TXT. but all the files names are coming.

    I'm confuse. After the first data file inserted then insert second data file. in that all file names are coming. Please help me.

    I thought that the global variable is preferable to identify the data came from which file.

    to do this, the global variable is used in the target table. I don't always have my exit.

    Please help me.

    Thanks in advance.

    err25.jpg

    Hello

    You can use the same way, how you use the project variable, just you have to do a thin is #GLOBAL.variable_name for example: #GLOBAL. SMART_AL_FILE_NAME_S

    Note: Make sure you that while you use one variable overall in interface, indicator should be staged as you chose above the screen

    hope this helps you

    Kind regards

    Phanikanth

  • Can I use the session with the presentation variable variable

    Hello

    I'm using a method join the variable session or repository with the presentation variable.

    I created a variable called 'VarPres' in obiee presentation I created a session with a new block of initialization variable and I made this request

    "{Select fullName from employees where idEmp=@{VarPres}.

    but when I called the session variable in obiee I got this error

    The session variable, NQ_SESSION. S_OBJ, has no definition of value

    Hello

    Does not allow a presentation in an init block variable, simply because there is no variable presentation.

    In general what you try to do probably will never work because of "timing" and is as a session variable.

    A session variable is set once per session, for once he put no exchange of value as the init block is not executed again. So, because of this you already can imagine that there is a problem in your logic, if you want to use a value set by the user in the front end to set the value of a session variable.

  • With the help of semaphore with a Global Variable - correct use?

    Hi all

    I looked in the use of global variables and in my case, it seemed with the help of a semaphore is the appropriate solution.

    In my case, I use a global variable to store the State of the system. Asynchronous two with screw environment (same VI) will follow two COM ports to see if they get a ' login:' command prompt. If the COM port is associated with Alpha, Charlie, or Echo, it increments by 1, and if it is associated with the Bravo, Delta, or Foxtrot, is incremented by 2 GV. If the GV is 3, the rest of the code will run. In this case, it must be a port COM A, C or E; the other should be B, D or F.

    A VI parent is called inside a loop. He works for the first loop. He never adds up to 3 on the second loop, however. I can't understand why. Please let me know if my code is a poor use of semaphores, or if there is debugging I can try.

    I'm still relatively new to LV, so I'm sorry if my screws are difficult to read. I created this in LV2011.

    Thanks for any help!

    CelerityEDS wrote:

    The output of my time looping (wait GV = 3) goes to the structure of the case on the bottom right (clear SGS, PasswordEntry, etc.), so the GV get indeed consulted by the upper case structure right.

    ??

    Your right upper case structure does not run until your time ends in a loop.  The while loop does not stop until the total is equal to 3.  Where can increment you the world besides structures case you cannot yet?

    Have you tried in your point culminating execution of the VI in order to see how they are actually running?

    Another problem that I see.  Assuming that your first while the loop is going to end.  In the structures of your case, you lock the semaphore.  But you can never unlock the semaphore unless you have the right combination of conditions that allow you to get to the case that unlocks the semaphore.  The conditions are based on data that are read before the start of the case of structure, which means that data will not be read and changed until it all ends.  You have the timeout of your lock semaphore connected on one of the cases, but your semaphore lock can never timeout because you do not have a value on his entry time-out.  I think you have a situation where you can lock a semaphore, then arrive at a situation where you can not unlock, then wind locking up of your cold code.

    I don't really think that you need a semaphore at all.  I think you can protect reading and writing functional your overall using a global variable, i.e. the motor action.  Overall, I think you need to rethink the architecture of your code.

  • Create the global variable

    I am new to animate. Please can you tell me how I can declare a global variable?

    I try to have a single button that plays the next 10 frames, another button that plays the next 20 images. I put the event listeners for the buttons on the first image. I'm putting the code on the timeline each 10 images that works if the game has to stop. I would like to connect with some global Boolean values. The project is the html canvas.

    It must be simple. Can you help me?

    Scope of variables in canvas mode:

    myVar = 1; variable is accessible everywhere in the current page

    this.myVar = 1; variable is accessible in all the images of the current clip

    var myVar = 1; variable is accessible in the current context only

    So yes, the creation of a global variable is simple the most.

  • Need help with the procedure variable

    Hi guys,.

    I try to get the list of the TableName of a specific table and store it in a variable and use this variable to LOOP and remove specific data in the table. Here is my code, maybe that will be clearer...

    This procedure within a package

    PROCEDURE DeleteData (parCONTR_NBR IN VARCHAR2)
    AS
    v_TableName CMSR_MAPPING. TABLE_NAME % TYPE;

    BEGIN
    Extract the names of the tables
    SELECT TABLE_NAME
    IN v_TableName
    OF CMSR_MAPPING
    WHERE TABLE_TYPE <>'W '.
    AND ORDER_SEQ <>' 0'
    ORDER BY ORDER_SEQ DESC
    ;

    -Loop on the name of the table
    FOR v_Index in 1... v_TableName.Count LOOP
    -Check that the table name and remove from the respectable table -.
    CASE v_TableName (v_Index)
    WHEN "CMSW_CONTR" THEN
    REMOVE FROM CMSW_CONTR
    WHERE CONTR_NBR = parCONTR_NBR;
    WHEN "CMSW_AMNDS" THEN
    REMOVE FROM CMSW_AMNDS
    WHERE CONTR_NBR = parCONTR_NBR;

    END CASE;

    END LOOP;

    END;

    When I run it, I get the following compile on this line error of TO v_Index IN 1.. v_TableName.COUNT LOOP:
    PLS-00487: Invalid reference to the variable 'V_TABLENAME '.

    Can someone help with this? What I'm doing wrong here?

    Like this?

    /* Formatted on 5/20/2011 12:37:05 PM (QP5 v5.149.1003.31008) */
    CREATE OR REPLACE PROCEDURE DeleteData (parCONTR_NBR IN VARCHAR2)
    IS
    BEGIN
       FOR c IN (  SELECT TABLE_NAME v_TableName
                     FROM CMSR_MAPPING
                    WHERE TABLE_TYPE != 'W' AND ORDER_SEQ != '0'
                 ORDER BY ORDER_SEQ DESC)
       LOOP
          -- Verify the table name and delete in respectable table --
          --( I always hate when my tables aren't respectable !)
          CASE c.v_TableName
             WHEN 'CMSW_CONTR'
             THEN
                DELETE FROM CMSW_CONTR
                      WHERE CONTR_NBR = parCONTR_NBR;
             WHEN 'CMSW_AMNDS'
             THEN
                DELETE FROM CMSW_AMNDS
                      WHERE CONTR_NBR = parCONTR_NBR;
          END CASE;
       END LOOP;
    END;
    

    Obviously I don't have your data and do not know exactly what is the whole procedure
    but you could not do?

    /* Formatted on 5/20/2011 12:49:07 PM (QP5 v5.149.1003.31008) */
    CREATE OR REPLACE PROCEDURE DeleteData (parCONTR_NBR IN VARCHAR2)
    IS
    BEGIN
       DELETE FROM CMSW_CONTR
             WHERE CONTR_NBR = parCONTR_NBR
                   AND EXISTS
                          (SELECT 1
                             FROM CMSR_MAPPING
                            WHERE     TABLE_TYPE != 'W'
                                  AND ORDER_SEQ != '0'
                                  AND table_name = 'CMSW_CONTR');
    
       DELETE FROM CMSW_AMNDS
             WHERE CONTR_NBR = parCONTR_NBR
                   AND EXISTS
                          (SELECT 1
                             FROM CMSR_MAPPING
                            WHERE     TABLE_TYPE != 'W'
                                  AND ORDER_SEQ != '0'
                                  AND table_name = 'CMSW_AMNDS');
    END;
    

    Published by: pollywog may 20, 2011 12:49

  • To access the Global Variables in the functions/methods

    Which of the following statements is better in terms of performance and efficiency?

    public var a: int = 0;


    public void add (): void {}

    a += 5;

    }

    Addition();

    OR

    public var a: int = 0;

    public void Addition(b:int):int {}
    b += 5;
    Back to b;
    }

    a = (a) Addition;

    I saw a lot of guides discourages the use of global variables in the functions/methods, but I just don't understand why anyone would create a copy of the variable, modify this copy and to grant this value to another variable and throw.

    You must create an instance to pass to your function.  the parameter (for example, mov) does not create a separate instance and creates only a temporary pointer to the passed object.

    If an instance is prepared for gc, having spent this instance to any number of methods (as a parameter) delay / will not interfere with ca.

    and Yes.

    MOV ['x'] = mov.x,

    MOV ["rotation"] = MOV.rotation,

    MOV [anypropertystring] = MC.anyproperty

    Flash uses array notation to solve strings into objects:

    var var1:ClassType = new ClassType();

    This ['var1'] = this.var1

  • How to get the global variable for an instanceId

    Hello

    I have data in global variables of an instance level. And using that instanceId, how can I get the global-level variables data.

    Please me tips


    Thank you
    Sailendra

    Hello
    I guess you want to get the value of the external variable within the process. You can do like this:

    assuming that it is of type string. For other types of type cast properly...
    String extVarValue = (String) (New Component(instance: this)).get(attribute: extVarName);

    Replace "extVarName" with your project name. It returns the value of your project for the instance that you are currently working.

    -Thank you,
    Malar.

  • Dynamic read the global variable (cluster)

    Hello!

    I would like to lika to read each control (label and value) in my global variable that contains a cluster. The problem is that I am doing it on a cDAQ and insofar as I undestand and has seen property th node do not have good worl on a real-time target. The code that I've tested so far is as follows:

    It's the main/fornpanel on my cDAQ. The Subvi in the main code contains the following:

    The phenonomen I've seen against hepatitis a is that it works very well maybe the first and second time when I run cod drank for the third time that the labels are empty. I read something that the dose of propertynode does not correctly for real-time target, but it is a way to come to the same solution using only not not the propertynode or you could use the different propertynode?

    Best regards

    Anton

    I solved it by using a library (Cluster Toolkit of Autotestware) to the GE in variant tables and depending on the type, I converted the variant accordingly and saved.  I guess that CVT would be able to do, but since I already use the cluster and they are "already here" it was more convinient for me to use this solution.

  • Pass a reference to the shared variable

    I use two shared variables in a loop where I write one and read each other.  I need to repeat this loop 5 times, but each loop uses a different pair of shared variables.  These variables are shared between a vi on the computer and a cRio.

    It would be ideal to incorporate this loop into a Subvi where I can pass a reference to the two shared variables in and then read and write in threw these references.  Then I could just call this Subvi 5 times, instead of copying and pasting the loop 5 times.

    Is it possible that I can accomplish this?  I can't find an example that would achieve this.

    Thank you

    If I understand correctly, you can use the mode programmatic access to shared Variables and it would work.

    http://zone.NI.com/reference/en-XX/help/371361H-01/lvconcepts/sv_usingdynvarapi/

    http://zone.NI.com/reference/en-XX/help/371361G-01/lvconcepts/usingdynvarapi/

  • create the reference with the legend Info

    Hello

    I have on my side of a large number of controls, 152.

    I have an array of items with a value of 152.

    I want to load the values in the controls on the right. All controls have a legend with the same value as the index of the element.

    Is it possible to load the values in a loop?

    The element, get the reference and load the data via a property node?

    So is my question possible to create a reference to a control by giving the caption of the control as input?

    Suggestions are welcome, I would like to avoid to connect values 152 152 controls.

    Thank you Kim

    Kim,

    The loop is the right idea.

    You cannot create a reference to the legend.  You can get an array of references to all the controls in the Panel.  Then you can search the legend that corresponds to the one you want.  When you find a match, use this reference to write to a property value node.

    Legends are easily changed.  It is probably best to use the label, which cannot be changed programmatically when the VI is on, for research and the match.  You can display the caption to the user and hide tags if it's better for the user interface.

    Lynn

Maybe you are looking for