Are clusters or individual elements better for shared variables?

So...  I have some RT code that is being updated, and pulled out of the Stone Ages of LabVIEW.  It was originally written for an old FieldPoint controller operating in "headless" mode, and used the "publish" and datasocket methods for communications and external control.  I had to get clever way back then, and put together a parsing/unparsing system for strings to send sets of data back and forth between the controller and any HMI or other computer attached.
Now, I'm completely rewriting the code for a cRIO system, and doing my best to leverage all of the strengths of the latest LabVIEW versions.  I have already done an intermediate stage, where I converted from the publish/datasocket method to using network shared variables for my strings, so I could keep some of the original control and calculation logic.  Now, however, I'm going back to the drawing board for most of the program, with only some of the proven logic being held over into the new version.  And, as I'm putting together the data structures I need for both internal control and external communication, I'm in a bit of a quandary...
I have come upon a data structure dilemma:  should I use individual shared variables for my data, or assemble associated data into clusters?  My original program had a string (essentially a flattened cluster) for each sensor in use (up to 4), one for the system parameters and states, and one for the control parameters and states.  There was a certain advantage to keeping the data compartmentalized like that, it kept things organized and forced me to avoid too many random references of each data point.  And it kept the number of communications channels limited to just a handful.  Mimicking this structure with cluster shared variables would be easy.  But, I'm not sure it's the best or most network-efficient method.
I know the bundling/unbundling will add some processor time in my code, that is not new to me (it will still be much faster than my old parsing routines).  But, if I have individual data points being thrown around, I can access them easily from things like Data Dashboard (which is great, but far too limited to be able to grab items in clusters and such).  Having all of my data points individually available would make my project messier, but open up easier access.  It would also dramatically increase the number of data points being thrown around on the network at any one moment.  For reference, I would probably have a maximum of 100 data points at one time, made up of a combination of integers, floats, booleans, integer arrays, boolean arrays.  Or I would have a maximum of 8 clusters that would contain those data points.
Any suggestions on which way I should lean?  Are there any advantages/disadvantages between shared clusters like the ones I need vs. the number of individual shared variables I would need using the alternative methods?  Network traffic and efficiency are always a concern, particularly since this is a "headless" cRIO in a control situation that must maintain a fast scan rate...
Thanks for any help.  I'm so stuck on this fence, and I can't figure out which side to fall off!
Solved!
Go to Solution.

Thanks Tim, that is a great source that I somehow missed in my hunt for information regarding my dilemna...
I have to wonder though, does that 25 number also include the I/O points on your cRIO?  Anyone know that particular?  Most of the I/O points are network shared by default during initial configuration, and you could very quickly exceed 25 variables on an 8 slot rack (such as the one I use, a 9074).  Now I'm a bit worried that I'm overusing the variable engine, even before the communications clusters get figured in...

