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
>
>
>

Similar Messages

  • 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

  • Share data between built exe:s.

    Hello.
    How do I share data between two built exe:s ? I now use a global variable between two VI:s and it works exactly as I want. However, when I build the application
    the communication between the two exe:s is lost.
    All help appreciated. Real examples are really appreciated to.
    Regards
    Andreas

    Hi Andreas
    If you have an application, it allocates memory. All global variables are located in this memory. The same happens for the second application.
    So that's why it doesn't work. If you have to vis and start them with LV, they both are running in the memory range of LV.
    One way to solve your problem is some kind of client-server architecture. You could have a third application which acts as a data-server and the other two apps act as data-clients.
    Hope this helps.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...

  • How to share data between applications.

    I'm trying to share data between LabVIEW v6.0 and another program (16 bit), both running on Windows95. At first DLL's seemed to be the answer but I would need to call 16 bit DLL's which I understand can be a problem. With my limited knowledge of C++ I've written a program (Borland C++4.2) which can access the data I need and save it to a file, this is then repeatedly read by LabVIEW, crude but it works. When I add code to do the same the other way I get occasional file sharing errors. I can't get either LabVIEW or C++ to trap these errors. As an alternative I thought I could write and read to a reserved portion of memory (less than 1K should be enough) using in port and out port. Is this viable, and if so how do I
    reserve the memory in Windows 95 so that LabVIEW & my C++ program can access it?
    Any suggestions?

    Ian wrote:
    > I'm trying to share data between LabVIEW v6.0 and another program (16
    > bit), both running on Windows95. At first DLL's seemed to be the
    > answer but I would need to call 16 bit DLL's which I understand can be
    > a problem. With my limited knowledge of C++ I've written a program
    > (Borland C++4.2) which can access the data I need and save it to a
    > file, this is then repeatedly read by LabVIEW, crude but it works.
    > When I add code to do the same the other way I get occasional file
    > sharing errors. I can't get either LabVIEW or C++ to trap these
    > errors. As an alternative I thought I could write and read to a
    > reserved portion of memory (less than 1K should be enough) using in
    > port and out port. Is this viable, and if so how do I reserve the
    > memory in Windows 95 so that LabVIEW & my C++ program can access it?
    >
    > Any suggestions?
    May be TCP/IP or UDP interprocess communication will do? It shouldn't be
    a problem via localhost. You can try separate VI server to handle
    communication task from your vi with C++ socket.
    Sergey Krasnishov
    Automated Control Systems
    National Instruments Alliance Member
    Moscow, Russia
    [email protected]
    http://acs.levsha.ru

  • How do I share data between my MBP and iMac?

    I have two Genealogy programs on my iMac that I would like to share data between my MBP and the iMac.  I would like to gather the data on the MBP and then share new data to the iMac which is where I basically do all of the Genealogy work from, since it is much easier with the larger screen and better keyboard. 
    Can someone please explain or direct me to a tutorial or procedures if this is possible?  Thank You!

    Click Apple>System Preferences>Sharing
    Check File Sharing. In File Sharing add the folder you want to share with another computer. Then add users. Then proide access previledges such as Read & Write, Read Only, Write Only or No Access.
    Now in the System Preferences, Click iCloud, sign in to iCloud. It's free and you can access your Macs from anywhere.
    In iCloud, check Back to My Mac.
    Do the same to another computer. You're all set by now.

  • How can I share data between two forms on different lists

    Using a custom content type, I created two lists that I want to share the same data - one is a calendar.  Our employees complete a form from the "Out of Office Request" list that has workflow functionality that sends an email to that person's
    manager.  If the manager approves the request, the item automatically populates the "Out of Office Calendar."  The problem is that the only information from the request list that populates the calendar is the Title field and date/time fields. 
    I need the manager name in order to create a view for each manager.  
    How can I connect the other information in the request list to the calendar list.  It seems to me that if the title and date fields carry over the information, there should be a way to connect the other information.  I'm using Designer.
    I've tried to connect the two lists' webparts with the wizard, but when I get to the page that maps the two lists, there are no column names and the "Next >" button is grayed out.  This seems like the logical place to connect the two lists,
    but it isn't working.

    Hi,
    According to your post, my understanding is that you wanted share data between two forms on different lists.
    To show external  information on the calendar event, there are two methods: Calculated column, workflow. You can refer to:
    A Simple Guide to Show More Information on a Calendar Event
    I recommend to use workflow to achieve what you want. But you need to create a people column to display the manager.
    You can create a workflow associated to the "Out of Office Request" list, add action to Start Approve Process. If the manager approves the request, you can create a item in the calendar, and then update the people column and the title column.
    Then the calendar will display the Title, date/time and the manager.
    To create a view for each manager, you need to modify the Filter. You can use the people column is equal to the manager name or the Title contains the manager name.
    Thank you for your understanding.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How can I share data between WinXP Pro and Mac OS 10.8.3 via wifi

    How can I share data between WinXP Pro and Mac OS 10.8.3 via home wifi. 

    MartyP wrote:
    Or is there a problem with both OS's writing stuff to the
    ~/Home/Library folder that may be incompatible?
    Yes, big time.  Mail, for sure, has a different file/folder structure, and would not be happy.
    Plus, a number of apps (Apple and 3rd-party) are "Sandboxed."  That's a security feature, to prevent malware or bad coding from affecting things it shouldn't.  Some of their files, including the preferences files, aren't even stored in the same places!
    Or to other places I'm not aware of?
    Probably.  If you have two versions of the same app, they may or may not expect the same data setup.
    To have one User folder for both OS's would save a lot of drive space
    Not if you use some or all of woodmeister50's suggestions. 
    But I'm also not sure how I'd use Time machine with such a set up.
    Just as you do now.  By default, Time Machine backs-up everything (except things like system work files, most caches and logs, trash) for all users and all internal drives & partitions.  By default, it excludes external drives.
    You can change those defaults, of course, via TM Preferences > Options.
    See Time Machine - Frequently Asked Question #32 for details and considerations of multiple drives.
    Presently I backup with . . . clones to other HD's
    Good.   Yes, clones are different.  You need multiple "tasks" to back up multiple drives/partitions.  But once set up, that shouldn't be a big deal.

  • How to interchange data between Java Program and C++ Program

    I constructed a java program using netbeans IDE that has ability to connect with a respective DLL; I want to connect and interchange data between my java program(.jar) and VSC++ program(.exe) through DLLs.JNI uses single Dll to invoke C/C++ function in native manner,In order to increase the efficiency I tried to connect and interchange primitive data types between Java program and C++ program using that DLL(JNI implemented).
    Unfortunately C++ program cannot obtain data values that has been changed by Java Program.For example - If I declare a global int variable in DLL,java program can catch that int variable and can update it but If I run my C++ program(exe) loading same DLL simultaneously it cannot receive the updated value of that int variable declared in the DLL.
    Therefore I need a solution to share/Interchange at least primitive data and their respective values between a JAVA and C++ Program using JNI (in spite of date transferring through Sockets).JAVA TO C/C++ & C/C++ to JAVA using DLLs.
    (TWO WAY COMMUNICATION)
    JAVA.jar  <=> <JNI> <=> DLL <=> [Connector Program C/C++] <=> C/C++ .exe
    PLEASE HELP ME!! THANK YOU

    What in the are you trying to say? What does "filled into the servlet mean?" Is the map somewhere outside the servlet? In a different process? Are you asking how to extract data from a map? Something else?
    Sorry, but your question makes no sense.

  • How do I share contacts between separate users on the SAME Mac?

    I need help with an issue that came up today. A client asked me to put all her friend's names and addresses into her contacts.  After entering all the names into the address book I realized that I had entered them all into her husband's contacts, as his user ID was logged on when I opened the computer.  I now need to find a way to export/transfer/copy all those entries to a separate contacts/address book on the SAME Mac?  Anyone have a simple solution?

    Hello Whigged-out,
    It sounds like you would like to share one library between two different users on your iMac.  I found an article with steps you can take to accomplish this:
    iTunes: How to share music between different accounts on a single computer
    http://support.apple.com/kb/ht1203
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Globale variable to exchange  value between two planning function (Formel)

    Hi,
    can I define a globale variable to exchange the value between two planning function?
    any anwser will be very appreciated.
    hongwei

    Hi,
    can I define a globale variable to exchange the value between two planning function?
    any anwser will be very appreciated.
    hongwei

  • Using events (?) to share data between tab pages

    I don't know whether this is an event question or an Object-Oriented design question or a JTabbedPane question.
    I'm pretty new to Java, so be patient!
    I wish to have a JTabbedPane with a tab to do 'Import' of data, and a tab to do 'Export' of data (the SAME data which was imported). Now, how do I share the data between the 2 tabs?
    It seems the data belongs at the JFrame level, but then how does the data in each tab access it? In other languages I would pass a reference to the data object in the window to each tab.
    Or how do I get (or set) the data when the tab changes? And how do I know when the tab changes?
    I think I need to set trigger some sort of event to the parent window, who I suppose has a listener, and then it can then query the appropriate pane? If so, I'm not sure what sort of event trigger I should be using, where etc.
    I know if I had one tab with an import/export functionality then I could declare the Collection within that panel.
    Help!!!
    Thanks ;)

    I think this is an OO design question.
    You basically have two views (the two panes) of the same data. So I'd suggest the Observer pattern (see the Design Patterns book) where one model holds the data and the model is observed by several views.

  • How can share data between jsp pages using beans??

    any one can give me code for 2 jsp pages with bean that share data for them

    <jsp:usebean name="yourBeanName" type="com.whatever.foo" scope="session"/>
    this will look for a bean named yourBeanName in the scope specified by the scope attribute. If none was found, the container will instantiate one with the no arg constructor for your bean and place it into the proper scope.
    if your bean had a method getName(), you could then on your jsp do:
    <%=yourBeanName.getName()%> to print the results of the method to the page. there are other ways to do the actual placing of the output on the page, but this is the most direct.

  • How to exchange data between wda program and abap program?

    Dear guru,
    the situation is:
    we have a abap program , which uses
      CALL FUNCTION 'WDY_EXECUTE_IN_PLACE'
        EXPORTING
        PROTOCOL                  =
        INTERNALMODE              = 'X'
        SMARTCLIENT               =
          application               = 'YHREFM_WD_APPROVE2'
        CONTAINER_NAME            =
          PARAMETERS                = lt_parameters
        SUPPRESS_OUTPUT           =
      IMPORTING
        OUT_URL                   =
      CHANGING
        VIEWER                    =
        EXCEPTIONS
          invalid_application       = 1
          browser_not_started       = 2
          action_cancelled          = 3
          OTHERS                    = 4
    to call a wda application inside sapgui, and  we want to get data return by the wda application in the program.
    we tried to use EXPORT/IMPORT  TO/FROM MEMORY, but failed.
    could you please tell me how to do that?
    br
    zj

    For integration between SAPGUI and WDA, the only supported solution is to have two iViews within the same portal page.  As mentioned in the linked thread, this function module is not released for customer usage.  You could setup a parameter transaction around WDYID and launch the WDA application from a SAPGUI transaction.
    For communicaiton of data, I wouldn't suggest anything that relies on memory communication.  In a multiple application server envinroment, there is no way to know if the two sessions will be on the same application server due to load balancing.  Therefore you should fall back to communications at the database level. Write data into a temporary database table. Consider using Server Cookies.

  • Share Data between Pro and Designer Form

    Good evening,
    Old Form:
    I recently inherited an adobe pro form created a few years ago. The naming conventions are horrible, and they refuse to replace the form to spit out an xml file. But they want the data to fill into an access database.
    New Form:
    I was able to create an adobe designer form, with proper naming conventions, that exports an xml file that can be imported into the access database.
    Help:
    Is there a way to link the old form data to the new form, with the naming conventions being different?
    Ideally, id like to create a button that will display a dialog box to select the old form and import the data without converting to an xml first…is this possible?
    Thanks in advance!

    Hello Pieter,
    Ok, it sounds like you are asking about 5 different things here.  Let me break them up and respond individually.
    There is no overhead inherent to using a MathScript node on RT.  Since the MathScript code is implemented on top of LabVIEW code, there will be varying levels of performance with respect to a native LabVIEW implementation, but simply having the node itself does not cause any overhead.
    On a Windows platform (or other desktop platform), the answer is the same: the node does not introduce any overhead into your algorithm.
    If you use the application builder to create a compiled program that uses the run-time engine, you are no longer able to change the .m file.  Or, to be a little more technically accurate, the LabVIEW run-time engine does not have a compiler.  Thus, you can change the .m file all you want, but the actual .m file that is used by your built application is the version that was present when you built the application.
    The behavior you observe with MathScript executing new code will only happen if you are running a VI with the full development version of LabVIEW.  We need the LabVIEW compiler in order to generate new code when you update a .m file and this is only present with the full development version of LabVIEW.
    The search path is only necessary when you are developing your VI on the host.  You can set a search path by right-clicking on "My Computer" in your project, choosing Properties, and then "MathScript: Search Paths."  Note: your VI will need to be in the "My Computer" target to locate your .m file.  After you have created your MathScript node, you can drag the VI to the target.  You are correct that the .m file is compiled when the program is deployed and you do not need to transfer the .m file to the target.
    Grant M.
    Staff Software Engineer | LabVIEW MathScript | National Instruments

  • Share data between two different plugins

    Hi All,
    I have two different plugins - In one, I am writing the persistent data and in the other I want to read this data. By making the dependency on the first plugin, I am able to read the data from the second one. But how can we read the data from the second plugin without any dependency on the first plugin?
    Regards
    Sahil

    As I recall, there is a setting to allow SO's to work between
    apps. Also you need to be sure to flush() the so to save the data.
    Another option is LocalConnection.
    Tracy

Maybe you are looking for

  • I want to change my internet connection, but don't...

    I have an 02 bought E5-00, but want to use a Tesco mobile sim. How do i go about changing the settings so i can connect to the internet via Tesco? Solved! Go to Solution.

  • Report Painter - KE30 - Export/Import

    Hi, I have a group of 'Z' report's in KE30 but i can't transport them, because they where made in QAS system and when i generate the transport order it becomes "local", so i can't transport the form that i want to PRV. Is there any possibility to mak

  • Publish/Approve Image or Attachment together with Page Publication

    HI all - I see this is a fairly common issue but mine may be more complicated: I have two Page libraries in a Publishing site: Draft and Approved. This is to ensure editors only view Approved documents in search results, etc. since SP always provides

  • 3.0 German local issue

    Hello, when I open the export dialog the field for the file name is not visible (it is, but only 2 px width) I have to pull the window some pixels wider, then the layout changes and it is fully visible. This only happens with my default local setting

  • EM DB Console not working

    Win XP, Oracle 10.2.0.1 What I did - while installing Oracle 10gR2, I'd configured loopback adapter with an arbitrary ip address in OS hosts file, as documented. - for some other testings, disabled loopback adapter, deleted the same ip address from h