When do I need to redeploy a Shared Variable?

I am using 2 network shared variables to share data between cfp-2220s.  The shared variables are both clusters of several deifferent data types.  Do I need to redeploy the shared variable everytime I add or remove a variable from one of these clusters?

Hello DrewCommPower,
Yes you will have to reconnect the custom control that defines the cluster and redeploy the shared variable.
Wear
National Instruments
Product Support Engineer

Similar Messages

  • Need help getting networked shared variables on compact fieldpoint to work

    I'm still a newbie and am trying to get Networked Shared Variables to pass from a VI running on a PC to a VI running on a Compact Fieldpoint. I created a VI that sends a message via a Networked Shared Variable and a VI that receives it. I have them both in the same project. If I run them both on the PC, it works, I can send a message string from the first VI to the Networked Shared Variable and read it in the second VI. I have the second VI turn the LED "A" on and the LED "B" off if I send the string "a", and turn the LED "B" on and the LED "A" off if I send the string "b", and turn them both off if I send anything else. It works as expected if both the VIs are running on the PC. The second VI also continuously blinks the LED "C" so I can verify that it's running.
    I "deployed" the second VI to the Compact Fieldpoint as follows:
    In Project I dragged the VI from My Computer (under Project: name.lvproj) down and put it under the Compact Fieldpoint name.
    I right clicked on Compact Fieldpoint name and verified it was set to "Connect".
    I right clicked on the second VI and selected "Deploy".
    I started both VIs with the "Run" arrow. At this point I know second VI is running since the LED "C" keeps blinking. But, when I try to send an "a" or "b" nothing happens, so the VI on the Compact Fieldpoint must not be receiving the messages in the Networked Shared Variable.
    I also right clicked on Compact Fieldpoint name and selected
    "Disconnect". The second VI continued to run since the LED "C" keeps
    blinking, but I still can't get messages to pass.
    Any help will be greatly appreciated.

    I got this to work. I moved the library (.lvlib) containing the Networked Shared Variable to down under the Compact Fieldpoint name. Now it works.

  • 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

  • Shared Variable Help

    Hey,
    I need some help with shared variables. Here is what I'm trying to do. I run a vi on the computer that uses a camera to track certain objects. I would like this program to send the position of the object to another vi that is running at the same time on the speedy-33. The speedy-33 takes the position and rotates the robot towards the object. The problem I have is communicating the position from the computer to the speedy-33.
    From what I've read, I think I'm supposed to do this with shared variables. On the computer target,  I created a library with an integer variable (to hold the x position of the object). I set this variable in the computer vi using the shared variable. All of this is in a while loop. On the speedy-33 VI, I've connected a control to the shared variable. When I run the program everything works as intended so far. When the object's x value changes the control on the speedy-33 front panel changes appropriately. However, when I try to drag the variable onto the speedy-33's block diagram from the project explorer I get a bunch of errors. The first is "My Computer\Variables.lvlib\xpos: Not supported for current target." Since it appears this isn't supported for the speedy-33 how am I supposed to transfer the data?
    Hope all that makes sense.
    Thanks

    Squirell wrote:
    Hope all that makes sense.
    Well, I for one got lost somewhere in there. Didn't you say that you already had the shared variable in both the computer VI and the Speedy-33?
    It may be a good idea to take a look at the Shared Variable Client-Server example, and perhaps test it to see if it, at least, can work on your setup.
    I for one gave up on shared variables (flow control was just too much trouble) and am using "functional globals" instead. http://zone.ni.com/devzone/cda/epd/p/id/4364 was particularly helpful.Message Edited by kehander on 02-20-2007 12:46 PM

  • Datasocket shared variable api

    I ran into the following the other day whilst debugging some code:
    We had a type mismatch when sending data however, when testing the DataSocket API did not return this error information, nut the Shared Variable API did.
    DS just returned default data with a change in the timestamp)
    This got me thinking:
    Is using Shared Variable API the way to go? Is it a better (more refined) API?
    Are there different reasons for using one over the other? (I do like that DS's refnum is not datatyped, which means that I have to provide the datatype on the read as opposed to the SV-API).  
    With respect to the type mismatch, I found that I could actually initialise the Variable with either datatype and it worked (only) for that datatype.
    It would only error when the other datatype was used.
    Does that mean the Variable does not know what its datatype actually is when a cluster is used?
    Cheers
    -JG
    Certified LabVIEW Architect * LabVIEW Champion

    charris wrote:
    I'm not sure I quite follow your question regarding datatypes. It looks like the error is being returned because a variable cannot contain a cluster. You can do arrays, but not clusters, so that's probably why the SV API is complaining about the type input.
    Hi Caleb
    My question was relating to the fact that if the variable is not initialized on one PC, and I try reading from it on another PC, specifying the datatype to read back, then I get an error using the SV API but no error from DataSocket.
    My use case was for a Cluster.
    I didn't check whether it was Cluster-specific or occurs for every datatype.
    I assumed Cluster-only as Clusters differ when setting up the Shared Variable.
    I.e. All standard datatypes are available in a drop-down, but you need to select Custom Control for a Cluster.
    So the last question was asking could I theoretically use any Cluster with a SV-Cluster as long it is the same when I do a Read and Write.
    I.e. When using the DS/SV-API the Shared Variable does not know (/have information on) what its datatype actually is when a Cluster is used - it relies on what datatype is used to initialize it? 
    Hope that makes sense.
    Cheers
    Jon
    Certified LabVIEW Architect * LabVIEW Champion

  • Having trouble assigning the Data Type to Shared Variables

    I have some type definitions that I need to use as shared variables.  When making the shared variable, I create it and then name it.  I then select "From Custom Control..." in the Data Type field and select the applicable type definition.  The problem is that it displays some other type definition.  Am I doing something wrong?  I am using LV v.8.6. I don't recall having this problem with v.8.5.1.

    Hi Hunter,
    All the custom controls are set to Type Def.  Since sending my question, I noticed that the system uses the first similarly used custom control and it's name.  For example, I have several clusters that each have four numeric controls in them.  When creating a shared variable for each of the various clusters, it uses the first custom control that was set up as a shared variable.  I hope this makes sense to you.  I have not had a chance to see if the shared variables are working because I have other issues to deal with first. 
    What troubles me is that I don't recall seeing this with v.8.5.1.
    I suppose I could and perhaps should use a common type def for all similarly used shared variables.
    Dave

  • Dsc 8.2.1 cannot write to shared variables error 1950679035

    I am getting error 1950679035 ni_tagger_write when I try to write to my shared variables.  I recently upgraded from labview 8.2 to 8.2.1.  I also upgraded to DSC 8.2.1.  During the install, I had to upgrade my computer to SP2 (windows xp), which installed mdac 2.8 sp1 for use with dsc 8.2.1.
    I have the windows firewall turned off, I checked with our IT dept and no upgrades were completed overnight (as the program worked yesterday using 8.2).  I checked and MAX will get a connection with the fieldpoint unit.  Everything is deployed from my machine, currently running under the dev environment.
    I have looked at this thread, but I was not able to get anywhere, http://digital.ni.com/public.nsf/websearch/0D7B86F4B4D19A5E86256F9A006EECB1?OpenDocument and here.
    Even though I have windows firewall turned off, I added all of the execptions to the windows firewall list.
    It appears that the shared variable library is deploying correctly, as the the windows says that it has (when you run a vi).  I am progmatically deploying the vi.
    I looked at the variable manager and I attached a screenshot below.  I am not sure if that means that it did not deploy correctly or not.?? (I was only watching a couple of the variables, I have about 20 total)
    thanks
    Kenny
    Attachments:
    variable manager.jpg ‏55 KB

    It appears that my problem has been solved.  Apparently our network had an internal error for a quick second and my nic did not like it.  So after I restarted again (fourth of the morning) it started working now.
    Kenny

  • Initialize the shared variable

    "From the issue description it seems that the Shared variable needs to be reinitialize.
    Create a formula to initialize the shared variable value and place it in appropriate section of the Main Report based on the section in which you are displaying shared variable value of the Subreport."  (post from Poonam Thorat 7/7/08)
    This is a solution to my problem.  However, I'm not sure how to initialize the shared variable value nor do I know where to place it in the appropriate section of the main report.  Therefore, what should the formula look like and where should it go in the main report?
    Can anyone help me with this?
    Thanks much!

    Hello
    Lets say you have a report like this
    Report Header
    Page Header
    Details
    Report Footer
    Page Footer
    If you want to create and initialise a shared variable, create a formula like this
    For this example call this forumula Rate
    whileprintingrecords;
    shared numbervar Rate := 1.5; // this can also be a field
    If you needed to use this shared variable in the Details section, then you would place the Rate formula in the Report Header, or Page Header (above Details so that it is created before the Details section is created)
    In details lets say you have some other calculation - Commission
    The Commission formula would look like this
    whileprintingrecords;
    shared numbervar Rate; // a shared variable must be referenced in each formula that it will be used.  It is NOT being initialised or set to any value here, just referenced
    {table.fieldname} * Rate
    Place the Commission formula in the Details section and Rate will be for each record in the report
    The same process applies for passing values from main report to sub report and vice versa
    There is also plenty of info in the Help and online about using shared variables
    Best regards
    Patrick

  • Shared variable, missing data, the same timestamp for two consecutiv​ely data

    hello
    I have a problem with missing data when I read from a network published shared variable.
    Host VI:
    In a host VI on my Laptop (HP with WinXP Prof.) i'm writing data to the shared Variable "data". Between two consecutively write operations is a minimum of Milliseconds waiting time. I use that because I want to be sure that the timestamp for each new data value is different then the preview one (resolution shared variables is 1 ms)
    Target VI:
    the Target VI on a cRIO-9012 realtime device is reading only new data in the way that it compares the timestamp of a new value with the timestamp from the last value.
    Problem:
    rarely, I'm missing a datapoint (sometimes everything works fine for several hours, transferring thousands of data correctly before suddenly the failure happens). With some workaround I'm able to catch the missing data. I've discovered that the missing data has the exactly same timestamp then the last readed datapoint, therefore is ignored in my "legal" data.
    To sum up, the missed value is written to the shared variable in the host, but the target ignores him because his timestamp is wrong, respectively the same as the last value has, despite the host waits every time for a minimum of 10 milliseconds before writing a new value.
    Note:
    The shared Variable is hosted on the Laptop and configured using buffering.
    The example is simplified only to show the principle function, in real I use also a handshaking and I secure that there is no over- and underflow.
    Simplified Example:
    Question:
    Has someone an idea why two consecutively data can have the same timestamp ?
    Where is the (wrong) timestamp finally coming from (system?) ?
    What would be a possible solution (at the moment with shared Variables) ?
    -> I tried a workaround with clusters where each data gets a  unique ID. It works but it is slower than comparing timestamps and I could get performance problems.
    Would it change something when I host the shared Variable on the RT-System ?
    Thanks for your help
    Regards
    Reto
    Solved!
    Go to Solution.

    Hi Reto,
    I had a look on your modified Example.
    Because the Shared Variables didn`t work like Queues or Notifiers (No Event or Interrupt when a new value has been written. And for sure the´re not possible over a network) you will see the issue, that the code is reading the values more often with the same timestamp (Polling Problematic) if the reader is faster then the writer. And because the timestamp is written with the value you´re able to program like you do. Filter out whats duplicated when you have the same timestamp.
    Everything is described in here:
    http://zone.ni.com/devzone/cda/tut/p/id/4679#toc1
    Laurent talked about a second depth of buffer. Please have also a look at the link. Somewhere in the middle of the tutorial you see the explanations of Buffer and RT-Buffer.
    Regarding your question: Would it change something when I host the shared Variable on the RT-System? --> No
    In my experiences, you should consider to place the Shared Variable Engine after asking some questions regarding the application.
    You will find the Answers to this 3 Questions also in the link:
    Does the application require datalogging and supervisory functionality?
    Does the computing device have adequate processor and memory resources?
    Which system is always online?
    And you`re right the smalles time interval you can see in the timestamp is 1ms.!
    What you also can do is working with an enabled "timed out". This might be more performance efficient than reading the timestamp.
    What I don`t know and not find up to now, is if LabVIEW or the OS adds the timestamp. It´s taken from the system time, this looks like LabVIEW is taking the value and adds it. 
    I hope this helps
    Alex
    NI Switzerland

  • Shared variable bug

    Hello all:
    With the attached project, run the shared variable bug.vi and press the button labeled Press me First.  Then press the button labeled Press me Second.  On both string indicators there shoud be text that say Hi There! in both string indicators.  However, sometimes I only get only a Hi OR There! (did I say OR ) and sometimes and empty string for both itring indicator outputs.
    Note this only happens when you FIRST run the VI.  To repeat the bug, you will have to stop the VI and unload it from memory.
    Can somebody else confirm this behavior?  If confirmed, this is obviously a bug.
    Robert
    Attachments:
    Shared Variable Bug.zip ‏25 KB

    There seems to be some sort of latency when you read the value of the shared variable.   I took your example, but I moved the read of the shared var. outside of the loop.  After the first boolean is pressed, it took two loop iterations ~100 mS for the shared variable value (read) to update.
    "There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
    Attachments:
    Shared Variable Bug.vi ‏44 KB

  • Comparing Previous shared variable to current variable Whileprintingrecords

    Hi All,
    I have a report with items listed in the footer. I need to compare the shared variables of 1 record to the next but I can't use Previous(field) because I'm doing the comparisons in the footer. How can I use Shared variables to find duplicate values? In some kind of WhilePrintingRecords Array? If so, how do I limit the array to compare the present value to the previous value only?
    footer row     SharedVariable    
    1                    887768
    2                    887756
    3                    887756
    4                    887787
    Thanks,
    John

    Hi John,
    Create a formula with a code that looks something like this and place it in the footer section(by the way, which footer are you taking about?):
    WhilePrintingRecords;
    numbervar array arr;
    numbervar x;
    shared <variable_datatype> <variable_name>;
    if Not(variable_name IN arr) then
         x := x + 1;
         redim preserve arr[x];
         arr[x] = variable_name;
    Create another formula to display the contents of the array and place this on a footer section below the above one:
    WhilePrintingRecords;
    numbervar array arr;
    stringvar vals;
    numbervar i;
    for i := 1 to ubound(arr) do
         vals := vals + arr[i] + chr(13);
    left(vals,len(vals)-1);
    Right-click this formula field once it's placed > Format field > Common tab > Check the 'Can Grow' option.
    Hope this helps.
    -Abhilash

  • Shared variable dialog window

    I want to ignore the dialog window or prevent it from coming up when there is an error in my shared variable.  I am reading data from a PLC on a manufacturing machine.  I am doing this on a separate server system and it isn’t monitored, so the fault does nothing but lock the Vi and prevent it from collecting data until someone happens to look at it.
    I have a loop that is waiting for the variable to change and the most common error is when the PLC is turned off and there is no data available, however there are others that come up now and again.
    I want to simply return to the loop and keep cycling until the data is there and readable again.
    Is there a way to prevent the Shared Variable from halting on error?  Can I turn off the dialog box so that it doesn’t stop the Vi?

    It is coming from LabVIEW's autmatic error handler.  There is also a VI option that can be changed globally for the VI to ignore the error.  But I don't recommend changing that unless you have accounted for all other errors you could possibly get elsewhere in the VI.  Any node that has an error output not wired to something else will have this dialog box pop up if the VI option is set to automatically handle the errors.
    Another alternative is to wire the shared variable error to a tunnel on the loop, but don't do anything with it afterwards.

  • Labview 8.2 can't write shared variable

    Hi!
    I developed LV 8.2 program using shared variable (network published) variant type. After extension of variable the vi charased after writing value in shared variable. If i changed shared variable from network published to single proces type the vi working OK.
    Attachments:
    problem.jpg ‏23 KB

    Hello,
    I have created a network published shared variable of type variant, and successfully written to and read from it.  Can you also post a snipet of your code which reproduces the problem?
    General things to try in case include:
    1. undeploy and redeploy the shared variable.
    2. repair your LabVIEW installation - this will repair the variable engine, and I know of at least one case where this helped after it was corrupted.
    I hope this helps!
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • I need to host a Shared PDF on SharePoint. If it is on SharePoint can only one person comment at a time? I know documents have to be checked out when using SharePoint. I need multiple users to be able to comment in real time and see comments in real time.

    I need to host a Shared PDF on SharePoint 2010. If it is on SharePoint can only one person comment at a time? I know documents have to be checked out when using SharePoint. I need multiple users to be able to comment in real time and see comments in real time. Is this possible?

    try here:
    http://www.bbb.org
    File a complaint with them. Verizon will call you to fix the blunder.
    But remember it is always up to the customer to insure what they are getting and what it costs. Don't trust the word of a sales person who makes their living on getting that sale. Lies, deceit or false promises will be and have been used by sales people for thousands of years.
    Good Luck

  • TS2972 itunes says my home sharing is "on" however on my tv, when I click on computers it keeps telling me I need to turn home sharing on? can anyone help me

    trying to play music on my apple tv - when I clicked on computers and error came up saying I need to turn home sharing on.  Went to my computer pulled up itunes and home sharing is on? not sure what to do, can anyone help me...

    I had this problem too.  My PC is connected to my router via  an ethernet cable and my Apple TV is connected via wireless.  When I phoned Apple they said that my router was probably sending the signals via two different sub networks, one for ethernet and one for wireless and so the Apple TV couldn't see my computer (It's like they are on different connections).  I didn't really understand how my router was setting up sub networks but when I connected my Apple TV via ethernet it works fine and then stops again when I use wireless.  I restarted my router and it was ok so I then went into my router settings and selected to always use the same channel for the Apple TV.  So far it has worked everytime I've switched on.

Maybe you are looking for

  • SLIM No Password

    Just made a fresh install and I've added the login manager SLIM. I created another user account for non-root usage. Unfortunately, I have not set a password for neither root nor the non-root account, and can't get past the login screen as it asks for

  • When I go to Control Panel and select hardware and sound then click on sound I am missing a device

    There are supposed to be three devices. I believe that I accidentally disabled a device and I can not figure out how to restore it.

  • Where can I get this background?

    Can you please give me a link to download it? Thanks

  • Nokia 5800XM maps not working

    Hi.. I installed the new maps from my mobile's software updater but it is not functioning fluently When I open maps,it shows me the menu but when I go to the map, the map starts loading itself after going online with my gprs connection. I left it for

  • I can't install on ipad 2 iOS 7.1.2

    I have ipad 2 and i was using the adobe line app until the day I upgrade my ipad from 7.0.4 to 7.1.2 . from now on while I am trying to install this app says that is no longer supported from this device!! please tell me if it is possible to use the