Similar Messages

  • Support for Shared Variables in Third Party XP embedded based TPC's?

    I have deployed an application in an XP embedded based Touch Panel (Third party). The application is working fine, but the shared variables hosted on an RT (sbRIO Board) are not getting updated in the application on TPC
    1. The TPC is part of the project as Windows XP Embedded Touch Panel
    2. NI TPC Service has been installed on the TPC and the application can be deployed remotely from the development PC through ethernet. (Hence network connections and communications are OK)
    3. By using Distributed Systems Manager in the development computer, I can see that the shared variables are getting updated on the network
    I believe that the problem can be solved if the following programs are installed on the TPC
    A. Support for shared variables for XPembedded
    B. Shared Variable engine
    I have tried installing support for shared variables from Program Files > National Instruments > Labview 8.6 > PDA > Utilities > Variables > x86 - but am getting an installation error "Unable to find application manager for Pocket PC applications".
    Shared variable engine has been installed from ve220 folder. The program is getting installed. But the Variable Engine is not started Control Panel > Administrative tools > Services in Xpe, the service is stopped and cannot be started. When I try to start the service, I am getting the following error on TPC
    "Could not start the National Instruments Variable Engine Service on the local computer.
    Error 1053. The service did not respond to the start or control request in a timely fashion."
    Please suggest solutions for the above or alternate locations for the following:
    1. Support for shared variables for XP embedded TPC's
    2. Shared Variable engine installer program.
    Thanks
    Krish
    Solved!
    Go to Solution.

    Problem solved!
    Update for interested folks working on XP Embedded TPC's
    Just to make sure that Shared Variables were indeed accessible to the TPC, I wanted to install Distributed Systems Manager 8.6 on the TPC. However since the TPC was having only 1 GB of DOM (Disk on Memory) and with all the software I had tried, there were only a few Megabytes left on the system. I had to add another DOM of 2 GB.
    All the products of the Installation went fine, with the exception of NI Logos (Version 5.0). NI Logos installation failed repeatedly.  I tried installing NI Logos separately, with the same results. Then I had this gut feeling that NI Logos had something to do with the issue.
    I then downloaded the new version of NI DSM 2009 SP1. Although this was supposed to get installed on any fresh system without Labview, the installation would not proceed beyond the setup stage. I tried installing NI Logos from the products folder on the new download separately and it worked like magic!
    Once the new Logos (Ver 5.5) got installed, the Shared Variable Engine started automatically and the Shared Variables were finally unleashed - free to rise and shine! Thank God Almighty!!
    On the lighter side, come to think of it - for running an application of around 400KB, we need XP embedded, NI Run Time, Logos, DSM ..........  (all around 900MB). Can we make it any simpler?!!  Inviting your comments .......
    Thanks
    Krish

  • Error codes for shared variables in Labview 8.5?

    I am trying to use Shared Variables in Labview 8.5 to enable real-time loops (similar to some of the examples in "Using the LabVIEW Shared Variable", published Aug 28, 2007).  I created it to hold the result of a 16-channel A/D converter (so a 16-element I16 array).  To avoid losing samples, I used buffering, with a buffer of 5.  To test this, I made a pair of VIs, one a producer that stuffs a 16-element I16 array into the shared variable "every so often" (controlled by a timed loop), and a consumer loop that reads the shared variable and does something with the data.
    If I think of the buffered shared variable as a Real Time FIFO (as the article suggests it is), I was curious how I would know (a) when the queue was empty, and (b) if the queue had overflowed.  Both are necessary if this is to be a practical means of exchanging data -- you want the producer and consumer to run more-or-less at the same rate, but only the producer is deterministic.  The consumer needs to be able to run "faster" if it falls behind (for example, because it is writing data to disk), but you don't want it to read data from the shared variable if there's nothing there.  [One can always read a shared variable, after all -- as the article states, it simply "holds" the last value written to it].
    Snooping around, I discovered that there are "error codes" associated with the shared variable.  In particular, a code of -2220 (FFFFF754) seems to signify an empty queue (or a shared variable that has not yet been written to), while a code of -1950678981 (8BBB003B) appears to be "buffer overflow".
    Is this documented anywhere?  Are there other "error codes" that would be helpful to know?  Is there some rationale to these seemingly-random numbers?  [It would help to develop code to utilize shared variables if there was a bit less "magic" and "mystery" involved].
    For what it is worth, with a buffer of size 40, I could generate 16 I16 values at 1 KHz (simulating sampling from a 16-channel A/D at 1 KHz) and pass it to a consumer node that (a) read from the shared variable until it was empty, then (b) "went to sleep" for 20 msec (simulating "doing something else non-deterministically"), and not miss any data (because I could then empty the Shared Variable RT-FIFO, which should have been half full, before it overflowed on me).  Not bad throughput -- I bet I could push it even higher.
    Bob Schor

    Hey Bob,
    The errors are documented in the LabVIEW help:
    Shared Variable Error Codes
    Real-Time Shared Variable Error Codes
    There are several error messages for buffer underflow/overflow depending on the settings of the network or RT FIFO buffers. In particular the -2220 and -2221 are useful for the producer/consumer use case. For example (as you probably know) the consumer can flush a variable using the error code (see the attached image).
    Gerardo
    Attachments:
    variable1.png ‏3 KB

  • What's the meanning of "bad status" in DSC alarm config for Shared Variable?

    as the title
    LabVIEW 8.20程序设计从入门到精通已经出版,敬请关注!
    欢迎访问LabVIEW学习乐园: http://labviewstudy.blog.edu.cn

    Can I read the quality  of an OPC tag which binded with a Shared Variable by using this  "status"?
    LabVIEW 8.20程序设计从入门到精通已经出版,敬请关注!
    欢迎访问LabVIEW学习乐园: http://labviewstudy.blog.edu.cn

  • Access denied error for shared variables in application builder

    I'm trying to use SVs in my app.  I build an exe using app builder.  When I run my VI from the project, it works fine.  When I run from the app exe, I get an access denied error (-2147024891) trying to write a value to a SV.  My SV lib is hosted on my computer (it's a local SVE).  I've disabled autodeploy and my VI calls deploy library on the lvlib file before I try to use it.  What could I be dong wrong?

    Hi knicewar!
    Thank you for posting on the discussion forums!  What are you refering to when you say SVs?  Here is a KnowledgeBase article discussing the same error, although I am not sure it will be a direct application to your VI, since I am unsure what you mean by SV.  
    Kristen H.

  • How to send (larger files) for 'Shared Review'?

    We are unable to get PDF files above 5.5MB to successfully 'Send for Shared Review' to a WebDav server (using Acrobat Pro 9.3.0 on OSX 10.5.8).
    The 'save' process fails at the final stage & the PDF is not uploaded to the server.  Files below that size can be sent for Shared Review without any problems.  Have tested this on different WebDav servers & domains - and with various PDF files.
    Has anyone been able to get PDF files above 5/6MB to successfully 'Send for Shared Review' to a WebDave server???
    Is there a file size limit for individual PDF files for 'Shared Review' using a WebDav server???
    Thanks for your help!!!

    Try creating a review without sending the file and then send the link in a seperate email.
    I used the "Do not send email invitation, just save localy" option and didn't add any reviewers in the wizard. Afterwards I sent a email with a link to the file to all reviewers and it worked.

  • Individual serial number for a particular Item

    Hi,
    At reciept level when we are manually assigning Individual serial number for a particular Item in the serial entry Form (serial_entry Block).
    Manual process For 10 Quantity its ok, but is taking time for 1000 Quantity.
    Pls let us know if there any process to reduce manual activity to assigning Individual serial number for a particular Item in the serial entry Form (serial_entry Block).
    Thanx,

    You can receive by range.
    Enter the starting serial number, enter the qty and then Oracle will generate 1000 serial numbers automatically.
    See http://download.oracle.com/docs/cd/A60725_05/html/comnls/us/po/connum.htm
    Hope this answers your question,
    Sandeep Gandhi

  • Lofs or nfs for sharing filesystems

    I'm trying to figure out if using lofs or nfs is better for sharing a filesystem from a global zone to several (five or more) non-global zones.
    For example. I've got a filesystem d0 mounted under /zonedir where the zones reside. I'd like to create /zonedir/homes and share that as /home on the non-global zones.
    I've had some success creating an NFS share on the global and then mounting it in the non-globals, but I can imagine that adds a lot of overhead running everything through the network stack and NFS services.
    There's lofs, but couldn't there be issues with file locking?

    the docs.sun.com manual specifically advises against mounting NFS filesystems between zones

  • 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

  • Performanc​e of Modbus using DSC Shared Variables

       I'm fairly new at using Modbus with LabVIEW.  Out of the roughly dozen tools and API's that can be used, for one project I'm working on I decided to try using Shared Variables aliased to Modbus registers in the project, which is a DSC tool.  It seemed like a clever way to go.  I've used Shared Variables in the past, though, and am aware of some of the issues surrounding them, especially when the number of them begins to increase.  I'll only have about 120 variables, so I don't think it will be too bad, but I'm beginning to be a bit concerned...
       The way I started doing this was to create a new shared variable for every data point.  What I've noticed since then is that there is a mechanism for addressing multiple registers at once using an array of values.  (Unfortunately, even if I wanted to use the array method, I probably couldn't.  The Modbus points I am interfacing to are for a custom device, and the programmer didn't bother using consecutive registers...)  But in any case, I was wondering what the performance issues might be surrounding this API.
        I'm guessing that:
    1) All the caveates of shared variables apply.  These really are shared variables, it's only that DSC taught the SV Engine how to go read them.  Is that right?
       And I'm wondering:
    2) Is there any performance improvement for reading an array of consecutive variables rather than reading each variable individually?
    3) Are there any performance issues above what shared variables normally have, when using Modbus specifically?  (E.g. how often can you read a few hundred Modbus points from the same device?)
    Thanks,
        DaveT
    David Thomson Original Code Consulting
    www.originalcode.com
    National Instruments Alliance Program Member
    Certified LabVIEW Architect
    There are 10 kinds of people: those who understand binary, and those who don't.
    Solved!
    Go to Solution.

    Anna,
        Thanks so much for the reply.  That helps a lot.
        I am still wondering about one thing, though.  According to the documentation, the "A" prefix in a Modbus DSC address means that it will return an array of data, whereas something like the F prefix is for a single precision float.  When I create a channel, I pick the F300001 option, and the address that is returned is a range:  F300001 - F365534.  The range would imply that a series of values will be returned, e.g. an array.  I always just delete the range and enter a single address.  Is that the intention?  Does it return the range just so you know the range of allowed addresses?
       OK, I'm actually wondering two things.  Is there a reason why the DSC addresses start with 1, e.g. F300001, instead of 0, like F300000?  For the old Modbus API from LV7, one of the devices we have that uses that API has a register at 0.  How would that be handled in DSC?
    Thanks,
        Dave
    David Thomson Original Code Consulting
    www.originalcode.com
    National Instruments Alliance Program Member
    Certified LabVIEW Architect
    There are 10 kinds of people: those who understand binary, and those who don't.

  • 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

  • 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 clock is consistently inconsistent

    From the annals of the weird:
    I noticed a while back that the DSM displays a different time than my system clock when I manually change a NSV value. I didn't think much of this, but then I noticed that it is not just wrong but inconsistently wrong. Here's the time difference, in seconds, between the system clock and the SVE timestamp for a dozen NSV value changes [the SVE clock always lags behind]:
    35, 14, 1, 18, 29, 2, 21, 24, 14, 17, 29, 20
    I checked these numbers in two different ways: (1) with the "Time stamp" event property node with NSV events using the DSC module and (2) manually changing values with the DSM and comparing to the displayed Windows time.
    What's the deal? The timestamp is completely useless to me with a seemingly random offset from the system time; it's by far the best way to deal with this little bit of unfortunate SV event handling behavior. Filtering event timestamps against system time is fairly standard procedure and I can't see it being useful with this going on.
    This should be trivial to reproduce--does anybody else see this? If so, is there an explaination--or better, a fix?
    [I should note that I have seen this but I'm running Intel core 2 duo, not an AMD multicore. I'm using LV and DSC 2010 SP1]

    You may have to set up the Time Synchronization Services on the computer with the DSM running. 
    In LabVIEW Help, look for Shared Variable Engine Page (Options Dialog Box)
    In DSM Help, look for Shared Variable Engine Time Server Configuration Box
    I don't know if both are necessary but I made all the computers on my system point at the same time server. The time server is configured as an Authoritative Time Server under Windows. It is in turn slaved to our DSN server which follows a Public NTP server. 
    JohnCS 

  • Datasocket and Shared Variables

    I am curious if there is any advantage to using Datasocket to read/write shared variables (as opposed to a direct read/write).  I'm specifically talking networked shared variables here.
    Is there any speed advantage to accessing shared variables thru the Datasocket functions?  Since both a direct read/write and a Datasocket PSP read/write talk to the same variable engine I assume they are equally efficient but I'm looking for confirmation here.  I've seen benchmarks for shared variable performance but none of them use DS/PSP to access the variables.
    Normally I would not even think of using Datasocket to access shared var's but where I currently work we have a large app that does this and it works great.  I suspect that this functionality only exists in LV8.x for backward compatibility and non-Windows OS compatibility and is not really meant to be used for new, Windows-based apps?   Am I off base on this?
    I am working in LV 8.5, BTW.....

    Hello Jared,
    Thank you for the reply with clarification. 
    Based on your comment, I changed the buffer parameters and also tried the programs with two different data types, previously StringArray and now String.
    In the attached LV8.6 project, you have all the programs, and shared variable library to review my tests. 
    There are two sets of two files - each set has a Write Shared Variable and Read Shared Variable file. One set is for StringArray type Shared Variable (named StrArr in the library), and the other set is for String type Shared Variable (named Str in the library).
    String Array example:
    MultipleDS-Write-SharedV-StrArr.vi / MultipleDS-Read-SharedV-StrArr.vi
    In my String Array shared variable, I use only 4 element array, each having 4 character strings - meaning 16 bytes per String Array data. I have two loops in the write file, writing to the same variable, an array of 4 strings, each loop continues until the loop index is >0. This means, sometimes, depending on the processor speed, the variable will be written 3 times or 4 times (the variable could have a new value before the loop condition is checked).
    So this means, if I have buffer of 100 bytes (16*4=64<100), it's enough for 4 such arrays (of 4 elements, each element with 4 characters) could be buffered to have sufficient time at the client (Read) program to read them. 
    I am putting 2048 bytes in buffer, which is much more than sufficient in my case. 
    The writer loops run with 200 ms to wait for each iteration. The reader loop runs with 100 ms in DS timeout and 100 ms in wait timer. This gives results without any loss. However, if I run the reader loop with 1000 ms to wait for each iteration, the data is lost. The buffer is not maintained for 2048 bytes.
    In the read program, just to make sure if all data is read or not, I am showing data in two different string indicators, showing data of each loop.
    String example:
    MultipleDS-Write-SharedV-Str.vi / MultipleDS-Read-SharedV-Str.vi 
    The String Array shared variable didn't show values in the Distributed System Manager. Hence, I created another simple variable with String datatype.
    The writer program writes strings of 4 characters, one-by-one, in two loops. Meaning, total 8 strings of 4 characters each are written in the "Str" Shared variable. 
    The reader program, however, doesn't always display all the 8 strings. Although the wait timer is not high (slow) it still misses some data usually. Data is overwritten even before the buffer is filled (in buffer, I have defined 50 strings with 4 elements in each).
    In both of the Read programs, I read using datasocket. I think thought datasocket has more ability to buffer. Earlier I had "BufferedRead" in DataSocket, which I have changed to just Read, because BufferedRead didn't give any special buffer advantage in the Shared Variable reading.
    ---- This is an update on the issue. 
    Ok, just while typing the last paragraph above, regarding datasocket, something clicked in my mind, and I changed the DataSocket functions to simple Shared variables (completely eliminating datasocket functions) in the read programs as well. And bingo, the buffer works as expected, even if I have reading loops very very slow, there is no data loss in any of the program sets. 
    The two changed Read programs are also included in the attached project - MultipleSV-Read-SharedV-Str.vi and MultipleSV-Read-SharedV-StrArr.vi
    So this means, I can completely eliminate DataSockets (not even using PSP URLs in DataSocket Open/Read functions) from my programs. 
    One question here, what will be an advantage of this (or any side effects that I should be keeping in mind)?
    Vaibhav
    Attachments:
    DataSocket.zip ‏71 KB

  • Labview on Shared Variable

    Hi,
    In our application we want share the some IO's in Tablet PC(remote PC) and HOST PC.
    We are using real time controller in our application.
    For this purpose we have create shared variables in *.lvproj. While we craeting shared variables we can not assign DATA type as a cluster of different elements to the shared variables.
    Due to this we created *.ctl file of that cluster and then tried to assign the same cluster to the particular shared variable.
    There are nuamber of shared variables in this application with different cluster of elements.The problem is that the same *.ctl file assign to two different shared varialbles which we not required. Because we have created different *.ctl files for two different shared variables.
    Is our apporach is right?
    Can we use *.ctl file as a data type as cluster of different elements for shared variable?
    Please suggest ....
    Thanks in advance

    I believe your approach is correct.
    Share Variables use the data type. So if you have a number of controls with the same type of cluster, e.g. Cluster1 is String & Numeric, Cluster2 is String and Numeric, then when you assign the Shared Variable to Cluster2 it will be identified as Cluster1.
    This is a reported bug in shared variables.
    One workaround would be to change the data type e.g. Numeric in Cluster1 may be INT16 while Numeric in Cluster2 may be INT32.
    Then the Shared Var's will identify them as different data types.
    DOK

