Binding shared variable in executable across network

I can't seem to get a shared variable to bind from an executable on another computer back to a source variable on the main machine.
I can get the remote variable to change with programmatic access.  Is it possible to have shared variables in an executable bind to a PSP URL on another computer?  This is labview 2011.
I can see everything with NI Distributed System Manager, and the programmatic access changes the remote variable, so it's not a network issue.
Thanks for any insights.  This just doesn't seem to work the way NI's online white papers say it shoud.

What I don't understand is why after binding to a specific URL, the "Shared Variable Deployment" screen of the application builder makes the target "my computer". 
I probably could get this to work if I changed the network address of "my computer" in the ini file created in Application Builder?
This seem a strange way for this binding process to work.  If the absolute target (for shared variable bound to another variable and referencing "absolute") was retained when the VI goes through the application builder, it would make for sense.
I can't get this to work any way with using bound variables.  The only way this works is using programmatic access to shared variables in the built app, and I don't consider this the same thing.
My conclusion is that shared variable binding and appropriate absolute references to deployed variable libraries do not survive passing through the application builder with their absolute references intact.

Similar Messages

  • Do I have to Bind Shared Variables in Executables?

    I want to have shared variables work between two executables that will be installed on seperate machines.  I've managed to get the code working, but am not satisfied with the approach.
    Attached is a .zip file with my project files that contain what I've been able to get to work.
    What I don't like, is how I need to have double the amount of network variables.  Right now I have a program that is a publisher and another is a subscriber (based on an example provided on this forum at some point).  The Publisher has its own shared variables inside a library, and the subscriber has its own shared variables inside a different library.  The Subscriber's shared variables are "bound" to the Publisher's shared variables in the project file and is a concrete physical network path that cannot be changed.
    Once the executable is made and installed, this works.  I've tried getting it to work w/o one of the executables using a shared variable library that contain bound shared variables through a concrete physical network path but I obviously do not know what I am doing.  Ultimatly, I would like to have a single shared variable library that both the publisher and subscriber use.  I want the publisher executable to post the variables to the variable manager running on the publishers machine, and then have the subscriber program running on the subscriber's machine to consume the shared variables from the variable manager on the publisher's machine.
    Please help me!
    -Nic

    Hey Nic,
    I am going to try and answer those questions for you.
    If you use the DataSocket API to connect to a variable that resides on another machine, is your local machine's variable engine involved at all?
    No, it should not be involved at all.
    If the Variable Engine is not used locally, does it need to be included with your application installer?
    Yes, it is going to need to included with the installer.
    If I'm correct, whats better?  To use the variable engine locally, or to connect directly to a remote variable engine?
    Can you please give a little more information here?  I'm not quite sure if I understand your question.
    The default time-out on the DataSocket Read vi is 10 seconds.  If you are doing multiple DataSocket reads in the same polling loop, one variable may update but the other datasocket read is waiting for its timeout before allowing the loop to itterate.  This creates a really laggy scenario (see progmatic subscriber.vi in the attached .zip).  Setting the timeout to something low, say 10msecs, reduce the "lag" but...
    Having the ability to set a decent time-out is a really nice performance feature that isn't availabe to you when you Bind to a shared variable (I don't think).  It may make performance since to not do any loop iterations until the data from the host has changed.... how to manage this w/o seperating each read into its own loop however is my question.... ???
    Can you please explain this a little more as well?  If I understand you correctly, it sounds like you have many datasockets open in one while loop.  Are you using one datasocket per variable?
    Is there any unseen advantages with using the National Instrument's Shared Variable API over the DataSockets API?
    Shared variables are in general more easier to use, and provide a simple way to implement the idea of passing data between machines.  Obviously, using TCP, you can create more control using your own protocol to exchange information, but in general, Shared Variables are normally just easier to use.
    Feel free to post any questions or dicussion issues here.
    Regards,
    Kevin H
    National Instruments
    WSN/Wireless DAQ Product Support Engineer

  • Binding Shared Variable to Source

    Dear all,
    I'm currently working on a project that requires the use of shared variables. The shared variables will be network published and programmatically created using properties nodes. However I encounter one error and one problem in the process of doing so.
    1) I programmatically bind the shared variable directly to the fieldpoint channel (data item) by writing the URL \\10.0.0.1\FP\1AIO\00 when i create the shared variable. The shared variable can be created successfully but when i deploy it, it generates an error which seems to tell me "it is out of range". Can anyone help me to rectify this problem?
    2) The 2nd question will be, as my fieldpoint is connected to a DHCP server. At the start when i create the shared variable programmatically, i could bind the shared variable directly to the data item by writing the URL to its property. However, during the process of deployment, the dynamic IP address assigned to my fieldpoint may change . How can I ensure that the shared variable continue to bind to the right fieldpoint channels respectively? even though the IP address changes?
    - Or is there any method that I could view all the network data items in a table? a list? or an array? so that I can link them to the URL.
    I tried using the data socket URL.vi, I can only select the data item one by one.. this will be tedious for 100 or 200 I/O points..
    Will greatly appreciate for any advice and help. Thanks in advance.

    Try this.
    Give your fieldpoint controller a computer name through MAX.  Then instead of referencing it by 10.0.0.1 in the URL's of the shared variables reference it by computer name.  So  \\MyFPmachine\FP\1AIO\00 instead of  \\10.0.0.1\FP\1AIO\00.
    Dynamic IP's can definitely cause headaches, and it would be best to use static IP's if possible, but doing this method should help.  It seemed to work for me.  I found when you browse for the channel in LV, it wants to give it the IP address by default, but it was possible to edit the string and paste in the computer name.
    Message Edited by Ravens Fan on 01-10-2007 11:01 AM

  • Bind shared variable to multi-chan​nel item

    How do i bind a shared variable (array) to a Fieldpoint multi-channel item?
    When i configure the shared variable, and click browse to select the network item to bind to, i can select individual channels but there's no "All" tag.

    Actually I suspect that the problem is in the National Instruments OPC Server.
    DataSocket can read array data types from an OPC Server, but National Instruments' OPC Servers do not publish data in an array format.
    Probably the easiest solution is to publish your shared variable in your network but don’t bind it trough the opc server, instead you have to use it like a standard global variable (bind to source method).
    Give a look to this document may lead you to a better solution.
    http://digital.ni.com/public.nsf/websearch/FA61036​7EC62574186257118005089F2?OpenDocument
    Hope these two tips can help you
    FiloP
    It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong.
    Richard P. Feynman

  • 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

  • Programmatically bind shared variable

    Hi,
    I'm trying to bind a control to a shared variable, if I clic on properties=>Data Binding, everything is set up correctly, but I get a red flag. Then if I add a white space after the variable path then clic OK. everything is fine and working properly.
    My problem is I have to bind hundreds of shared variables so I don't want to modify every single control properties...
    Anyone has any clue on what's happening?
    Rodéric L
    Certified LabVIEW Architect
    Attachments:
    properties.JPG ‏34 KB
    method.JPG ‏18 KB

    Looking at some similar code that I had developed to set FP bindings, I included single quotes in the url, for example:
    \\My Computer\IO\'PU.Heater_Power'
    Maybe the space is satisfying the need for a delimiter of some sort?

  • Problems with communication across a network using shared variables

    I have two programs(projects) running on two different computers connected with a LAN. I am using LabVIEW 8.0, and the DSC-module. The program on one of the computers have measurements that I want to collect and show on the program running on the other computer on the network. I choose the indicator where I want to show the data, select ''Properties'', ''Data binding'', ''Shared Variable Engine (NI-PSP)'', ''Network Items'' and then browse for a Network...but the problem is that in my ''Network Neighborhood'' There is only one computer...and that is the one I am one...not the computer on my Network that I want to communicate with....
    Have anyone any suggestions on how to solve this?
    Kind regards Mari

    Mari,
    Check this link regarding trouble shooting network-published shared variables:
    http://digital.ni.com/public.nsf/websearch/6E37AC5435E44F9F862570D2005FEF25?OpenDocument
    This might be a firewall issue, so I would check that first.
    Frode

  • Shared Variable Initializa​tion

    For whatever reason if I use shared network variables over the network they take 20 seconds each to initialize... after all of them initialize they are very fast.  Does anyone know why it would take exactly 20 seconds for this to occur?  If i look at the variables in variable manager i can see the update values and they are exactly 20 seconds apart.  This occurs weather i'm using a library with 20 variables or one with only 1 variable. 

    Hi Tak321,
    You can change the gateway address in the network properties on Windows (if that is the operating system you are using), however, doing so could disrupt your communications to your building network.  It does sound like it is possible that the shared variables are routing through the other network.  You could try disabling that network adapter to be sure.  It is also possible to bind shared variables to a specific network card: http://digital.ni.com/public.nsf/allkb/D358BABAE2F​61F1A862571570056867D?OpenDocument
    Regards,
    Jeremy_B
    Applications Engineer
    National Instruments

  • Network shared variables lose binding

    Hello,
    I am developing an application in LabVIEW that uses network shared variables to transmit data between two PC's on the same subnet. The shared variables work fine when running the VI's in development mode, however, when i build the vi's into an executable I find that they no longer work. Here is what I have found so far:
    I deploy the shared variable library on the publisher machine (also happens to be the development machine) through an invoke node in the executable. NI distributed system manager confirms that this does deploy and indeed updates as it should.
    For the executable on the subscriber PC I created a second shared variable library (same project) with the same shared variables and bound them to the respective shared variables from the first library by selecting enable aliasing, then bind to PSP URL and browsing to the shared variable I wish to bind it to (e.g. \\hallnet-ellm2\shared variable library\serial Number). The machines listed under browse were listed by name so when I tried this initially and it did not work I manually changed the name of my machine in the URL box to the IP address of the publisher hoping that would fix it in case the subscriber could not resolve the publishers machine alias. So now my bind URL read \\192.168.0.1\shared variable library\serial Number.
    As part of the executable on the subscriber I deploy this second shared variable library. NI distributed system manager confirms that this deploys but under quality for an individual variable it has a list of issues (see attached) and the bound variable is not updating. At this point the publisher shared variables are still functioning fine. By clicking on 'edit variable' I can see that the variable on the subscriber is still bound but the PSP URL is now \\localhost\shared variable library\serial number. Changing the PSP URL on the subscriber to \\192.168.0.1\shared variable library\serial number enables the variable to update as expected.However by this time my executable has already picked up the error and does not function.
    I think that the issue lies with the bind URL used on the subscriber as for some reason it does not keep the binding configured in the project and instead changes to 'localhost'. Why is this? Should it not stay bound to the address specified in the project?
    I have tried changing the IP addresses in the aliases file so that
    [My Computer]
    My Computer=localhost 
    becomes
    [My Computer]
    My Computer=ip of local machine
    This did not help.
    The shared variable libraries are included in the build spec to go into the support files directory and they are successfully deployed from there on both publisher and subscriber.
    I am using LabVIEW 8.6 on Windows XP
    Thanks for any help you may be able to offer,
    Lee
    Attachments:
    distributed system manager.JPG ‏74 KB

    Hi Lee,
    I hope you are well.  Thank you for your post.  Your application sounds very interesting.
    Looking at your issue I was wondering, have you tried lowering your firewalls, as this may be causing the problem.
    Also, another option would be to setup a private network.  Do you have access to any routers that you could use to link the two machines independent of your IT's infrastructure?
    The other thing to try is two other computers entirely.  Again, it would be ideal to take them off the network you are on, but it's something to try if my prior suggestion doesn't work.  It should work on the original two machines though, and it's likely that different computers won't solve your problems because I suspect the network.
    Remember that the client variables must know the location of the variables on the server, so you can't move the server exe around without changing this value.
    Make sure to set the network location in the "Bind to Source" option for the client variables.
    It is also possible to write a separate piece of code to install on every machine that is responsible for deploying the library and by doing so eliminate the need for programmatically deploying the variables in the original application.  However, this won't really help you, because the variables you use in the application have to be the same as the ones deployed in the library, so if you change the library, they'll no longer be linked and they won't receive data.  You'd have to create a separate exe for every binding source you wanted to link to, and then have a second, known library for the sake of communication locally on the computer between the ‘deployer’ and the actual application.  The main application could then be assigned the responsibility of launching the correct ‘deployer’' if it sees it needs to switch to a different variable binding source.  This method is not the most streamlined or effective, but it might work.
    Just to let you know, you will need to use the DSC toolkit.
    Please find below some knowledge base links that I think you will find helpful in your application.
    Using Shared Variables in Executables
    How do I Programmatically Change the Data Binding Source for Shared Variables?
    I hope this information helps and if you can give these suggestions a go and let me know how you get on, that would be great.
    Kind regards,
    Prashant M
    Applications Engineer
    NI UK & Ireland

  • Modbus ip shared variable network failure

    I am using lab view 8.6 DSC module to communicate to a watlow system which contains five watlow 96 controllers and an EM gateway.  I have created shared variables for the process temperatures and setpoints for each of the five controllers using watlow modbus register Numbers with a 400001 offset.  I have also created shared variables for Updating,CommFail,UpdateNow,and UpdateRate which where predefined. I have error when starting the VI if the SV  has been  dragged and dropped into the block diagram. The message is  Error -1967353902 (The Modbus I/O server failed to receive any response from the Modbus slave device.) occurred at SV in vi. If I bind a variable in the VI to this same SV the error does not occur but the variable cycles between Good, Network Failure, No known value, and device failure as stated in the variable manager watched variables.  The Updating, CommFail and UpdateRate all have a consistent Good in the quality column of the variable manager.  UpdateNow has X in value, type, timestamp, and quality columns.  CommFail and Updating does cycle between true and false randomly.  I have tried a third party software called SpecView 32 demo to see if the commincation with the modbus system is not working and I can create five watlow controlers on my screen and direct them to the ip address along with a unit address and the system works without faults.  This leads me to believe the commincation bewteen the SV Engine and the IP address is not correct.  HELP Please. 
    Robert Jensen
    UND EERC

    If your application can deal with it I would recommend staying clear of the 'Networked Published' option.
    When I started my Modbus development on cRIO....I left it enabled, and with ~100 shared variables on a 9074, the CPU was railing, and I saw a buffering behavior on the shared variables (which was not desirable in my application).
    In my application I am using the old modbus library (as apposed to the new API) for cRIO to slave comms, the cRIO being the master.
    I am also using the IOserver making the cRIO a slave to an external SCADA - and it passes essentially the same data arrays as I use on the modbus library for my local HMI [Not an NI product].....Which is two full Modbus frame writes (@ 120 words each, and about 60 words more for ~300 words outbound from the cRIO).
    The IOserver slave was a recent addition and did not add much to the CPU load - although only 16 bytes is high speed, the balance of the total word package is at either 1 second or 3 seconds.
    So, in my experince, the 'Networked Published' option adds significant CPU loading (on entery level cRIOs) YMMV.
    I am huge fan of the shared variable engine (some at NI were pusing the CVT, and TCE etc...). However most of my shared variables are not the Networked Published variety (excepting local module channels) those have remained networked published for DSM (Distributed System Manager) use.

  • Network-Published Shared variable access

    How can I deny the writing access to a network-published shared variable from all the network machines, except the machine where the vaiable was deploied??

    Hi Idilio,
    Which version of LabVIEW do you use? Do you use DSC? Where precisely do you specify your security options?
    Cordially,
    .mrLeft{float:left} .mrInfo{border-left:solid 1px #989898;font-size:x-small;color:#989898}
    Mathieu R.  
      CTD - Certified TestStand Developer / Développeur TestStand Certifié  
      CLAD - Certified LabVIEW Associate Developer  

  • CFP-1808 shared variables timestamp

    Hi,
    I need to control and acquire data from a cFP Ethernet module (cFP-1808) to a PXI RT system. I have tested two ways of doing it:
    1. Bind shared variables to the Fieldpoint channels. Works great except for the fact that I have to record the timestamp of every single channel in all Fieldpoint modules. I have to avoid this. The reason I have to record all timestamps is that sometimes two consecutive reads are the same in value and in timestamp; so even if I make sure I get a value every 100ms in my real time application I cannot trust  that  the shared variable engine will give a real new value every 100ms, because sometimes one read is the same as the previous one. My
    understanding of the technology is that the cFP network interface checks for an
    updated value of the channels of each module at the Advise Rate. If there’s a
    new value the cFP transmits it to the Shared Variable Engine running in the PXI
    controller, but if the value has not changed it doesn’t transmit anything, so
    more efficiency is achieved in the network communication. This would explain the
    timestamp behavior of the shared variables bound directly to Fieldpoint
    channels; since there is no new value the shared variable is not updated so the
    timestamp of two consecutive reads is the same.
    2.  Create a Modbus server and then create shared variables bound to the Modbus server channels. With this method any time my RT application asks for a new value the shared variable engine provides a real new value with an updated timestamp, and all timestamps in the same module are equivalent (in 1usec range).  Therefore, it looks like using the Modbus solution I  only have to record one timestamp per module.
    So option 2 probably fixes my problem, but I'd like to understand why. Both methods use the shared variable engine, shouldn't they behave the same way? There's one downside in option 2, which is having to deal with Modbus addresses and not having the ease of use of option 1 that just browses to find the Fieldpoint channel.
    Any comments?
    A final note, it'd be great to be able to use the Fieldpoint VIs in LV Real-Time! Can this be achieved?
    Raimon

    Hi Raimon,
    How are you binding to your shared variables?  This KB reviews three methods:
    http://digital.ni.com/public.nsf/allkb/FA610367EC62574186257118005089F2?OpenDocument
    I don't believe using FieldPoint VIs on a PXI RT target is possible because FieldPoint is not a driver that you are able to install on the PXI RT target.  We do have the cFP-2xxx line of RT controllers for FieldPoint, which can communicate directly to the FieldPoint modules, ensuring determinism.
    Trey B
    Applications Engineering
    National Instruments

  • The shared variable does not exist????

    This seems really strange!!
    I already use several shared variables within my whole project without any problem. At this point, I created a new one (a boolean network published) and everything seemed just fine (no errors were detected in my VI and it runs normally). However, when the VI on my host computer tries to use the shared variable, it generates an error message saying "LabVIEW:  (Hex 0x8BBB0005) The shared variable does not exist." (see attached screenshot).
    What is going on? I can't find any help online about that... Can anybody help me with this please?
    Thanks!

    Hello,
    This error can occur if you have an incorrect Path specified under your Bind to Source section for the shared variable - this could be as simple as a typographical error in the defined path.  Double-check that portion of your shared variable definition, and hopefully it'll be as simple as finding a typo in your path.  You should be able to browse for your variable/path by clicking Browse and then selecting Network Items if your shared variable is on the network.  Can you find it by browsing?
    I hope this helps!
    Best Regards,
    JLS
    Message Edited by JLS on 10-05-2006 03:54 PM
    Best,
    JLS
    Sixclear

  • Shared variable does not work between two computers

    I am using LabVIEW 8 on Windows XP computers.
    1. On one computer I have created two projects, writeProject and readProject.
    2.  In the writeProject I have a shared variable, writeData, which is "network-published" double. In this project I have a writeData.vi which in while loop assigns a random value to the writeData variable.
    3. In the readProject I have a shared variable, readData, which is "network-published" double and is bound to the writeData variable.  This is on the same computer as the writeProject.
    4. I run both the writeData.vi and the readData.vi and all works fine.
    5. Now, I create a readProject on a diferent computer.  Perform all the steps as described above and also in tools/shared variable/register computer, I have entered the IP address of the target computer on which the writeData shared variable exists.
    6. Binding the readData variable fails in the following way.  When I browse for the source, in the "Select Source Item" dialog, I see <IP> <Populating Node...>, where <IP> is the IP address of the source computer (on which exists the writeData shared variable).  A very long time later it is still "Populating Node...".  Neddless to say, this readData.vi does not work!
    What am I doing wrong?  Or, perhapse what else do I need to do to make it work?

    Hi,
    I would suggest checking out the two KnowledgeBases I have linked below for common issues with Network Shared Variables. Let me know the results. Thanks!
    Troubleshooting Network-Published Shared Variables
    Why Are My Network Shared Variables Taking Very Long to Initialize?
    Stephanie

  • Opc server into shared variable

    Hello,
    I am writing a program to read hundreds of OPC signal from a server. The server is a  localserver in the PC but its not a Labview server. My labview program reads the OPC signal thru data socket into a Labview Library.(Variable type=single process)
    This way is working but not optimal. I have read in Help that I can use a Network-published shared variables. Does this Network-published be able to read the signal from my opc server thru a network path without using data socket? Must it be a Labview server? 
    this is an example for my opc address
    opc://localhost/hteControl_OPC_DA_Server/PLC_FI010_ValueLimit_SP
    Thanks
    Solved!
    Go to Solution.

    fmpfmpf wrote:
    Hello,
    I am writing a program to read hundreds of OPC signal from a server. The server is a  localserver in the PC but its not a Labview server. My labview program reads the OPC signal thru data socket into a Labview Library.(Variable type=single process)
    This way is working but not optimal. I have read in Help that I can use a Network-published shared variables. Does this Network-published be able to read the signal from my opc server thru a network path without using data socket? Must it be a Labview server? 
    this is an example for my opc address
    opc://localhost/hteControl_OPC_DA_Server/PLC_FI010_ValueLimit_SP
    Thanks
    LV-DSC (Data Logging and Supervisory Control) aloows you to "bind" the NSV to an OPC server.
    As long as the server os OPC compliant it should work and has ben the case for me.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

Maybe you are looking for

  • Moving photos from one iPhoto library to another

    Is there a way to move photos from one iPhoto library to another? I tried to use export, and that puts the photos in the other iPhoto library (I can see the photo if I open Hard drive>user>pictures>iPhoto Library but when I open iPhoto it is not in t

  • Organizing in LR 3

    Over the years I have used LR and then drifted back to iPhoto and PSE, but now want to commit to LR 3.  I am combining several family members photos in one place. My stuff:  iMac 21.5 (3.06 Gh, ATI graphics), 4G mem., 1TB, backed up to 500G HD and Mo

  • Conversion from SQL7 stored procedure to PL/SQL

    Hi all, Anyone had any experience of converting stored procedure currently written in SQL7 to Oralce pl/sql? The stored procedures are being called by java servlets. I would appreciate any pointers or information on undocumented pitfalls in this proc

  • Add-on to capture videos from internet that don't have a download link.

    Is there an add-on to capture videos from internet that don't have a download link. I am on a Mac.

  • Insertion / Update of field of type "TIME" using Native SQL

    Hi ABAP gurus, We are trying to perform inserts and updates within an ORACLE table where a TIME field exists without suscess. We are trying to code it using Native SQL. EXEC SQL. INSERT INTO table (field1[name], field2[age], field3[birthday], field4[