Indicator Refresh from Global Variable

Hi,
Here's an easy one from a newbie:
I am maintaining a global string variable that contains lines that report the status of my program.
Every time the global is updated I would like the contents to be written to a front panel string indicator. This means that the global is read from multiple points in the vi, but there is only one indicator icon that I can access.
What is the best way of ensuring that the indicator is updated every time the global is updated?
Thanks.

Hi mem07,
Some good answers have come up... Tbd is right - there is probably no reason to use a global.  The string indicator will work just fine in storing your value.  You mentioned that "there is only one indicator icon that I can access."  By that statement, I assume you mean that there's only one terminal that lets you access the value in your front panel indicator or control. 
A way around this that was mentioned by tbd is to use a reference and a property node.  Yes, you could right click the control or terminal and select create->reference, wire it to a property node (Application Control Palette), and select the "value" property.  Property nodes by reference are one of the slowest ways to update controls, though.  This is also a pretty advanced technique for someone new to LabVIEW (good learning experience, though).
A slightly faster method is to right click your terminal and create->property node, selecting the value property.  This property node is "implicit" because it doesn't use a reference.
The quick and dirty way to access the terminal's value is to create a local variable. Locals are frowned upon by the gurus almost as much as a global because they duplicate the value of the control in memory for each local - it'll get the job done, though, and they're refreshed faster than both property node types. To make a local variable, right click the control or terminal and select "Create->Local Variable".  If you know about globals, you probably already know about locals.
Whew - that was a lot to type.  The bottom line is that, every time you update the front panel control or indicator by any of these methods, it's functionally equivalant to using the terminal ("indicator icon.")  The trouble is when you have multiple parts of your code updating the indicator at the same time, leading to a race condition.  We'll leave that for another post.
I hope my rambling was helpful...
Jim

