Pass a reference to the shared variable

I use two shared variables in a loop where I write one and read each other.  I need to repeat this loop 5 times, but each loop uses a different pair of shared variables.  These variables are shared between a vi on the computer and a cRio.

It would be ideal to incorporate this loop into a Subvi where I can pass a reference to the two shared variables in and then read and write in threw these references.  Then I could just call this Subvi 5 times, instead of copying and pasting the loop 5 times.

Is it possible that I can accomplish this?  I can't find an example that would achieve this.

Thank you

If I understand correctly, you can use the mode programmatic access to shared Variables and it would work.

http://zone.NI.com/reference/en-XX/help/371361H-01/lvconcepts/sv_usingdynvarapi/

http://zone.NI.com/reference/en-XX/help/371361G-01/lvconcepts/usingdynvarapi/

Tags: NI Software

Similar Questions

  • Publish a queue using the shared variable

    I have a 2D table queue and I would like to publish (the reference) in a shared variable, so that I can pay the items in the queue in an another vi. I tried to create a queue control and used the custom of the shared variable control option, but it gives me an error "invalid data type.

    You try to read from the queue to another computer? Passing the reference to the queue on the network to a another computer will not allow the application to read data from the queue. The queue data is stored only locally.

    I honestly don't know why you get an error trying, however. Other options to access a queue in the world on the same machine are to use a Global Variable, rather than a shared Variable, or to get your reference queue by using a well-known name who know the other parties of the request.

  • new variable networked shared in my computer, but not in the shared variable engine list

    I have a Variables.lvlib shared on a cRIO target and test algorithms when I don't have access to material cRIO. Thought I could do a new project, add the library to the windows target (workstation). I need to add a few additional variables, I did in the original (i.e., while the library was the target in real time). Then create a new project and added the lvlib to the project (under my computer), and then wrote a VI to write in these SVs. When I let fall a constant Variable Refnum shared on the block diagram and browse for objects variables under 'Variable' Motors > ni.var.psp > localhost > shared Variables, list of variables shows everything except the 6 new variables. When I switch the view 'Current project', I get the same variables for new list WITH THE 6. However if I select the variables in the list and run the VI I get an error-1950679035 impossible to locate the variable in the shared Variable engine. Of course, I forgot something, anyone out there set me straight?

    Thanks for your time - lmd2

    Hello Lawrence,.

    Looks like you'll have to maybe just to deploy the new variables - refer to this document:

    LabVIEW Help: Making static Variables available on a network

    http://zone.NI.com/reference/en-XX/help/371361K-01/lvconcepts/sv_deploying/

    Hope that helps!

  • What is the blue thing in the shared variable?

    I'm going thorough a code that has the huge set of shared variables and in some nodes, I find a blue color of brand/thing left bottom just worldwide as shown below.  What this indicates?

    Thank you

    Ajay

    I found the answers of my team member.  The blue mark indicates in fact a point and a slash ". ------"which means relative sharing Variable target."  If the shared Variable is absolute, this indication does not appear.  To learn more about the difference between shared variable absolute and Relative target, check it out here.  A Shared variable node can be established between absolute and relative assistance

    Menu popup (right click the node)-> reference mode.

    Thank you

    Ajay.

  • Support of the shared Variables in the third part XP embedded based of PTC?

    I sent a request in an embedded XP touch function (third party). The application works very well, but hosted on a RT (sbRIO Board) shared variables are not getting updated in the app on PTC

    1. the PTC is part of the project as a Windows XP Embedded Touch Panel

    2 NI TPC Service has been installed on the PTC and the application can be deployed remotely from the PC development via ethernet. (Where network connections and communications are OK)

    3. using distributed in the development computer systems manager, I can see that the shared variables are getting updates on the network

    I think that the problem can be solved if the following programs are installed on the TPC

    A. Support for variables that are shared for XPembedded

    B. shared Variable engine

    I tried to install the support of variables shared Program Files > National Instruments > Labview 8.6 > PDA > utilities > Variables > x 86 - but I get an installation error "cannot find the application for the Pocket PC applications Manager.

    Shared variable engine was installed from the ve220 folder. The program is installing. But the engine Variable is not start Control Panel > administrative tools > Services, Xpe, the service is stopped and cannot be started. When I try to start the service, I get the following error on PTC

    "Cannot start Service engine of National Instruments Variable on the local computer."

    Error 1053. Service has failed to demand launch or timely control.

    Please suggest solutions to the addresses above or another of the following:

    1. support of variables shared for XP built-in PTC

    2 Installer engine Variable shared.

    Thank you

    Krish

    Problem solved!

    Update for interested people working on XP Embedded PTC

    Just to ensure that shared Variables were indeed accessible to the TPC, I wanted to install Distributed Systems Manager 8.6 on the TPC. However given that the TPC was only 1 GB of DOM (disk on memory) and with all the software that I had tried, there remained only a few megabytes on the system. I had to add an another DOM of 2 GB.

    All products in the Installation went well, with the exception of the Logos NOR (Version 5.0). Logos OR installation has failed repeatedly.  I tried to install NI Logos separately, with the same results. Then I had this intuition that NI Logos had anything to do with the question.

    Then, I downloaded the new version of NI DSM 2009 SP1. Even if it were to settle on any fresh system without Labview, the installation would not proceed beyond the stage of configuration. I tried to install NI Logos of the folder on the download of new products separately and it worked magically!

    Once the new Logos (Ver 5.5) installed, the Shared Variable engine starts automatically and the shared Variables are finally unleashed - free stand up and shine! I thank Almighty God!

    On the lighter side, come to think of it - to run an application about 400 KB, we need NEITHER of Run Time, XP embedded, DSM, Logos...  (around 900 MB). Can make us everything simpler?  Invite your comments...

    Thank you

    Krish

  • Can I send value cluster through the shared variable?

    Hi every1,

    I want to send a cluster through the shared variable. While creating a shared variable, there are options to choose the type of data, but there is no option to Cluster.

    But there is an option of "custom control". How to use it?

    Hi, Germain,.

    Create your control and save it as a file on your disk *.ctl. If you use the "custom control" option, and then select your control. If this does not work for your control, you can use the function 'flatten in string' to send a string.

    Mike

  • How can I dynamically select the shared Variable API programming data type?

    I am trying to create a configuration of open connections of variable shared using the programming API. It seems to me that the cleanest way to do would be to put one "open and check" routine in a loop, then call it for each variable in the library.

    The question that I am running is that I have different types of data in my library (to help a server Modbus i/o and data types 'boolean' and 'single' in my library.) How can I dynamically select the data type of the shared variable API?

    See the attached snipit.

    Thank you

    What I ended up doing was doing a Subvi to open, read, write, and close each data type, I use the packaged in 4 polymorphic SubVIs (polymorphic Open, read, etc...)

    Now all I have to do I drop in the polymorphic Subvi and it switches automatically to the appropriate data type

  • How the shared variable affects determinism RT?

    I continue to read again and again that ' If you activate the FIFO in real-time to a shared variable, you can deterministically share data active without affecting the determinism of the screws on an RT target. "

    Could someone help me understand how shared variable affects RT determisim and how FIFO variable sharing does not work.

    Thank you!

    If you send something comes the RT to the host, you use the network, which is inherently not deterministic.

    To use an SV to maintain determinism, you want to stay on target to RT.  You would use this to pass the latest value of a loop to the other.  If you enable the FIFO, you create separate read and write the points so that you have not the same access point in both your curls deterministic and non-deterministic.  With this, you are able to maintain the determinism to nondeterministic loops the last value of a variable.

    The idea is that do not break the determinism of your deterministic loop while accessing these data elsewhere.  If you do not select the FIFO, you have a shared resource that may eventually block the deterministic loop and could potentially go beyond your jitter related.

  • URGENT DSC: I can write to the shared variable but can NOT read?

    Hi all

    I use DSC to communicate with an automaton of DVP28SV DELTA. I managed to write to a coil to turn on a fan, and I have also written in a register.

    However, when I tried to read the spool (spool the same I just turned on) or when I tried to read a record that I'm very sure that has values registry where I configure the parameters of modbus, it would return to ZERO, even when I tried to read the registry I just write in the answer was zero (I do not know the entry in the registry was successful because I did the specific value that) I wrote to the registry a condition to turn on a light).

    So, anyone know why this might be happening? the registers are read/write. I thought it might be time to scanning in the controller is too short, so I added delays, but everything I read always gives zero return. ideas? can someone help me with this?

    Here's the manual for registration of corporations, in the case where it is important: http://www.delta.com.tw/product/em/control/plc/download/manual/DVP-PLC-Program_O_EN_20120416.pdf

    In fact I solved this in time ^^ in the case where someone faced the same question and get zeros in the response, which has worked for me exchange of programming (by clicking with the right button on the shared in my VI variable).  Why it works? no idea. but variables starting to give me the correct values.

  • TPC-2012 cannot read the shared variable

    Hello

    I have a TPC-2012 and can not read variables shared with him. I welcomed the shared on a cRio-controller Variable. On another PC, the variable is read correctly, but not on the tpc-2012. What can I do? No error message is displayed on the TPC-2012 (Windows CE 5). The PTC can not write values in a shared Variable.

    Thank you

    Christian

    What LabVEIW Touch Panel version do you use? I don't know why static variables do not work correctly on your device. TPC-2012 comes with support preinstalled for shared variables, and it would be possible that it has been deleted or corrupted. Here are some steps you can follow:

    Install the Support of shared Variables
    How do we install the Support of Variables shared on the TPC-2012?

  • static reference with the global variable

    Hi, I used a static reference to a Subvi where I change a global variable before (3-4 years ago) and do not remember how I did it.

    It was something like these attachments, but now I'm using LabView 2013 instead of LV 8.6.

    The change in the overall operating system sees only not in the main vi (looks like the invoke node run vi does not work with globals).

    In addition the vi close with the invoke node close vi but not if I put the custom in the Subvi properties to automatically close.

    dkfire wrote:

    Why not call the sub vi as usual, just with the setting to display the front panel, when it is called?

    Use the connector pane to transfer the value of the sub vi Ok button when done.

    That's what I recommend.  If this is not possible for some reason, then you will need to use a flat Structure of the sequence to force the reading of the global variable after the Subvi is complete.

  • How to sort the shared Variable libraries

    I have large libraries SV in my project I want to sort by variable name.  I tried to export to Excel, sort and then import them into the library, but the type did not appear.  It looked like loading each variable then the multiple variables Editor opens with the original (unsorted) list I pressed the fact and then is back to were I started.  Any ideas?

    "In LabVIEW, you can sort variables shared libraries by right-clicking on the library" arrange by "name.

  • How to locate where the shared Variables are used in the project.

    I'm looking everywhere where a shared Variable is used in my project. Right-clicking does not provide a find. The display hierarchy does not help. In the Project Explorer, the appellants find displays only the names of the screw called, not the many places where the call is made.

    Does anyone know how to find the location where a shared Variable is used?

    Edit-> find and replace. For "Select object" click and access features-> Structures-> shared Variable.

  • OPC server in the 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 this isn't a Labview server. My labview program reads the signal from the mutual FUND through the data in a Labview library. (Variable type = single process)

    This way is functional but not optimal. I read in the help that I can use a published shared network variables. Is published this network can read the signal from my server through a network path without use of data? He will need a Labview Server?

    This is an example for my opc address

    OPC://localhost/hteControl_OPC_DA_Server/PLC_FI010_ValueLimit_SP

    Thank you

    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 this isn't a Labview server. My labview program reads the signal from the mutual FUND through the data in a Labview library. (Variable type = single process)

    This way is functional but not optimal. I read in the help that I can use a published shared network variables. Is published this network can read the signal from my server through a network path without use of data? He will need a Labview Server?

    This is an example for my opc address

    OPC://localhost/hteControl_OPC_DA_Server/PLC_FI010_ValueLimit_SP

    Thank you

    LV - DSC (data logging and control) words allows you to "bind" the NSV to an OPC server.

    As long as the compliant OPC server operating system it should work and has been the case for me.

    Ben

  • How to use the shared variables to address several Watlow controllers on the same COM port

    Hello

    I am using LabVIEW 2010 to control 4 Watlow temperature controllers on a port com 3 are model 96 and 1 is a zone EZ controller. The controller has a unique modbus address and I'm trying to read from and write in the individual records (for example, setpoint closed-loop) variable shared help. I would return the data during playback (even if the data is displayed as invalid), but I am unable to change the value in the registry in writing. How can I be sure that's the Modbus server send commands to the correct controller?

    Chuck

    Hi Chuck,

    Sorry for the delay in response, I was away last week. You can create as many servers for Modbus on one COM port that you would like, the only problem you'd see is if you tried to call the port from different locations at the same time. With respect to the documentation to cross, I'd start with the tutorial below for a comprehensive manual of Modbus. There are also quite a few listed under Datalogging and supervisory control Module help topics that may be useful if you want to solve specific issues.

    Introduction to MODBUS

    Kind regards

    Peter W.

Maybe you are looking for

  • Satellite M30: Options after replacing the motherboard's missing energy saver

    Hi all I just got my laptop back from the service center, and not surprisingly, they've pushed a device that existed! I had my laptop (M30 1.7 GHz special edition) for the centre of repair for a defect and they informed me that the motherboard had to

  • Attend for Instrument i/o for Labview 2009 trial?

    I use the Evaluation Version of LabView 2009. Unfortunately, the Assistant of the Instrument-I/O is not currently available. If I try to add an Assistant for Instrument-I/O-Express-VI (exit), I get an error message telling me that the Measurement & A

  • Force logoff idle session for user 2003 active directory

    I hava an active directory on windows server 2003 and I want to set the strategy of inactive users logoff, how do I do?

  • Where is the user name after came C\:user\ please?

    I was wondering how this name after C:\user was generated it please. I do not remember that they asked for a user name during installation and would like to know if it can be changed easily. It just seems to have taken the first part of my e-mail add

  • Dell AIO printer 964 and Windows 7 64

    We will see dell AIO 964 drivers for Windows 7 64? Windows 7 RC has been released and the only reason that I didn't spend to Win 7 because my printer does not work with Win 7. Drivers Windows update installs are a year old and not fully compatible wi