Shared Variable communication (network publiched )

Hi all ,
The whole day I have been banging my head with Shared variable communication between RT Host and host computer :
I essentially attempted to pass an array from the RT host to the Host computer .For this purpose I used a Network published shared variable of type Array U64 . I utilized this link to help me understand usign shared variable communication 
http://www.ni.com/white-paper/4679/en .. 
I also enabled RT FIFO .Now in the mentioned link this the information given about using single element FIFO or Multi element FIFO
'' By enabling the real-time FIFO, you can select between two slightly different types of FIFO-enabled variables: the single-element and the multielement buffer. One distinction between these two types of buffers is that the single-element FIFO does not report warnings on overflow or underflow conditions. A second distinction is the value that LabVIEW returns when multiple readers read an empty buffer. Multiple readers of the single-element FIFO receive the same value, and the single-element FIFO returns the same value until a writer writes to that variable again. Multiple readers of an empty multielement FIFO each get the last value that they read from the buffer or the default value for the data type of the variable if they have not read from the variable before.'' 
I had read the above content a 100 times but still I am not able to get a clear picture of the difference and when to use which option .So I decided to throw away the text and attempted to try somethign out for myself .
I had a loop in the RT host that writes different 3 element arrays into the ''network published shared variable '' . Now when I use the multi element option with '' number of arrays as - 2 '' I am able to read the arrays seperates one by one in the host computer ( as we can read a general queue).
Now when I used the single element option for the RT FIFO with un editable 1 array option ,only the last written array into the ''network published shared variable '' gets read in the host computer .
This sounds absolutely silly as if this is the case then what is the purpose of setting the ''buffer''.For testing purposes I had set the buffer as 5 arrays .
In fact I have only one writer ( writing in loop in the RT Host ) and one reader ( again reading in loop in the Host computer ).So I am not even sure if I require The RT FIFO option for the network published shared variable .
I apologise for the long message but I have reached the limits of running in circles waiting to bang somewhere
I know I am doing a silly mistake somewher or I am probably missing a simple obvious trick but dont know what it is ..
I request for some clarity .. In fact I had posted a little while earlier today as well .... link - http://forums.ni.com/t5/LabVIEW/RT-Host-to-Host-computer-communication/td-p/2348130 )
any help would be appreciated
Cheers
me  
Solved!
Go to Solution.

Hi,
I think the difference between both types is clearer in the LabVIEW help :
Enabling the Real-Time FIFO
You can enable the real-time FIFO of a shared variable from the Real-Time FIFO page of the Shared Variable Properties dialog box. Place a checkmark in the Enable Real-Time FIFO checkbox to deterministically share data using single element or multi-element FIFOs.
Single Element FIFO
A single-element FIFO shares the most recent data value. The shared variable overwrites the data value when it receives a new data value. Use this option when you need only the most recent value. Configure the size of the array elements or the size of the waveform for the FIFO buffer if you select an array or waveform data type.
Multi-Element FIFO
A multi-element FIFO buffers the values shared by the shared variable. You can configure the size and the elements of the FIFO buffer to match the settings from the Use Buffering section of the Variable page, or you can configure a custom size for the FIFO and the FIFO elements.
Note  For both single-element and multi-element FIFOs, if the variable contains array or waveform data, you must configure the size of the FIFO elements equal to the size of the data you want to share. If both the network buffer and the RT FIFO are enabled, the network buffer must be at least as large as one FIFO element. Sharing data smaller or larger than the length you specify causes a memory allocation that affects determinism.
Note  Waveforms contain variable-size variant elements that are not compatible with the Real-Time FIFO. Therefore, if you enable the Real-Time FIFO on a shared variable that contains waveform data, the variant element of the waveform data does not transfer.
http://zone.ni.com/reference/en-XX/help/370622K-01/lvrtconcepts/rt_projectvariable/#Single_Element_F...
'Hope it helps
Aurelie

