Using functional global variables to transfer data between touch screen device and other targets

Hi,
We are currently developing a control system that will operate on a cRIO with a touch screen interface. During development we have been using functional global variables (FGVs) to handle most of the settings/data etc, however we have just realised that we may have an issue updating the data on the touch screen, and vice versa.
Previously we have implemented similar programs using shared variables, however we were wondering if there is anyway to implement FGVs in a similar manner, whether it'd be a combination of FGVs and shared variables.
Regards,
Mike
Software version: Labview 8.2.1

See this thread on LAVA about sharing FGV's across projects. THis should be extendable to cross paltforms (I believe).
You also may want to concider an upgrade to LV 8.5.1. We have found a number of performance related issues with LV 8.2.1 and RT.
If you decide not to upgrade, just remeber what I wrote (above) when you have reason to question the performance.
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction

Similar Messages

  • Best way to transfer data between iMac early 2006 and iMac late 2012

    What is the best way to transfer data between iMac early 2006 and iMac late 2012?

    HI, is this for Migrating all data ove, or just File Sharing?
    What OSX version is in he older one?
    Do you have any backup external drive for the older one?

  • Global variables to share data between separate programs.

    Hi guys and gals,
    On the advice of a lv consultant, we've used an array of global
    variables to share data (about 100 variables) between an acquisition/control
    program and a consumer program (datalogging) running on the same PC. This
    worked fine in the development environment. However it no longer works when
    the two programs are compiled. Is there a trick to get this to work or do
    we have to use datasockets or DDE to move the data.
    In case you're wondering the idea of two separate programs is to
    separate the critical control and data acquisition functions from the less
    critical but more likely to error datalogging functions.
    Regards,
    Alf Katz,
    [email protected]

    There are several solutions:
    1.) Use VI Server available in LabVIEW 5.1 and Up to provide a communication
    path between the two executables.
    2.) Use a data file to transfer the data between the two executables.
    3.) Use a TCP/IP connection there are several examples included with LabVIEW
    showing the mechanics of this.
    The simplest method is Number 1. Using the VI server, you open the
    connection and then retrieve the data form the Global VI based on the
    Parameter Name. It is very fast and requires very little processor
    overhead. Make a driver to Open the connection then a Read to get the data.
    Do not open and close the connection everytime, there is a lot of overhead
    in the Open connection call.
    Make sure you configure the VI Server within the development environmen
    t.
    Also you must include a few statements in the Executables INI file to
    correctly enable the VI server capabilities.
    Regards,
    Jeff Meyer
    Consultant
    Focused Energy
    Suffield, CT USA
    "Alf Katz" wrote in message
    news:[email protected]..
    > Hi guys and gals,
    > On the advice of a lv consultant, we've used an array of global
    > variables to share data (about 100 variables) between an
    acquisition/control
    > program and a consumer program (datalogging) running on the same PC. This
    > worked fine in the development environment. However it no longer works
    when
    > the two programs are compiled. Is there a trick to get this to work or do
    > we have to use datasockets or DDE to move the data.
    >
    > In case you're wondering the idea of two separate programs is to
    > separate the critical control and data acquisition functions from the less
    > critical but more likely to error datalogging functions.
    >
    >
    > --
    > Regards,
    > Alf Katz,
    > [email protected]
    org
    >
    >
    >

  • Use of SAP memory to transfer data between two different sessions.

    Hello experts,
    I wish to know how to use SAP memory to transfer data between two different sessions.
    The scenario is that when I run a report and change a variable, the value of changed variable should be availabe to another user on another terminal.
    Thanks & Regards!
    Sumit

    Hello,
    Just to add what Max has already mentioned. IMPORT TO / EXPORT FROM DATABASE statements can be used to store data in special "cluster" tables (you can't use any DDIC table) e.g., INDX.
    @OP: You can opt for Shared Memory(SHM) for this specific requirement as well. In my opinion SHM is a bit tricky to code, but it is easier to monitor. The opposite holds true for "data clusters".
    You should remember SHM is app-server specific. So if you've a load balancing scenario, using SHM can cause problems.
    Hope i'm clear.
    BR,
    Suhas
    Edited by: Suhas Saha on Nov 19, 2010 4:12 PM

  • Use global variable to transfer user parameter in some Vi

    Hello,
    I have troubles when I use a global variable to transfer the parameter to a first Vi (user interface) to a second vi (acquisition interface).
    In the first Vi, the user paramater is wrote to my global variable.
    In the second Vi, the acquisition parameter is read to my global variable.
    This 2 Vis are include to a master Vi who synchronized by the error bus.
    The problem :
    For the first use, the user parameter is transfer to the global variable but the acquisition vi read the old parameter. In the second use, acquisition vi read the first use parameter.
    After I use the IN/OUT parameter subvi and i have too this problem.
    Thanks for help.
    VIEW THE PROBLEM : (I use event structure
    Attachments:
    Problem.zip ‏52 KB

    Labview uses the dataflow to chain the execution. That is, as soon as one item of data is ready is is presented to the next stage.
    Global (or local) variables do not easily fit in there. A variable is always present and ready to give away it's data. It does not matter that you write to it in one vi. Another vi, that is running concurrently is not aware that the content may have changed.
    Especially if you reference variables outside of loops, the value is taken just once and never updated. Be aware! If in doubt, use the tracing facilty (the light bulb) to follow the data flow.
    Gabi
    7.1 -- 2013
    CLA

  • How to use functional global with a large amount of variables?

    Hi all,
    I'm currently developping a LV program which control and acquired data from a device. Up to now I used global variables ( very conveniente to use for experimental parameters). But now my program is become to be too large and I have too much "global" variables to continue to use a global.vi.
    I'm wondering if functional global can help me. If someone has an exemple of how use functional global with a large amount of variables...
    thanks

    I agree with Ben.
    Using queues is better than a number of Globals or Action Engines (Functional Globals).  If you need to pass data to a sub-vi, you can simply wire the queue out to a queue control of a sub-vi, or a reference.  See attached example of passing data to a sub-vi using a queue.  The example is an extremely simple, undocumented tid-bit of code that sends the loop count to the consumer VI.
    Run the main program called QueueProducer.vi.
    R
    Attachments:
    QueueProducer.vi ‏18 KB
    QueueConsumer.vi ‏14 KB

  • 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

  • How to transfer data between a multi-thread dll build with LV7 and MS C++, using envent programing method.

    It is easy to transfer data between a simple input/output dll build with LV and an external code like C++, but when data are available inside a loop running in the dll(in fact thread running in LV); How can I read them or receive an handle pointer to the calling C++ application when new data are ready.

    If you're using LabVIEW 7, you can use the PostLVUserEvent function to fire an event for an event structure in LV. Refer to the Using External Code in LV manual.
    Or you could use datasocket for this. The datasocket activex dll is nids.dll. You could have the class wizard generate wrappers for you or if you have Measurement Studio, you could use the custom wrappers it provides to communicate between the VI and dll.
    I hope this helps
    Bilal Durrani
    NI
    Bilal Durrani
    NI

  • Using EPMA to transfer data between HFM and Essbase on 11.1.1.3

    Can we use EPMA to transfer data between HFM application and Essbase cubes on Hyperion version 11.1.1.3?
    As far my understanding we can only link HFM and Essbase through EAL.
    I would be very keen to know from the audience if we can use EPMA to transfer data between HFM and Essbase
    Hyperion version 11.1.1.3
    Windows 2003 64-bit
    Regards
    Yogananda Bharadwaj

    Hi Yogananda,
    Check epma admin.pdf, page 439. Chapter 19 describes how to synchronize and map data between Hyperion applications, interface tables, and external files via EPMA Data Synchronization.
    Regards,
    Thanos

  • RT executable causes functional global variable VIs to become non-reentrant

    Hi,
    I am having a small issue with functional global variables (Repositories). The attached VI is a sample functional global variable I created that stores double precision numeric values. The VI properties are set to normal execution. I use this VI to pass data between loops running in real time on a PXI platform. When running my application from the project explorer (not creating executable) the VI functions as it should and passes data between my loops with no issues. But when I create a real time executable of my application and run it on the PXI, it does not share data between instances of the VI. My work around this issue is to change the VI properties execution priority to Subroutine but it forces me to modify my VI slightly for this to work (I have to remove the property node). I am not sure why this is happing. I have seen some applications with this VI that appear to function normally in development and in executable with the VI properties execution priority set to Normal. Any comments or suggestions are welcomed.
    I am running LabVIEW 2009, PXI-8186, and Windows XP
    Thanks
    Attachments:
    RT Repository DBL Numeric Command Ver 2.ctl ‏5 KB
    RT Repository DBL Numeric Element Ver 2.ctl ‏5 KB
    RT Repository DBL Numeric Ver 2.vi ‏25 KB

    Many properties require the front panel to be loaded in memory; the property you're using, NumItems, appears to be one of them (look at the help, you'll see that it says "Loads the front panel into memory.")  However, VIs running in an executable on RT do not have front panels, so those property nodes will not work.  If you were to log the error out terminal from the property node in your executable, you should see that an error occurs.  As a result, you're getting a 0 value out of the property node, causing your VI to output unexpected results.
    My recommendation is that you replace the property node with the function GetNumericInfo found in vi.lib\utility\VariantDataType.  It has an output called EnumNames.  Take the size of the EnumNames array and use that in place of the output from the property node.  This will work on RT.
    Note that this has nothing to do with re-entrancy, and the key hint is that the VI works when you remove the property node.

  • Best way to transfer data between loops?

    Hi, whats the best way to transfer data between loops(state machines, regular while loop etc) in labview. For so many years ive been using local variables but these can cause race conditions. Anyone advise?
    Stu

    It depends one the structure of the loops and how they need to exchange data (unidirectional, bidirectional, broadcasting).
    The simple case of one loop passing data to the other loop: producer/consumer design pattern using a queue
    If the structure already contains an event structure: User Events
    The way I code is documented in my community nugget on events
    I often mix this with producer/consumer.
    Felix
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml

  • Functional Global Variable on Hold

    Hello everyone,
    I understood, by reading threads on the forum, that a call to a Functional Global Variable will block its execution if the FGV is already being accessed by another VI, correct? Is there any other way it would block, apart from the stated?
    The motive of the question is that I have one FGV (non-reentrant) that is read by 8 subVIs concurrently (they are, actualy, the same vi, but configured to reentrant) and whose access time varies, strangely, based on the number of subvis running.
    When less than 5 VIs are trying to access the FGV, the execution is blocked (I assumed it, because when the FGV is disabled and replaced by a constant there is no problem with the execution) and the access lasts at least 50 ms; if this number is between 5 and 8, the execution is done much faster. My first guess was that the FGV hasn't been initialized until the fifth subVi is called, but I don't know how to check that.
    I can figure that there is something wrong with the FGV, but can't put my finger on it. Any ideas?
    Thank you in advance for any help.
    Solved!
    Go to Solution.

    Thank you for your response, Ben
    I'll try to explaing the problem better with the images that follow.
    I have 8 concurrent instances of the "bitDefiner.vi" - shown below - in the program.
    It reads from the AE (a simple read-write one) and it's the only one to call it besides the writer (that generates the appropriate signal), gets the rising edge of a waveform and determines how long it takes until the falling edge, giving a category to this time later on. If it doesn't determine the period between rising and falling edge before the timeout runs out, it aborts the execution of the while loop. This VI execution is setup like this:
    That being said, let's go to the problem.
    Assuming there is nothing using the AE but one instance of the bitDefiner, it won't get the rising edge, due to the fact the signal is not being generated, resulting in a timeout. The return value on the diff indicator should be next to the one defined to timeout(image below)
    However, when the subvi concludes its execution, the diff indicator shows 54ms intead of 15ms; so I concluded that the AE is taking to long to process the call. Besides that, I'm quite positive that there is only one thread accessing the AE.
    After this result, I ran the other instances of the bitDefiner and after the 5th one got activated, the diff went to the expected 15 ms (I'm still thinking how to show that on picture).
    I tried highlighting the execution, but it didn't show me anything unsual. The call chain just present that the caller is the bitdefiner VI as expected.
    Any thoughts on that?

  • Functional global variable

    I would like to ask to the experts a question about functional global variables. 
    In the labview basics 2 course was said that a functional global variable is not reentrant. 
    My purpose is to implement a code in such a way.2 main vi's. The first vi deals with some hardware that writes data in an output file with 1 Hz rate (more or less 1Hz, I cannot decide it).
    The second vi deals with a different hardware (thermocouples). This works at a different rate (I cannot match exactly the different rates). I would like to write the data from the second hardware in the same output file of the first vi. 
    I am thinking to use a functional global variable to pass the information from the second vi to the first vi. In this way I am using the data from the thermocouples at a rate given by the first vi. But at the same time in the global variable the data are written at a rate given by the second vi.
    My question is: what exactly happens if the subvi (functional global variable) is called exactly at the same time? As you can understand it's not really important if I read the temperature with an error of 1 second, but I would not like the execution would stop or something like that. 
    A functional global variable is a subVI that is not reentrant. This means that when
    the subVI is called from multiple locations, the same copy of the subVI is used.
    Therefore, only one call to the subVI can occur at a time.functional global variable is a subVI that is not reentrant. This means that whenthe subVI is called from multiple locations, the same copy of the subVI is used.Therefore, only one call to the subVI can occur at a time.

    A couple of quick comments to add to this thread.
    FG's can be involved in Race Conditions if two callers attempt to direct set the same value. An Action Engine (well what do you expect?) can be coded to help with those situations.
    Example:
    In arecent app I needed to set the heaters to "0" if an over-pressure condition was detected. The Heater set points where driven by a PID. The safety conditions where controlled by a process monitoring the input values.
    So how do I keep the PID from setting the heater when the rig is not safe?
    A Safety AE !
    Actions used by the pressure monitoring set the Safety AE in an "go-safe" state where setting the heaters results in a null op.
    This particular pattern (two writters) screams for an AE to coordinate the vaious actions. Do this same thing with queues could get tricky.
    So for the Q in this thread we have a pattern of "two source of info, one sink for each" that screams for a queue.
    BTW:
    The AE Nugget linked above addresses what happens when two callers attempt to call the same non-re-entrant sub-VI.
    Have fun,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • ODI: How to transfer data between Essbase apps

    Hi,
    I'm using old Planning version 3.5 on Essbase 7.1.6. It has no partition options between apps. XREF function work slowly. I need to transfer data with transformations between two Essbase Apps. I'd like to use ODI 10.1.3.6.4 to do it. I'd like to transfer data between essbase apps via Staging Area.
    1. What units of LKM, IKM, RKM to me need to be used?
    2. How to create datasource for Essbase in ODI?

    I've found "Compatible software: Essbase 7.1.6 (Data Load & Data/Metadata Extract Only)" information here
    http://download.oracle.com/docs/cd/E15985_01/doc.10136/readme/DIHER.pdf
    John, I use your blog as a short ODI guide. Thanx a lot of!
    Besides, I've found "Getting Started with Oracle Data Integrator Adapter for Hyperion Essbase" - informative source
    http://download.oracle.com/docs/cd/E15985_01/doc.10136/getstart/DIAHE.pdf

  • Function global variable(FGV) template

    Hi All 
    if NI adds the Fuctional Global Variable (FGV) tempalte in design pateren tempates in hte New window, it is easy to create FGV VI's.
    and Helps the programmers, no need to create from the begining of VI.
    Even it is usefull for CLD Exam also.

    Something like this? Note that I would use the term "Action Engine" instead of "Functional Global Variable" specifically to discourage the use of this template as a global variable and instead emphasize its role as an action performer on centralized data (as noted in the comments).

Maybe you are looking for

  • After upgrade to iOS 4.3.4 to iPhone 4 I can no longer sync with outlook 2007.

    Initially calendar just hung (overnight). Tried overwriting from PC and my phone calendar is now blank? Tried to sync again and contacts also appeared to hang for 30 mins so cancelled sync. Any ideas?

  • OBIEE 11g default pivot formatting changes

    Hi, in OBIEE 11g, there are several default pivot table formatting options that we would like to disable - I don't want end users to have to do this manually: #1 - All cells that are not in the "Measures" area have a default tan background applied to

  • Badi for attach documents at PO line item?

    Hi Gurus- I was wondering if there is a BADI or a user exit for enabling selection criteria for populating the link to documents button (for the PO line item).  If so, can you tell me what it is?  Thanks! -J

  • Import DVD's into iTunes?

    Instead of purchasing all of the movies I already have on DVD from iTunes, can they be imported?

  • PP work center capacity and link in Equipment master

    Dear All My client has five equipments which he is clubing them into one work center with five capacities. In equipment master i have given for respective equipments i have given PP work center locations but when i create a maint order for one equip