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

Similar Messages

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

  • 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

  • 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

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

  • Shared variables problem

    I have 2 applications runnng in different PC connected to the same network
    Both applications are for testing purposes before going on with the real implementation. Written in LV 8.5 and based on Shared Variables.
    While everything is fine when those application run on the same PC (in effect, localsystem), nothing seems to work when each is active in the proper PC.
    Shared variables seem not to be seen from outside the PCs.
    This happens also when I use Variable manager on both machines: I create a variable on PC1, defining it as published. Then I create another variable on the other machine (PC2) and try to bind it to the variable deifned in the PC1. Pressing the Browse button the list of PCs networked to mine appears. Selecting th eone I need (PC1), Variable Manager tries to populate the tree but hangs up. Or, better said, simply does not populate the tree. The ariable Manager still works but the item son the other PC are not seen.
    Any suggestion?
    Regards
    Walter

    Hi there,
    I'm having a very similar issue. My set up is 2 pc's on the same network, the "server" (date generated on this pc) running LV 8.0 ip#1,  the other is running LV 2010 and will only see the data, ip#2.
    I have set up two test network shared variables and configured them on the server machine Ip#1 to bind to ip#2.  When I run the vi's I see that the shared variables are deployed to the particular machine. 
    On ip#1 I included a test vi in the project to read data from the ip#1 shared variable, and I see no data.  I have other local shared variables working within ip#1, but the network shared variables cannot be read even within the same project. 
    Any ideas as to why I cannot read the networked shared variable within the same project on the same computer? 
    Also the link about multiple network-adaptors is dead.  I have seen strange issues when configuring the networkd shared variables if I have a VPN sessing going to an outside network on both computers, I will see both the windows computer name and the ip address. 
    Is there anyway to delete a computer after adding it as a shared variable potential source?
    Thanks for any help, there are a couple of questions here.
    Jim

  • 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

  • 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

  • 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

  • Shared variable, bind to source

    I have two projects, one on a computer the other on a FieldPoint. The computer is the client.
    If I bind a shared variable on the computer to a shared variable on the
    FieldPoint (Bind to source), what protocol does the communication use?
    NI-PSP?

    Hi,
    Every Shared Variable is transported via the NI-PSP protocol. The NI-PSP protocol is based on the UDP. More information about the NI-PSP you can find at http://zone.ni.com/devzone/cda/tut/p/id/4679.
    hth
    Joachim

  • 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

  • Shared variable engine network published source issue

    Hello,
    I am attempting to use the shared variable engine to share some simple stings over a network between a Windows 7 computer and a Windows XP computer. 
    I got through the shared variable example just fine and can share variables between VIs on a single computer. When I open the shared variable engine, it shows the client and server variables that are shared on the local computer. I then create a new process, and attempt to define a new variable, and the Shared Variable Property screen comes up. I attempt to "Bind to Source" and click browse, and see the computer name I am attempting to connect to. However, when I click it, it stalls and I cannot expand the computer to find the variable I am trying to bind to. What am I missing?
    Thanks, Arron

    Arron,
    This document may be useful in helping to setup your network shared variables. Take a look at this and see if you have followed all the outlined steps in setting up a network shared variable.
    http://zone.ni.com/devzone/cda/tut/p/id/4679
    Let me know how this works for you.
    -Nick-
    Nick C | Staff LabVIEW Platform Product Support Engineer | National Instruments

  • Error -1950679007 when I try to create shared variable binding automatically

    Hi All,
    I'm using LV 8.5 with DSC.
    My aim is build shared variable library automatically. A program read variable name, data type and network binding address from .CSV file. Program works well untill I add this "bind to source" property. I don't know what goes wrong. Does anyone else have found this same issue?  
    Picture about problem is in attachment.
    The error codes are found here:
    http://zone.ni.com/reference/en-XX/help/371361D-01/lverror/shared_variable_error_codes/ 
    Other useful information:
    http://digital.ni.com/public.nsf/websearch/2E8BAD0EA218A7558625712E0003F044?OpenDocument  
    Thanks,
    Attachments:
    error_19506790071.jpg ‏88 KB

    Hi,
     Now i able to attach the file, While creating Shared Variable,Enable the options which i given in the image by same order. So i think it will solve this problem. If it cont., i will give some more suggestion.
    With Regards,
    vijay_Conz
    Attachments:
    Creating SV lib.JPG ‏28 KB

  • Front Panel binding of shared variables very slow initialization / start

    Hello @ all,
    I am using a server running Windows2000 and LV 8 DSC RTS for datalogging. All shared variables are deployed on that server.
    I am now facing the problem, that all front panels running on the clients using the network shared variables on the server take very long to sync on startup. First the flags on the controls bind to the shared variables turn red, after up to ten minutes they start to turn green. The panels use up to 40 controls bind to the shared variables.
    All firewalls are turned off. I tried to connect the client to the same switch the server is connected to. Same problem. Does anybody have a clue?
    Thx for your quick answers.
    Carsten 

    While I can't offer any solution to your problem, I am having a similar issue running LV8.0 and shared variables on my block diagram (no DSC installed).
    When using network published shared variables, it takes anywhere from 30 sec to 4 min from the vi start for any updates to be seen. Given enough time, they will all update normally, however this 4 minute time lag is somewhat troublesome.
    I have confirmed the issue to be present when running the shared variable engine on windows and RT platforms, with exactly the same results.
    In my case, the worst offenders are a couple of double precision arrays (4 elements each). They will normally exhibit similar "spurty" behavior on startup, and eventually work their way up to continuous and normal update rates. Interestingly enough there are no errors generated by the shared variables on the block diagram.

  • Using Shared Variables and Initialize Front Panel Binding (to PSP)

    Hi,
    I use LV DSC RT 8.2.1
    I have a Vacuum System That includes signals from - Pumps failure, Valves status, Vacuum gauge, start Pump ...
    Each signal is read by a FieldPoint. 
    All the relevant FieldPoint Channels are read by the Server (a computer in the Ethernet Network) and published to the network in the form of Shared Variables.
    I have a client VI that is reading the Shared Variables published by the Server using Front Panel Binding.
    Problem : 
    Some of the Bindings are in the mode 'Write &Read' and that causes some initialization problems.
    For example - Valve #1 is Open, and then a User start running the Client VI, (the Valve #1 Status mode is 'Write & Read")
                           if in the VI the status of Valve #1 is closed (before running it) then the Valve status is changing to Closed.
    I want the Client VI to first read the Physical status of the instrument and then to change the Value if the User changes it.
    But that's seems to be a problem when using Front Panel Binding... (is it?)
    I know I can Deploy a lvlib in the Client Side and Item Bind to the Shared Variables or Use DataSocket.
    (Is DataSocket is a Reliable method when connecting to Shared Variables? What are the disadvantages when using DataSocket?) 
    What is recommended by those of you that are experienced or by NI ?
    Sincerely Yours,
    Amitai Abramson.

    Amitai Abramson,
    Hello and thanks for using the NI Forums.
    I'm glad that you've read the Using the LabVIEW Shared Variable Tutorial on our website. Check out these other resources:
    Network Variable Technical Overview
    Troubleshooting Network-Published Shared Variables
    Why Do I See Unexpected Value Change Events for Shared Variables Using LabVIEW DSC?
    All You Need to Know About Shared Variables
    Creating a Value Change Event for Shared Variables
    Alternative Method for Using Shared Variables Between Systems in LabVIEW 8.x
    What Is The Difference Between Using Shared Variables And DataSocket VIs To Access OPC Tags?
    The issue that you are seeing by having "Write & Read" bound items on both the server and client side is essentially a race condition, you don't know which one is being read/written at what time. To resolve this issue I would take a look at some of the documents below.
    Using a Local, Global, or Shared Variable in Parallel Loops Can Cause Race Conditions
    Using Local and Global Variables Carefully
    Tutorial: Local Variable, Global Variable, and Race Conditions
    Locking a Shared Resource or Variable in LabVIEW Using Semaphores
    You mentioned not wanting to have two sets of shared variables (one on each side), but this is a great method to resovle this issue, that, or you can develope some sort of hand shaking to prevent these race conditions.
    I would suggest that in the future when using these forums you try to ask only one question per thread and make it more concise. It's hard to tackle multiple questions and such broad questions as "I want to know all the ways that I can connect to Shared Variables, and I want to know the advantages and disadvantages." I suggest this because we want you to get your questions answered and more concise questions will result in quicker and better answers. 
    Message Edited by Ben S on 10-01-2009 06:05 PM
    Ben Sisney
    FlexRIO V&V Engineer
    National Instruments