Similar Messages

  • Network shared variables reconnecting network dropout

    I've got a cRIO unit communicating with a Laptop using Network Shared Variables, with one of them being a 21 index array that is buffered.
    The system connects and communicates fine, but occassionally the wireless card in the laptop is losing the signal from the WAP attached to the cRIO.
    When this happens the Network Shared Variables never "reconnect" and start receiving values again once the Wireless link is restored.  Is this an expected behavior?
    When I tried using another industrial WAP instead of the laptop wireless card I do not get the drop-outs.
    Ryan Vallieu
    Automation System Architect
    Solved!
    Go to Solution.

    Hello Ryan,
    Thank you for contacting National
    Instruments!  I have looked into the issue you are experiencing and
    wanted to ask you a few more questions.  First of all, do you have a
    time frame in which you allow for the reconnect?  I believe that the
    Shared Variables should regain connection after a short period but it
    will not necessarily be a very quick process.  It may take a few
    minutes for the Shared Variables to reconnect.
    The other
    thing that may be happening is if you have error wires being passed
    through the Shared Variables, it is possible that the error is not
    being cleared and so it will always see the error and therefore never
    reconnect.  In this case you will have to filter this error out and
    then clear the error in order to utilize the shared variables again.
     If
    you have any more specific information about your program that may help
    us determine the reason for this behavior.  Also a screenshot of your
    code would also be helpful.  Please let me know if you have any further
    questions and I will be happy to assist you.  I hope this helps!
    Thanks!
    Bob H
    Applications Engineer
    National Instruments

  • 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

  • Version compatibility in shared variable communication

    I have a cRIO running a new piece of hardware that arrives today.  I have done all the development in LV 2012/13, but we still have some older machines running LV 8.6.1.  These machines will be upgraded soon-ish, but the code is byzantine and so it will probably require some downtime to do the switch.  In the meantime, I found conflicting information online (e.g., here and here) about whether I can communicate between these systems using shared variables.  I do not want to do a lot of this, but it would greatly ease the transition if I could write a few booleans and doubles from the old computers to either the cRIO or to the new computer as a stopgap.
    In LV 8.6.1, I can see the cRIO and the names of the shared variable libraries on the Distributed System Manager.  However, MAX says the system is unsupported if I try to connect that way.  The Distributed System Manager also seems unreliable--just poking around this morning, it has frozen a few times, and right now for some reason it doesn't show any of the variables, just the target's IP address (although it's not grey).  In LV itself, I can't figure out any way to make the shared variables appear, but I have never tried to use them in a pre-2012 version of Labview, so maybe I just don't understand how to do that.
    Is there any way I can make this work, or do I have to do something stupid like communicate with text files and while loops between these systems until I get them all upgraded to the same version of Labview?

    Sorry, I was not clear--the cRIO and the computer I use to write code for it are running LV 2013.  I have an old computer running 8.6.1 that needs to be able to talk to the cRIO occasionally through the shared variables.
    I think I figured out at least part of my problem--I finally noticed a dropout on the shared variables on the LV 2013 computer as well.  So I lowered the clock speed and network publishing rate on the cRIO and the variables stopped dropping out constantly in the DSM in version 8.6.1.  I think maybe this was the problem, and the faster computer running LV 2013 was just better able to recover from occasional missed signal or something like that.  Anyway, I will try to implement the shared variables in the 8.6.1 code the next time I am able to take down the system.  Thanks for the clarification.

  • Network streams vs shared variables

    I send data from a PXI RT System to users on different Windows computers via Shared Variable and Network Stream.  The user that receives the data via Network Stream writes the data to a disk file (aka DAQ computer).  The users that receive the data via Shared Variable displays it on front panels (aka Observers). 
    The data consists of a 1D SGL array where elements 0-3 are the timestamp, element 4 is the counter, and elements 5-1000+ are data.  The timestamp is GPS time and is displayed on all computers.  When I look at the timestamp on the DAQ it is slowly falling behind the current GPS time.  After 4 hours it can be up to a minute behind.  When I look at the timestamp on the Observers it is always displaying current GPS time.  When I look at the code on the PXI System, it is always sending the current GPS time.  The counter on the DAQ computer is also behind.
    I am using the Read/Write Single Element Stream functions with the default read/write buffer size of 4096.  The 'timed out?' output is always FALSE for both functions.  No errors are generated.  LabVIEW memory usage is constant during the whole time.
    On the PXI RT System the Network Stream and Shared Variable are being written to inside a Timed While Loop.  The users read the data within a standard While Loop.  Everyone is using LabVIEW 2011.
    It sounds like a buffer is slowly being filled up somewhere, but where?
    Solved!
    Go to Solution.

    On the PXI RT System:
    How often is data sent?
    Are you using a “Flush Stream” function after your “Write Single Element to Stream”?
    On the “DAQ Computer”:
    Are you buffering the reading of the data (i.e. feeding it to a queue)?
    You might try using a property node to read “Available Elements for Reading” to see if they are stacking up here.
    The buffer size is another option to consider.
    steve
    Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
    question. Give "Kudos" to replies that help.

  • Problem while binding variable progmatically shared variable in RT

    Hi All,
    I have a problem while programaticaly binding the shared variable from RT controller.
    The application scenario is as follows 
    I have three cFP controllers and two
    server PCs in my application. Servers are implemented with Redundancy. If server
    1 fails, server 2 will take care and vice versa. The cFP controller program is
    intelligent enough to detect this switching and identify the active server.
    I am using shared variable
    communication for transferring the data between cFP and Active Server. This I am
    achieving by binding the cFP variable to Server variables. I can bind server
    variables to cFP variables also. But I have some advantage with first one rather
    than second one.
    Now, cFP Variable to Server Variable
    binding I can do in two ways.
    Right click the variable in Project
    Explorer and select the network URL.
    Other method is by programmatic
    binding.
    Now Programatic binding should be
    done in cFP controller since cFP controller should bind to second server
    whenever it detects switching.
    For this, I tried with
    SharedVariableIO property node like in the below attached diagram 1.
    But I was getting a deployment error
    shown in attached diagram 2.
    The second method I tried is by
    transferring a shared variable library cFP Library.lvlib to cFP through FTP and
    opening the Library variable reference and by using the variable property node.
    This way of binding was successful when I run from windows PC. But in RT
    controller, it was giving me Error 1 while opening a
    library.
    I am attaching the code with this post
    Summary of the problem is I am not able to progmatically bind variables from
    RT Controllers
    Kindly help me in solving this
    problem.
    Regards,
    Blackperl
    Message Edited by blackperl on 08-18-2008 08:29 AM
    Message Edited by blackperl on 08-18-2008 08:31 AM
    Attachments:
    Code and Library.zip ‏27 KB
    Diagram 1.jpg ‏15 KB
    Diagram 2.jpg ‏25 KB

    Hi All,
    I have a problem while programaticaly binding the shared variable from RT controller.
    The application scenario is as follows 
    I have three cFP controllers and two
    server PCs in my application. Servers are implemented with Redundancy. If server
    1 fails, server 2 will take care and vice versa. The cFP controller program is
    intelligent enough to detect this switching and identify the active server.
    I am using shared variable
    communication for transferring the data between cFP and Active Server. This I am
    achieving by binding the cFP variable to Server variables. I can bind server
    variables to cFP variables also. But I have some advantage with first one rather
    than second one.
    Now, cFP Variable to Server Variable
    binding I can do in two ways.
    Right click the variable in Project
    Explorer and select the network URL.
    Other method is by programmatic
    binding.
    Now Programatic binding should be
    done in cFP controller since cFP controller should bind to second server
    whenever it detects switching.
    For this, I tried with
    SharedVariableIO property node like in the below attached diagram 1.
    But I was getting a deployment error
    shown in attached diagram 2.
    The second method I tried is by
    transferring a shared variable library cFP Library.lvlib to cFP through FTP and
    opening the Library variable reference and by using the variable property node.
    This way of binding was successful when I run from windows PC. But in RT
    controller, it was giving me Error 1 while opening a
    library.
    I am attaching the code with this post
    Summary of the problem is I am not able to progmatically bind variables from
    RT Controllers
    Kindly help me in solving this
    problem.
    Regards,
    Blackperl
    Message Edited by blackperl on 08-18-2008 08:29 AM
    Message Edited by blackperl on 08-18-2008 08:31 AM
    Attachments:
    Code and Library.zip ‏27 KB
    Diagram 1.jpg ‏15 KB
    Diagram 2.jpg ‏25 KB

  • Shared Variables should support LVOOP as a data type

    Almost all LabVIEW data types can currently be sent through a shared variable without any hassle.  The notable exceptions are native LabVIEW classes, which cannot be selected as the data type for a shared variable.  This causes a problem for anyone who wishes to send objects across a network.  They are forced to rethink their use of LabVIEW classes, use a communication method other than shared variables, or flatten and unflatten the object on either side of the shared variable communication.  The use of classes is growing more common with every version of LabVIEW, so I think it is time for these two prominent LabVIEW features to work together seamlessly.

    There has been some debate (both within NI and with customers) about whether or not the flattening/unflattening solution is actually desirable. After all, if NI made the shared variable support classes, to do the writing to the variable, the object would be flattened to a string and then unflattened when the variable is read. In other words, having the shared variable support classes does not actually remove any work that the program has to do, so having the shared variable do this behind the scenes is just syntactic sugar. The negatives crop up with the issues that Phillip raised -- suddenly the shared varible is reporting a number of errors that it did not support previously, whereas by separating the (un)flattening into a separate node, it is easier to tell where an error is arising -- was it a failure to read a shared variable or was it a failure to unflatten the data therein? By keeping the shared variable ignorant of such complex data types, it is easier to swap out the communication mechanism used -- shared variables might get support for LV classes, but TCP/IP prims might not, or whatever other communication protocol comes along in the future (i.e., the network stream primitives that are brand new in LabVIEW 2010 -- effectively queues that are usable over the network).
    Users may choose to create a custom string format for objects, one that can be unflattened by any system that uses the shared variable -- including CVI and MeasStudio. Having shared variables support classes directly does not get in the way of this, but consideration of exactly what private fields actually need to be exposed in that very global global variable might be encouraged if users are consciously aware of the serialization taking place.
    I'm not pro or con this feature at this point... this post is merely to document debate I've heard about any intermachine communications protocol handling LV classes directly.

  • Strange behaviour with Vision 8.2 and Shared Variable 1D Image Array

    I've just upgraded to LabVIEW 8.2 and Vision 8.2.  When loading a particular VI, it is searching numerous times for ...\LabVIEW 8.2\resource\objmgr\IMAQ Image.ctl - which of course doesn't exist.  As best as I can track it down, this seems to be cause by a Shared Variable I have in the project which is a custom control of a 1D array of Image. 
    So I've created a new project from scratch to illustrate (attached).  The VI runs OK, but any editing means that this non-existant control is searched for again.  Of interest is also that there is a coercion dot where the Image is used, but the data type on the wire seems OK.  Creating a control (rather than a Shared Variable) works fine.
    Anyone know what's going on here?
    Message Edited by GregS on 02-26-2007 03:43 PM
    Attachments:
    1DImage.png ‏4 KB
    1DImageShared.zip ‏15 KB

    Hello Greg,
    I downloaded your project and opened it up on my
    system.  I received the same results as you
    did – I tried to open the project it searched for \LabVIEW 8.2\resource\objmgr\IMAQ Image.ctl.  I also used the 1d Image.ctl file as a constant on my block diagram and it did not
    show the coercion dot as you mentioned.
    There does seem to be some strange behavior going on here
    with the coercion dot and the shared variable. 
    I will have to look further into it and report this to R&D. 
    But for now, we need to address your application.  What is the goal of your application?  How does using a shared variable with IMAQ
    Images help you get there?  You may be
    aware of this already, but when an Image wire is passed around LabVIEW, it is
    not actually passing a copy of the data in a dataflow manner.  The large size of IMAQ Images necessitates
    that LabVIEW pass around a pointer to the IMAQ Image.  Therefore, when an array of Image controls is
    made and used as a shared variable, the controls do not contain the actual
    image data.  Instead, they contain
    pointers to the IMAQ Images.  When they
    are passed into a shared variable, unexpected results may occur.  If the shared variable is network published,
    for example, another computer on the network would receive a pointer to an
    image that it would not be able to find or access.
    There may be a much better way than shared variables to
    achieve the same functionality you are currently looking for.  If you do in fact require shared variables,
    you could use IMAQ ImageToArray.vi
    to create an array that can be used in the shared variable like any other data
    type, and then use IMAQ ArrayToImage.vi
    on the other end to be able to view the array as an image.
    Please post back with more information about your
    application and we should be able to find the best solution for you.
    Regards,
    Luke H

  • 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

  • Problem Sharing Variables between 2 machines

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

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

  • Dynamically enabling/disabling opc-binding to shared variables?

    Hi.
    I've got some shared variables binded to my OPC server, but sometimes some variables need to "ignore" the OPC updates and and be simulated, and in some cases, all of the variables.
    So, I've got an application to dynamically change the shared variables properties: Network.UseBinding and Network.URL to "connect to" or "disconnect from" the OPC server, but is there a way to "unbind" the whole library from the OPC quickly and restore it back when need it?
    I tried creating and deleting the IO server programatically but the variables go "bad"...
    Is this is a good practice or should I change the method?

    Hi Keptat, you can bind them directly to the OPC sever but you need to add
    psp: at the begining.
    For example 
       psp:\\localhost\IOServer\ModbusSlave1.000001
       psp:\\aebenjamin\IOServer\OPC1.Channel_0_User_Defined.Ramp.
       psp:\\ host \ library\IOservername.register
     An easy way to find the complete address y bind a Variable with psp
    binding to the OPC server and you will get the path.
    In the example code it gets the psp address from a Library, but won't get
    you the directions of the registers inside the IOserver, so you need this list
    manually.
    Another option is create 2 libraries one with the variables binded to the IO
    Server and the other binded to the simulated info, in this case you just have
    to point to the library, and get the address of all variables.
     Also you have to make sure the OPC server is deploy and you can see it
    in the Distributed System Manager
    Best Regards
    Benjamin C
    Senior Systems Engineer // CLA // CLED // CTD

  • 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

  • Serializin​g read/write operations of network-pu​blished shared variables

    Hi all,
    I'm developing a distributed application (PC + CompactRIO), and using shared variables (SVs) for inter-device communication. Here's my journey so far:
    Intended procedure
    PC parses file
    PC writes processed file data (custom cluster, large) into the 1st SV 
    PC writes a "grab data" signal/command (enum) into the 2nd SV
    cRIO polls the 2nd SV
    cRIO sees the command, then reacts by reading the 1st SV
    Steps #2 and #3 were sequenced, using error wires.
    Unexpected results
    Even after the command is transmitted and the cRIO sees it, the cRIO could not read the data (which I wrote BEFORE the command) -- LabVIEW reported that the buffer was empty.
    The operation succeeded when I placed a wait (5 seconds) between steps #2 and #3.
    Questions
    What am I doing wrong, and how do I achieve my desired outcome?
    Is SV I/O asynchronous by design?
    Is it possible to use event-driven programming to handle SV access? (i.e. does LabVIEW signal when the new SV value has propagated across the network?)

    BillMe wrote:
    Why do you have to "notify" the other end that data is available? The subscriber can simply sit in a loop doing a timed read just as if using a queue or notifier IPC. If it doesn't time out, you got new data. If it does time out, do some other processing if needed and then loop back for another timed read.
    My sytem architecture is command-driven -- the cRIO listens for instructions from the PC interface (sent as an enum via one SV), and performs tasks (motor control) in response. One of the commands (the one described in this thread) happens to be "download a new motion profile from the PC, by reading the other SV". Given that the cRIO is already polling the command channel, I felt that there's no need to also poll the data channel (especially since the "download" command is issued very infrequenty). Plus, I thought that polling two channels would increase the chances of race conditions or illegal state transitions, particularly if the app is developed over a long term.
    I am also new to LabVIEW, so my current programming style will heavily reflect my C++/Qt background while I get a feel for LabVIEW's strengths and weaknesses -- Qt is a heavily event-driven framework (even for networking!), where polling often means you're doing something wrong.
    Still, thank you for pointing out that I can use timeouts to determine if new data has arrived -- my subscriber current writes a null command back into the SV when it has consumed the command, but you showed me that I don't have to.

  • Distributed application: Networked Shared Variables, Named Services (Raw TCP/IP) or Other?

    Happy New Year NI forums! 
    I am working on a project involving mobile interacting robots. In the future it is likely the application's components may need to run on different PCs (Targets). Note: at this point in time all the components are seperate but all running on the localhost machine. Thinking towards the future I want to pick the 'best' architecture to allow all these components (VIs performing various functions) in multiple locations. For example, several VIs on the Robots, VIs on serveral PCs. 
    I am  currently aware of using Server/Client TCP/IP using named services. My mock up works well, but is it time efficient (my time coding) I wonder.. ?  
    Whereas I am aware of networked shared variables which handle connections and all the parsing for the underlying tcp/ip communication. But will this be difficult the manage? I am unsure if I can associate shared variables with a VI similar to named services. I suppose I could pro grammatically create the variable upon initialization of the server component - and the client could just search the list of avaiaible variables to connect too. Downside this would require DSC module. 
    As you can see, I am rather unsure. Any advice would be great!
    Kind Regards,
    James  
    Kind Regards
    James Hillman
    Applications Engineer 2008 to 2009 National Instruments UK & Ireland
    Loughborough University UK - 2006 to 2011
    Remember Kudos those who help!

    Hi Jason,
    Thanks for your reply. I hope your enjoying NI UK as much as I did.. fun times!
    I have seen the link you posted a few times before. But today, I took a better look at it.
    My issue is I need several multi-client severs, i.e. many servers which allow multiple clients to connect to them.
    Now the STM does have an example of this - STM mutli-client Example - Server.vi (used with the STM mutli-client.vi)
    However, when a make copies of these code (to have my second server) - it refuses to run. As in , it just stops itself.
    I DID change the port number, on the lister aspect of the server code. But I Am unsure what else I would need to change to get this setup to work?
    One thought I had was, the FIFOs all having the same name - this probably isn't a good idea between servers.
    Any suggestions would be grateful!
    *please could you provide me email support
    Kind Regards,
    James Hillman  
    Kind Regards
    James Hillman
    Applications Engineer 2008 to 2009 National Instruments UK & Ireland
    Loughborough University UK - 2006 to 2011
    Remember Kudos those who help!

  • 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

Maybe you are looking for

  • JSP page import problems

    Hi, i've got a problem with importing java classes into my jsp file. i use the following method: <%@ page import="Person" %> Person is originally a selfwritten class which lies in the subdirectory WEB-INF/classes of my webapps directory of my tomcat

  • Default Layout and Skin

    Hello, Does anyone know if there is a way to override the default Layout and Skin? What I want is to apply a Layout/skin combination for users that are associated with a specific Role. I know this can be done per user, on his profile page, but I want

  • Corsair Vengeance K95 RGB

    Hello, A family member gave me a keyboard for my birthday. They did not get the keyboard that I wanted. The keyboard was purchased about 3 months ago from Best Buy, but has just been opened last week. Is this product available for return or exchange?

  • Ora-92101 when add a new form

    Dear all, I am using oracle application server 10.1.2.0.2 and database 9.2.0.7.0 An ora-92101 error appeared when I tried to add a new form to the existing application with buttons that generate reports would you help me please to solve this problem

  • Upgrading from weblogic 8.1 to 10gr3 facing problem with the Building

    Internal compiler error java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.binarySearch(ReferenceBinding.java:108)      at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.getMethods(Parameter