Maybe you are looking for

  • Multiple e-mails under one account?

    Hi All!  I'm getting a new iPad and will be wiping out my old one and giving it to my mother.  Here is the issue.  I would like for her to have free reign over my apps, videos and music but I would like for her to use her own Apple ID.  is it possibl

  • Non-varying variable in Constrained Nonlinear Optimization

    I have built a labview VI so as to execute an optimization problem that I had previously solved using Matlab's fmincon. The transition wasn't difficult and the VI mostly works except for one variable. The VI is expected to optimize an array of four v

  • XMLParserv2 9.2.0.4.0 vs 9.0.3.0.0

    does anyone know if there are any implementation changes between these two versions of XMLParserV2? We know that 9.0.3 ships with 9iAS 9.0.3 and the other is part of the XDK. We've noticed some glitches in our application, which was programmed using

  • How do I keep my iLife08 when I install Leopard???

    I bought my Macbook a month ago and it came with Tiger 10.4.10, Leopard CD and iLife08 that was pre-installed in the system. Im thinking of changing my OS to Leopard through Erase and Install option but I want to keep iLife08. Is that possible? Thank

  • AD and Exchange provisioning succeeds but OIM user creation fails

    Hi, I am trying to provision exchange 2010 using exchange connector which i have customized. When i create user in OIM, AD provisoning starts ,then AD user gets created , then exchange provisioning starts & exchange gets provisioned. By the time all