Maybe you are looking for

  • Duplicate Items in Recent Items menu

    HI, Just recently (in the last couple of weeks) I have suddenly been getting duplicate entries in the recent items folder (not in the apple menu as has been discussed elsewhere). I have 2 entries for Disk Utility, ITunes, Terminal etc. I have checked

  • How To Create Gradient Horizontally, Top to Bottom

    Within Illustrator CS4, I created a rectangle. Is it possible to fill the rectangle using a gradient with the gradient occurring from the top of the rectangle towards the bottom edge, essentially having long strips of color from left to right within

  • In Charm what is the

    Hello, In a CHaRM SDCR Change request, in the fast entry screen. There is a "desision Date" and a "Implemenation Date" under the time of entry. What are these used for? I see in a U.rgent Correction SDHF There is only an "Implemenation Date". Also fo

  • Sales Return procedure

    Hi, 1. Pl guide us for standard procedure for 'Sales Return' from customer with refereence to billing doc. Pl specify the relevant 'T' codes. 2. Pl also guide us if any task needs to done thru SPRO/Transfer request to PRD.

  • Target Recon using ICF flatfile connector in OIM 11gR2

    Hi, we developed a flatfile recon using Oracle Assets (where there was a predeveloped oracle flatfile connecter using ICF) and deployed the Flatfile connector on java connector server using ICF. for test purposes, We took a user created already in OI