What is the difference between using a global variable,passing a valuee and using a reference?

I have created a project that consists of several VIs.  Only the main VI has a front panel and the others perform functions.  The function VIs are dependent on controls on the main VI's front panel.  I have several ways of passing the value of the controls.  One is to use a global variable and just place it on the dependent VIs.  Another option is to strictly connect the terminal from the control to a VI connector block and pass the value directly.  My last option is to create a reference of the control and reference it inside the dependent VIs, but this would also require connections to be made to the VI block.
What are the advantages/disadvantages of these options?
-Stephen

5thGen wrote:
I have created a project that consists of several VIs.  Only the main VI has a front panel and the others perform functions.  The function VIs are dependent on controls on the main VI's front panel.  I have several ways of passing the value of the controls. 
1) One is to use a global variable and just place it on the dependent VIs.
2) Another option is to strictly connect the terminal from the control to a VI connector block and pass the value directly. 
3) My last option is to create a reference of the control and reference it inside the dependent VIs, but this would also require connections to be made to the VI block.
What are the advantages/disadvantages of these options?
-Stephen
1) Globals are evil and introduce race conditions.
2) The sub-VI only get the value when it was called and updates that occur while the sub-VI is runing are not sensed by the sub-VI
3) This uses property node "value" or "value signaling" both of which run the user interface thread which is single-threaded and you incur a thread swap hit to performance. You also have a potential for race conditions.
The are various methods for sharing dat to/from sub-VI which include Queues and Action Engines.
I hope that hleps,
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction

Similar Messages

  • What's the difference between using and 802.11a and 5GHz only?

    What's the difference between using "802.11n (802.11a compatible)" and "802.11n only (5GHz)" modes on the Airport Extreme?

    802.11a gives you 802.11g speeds but using 5GHz (54mbps
    802.11n gives you 144Mbps (600 peak) at 2.4GHz or 5GHz

  • What is the difference between HP DeskJet 3052A Vs. HP DeskJet 3050 and what is the latest model.

    what is the difference between  HP DeskJet 3052A  Vs. HP DeskJet 3050 and what is the latest model. I tryed to look up HP 3052A but i couldn't get any info, does HP still make the 3052a model?

    3052A is us version only
    http://h10025.www1.hp.com/ewfrf/wc/documentSubCategory?tmp_task=solveCategory&cc=us&dlc=en&lc=en&pro...
    DeskJet 3050 is both us & aus version
    the same specifications...
    Although I am working on behalf of HP, I am speaking for myself and not for HP.
    Love Kudos! If you feel my post has helped you please click the White Kudos! Star just below my name : )
    If you feel my answer has fixed your problem please click 'Mark As Solution' and make it easier for others to find help quickly : )
    Happy Troubleshooting : )

  • What's the difference between using a connection pool and a datasource

    Howdy. I figure this is a newbie question, but I can't seem to find an
    answer.
    In the docs at bea, the datasource docs say
    "DataSource objects provide a way for JDBC clients to obtain a DBMS
    connection. A DataSource is an interface between the client program and the
    connection pool. Each data source requires a separate DataSource object,
    which may be implemented as a DataSource class that supports either
    connection pooling or distributed transactions."
    In there it says the datasource uses the connection pool, but other than
    that, what is the difference between a connection pool and a datasource?

    Thanks for the info. I think it makes some sense. But it's a bit greek.
    I'm sure it'll make more sense the more I work with it. Thanks.
    "Chuck Nelson" <[email protected]> wrote in message
    news:3dcac1f5$[email protected]..
    >
    Peter,
    Here is a more formal definition of a DataSource from the Sun site
    "A factory for connections to the physical data source that thisDataSource object
    represents. An alternative to the DriverManager facility, a DataSourceobject
    is the preferred means of getting a connection. An object that implementsthe
    DataSource interface will typically be registered with a naming servicebased
    on the JavaTM Naming and Directory (JNDI) API.
    The DataSource interface is implemented by a driver vendor. There arethree types
    of implementations:
    Basic implementation -- produces a standard Connection object
    Connection pooling implementation -- produces a Connection object thatwill automatically
    participate in connection pooling. This implementation works with amiddle-tier
    connection pooling manager.
    Distributed transaction implementation -- produces a Connection objectthat may
    be used for distributed transactions and almost always participates inconnection
    pooling. This implementation works with a middle-tier transaction managerand
    almost always with a connection pooling manager.
    Does that help clarify the distinction?
    Chuck Nelson
    DRE
    BEA Technical Support

  • What is the difference between using the command "dsmgmt" and the "Managed By" tab when adding users to the local administrators Account on a Read-Only Domain Controller?

    When I use the
    "dsmgmt" command to add a user to the local administrators account of a RODC I can actually see the user when I use the "Show Role Administrators" parameter. However, I can't see the members of the
    group added to the "Managed By" tab of the RODC object in AD. Even though, the users added using
    "dsmgmt" and by the "Managed By" tab can all log in locally and have admin rights to the RODC. Are there any differences between these two ways of adding users to the local administrators account? 

    Hi,
    For groups, managedBy is an administrative convenience to designate “group admins”. Whatever principal listed in
    managedBy gets permission to update a group’s membership (the actual security is updated on the group’s AD object to allow this).
    In Win2008 and later managedBy also became the way you delegated local administration on an RODC, allowing branch admins to install patches, manage shares, etc. (http://technet.microsoft.com/en-us/library/cc755310(WS.10).aspx). 
    On the RODC, this is updating the RepairAdmin registry value within RODCRoles.
    So the difference between them should be only the way they do the same thing.
    For more details, please refer to the below article:
    http://blogs.technet.com/b/askds/archive/2011/06/24/friday-mail-sack-wahoo-edition.aspx
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • What's the difference between using java directly in JSP and java bean

    What is the difference if I use java code directly in JSP or use java bean in JSP?
    Which class to use for receiving the passed parameter from html or java script? Any difference for java code and java bean in the way receiving the passed data?
    How can I pass string from jsp to html or java script?

    1 Cleaner pages
    2 you have to write the class and use set and get methods
    3 What do you mean when saying passing string from jsp to html??, do you mean the value you can use <%=variablename%>

  • What is the difference between Object Outline Stroke, Object Expand..., and Object Compound Path/Make?

    Could anyone explain the differences between these three commands? I created a circle with a stroke, applied all three commands, and ended up with the same thing, a compound path. Are there situations where this is not the case, or situations where one of these commands is more appropriate?

    Cleveland,
    In the case of the straight stroke/nofill, object>outline stroke and object>expand seem to do the same thing.
    In the Layers palette you can see the three different outcomes for Expand if you have both Fill and stroke ticked, only Fill ticked, and only Stroke ticked. Only the last one corresponds to Outline Stroke.
    You should use Outline Stroke as the simplest one if that is what you need. Compound Path is for creating something with one or more holes from multiple paths, or for collecting paths to forrm the Clipping Path of a Clipping Mask. Expand is for the rest.

  • What's the difference between R/3 Enterprise extension set 1.10 and 2.00 ?

    Hi there,
    Anyone know how to find the difference between 47x110 and 47x200. I want to install the new IDES R3 which is 47x200 (I found some program/source that I need in this version). But our PRD system is 47x110.
    thanks in advance,
    Doris

    Hi Doris
    SAP R/3 Enterprise Core has been assigned the release number
    4.70. This signifies its similarity to SAP R/3 4.6C and indicates
    that the core can be independently upgraded and maintained.
    SAP R/3 Enterprise Extensions are selectively deployable and
    have their own release cycles. The name of each SAP R/3 Enterprise Extension reflects its relevant application area.
    e.g.
    SAP R/3 Enterprise Extension Set 1.10 includes HR,SCM and Fin modules
    SAP R/3 Enterprise Extension Set 2.00 includes all above and additionaly PLM module.
    Award points if Helpful
    Regards
    Umesh

  • What's the difference between using this & Adobe Catalyst?

    What are the pros and cons of each compared to each other?  Would appreciate specifics, thanks.

    Hello,
    I've spoken with the development team and they have explained FC like this:
    Flash Catalyst is a professional design tool  for interaction design. It helps designers specify not just the visual  layout of an interactive piece, but also exactly how the interactive  elements and transitions will work including designing buttons, scroll  bars, transitions, and more. Flash Catalyst integrates with Flash  Builder, so a designer can either export their design as a final .swf or  .air project, or they can hand it off to a developer to do further work  in Flash Builder. This integration makes Flash Catalyst and Flash  Builder the perfect solution for designing data driven applications  among other things.
    Project ROME is designed for the everyday user who wants to use digital media to better express and communicate ideas. Project ROME’s tools, interface and capabilities are simple but powerful, and do not require expertise in design.
    Essentially, FC enables a sophisticated  designer-developer workflow for professionals while ROME enables  all-in-one media creation for at home, work or school users.
    Thanks for your questions!
    Sarah
    Sarah
    Forum Moderator

  • What are the differences between aqapi.jar in Oracle 8.1.7 and OC4J 9.0.3

    Recently, I have been trying to use AQ as the foreign JMS provider for WebLogic MDB. I started with the AQ/JMS implementation in Oracle 8.1.7. I found that that version of AQ/JMS does not support:
    QueueConnection.createQueueSession(false, ...);
    Session.recover();
    Message.acknowledge();
    Message.setJMSType();
    Message.setJMSReplyTo();
    Connection.setClientID();
    Connection.setExceptionListener();
    After some hacking I was able to dequeue AQ messages using WebLogic MDB, but I could not handle exceptions.
    Later I looked at the version of OJMS in OC4J 9.0.3 and found all the above features are supported (I guess they are required by J2EE 1.3 specs). However, I can no longer dequeue messaged using MDB.
    Can someone at Oracle provide some insight on whether I can mix and match the two OJMS versions to get WebLogic MDB to use AQ?

    I subsequently found this thread:
    MDB on Oracle9iAS Release 2 (9.0.3)
    and found I need Oracle 9i with patches. This indeed solved my problem. The question now is, what is the major difference between the AQ versions?

  • What is the difference between Edge Animate CC, Edge Code CC (Preview), and Edge Reflow CC (Preview)?

    Also, what does the (Preview) mean?  Does it mean that a newer version will become available soon?

    Hi All,
    Preview releases means that our team acknowledges the limited functionality of the application. Our goal is to provide community members an opportunity to try out the application and we encourage everyone to provide us with feedback.
    Edge Animate lets web designers create interactive HTML animations for web, digital publishing, rich media advertising and more, reaching both desktop and mobile with ease.
    Edge Animate FAQ
    Edge Reflow allows responsive designs faster and create high-fidelity prototypes through media query breakpoints, precise CSS layouts, grouping and more. Edge Reflow now connects directly to Photoshop CC, allowing you to go from static design to responsive comp in just one-click.
    Edge Reflow FAQ
    Edge Code is a lightweight code editor for web developers and designers working with HTML, CSS, and JavaScript. Edge Code is built to work with browsers, speeding up development time by displaying changes to the code directly on the screen.
    HTML, JavaScript, CSS editor | Download free Adobe Edge Code CC (Preview) trial
    Regards,
    Devendra

  • What is the difference between 'command delete' and using 'delete original and all versions'?

    My masters are not referenced and I usually have only one version.  What is the difference between using 'command delete' versus going to the top menu bar and using 'dele

    Good question  .
    When the Version is the only Version based on the Original of that Version, the two commands have the same effect.
    See this User Tip by master Aperturist Frank Caggiano.

  • WHAT'S THE DIFFERENCE BETWEEN.....

    Hi friends,
    Please enlighten me ....
    What's the difference between using this.....
    1. Add User command functionality to ALVgrid report
    In order to add user command functionality to the ALV grid you need to perform the following steps:
                        1. Update 'REUSE_ALV_GRID_DISPLAY' FM call to include 'USER_COMMAND' FORM
                    2. Create 'USER_COMMAND' FORM
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE'
                I_callback_user_command = 'USER_COMMAND'   "see FORM
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
                i_save                  = 'X'
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 1
                others                  = 2.
          FORM USER_COMMAND                                          *
          --> R_UCOMM                                                *
          --> RS_SELFIELD                                            *
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    Check function code
      CASE r_ucomm.
        WHEN '&IC1'.
      Check field clicked on within ALVgrid report
        IF rs_selfield-fieldname = 'EBELN'.
        Read data table, using index of row user clicked on
          READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
        Set parameter ID for transaction screen field
          SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
        Sxecute transaction ME23N, and skip initial data entry screen
          CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
        ENDIF.
      ENDCASE.
    ENDFORM.
    and using this----
    2. Add User command functionality to ALVgrid report
    In order modify PF_STATUS of ALV grid report you need to perform the following steps:
         1. Update 'REUSE_ALV_GRID_DISPLAY' FM call to include:
                        i_callback_pf_status_set = 'SET_PF_STATUS' statement.
         2. Create 'SET_PF_STATUS' FORM
         3. Create pf_status (i.e. 'ZNEWSTATUS').
              - It is recommend that you copy standard status'STANDARD' from function group SALV
                and modify it accordingly. ALV standard function codes always start with '&'.
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE'
                i_callback_pf_status_set = 'SET_PF_STATUS'   "see FORM
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
                i_save                  = 'X'
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 1
                others                  = 2.
          FORM SET_PF_STATUS                                         *
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ZNEWSTATUS'.
                      "Copy of 'STANDARD' pf_status from fgroup SALV
    ENDFORM.
    I have assumed the former is used  when I am selecting a field on the list
    and the later when I have  created a pf-status. I mean to say... I have slected a field and click on some button to get further information.
    Please remove my confusion.
    Thanking you alll in advance,
    Hari Kiran.

    From their Terms & Conditions page:
    Grade A - Working phone in as new/mint condition. Complete with original box and accessories as sold new.
    Grade B (and Discounted) - Working phone in good condition with slight cosmetic blemishes. Charger supplied. If the phone includes a music player/radio then it is supplied with headphones. If the phone has PDA functionality a sync cable and/or docking cradle is supplied. Missing original packaging.
    Grade C (and Budget) - Working phone in poor cosmetic condition. Original or 3rd party charger supplied but missing accessories and original packaging.
    Substitute iPod for phone and I think it makes sense...
    tt2

  • HT201342 What is the difference between an @me email and an @icloud email address?

    What is the difference between using an @me email address for iCloud and the new option of an @icloud email address offered?

    The @icloud address operates like an alias to your @me address.  Any email sent to either your @me or @icloud address is routed to your current @me inbox.  It's just another address that you can use as an alternative to your @me address if you want.

  • What's the difference between these net connection...

    I am using my N97, on the UK Vodafone network. I have 'unlimited' internet useage, which is actually capped to a 'fair use' of 500MB per month. Having checked out online it seems Vodafone are pretty lenient about the cap, and will only charge more if you consistantly go well over than limit, and ignore warning to lower your useage.
    Anyway, basically, in my internet connection destinations on my phone, I have my 3 WiFi networks I use set as priority 1, 2 and 3 (home, work, another place) and then 4th is Vodafone Live! which I presume is the 'normal' Vodafone network, and then lastly we have Vodafone Internet GPRS. 
    What is Vodafone Internet GPRS? And what's the difference between using that, and Vodafone Live? If anyone could clear this up it would be great, cheers! 
    Message Edited by alex79uk on 09-Jul-2009 02:23 PM

    In analog terms, to explain YCbCr use the example of the COMPONENT output from your DVD player. It use 3 separate cables (Y = Luminance = Green Cable), (Y-B = Blue Color Diff = BLUE Cable) and (Y-R = Red Color Diff = RED Cable). In the analog world, RGB is actually RGBHV (5-wire) and is adaptable to 15-pin VGA with a simple passive adapter. Many people will mistakenly refer to Analog Component video as RGB, since the cables are Red, Green and Blue.
    So, since all that mumbo jumbo means essentially the same, this appears to be the digital "equivalent" of what is known as Component Video in the Analog world... What I said about RGBHV does not apply to the 10-bit color, but thought I'd mention it anyway.
    -BChil

Maybe you are looking for