Similar Messages

  • Oracle Froms, Global Variables and Oracle Reports

    Hi all,
    We are developing a form that will call an Oracle report and we would like to test the value of a global variable that was set in the Oracle Forms in the "Before Parameter Form" in the Oracle report trigger. Can this be done?
    Thanks, Larry

    The "global" var. is global to either a report or a form, not both. You may pass them from one to the other but that's not the session-global thing.
    DC

  • How a statics variable different from global variable...

    explain the span of these two kind of varaiables in subroutines..with a simple example
    Thanks guyz

    Check the following syntaxes to declare a static variable.
    1. STATICS f.
    2. STATICS f(len).
    3. STATICS: BEGIN OF rec,
    END OF rec.
    4. STATICS: BEGIN OF itab OCCURS n,
    END OF itab.
    Static validity means that, unlike normal local variables, the life of static variables does not depend on the defining procedure, but on the program at runtime. Static variables are thus not redefined on the stack each time the defining procedure is called, but exist independently of this in the program and keep their value, regardless of calls to the defining procedure.
    Global Variable:
    global variable is a variable that is accessible in every scope.

  • CALLING MENU FROM GLOBAL VARIABLE

    Hello all
    How can i call a menu from a global varible :global.path
    Thanks

    Hi,
    Please post the question on Form Forum.
    Thanks,
    Oracle Reports Team

  • Netui:form  not refreshing from global menu in portal 10.3

    Hi,
    I'm working on weblogic portal 10.3 . When clicked on menus jsp page is opening fine. After an action is performed, when clicked on menu again to navigate to the same page form values are getting retained.
    Tried to debug, First time the page is requested it does go into begin() of corresponding controller but subsequent requests does not got to begin action and thus retaining the old page again and again.
    Any help much appreciated.
    Regards
    karthic

    Hi
    that is expected behavior. If you want to override click the portlet in the properties for the portlet you can specify an action as the refresh action (you could specify it as begin if thats what you need or any other action in your pageflow) .
    regards
    deepak

  • How to Set multiple Global Variables without using Controls or Indicators

    I have to set many Global Variables (i.e. declare and initialize them) in a subVI in order to pass them to various other subVI's. The only way I know how to do it in LabView is to create a Globals.vi on which you create a control or indicator for EACH Global Variable. That's fine if you have only a few variables. But I have close to a hundred Global Variables (which come from a configuration file for a large program) and clearly it is impractical and cumbersome to create a control for each global variable. In Agilent Vee, there is a simple function called "Set Variable" that sets the data value of a global variable. Then in other module, you simply use the "Get Variable" function to get back the v
    ariable and its value.
    In LabView you can use the "Invoke Node / Set Control Value" and "Get Control Value" properties to achieve the same thing. But as mentioned above, you need to create a control for each global variable and that is a big pain in my case, with many global variables. Furthermore, the global variables are read from a Configuration Text File to this VI. Is there a way to do it without using the control? Thank you in advance for any help.

    Actually you could create the same sort of facility in LV. All you have to do is create a LV2-style global that behaves as follows:
    To write a value to it, you supply a value name and the value. These pieces of data are save internally in seperate arrays.
    To read a value, you supply a value name. The VI looks up this name in the value name array to return an index into the value array. Output the value you find.
    Frankly though, it sounds like what you really need is not hundreds of globals, but a good way to manage configuration data.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Unit Testing and APEX Global Variables

    We've recently started to unit test our database level PL/SQL business logic.
    As such we have a need to be able to simulate or provide output from PL/SQL APEX components in order to facilitate testing of these components.
    Some of the most obvious portions that need simulation are:
    1. The existence of a session
    2. The current application ID
    3. The current page ID.
    We currently handle requirement #1 by using apex_040100.wwv_flow_session.create_new
    We handle 2 and 3 using the apex_application.g_flow_id and g_flow_step_id global variables.
    I'm just wondering, how safe is it for us to use wwv_flow_session.create_new to simulate the creation of a session at testing time for those things which need a session?
    I've also noticed that there are apex_application.get_application_id and apex_application.get_page_id functions whose output is not tied to the global variables (at least in our current version).
    Is it safe for us to expect that we can set these global variables for use in testing or is apex moving to get_application_id and get_page_id functions away from global variables?
    Will there be corresponding set_application_id and set_page_id functions in the future?
    Sorry for the question bomb. Thanks for any help.

    My first question would be why do you need to establish a session to test your PL/SQL?
    wwv_flow_session is a package internal to APEX, and you should probably leave it be.
    The get_application_id procedure you refer to is in apex_application_install, which is used for scripting installation of applications - not get/set of page ID like you're describing.
    If you're uncomfortable using apex_application.g_flow_id, you can use v('APP_ID') or preferably pass the app_id/page_id as parameters to your procedures.
    Your question seems to have a few unknowns, so that's the best I can describe.
    Scott

  • Is it possible to intialize a text item with Global Variable

    Hi,
    I have forms10g, I want to initialize text item with current hour for this purpose I have defined one global variable and initialize text item(for hour) with this global variable.
    Defination of global variable
    :GLOBAL.my_var := TO_CHAR(sysdate,'hh24');
    Initial Value of form text item as
    :Global.my_var
    but when I run the form it raise error " ORA-01403 no data found " error
    I already check this global variable intialize properly with the current hour.
    Thanks and Regards.
    Khawar

    Hi Francois,
    Thanks for reply, but when I removed initial value property of text item from Global variable to other or Null form starts running, I have one Poplist and it populate with a procedure at form startup I remove it but no success.
    Thanks and regards.
    Khawar

  • How do i create and pass a global variable from one vi to several sub-vi's?

    Hi Guys,
    I am trying to create a program that opens several front panels (sub-VI's) in sequence. in each front panel, the user would open a file that the name is obtained from the previous sub-VI. I would like to know how i could pass the filename and refnum of the file thorough from one sub-vi to another. A global variable would do it in VB, but how do we do global vars in LABWIEW. thanks
    Papish

    I put together a sample VI and Sub VI that illustrates how to pass a Refnum and access a data file while in a Sub VI.
    For multiple VIs just repeat the sub VI process.
    You probably don't wanna use a Global Variable if not needed (can add to the mess down the road haha).
    Let me know if it helps you out! Or if I can clarify anything else!
    Chances are if you have seen VI in the forest it hasn't fallen.
    Attachments:
    Passing Refnum.zip ‏21 KB

  • How to get value for a global variable from an exel file?

    Hallo all,
    I am a beginner in LabVIEW and I have  a problem in reading datas from an exel file . I would like to import a group of data with timestamps from exel file to a global variable. for ex. speed, acceleration and position of 4 different sensors to each of its global variable.
    It will be very nice if anyone can give me some ideas.
    Thanking you in advance

    ...continued here

  • Can i pass parameter or global variable in view from 6i form

    hi master
    sir can i pass parameter or global variable in view from 6i form
    i use view for some diff column calculation within the date then i use
    where date between data1 and date2
    in view but view not create
    please give me idea how i pass external value in view
    thank
    aamir

    Hi Antony!
    I feel it may not produce the right results if you
    dont include the where clause and using only group by
    in view.You felt? Please clear, logical thoughts put here, not feelings.
    (It may very well have all the Debit, Credit
    for all the Accid where as the user wants only for
    r some date range)Data range is determinated in Form by user, so if view should give final data set then you must back
    on Ranjana first question: How to pass parameter or global variable to view from 6i form?
    And also as Ranjit pointed out, If you have only
    accid, sum(debit), sum(credit) in View, wheres this
    enddate ??Of course, column entdate (or enddate?) must be included in view...
    Cheers!

  • What is the best way to retrive data from a Global Variable?

    Here is what I want to do,
    I have several PC's that run different types of tests. I want to use a global variable, running on a single PC, that acts like a sever that can be accessed by the other PC's in my lab. This Global variable will store the hostnames of the different PC's that are currently running each test, along with a description of the test.  Then, a user can access this Global variable to read the different values and select the PC and connect to it's desktop using Remote Desktop in Windows.
    Is it possible to write data to the Global variable that is running on the single PC?
    What is the best way to do this? Does anyone have a sample VI?
    What is the best way to then read the data from the Global variable?
    (I will probably use an array\cluster to store the hostnames.) 

    Another pre-LV8 idea...
    A functional global can be accessed using VI-Server and called using "call by reference".
    This approach harnesses the TCP functionality built into the VI-Server to manage the conncetion.
    This can be pretty quick and (if the functional global is written correctly) will support buffered- mixed data types. (Try to do that with the Shared Variable  ).
    Just another idea,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Call function in LabView from a DLL, then access global variable from DLL

    I have created a DLL in LabWindows with a function and a structure.  I want to call the function from within LabView and then access the global structure.  I am able to call the function from the DLL with a "Call Library Function Node" and can access the return value, but I cannot figure out how to access the global structure.  The structure is declared in the DLL header file with __declspec(dllimport) struct parameters.
    Is there any way of accessing this structure without using the Network Variable Library?
    Solved!
    Go to Solution.

    dblok wrote:
    When you say "access to" or "the address of" the global variable, do you mean to pass the variable as an argument to the function call in the DLL?  If so, then I was not really sure how to pass a cluster from LabView by using the "Call Library Function Node".
    Yes, that's exactly right.  I would include a pair of helper functions in the DLL to read and write the global variable.  Alternatively you might write separate helper functions for each field inside the global structure, depending on the number of fields and whether you want to do any validation on the values.
    You can pass a cluster by reference to a function that expects a struct by setting the parameter to Adapt to Type, so long as the cluster does not contain any variable-length elements (strings or arrays).  The cluster needs to match the struct exactly, and sometimes that involves adding extra padding bytes to make the alignment work.  Variable-length elements in LabVIEW need to be converted to clusters containing the same number of elements as the struct definition (for example, if your struct contains char name[12], you would create a cluster of 8 U8 values, and you could use String to Array of Bytes followed by Array to Cluster to convert a LabVIEW string into that format).  If the struct contains pointers it gets more complicated, and it may be easier to write functions in the DLL to access those specific elements individually.
    If you can't get this working or need help, post your code and an explanation of the error or problem you're seeing.
    EDIT: it is also possible to include a single function in the DLL that returns the address of the global variable, which LabVIEW can then use to access and modify the data, but that's more complicated and likely to lead to crashes if you don't get the memory addressing exactly right.

  • How to declare a global variable from a PL/SQL package

    Hi All,
    Using a global variable is a bad practise for all language. However, in my case, I have a PL/SQL package defines all constants, and I want to use them directly via SQL statement, for instance,
    PACKAGE my_const
    IS
         DEFAULT_ZIP_CODE CONSTANT VARCHAR2(5) := '00000';
    END;And I cannot referrence this variable from my select statement as
    SELECT my_const.DEFAULT_ZIP_CODE from dual;I have to create a function via my package, as,
    FUNCTION get_default_zip_code RETURN VARCHAR2
    IS
    BEGIN
         RETURN DEFAULT_ZIP_CODE;
    END;and
    SELECT my_const.get_default_zip_code from dual;I don't want to create functions to referrence the default varaibles. Does anyone have any clues?
    thanks
    Edited by: user4184769 on Jul 19, 2010 8:36 AM

    riedelme wrote:
    thanks for the info. Your scope explanation makes sense even though it is not intuitive to me. I think the usage of package variables should be supported by SQL (they're just values to be copied) Maybe look at it from another language's perspective. You want to use a global PL package variable in Java/C#/Delphi/VB/etc. How would you do it?
    None of these languages can crack open the data segment of a PL code unit, inspect the variables in it, and extract a value from it. Instead, it needs to be done as follows:
    Using sqlplus as the client illustrates how all these languages will need to do it:
    SQL> var value varchar2(20);
    SQL> begin
      2>     :value := SomePackage.someVar;
      3> end;
      4> /So why should SQL behave differently? It is not the same as the PL language. It is not a subset of the PL language. Yeah, PL/SQL blurs the line between these 2 languages making it very simple for us to mix their source code. But PL/SQL is SQL integrated with PL - not PL integrated with SQL. PL has tight hooks into SQL, creating cursors for you, defining bind variables, binding variables and doing the whole Oracle Call Interface bit for you.
    But SQL has no need for PL code, just as it has no need for Java code, or Delphi code or VB code. Yes, it is possible for it to call Java stored procs. As it is possible for it to call PL procs. But these are via the formal call interface of those languages - not via tight integration hooks that blur the languages and make SQL and Java, or SQL and PL, look like a single integrated source code unit.
    Thus SQL has the pretty much the same constraints in calling the PL language as other languages do. What SQL can do is use the PL engine's call interface and tell it "+execute this function and return the result of the function+".

  • Access global variable in fpga from rt-target

    Hi All,
    I have a realtime PC with NI-FPGA 7852R.
    Generally I used programmatic front panel communication to access variables from FPGA to rt-system since I need the data for control and not for data logging.
    The thing is, I bumped into a tutorial and suggested me to use global variables to save resources of your FPGA. My question is, is it possible to access global variable that belongs to FPGA from rt-system? As far as I tried, this does not seem possible.
    Thanks,
    Auralius

    Could you point us towards this tutorial?
    Chris
    Certified LabVIEW Architect
    Certified TestStand Architect

Maybe you are looking for

  • Transporting LSMW without creating transport request( from quality to prodn

    Hi All, I have created an LSMW in quality, I need to transport it to production with out creating any transport request. Kindly let me know the procedure for the same. Please help!!! Vivek Gupta

  • How to put up a calendar in VI for date selection?

    Hi all, I need to put up a calendar in my VI for date selection to view historical data like we find on websites of travel agents? & also guide me how to get this kind of calendar..... please guide me... Thanking You, Vaibhav Gandhi B.E. Instrumentat

  • WIFI DO NOT WORK

    My wifi is not working after I have installed the new version 6.1.3. The color is grey and I've tried already several possible solutions, restore, download again, fridger,, reset everything. Nothing works...

  • 2.1PROD/EA2: Show Errors problems

    With 2.1EA2 (JDK 1.6.0_16), the "show errors" command still doesn't ever seem to report errors (long time problem for me - see 1.5PROD/EA3/EA2/EA1 - BUG: Show Errors for View says no errors when errors). As well as that, when trying to run a show err

  • MY BB SERVICES ARE NOT WORKING

    PLEASE MY GOOD BROTHERS  AND SISTERS KINDLY COME TO MY AID IN  HELPING ME RETIRIEVE THIS  PROBLEM ....................... MY  BLACKBERRY SERVICES THUS THE BBM ,APP WORLD ,FACEBOOK  ,ARE NOT WORKING AT ALL. COSMOS