Problem Sharing Variables between 2 machines

I am having problems trying to create a project that would share variables between multiple computers. I am using Labview 8.2.1 (I am new to 8.2.1 and Shared Variable).
here is what i did:
1. I created the project with Client and Server VI's and a library containing shared variables, which both of them call
2. I placed this project onto 2 computers (XP on a local workgroup, no firewall, see each other).
3.  On one of the computers I bound all shared variables to their counterparts on the other computer
The system is "almost working"
The problems are:
- I initially used wrong type variables for few items. I then modified the variables in both VI's and Shared Variable libraries and repeated the Steps 1-3 above.
But the sysrtem has some sort of a buffer somwhere, because it keeps bringing the old types of shared variables back (when I monitor them using Shared Variable Monitor).
- When I do binding to source, the system shows wrong variable types (for example DBL instead of U8).
- It takes almost a second to write and read shared variable (my network is quite fast)
I saw that the Labview Example with Server and multiple Clients uses 2 sets of shared variable and they bind - separate sets (different names) fro client and server within the same project. Do I have to do this or is this done just to simplify bindinga nd future distribution?
Is there a buffer/setup/file that I need to clear to get rid of "old" shared variable assignements? (I tried undeploy/deploy - does not help...)
Thank you very much,
Gleb.

Hi Gleb,
It sounds like the shared variable is not getting completely undeployed from the shared variable engine.  I would recommend opening the shared variable manager and undeploying the library from there just to see that it is no longer in the engine.  Then, redeploy the library and rebind your variables to the host library that you have deployed.
It is not necessary to have different sets of variables for client and host.  The important part of the variable is what it is bound to, not necessarily what it is named.  So just undeploy your variable, double check the settings of the host variable, then redeploy using the variable manager and rebind your client variables. 
I hope this helps,
Brian Coalson
Software Engineer
National Instruments

Similar Messages

  • How you connect a shared variable between internet?

    Hello;
    I have a aplicarían which use the shared variables, and other one which is the slave. both work rightly, in a local lan, but now I need connect the slave aplication between Internet.
    what is the procedure?????
    thanks in advance

    Hola Joju,
    La tecnología de variables compartidas sólo es válida dentro de una red local. Si necesitas acceder a una variable desde Internet, tendrías que hacer uso de DataSocket y de servidores DNS.
    Servidores DNS para que tu PC tenga asociado un dominio en Internet y, de esta forma, se pueda acceder a él a través de su nombre. El problema es que tendrías que dar de alta dicho dominio. Después, seguir las instrucciones de este link, cambiando direcciones IP por nombres de equipo:
    How to Use Shared Variables and DataSockets to Pass Data Between Two Networked PCs
    Esto no es trivial y dependiendo de la configuración de la red del operador, es posible que haya problemas. Para comunicación a través de la red, siempre es más recomendable utilizar funciones básicas de TCP/IP o servicios web.
    Un saludo,

  • How do I setup shared variables between executables created in sepparate projects

    Hello,
    I have several sepparate projects with their own respective executable files and I would like to be able for these executable files to all share the same variable (one program controls the value of the variable, while the others read from it).
    I got this setup to work on my personal computer (by being able to access variable manager, etc), but I need to deploy these executables on different computers that don't have the labview development program. What steps do I need to do in order for me to be able to put these executables on any computer (I'm assuming I need to setup a path for the shared variable that is always in the same folder, etc)
    Thanks
    Vlad
    Solved!
    Go to Solution.

    Hi Vlad,
    I think this article may answer some of your questions regarding shared variables in deployed applications.
    http://zone.ni.com/devzone/cda/tut/p/id/9900
    It sounds like you already have your executables built, but this article may answer some questions about deploying them to other machines.
    http://zone.ni.com/devzone/cda/tut/p/id/3303
    Jeff S.
    National Instruments

  • Strange classpath problem sharing jars betweens webapps

    I'm using tomcat 4.1.31 and I have 2 web applications using struts.
    The first thing I see is strange is that if I put struts.jar in the tomcat/shared/lib directory when I load the application it sais it cannot instantiate the objects that inherit from the struts' classes. So I put struts.jar inside each application /WEB-INF/lib direcotry and it works.
    The same happens with one jar i want to share between applications. Since it depends on struts.jar I cannot put it in the shared/lib dir. I have to put it in every application's lib. But I get class cast exceptions when I go to one app after I've been browsing the other since the shared classes were loaded with different classloaders and they are not the same class as expected.
    Is this related to the webapps not being deployed as war files but copied uncompressed to the tomcat/webapps dir.?
    If I load all the classes in the tomcat classpath everyhing works perfectly.

    I suspect some other problem.
    NT allows variable values up to 1200 characters. There are no size limits on the env space (of course excluding actual memory.)
    And what you printed included 'windows' which was not in your string to start with.
    How are you adding to the var?
    And how are you printing it out?

  • Problems Sharing Files Between iMac's

    I've created a network between my to iMac's, and I'm using one of them as a server-
    I've created a folder, inside "Public" folder and I've turn "File Sharing" on and done all that it said.
    Selected the folder, and everything.
    When I go to my other iMac, I connect to the network with no problem, I see the folder but can modify anything from the iMac that is NOT the "Server".
    I've check everything about the "read & write" at the bottom of the folder, and still doesn't work.
    Can anybody help me ? I really need this working ASAP.
    Thanks to all, and happy new year !!!
    Esmeralda
    PS: It's better if I buy a external drive and use it attached to one of the iMac's ? Thanks.

    If I understand this correctly. You are using file sharing to do this. And going to connect to server to get access. In file sharing while connected to your home computer they only have read only access. They can drag you apps. to their desktop and copy or modify it, but not on your computer. They can listen to your music . whatch your videos read your mail and use your printer or dvd drive. If you give permission to all. In file sharing there is an xgrid check off which allows users to work together on apps. If you check the xgrid and then the ? in file sharing it tells how to do this.

  • Problems sharing music between libraries

    I'm having trouble sharing music from my computer to my wives computer on the same network different apple id's. This was never a problem in the past. has there been any changes to prevent this?

    Whilst you can share the content between two different libraries using a different Apple ID for the iTunes login, they both need to use the same Apple ID for homesharing (iTunes > file > homesharing)

  • Problem: Sharing session between two different Web browser & Web Appn'

    I�m facing a strange scenario here and would appreciate any inputs which could resolve this issue.
    I have two webapplications (EAR�s) on two different machine and different WebSphere application server. I have �WebAppA� [on machine A, WAS A] which opens in parent window and expects to pass some info in the FORM submission with request parameter to �WebAppB� [on machine B, WAS B] which opens in a child window browser on clicking submit button from �WebAppA�.
    Now the WebAppA is required to wait till the response come from WebAppB after certain functionality and once the function of retrieval is over by WebAppB, it sent back the response data back to WebAppA FORM, which finally submits this form after getting the response data from WebAppB. Now the response to WebAppA [which is in machine A, WAS A] from WebAppB is a pure POST request on complete URL and set of request parameters with values.
    Now what is happening is that, when a User A fills the form on WebAppA and submits the data to WebAppB, on response it gets the data of some other User request, for example day of UserB or UserC.
    Now when I do the test on my development environment, where its just me or some other 2-3 users accessing it I don�t face any problem. I get the response for the request I have submitted�.PERFECT. On production I have issue where users are getting data as response of other users.
    I suspect since the response is submitted to the form page of WebAppA its unable to synchronize to which user it belongs to. May be that�s the reason when I test it on development with single or 2-3 users its behaving fine. I hope I could put my question properly to you. I don�t know what can resolve this or what is the actual cause? Is there a proper way to implement this? Please any suggestion or inputs are appreciated.

    Thanks Amittev,
    That's the problem for me. Actually this is a part of integration with third party application (which is loaded in child window - WebAppB). So as per the functionality there is no reference or trace of the user in the parent window at first instance. Anyone can come to parent window and initiatate a process. Its only when the data comes back from child window (which is the WebAppB), that parent window application (WebAppA) take the response and proceed further. Now here is what I'm facing problem. the user who initiated the process by clicking on the submit buttom of Parent window is not getting his response, but of some other user. This is not happening with every user and at all time. But were sparingly and rarely, but enough to bring headache to our department now.
    Now I suspect that, since there is a parent/child browser functionality here the session which is started by parent is not synced with child where the WebAppB is loaded and responds the response to WebAppA. The WebAppB makes a POST request submission to the WebAppA thru the child window and the session here is missing synchronization, I believe. I will appreciate some inputs and resolution to this problem. Thanks.

  • Problems sharing libraries between a Mac, and a Windows.

    Ok.
    So ive been doing a fair amount of research on the subject.
    Havent found much, so i decided to come here to see if any of you guys might help.
    Anyways, the i want to share my libraries over the network. So, the 2 computers are both connected, they see eachother, the libraries show up, but when played, everything is skippy, and cuts in and out.
    I checked everything.
    The connection is fine as far as i can see.
    I have a linksys WRT300N router, and i even upgraded the firmware on it.
    So, is there any sort of fix for this sort of problem?

    no help?

  • Sharing variables between 2 custom components. Please help.

    Hi,
    I'm a beginner in java and I have a problem. I'm using Netbeans 5.5.1
    I need to use 2 classes, defined in 2 separate files, in a third, main class.
    Actually I copy/paste the 2 classes (are made as swing jpanels with controls, textboxes, combos, etc) in the main class, so in the main class they appear as components.
    what I need is to read a combo box from first component every time when it is updated and use it in second component , when a buton from second component is pushed.
    I don't know haw could this be done.
    Thanks,
    Dan

    http://en.wikipedia.org/wiki/Model-view-controller
    What you need is a controller. Let your gui classes do nothing but interact with the user and tell the controller class when they do something (like push the button on the second component). Then the controller gives the guis their updated data to display.

  • Sharing variables between apps

    hello,
    i have 2 apps with one being a background tool for the main app. is it possible to pass along variables from the background app to the main app? maybe some kind of global variable? i'm thinking also distributed objects might be the way to go but i have never done this before so i thought i'd ask for some input. thank you very much,
    rick

    rick722 wrote:
    thank you both for the replies and glad to hear there's options. to be a bit more specific both apps are mine so i don't really need to pass info to other apps. and yes it's just for mac os x. basically the small background app is monitoring a directory for changes. when a change occurs it does some basic processing to see what the changes were and then if necessary it will launch/activate my main app and hopefully provide info regarding the changes.
    Before you get too deep into it, have you looked at FSevents? fseventer is a good example.
    in this case it's really just the filenames i'm interested in so passing along an array of filenames would probably do the trick. and it would generally be a small array maybe 10 to 15 objects on average. i don't believe i will need communication back to my background app it would be one-directional.
    Are you sure you need a background app? You can write an app the stays hidden until you need it.
    As far as communication goes, you have lots of options. You could use something like a unix domain socket and just use standard file I/o. A pipe or named pipe would be very similar. Your background app could be a pure POSIX app. If your background app includes Cocoa, you could use NSDistributedNotification.
    as an example the kind of behavior i'm looking for is like when you drop files onto the dock icon of apps that have an application:openfiles: method and the app will receive an array of filenames. except in this case i want to pass the array from my background app. thank you both for the help.
    Another option is to just have your GUI app handle the open file AppleEvent (a standard document-based app) and the background app could send open file events to the GUI.
    Finally, someone else mentioned using launchd.

  • Problem sharing media between multiple users on same Mac

    My wife and I have an eMac, running Mac OS 10.4.11, with iTunes 9.2.1(4).  We each have separate user accounts.  Previously, I had imported several albums into my iTunes library.  Now, my goal is to be able to share the albums that I had imported with my wife.  Simultaneously, our available hard drive capacity is getting limited, so I decided to put my iTunes media on an external fire wire drive by Iomega.  I followed article HT1449, transferring my media (and, not the other associated library files) and that part, at least, seems to be working fine.  The folder "iTunes media" is now located on a partition of the external drive.  As far as I can tell, both my wife and I have "read and write" permissions for this partition.  Ownership of the partition volume is "ignored".
    Now, as for setting up my wife's iTunes library and linking it up to the iTunes media folder on the external drive, I have followed HT1203 as a guide, changing the path of the media folder to the partition on the external drive.  But, it simply doesn't seem to have any effect.  There are no songs available within iTunes from her user account.
    I would appreciate any guidance on how to resolve this.  Thank you.

    AndyMcKay wrote:
    Chris, won't this copy the music contained in the external media folder, to the media folder under his wife's account?
    They are both using the same media folder so iTunes won't copy it anywhere.

  • Sharing variables between classes

    Hi,
    I wrote a class to handle button functionality. I want the
    onPress event in this class to play a movieclip that is sitting in
    my .fla file, also access some boolean values in the .fla.
    What's the best way to implement this?

    Best practice is to avoid directly accessing non-static final fields of other classes - they should generally by private or if necessary protected.
    get/set methods are the usual way to do this. You can use public static final fields without having a getter.
    Static in the context of field definition identifies fields which exist at the class scope (1 copy per class) versus those (non-static) which exist at the instance scope (1 copy per instance of the class).
    If the value you want to share instance-speciifc, use a non-static field backed up by non-static get/set methods. If you want one copy per process, static fields with static get/set methods are best.
    Chuck

  • Communicating Between Multiple LabVIEW Executables on different computer using Shared Variables

    hi,
    I need to develop some executables which will be launched on different computer of a LAN. Some DATA are common. I need to share the data using shared variables.
    I usually used LabVIEW so I 'm familiar with shared variables but in this case, the RT target is a part of my
    project.
    I do I need to procceed in my case?
    thanks

    Ok but it's not my configuration and I haven't found my answer in the tutorial.
    You speak of a case where there is a computer and a RT target under the same LabView project. As I said earlier, I often use labview RT and shared variable between computer and RT target. But I assume here it's different.
    My question is : how do you acces to the SVE from 3 computers (without any RT target)? 
    1. If I create 3 labview projects using the same Shared Variable, do I need to use the same .lvlib on each project?
    2. Is it possible? 
    3. How can I configure where the SVE should be? When I use a RT target, It only depends where I put my Lvlib. But here there is 3 projects. 
    James
    Attachments:
    Sans titre.JPG ‏9 KB

  • Peculiar behavior of Shared Variable RT FIFO

    I'm trying to "leverage" the enhanced TCP/IP and Shared Variable properties of LabView 8.5.  My application involves (among other things) doing continuous sampling (16 channels, 1KHz/channel) using 6-year-old PXIs (Pentium III) and streaming data to the host.  I developed a small test routine that was more than capable of handling this data rate, even when I had the host put a 20msec wait between attending to the PXI (to simulate other processing on the host).  To do this, I enabled the "RT FIFO" property of the Shared Variable (which was an array of 16 I16 integers) and specified a buffer size of 50 (that's 50 arrays).  Key to making this work was figuring out the "error codes" associated with the SV RT FIFO, particularly the one that says the FIFO is empty (so don't save the "non-data" that is present).
    Flush with success, I started developing a more realistic routine that involves rather more traffic between Host and Remote, including the passing back and forth of "event" data.  These include, among other things, "state variables" to enable both host and remote to run state machines that stay "in sync"; in addition, the PXI also acquires digital data (button pushes, etc.) which are other "events" to be sent to the Host and streamed to disk.  I developed the dual state-machine model without including the "analog data" machine, just to get the design of the Host/Remote system down and deal with exchanging digital data through other Shared Variables.  Along the way, I decided to make these also use an RT FIFO, as I didn't want to "miss" any data.  One problem I had noticed when using Shared Variables is the difficulty of telling "is this new?", i.e. is the variable present one that has been already read (and processed) or something that needs processing.  I ended up adopting something of a kludge for the events by including an incrementing "event ID" that could be tested to see if it was "new".
    Today, I put the two routines together by adding the "generate 16-channels of integer data at 1 KHz and send it to the Host via the Shared Variable" code to my existing Host/Remote state machine.  I used exactly the same logic I'd previously employed to monitor the RT FIFO associated with this Shared Variable (basically, the Host reads the SV, then looks at the error code -- a value of -2220 means "Shared Variable FIFO Read Buffer Empty", so the value you just read is an "old" value, so throw it away).  Very sad -- my code threw EVERYTHING away!  No matter how slowly the Host ran, the indicator always said that the Shared Variable FIFO Read Buffer was empty!  This wasn't true -- if I ignored the flag, and saved anyway, I saw reasonable-looking data (I was generating a sinusoid, and I saw numbers going up and down).  The trouble was that I read many more points than were actually generated, since I read the same values multiple times!
    Looking at the code, the error line coming into the Shared Variable (before it was read) was -2220, and it remained so after it was read.  How could this be?  One possibility is that my other Shared Variables were mucking up the error line, but I would have thought that the SV Engine handling reading my "analog data" SV would have set the error line appropriately for my variable.  On a hunch, I turned of the RT FIFO on the two Event shared variables, and wouldn't you know, this more-or-less fixed it!
    But why?  What is the point of having a shared variable "attached" to an error line and having it return "Shared Variable FIFO Read Buffer Empty" if it doesn't apply to its own Read Buffer?  This seems to me to be a very serious bug that renders this extremely useful feature almost worthless (certainly mega-frustrating).  The beauty of the new Shared Variable structure and the new code in Version 8.5 is that it does seem to allow better and faster communication in real-time using TCP/IP, so we can devote the PXI to "real-time" chores (data acquisition, perhaps stimulus generation) and let the PC handle data streaming, displays, controls, etc.
    Has anyone been successful in developing a data-streaming application using shared variables between a PXI and and PC, particularly one with multiple real-time streams (such as mine, where I have an analog stream from the PXI at 16 * 1KHz, a digital stream from the PXI at irregular intervalus, but possibly up to 300 Hz, and "control" information going between PC and PXI to keep them in step)?  Note that I'm attempting to "modernize" some Version 7 code that (in the absence of a good communication mechanism) is something of a nightmare, with data being kept in PXI memory, written on occasion to the PXI hard drive (!), and then eventually being written up to the PC; in addition, because the data "stayed" on the PXI, we split the signal and ran a second A/D board in the PC just so we could "see" the signal and create a display.  How much better to get the PXI to send the data to the PC, which can sock it away and take samples from the data stream to display as they fly by on their way to the hard drive!
    But I need to get Shared Variables (or something similar) working more "understandably" first ...
    Bob Schor

    Bob,
    The error lines passed into and out of functions are just just clusters with a status boolean, an error code, and an error string, and are not "attached" to a particular function as you describe in your post.  Most functions have an error in input and an error out output, and most functions will simply do nothing except pass through the error cluster if the error in status is True (to verify this for yourself, double click on a function such as a DAQmx Read or Write and look at the block diagram.  If there is an error passed in, no read/write occurs).  This helps prevent unwanted code from  executing when an error does arise in your program.  By wiring the error cluster from your other shared variables to your analog data variable, you're essentially telling LabVIEW that these functions are related and that your analog data variable depends requires that the other shared variables are functioning properly.  The error wire is a great way to enforce the flow of your program, but you must always consider how it will affect other functions if an error does arise.
    Anyways, it's great that you have things more or less working at the moment.  Keep us all updated!

  • Shared Variable Engine on Windows PC w/o full install of LabVIEW

    I have the NI Developer Suite (8.20) and need some conformation before I get too deep in a project. 
    First of all, it is my desire to become very efficient on develop compiled executables with LabVIEW 8.20 as my NI Developer Suite license allows me to deploy these programs to any number of machines without facing copyright infringement.  I have been successful with this to a certain degree, but am still having problems in the testing stages of my application especially in cases where the hardware I am trying to target does not exist on my developing station.  If anyone can point me to white papers that would help me get the mindset to develop in this way, I would appreciate it.
    Onto the topic of this post:
    I am just scratching the surface of the shared variable interface that is available in LabVIEW 8.2.  My project involves two computers where both of them need to share variables back and forth from each other.  I've been reading everything I can get my hands on and I am having a hard time answering my unlying question: Is it possible for both of these machines to be running compiled LabVIEW programs and still manage the shared variables between them?  That is to say, can one of the machines have the Shared Variable Engine running on it as a Windows service, or compiled into my application executable.
    I've read that I can access shared variables from my compiled LabVIEW application through NI-PSP.  I am wondering what my limitations would be sans-LabVIEW installation other then the troubleshooting head ache you get from developing applications without direct access to the hardware.
    Thank you for your time and submissions.
    -Nickerbocker

    I am trying to get the "Shared Variable Client - Server" project example compiled so that both the server and client vi's can be run as executables on a standalone machine.
    I have created 3 build specifications:
    1. "My Server" which is the compiled EXE of the server.lvib.  Added that entire library to the source.
    2. "My Client" which is the compiled EXE of the client.lvib.  Added that entire library to the source.
    3. "My Installer" which is the installation package of the vi's and NI supporting software.  In the additional installers I have added:
     * NI DataSocket
     * NI LabVIEW Run-Time Engine 8.2
     * NI Measurement & Automation Explorer 4.1
     * NI Variable Engine
     * NI Variable Manager
     * NI-DAQmx 8.3
    Some of those are added for future needs.  Installed the package on my target machine and run the server executable it appears to run fine but I get various error messages from my client.exe package (which I won't go into detail here, yet).  Upon stopping the server I get the message "LabVIEW: (Hex 0x8BBB0005) Unable to locate variable in he Shared Variable Engine.  Deployment of this variable may have failed."
    I check the services running and see that the "National Instruments PSP Server Locator" and the "National Instruments Variable Engine" are both in the list and "Started."  I open up the Variable Manager that has been installed on my target machine and manually add the "waveform" and the "command" variables under a process I call "server" and start the process.  After that I start my server.exe that I have compiled from the server.lvib library.  The process gives no error messages until the stop button is pressed, and then I receive the message "LabVIEW: (Hex 0x8BBB0011) The connection to the server was disconnected."
    The compiled programs run fine on my development machine as well as the uncompiled VIs within the LabVIEW development enviornment.  Something tells me that I simply do not have the Variable engine properly configured on my target machine.  Also, the process and variables should automatically be populated under "Local System" in the Variable Manager, right?  I do not need to add them manually, or do I?
    Thanks for your input!
    -Nickerbocker

Maybe you are looking for

  • HDMI to VGA no audio

    As soon as I plug in my HDMI to VGA converter I now lose audio from the computer / video. It was working fine last night so I am not sure what changed.  Haven't done anything affecting audio settings. I'm running Windows 8.1 and I've installed all up

  • Constant flashing blue screen during operation?

    I keep having the screen turn blue and then suddenly go back to normal. It's a quick flash, totally random, repetitive during operation, no noises, and nothing else is interrupted. It does not restart, log off, or try to. Is it about to die?

  • My website navigation bar falls behind the flash content

    Hello All, i have the website, http://www.retailtechnologyexperts.com and am using safari 4 and to be precise..it is safari 4(530.17) i have made almost all the changes,,but the navigation bar falls behind the flash content on the homepage..i have ch

  • Speech transcription, metadata, and a massive amount of footage (CS5)

    I've been charged with developing a workflow and working environment that will capture, process, preserve and output the content of over 450 BetaSP tapes. The footage was and continues to be shot for a national documentary project that is still rolli

  • Messages taking 2 hours to process .

    Hi our system is getting very slow with below warning every second The adapter failed to transmit message going to send port "SendPort" with URL  "". It will be retransmitted after the retry interval specified for this Send Port. Details:"System.Tran