Shared Variable (published network) communication

Hi all

All day I was hitting my head with variable communication shared between RT host and the host computer:

I basically tried to pass an array of the host of the CR to the host computer. For this I used a published shared variable of network type Array U64. I used this link to help me understand usign shared variable communication

http://www.ni.com/white-paper/4679/en ...

I also activated RT FIFO. Now in the city that link the information given on the use of FIFO of the single element or Multi element FIFO

"By enabling real-time FIFO, you can choose between two types of compatible FIFO slightly different variables: the only element and the buffer insurance program. A distinction between these two types of buffers, it's that the only element FIFO reports no warnings on positive or negative overflow conditions. A second distinction is the value returned by LabVIEW when several readers read an empty buffer. Several readers the only element FIFO receive the same value, and the only element FIFO returns the same value until a writer writes back to this variable. Several readers of a FIFO empty array 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 before variable. "

I had read the content above a 100 times, but still I'm not able to get a clear picture of the difference and when to use which option. So I decided to take the text and tried to try something for me.

I had a loop in the reception of RT who writes arrays of 3 different elements in the 'network published variable shared'. Now when I use the option of multi element with "number of berries as - 2" I am able to read tables separates one by one in the host computer (as you can read a queue in general).

Now when I used the option of single element for the RT FIFO with 1 UN editable table option, only the last table written in the 'shared variable published network' is read in the host computer.

This seems absolutely ridiculous as if this is the case, then what is the purpose of creating the "buffer". For testing purposes, I had put the buffer in 5 tables.

In fact, I have only a single author (written in loop in the reception of RT) and a reader (new looping in the host computer). So I don't know even if I need option of the RT FIFO for the published network shared variable.

I'm sorry for the long message but I've reached the limits of going around in circles waiting to type somewhere

I know I made a mistake stupid somewher or it miss me probably a clear simple trick but don't know what it is...

I request some clarification... In fact I posted a little while earlier today so ... bind - http://forums.ni.com/t5/LabVIEW/RT-Host-to-Host-computer-communication/td-p/2348130 )

any help would be appreciated

See you soon

me

Hello

I think that the difference between these two types is clearer by using LabVIEW:

"

Activation of the FIFO in real-time

You can activate the FIFO in real-time to a shared variable since the page FIFO in real-time of the properties of the shared Variable dialog box. Check the box Enable the FIFO in real-time in a deterministic way share data using the one element or several elements FIFO.

Single element FIFO

One FIFO shares the most recent value of the data. The shared variable overrides the value of data when it receives a new data value. Use this option when you need only the most recent value. Configure the size of the elements of the array or the size of the waveform for the FIFO buffer, if you select a table or a waveform data type.

Several elements FIFO

A FIFO multi-elements implements buffer the values shared by the shared variable. You can configure the size and elements of the buffer FIFO to match the parameters of buffering to use of the Variable page, or you can configure a custom size for the FIFO and FIFO elements.

Note  For single item both multi-elements FIFOs, if the variable contains data table or a waveform, you must configure the size of the elements FIFO equals the size of the data to share. If the network buffer both the RT FIFO are enabled, the network buffer should be at least as big as one of the elements of FIFO. Sharing data smaller or larger that the specified length results in a memory allocation which affects determinism.
Note  Waveforms contain variant of varying size that are not compatible with real-time FIFO. Therefore, if you enable the FIFO in real-time on a shared variable that contains the waveform data, the item variant waveform data does not transfer.

"

http://zone.NI.com/reference/en-XX/help/370622K-01/lvrtconcepts/rt_projectvariable/#Single_Element_F...

' Hope this helps

Aurélie

Tags: NI Software

Similar Questions

  • writing in shared variable published network hosted on rt (defined as slave modbus for crio) problems

    Hello Forums or

    This is my first post on this forum and I've been using labview for about 8 months now

    I have a problem about writing data in the modbus registers through a server of e/s defined as a slave modbus for my hardware 9074. Once I finished the project of construction and deployment of the variables and by following the instructions here , he reports no results but a row of zeros. I have the DSM nor opened and configuration modbus master to see whether the data is actually read or written on the respective sides that give the same line of zeros so.  What I am actually trying to write is a single-precision floating data table. The registers are structured F40000-F46534 runs from 10 items or have them for range AF40001L1-AF46534L1 of the AF40001L10 point where it's an array of length 10. (Referenced beaches here)

    I know 1 thing for you, the modbus connection works and is ready for data requests, I tested cela NI DSM and set manually the data for and received my master.

    System and project specifications

    Windows 7 operating system

    LabVIEW edition development system complete 2011

    No module Labview DSC, but I use the real time such referenced by one of the documents

    This project is an application in real time with fpga mode (and not scan interface)

    The master and the slave are the same network and subnet

    Connection Modbus type: TCP

    9074 compact slots rio 8

    9234 module x 3

    module 9221 x 1

    9472 module x 1

    Engine service Variable shared running on windows os and rtos system

    Used this guide to learn more about the Protocol modbus, as I have searched all over the internet to learn more about modbus

    I already have software Modbus IO Server installed on the crio thanks to max or 1.8 for NI RIO 4.0 version

    file attachment (s)

    Image of software specifications Crio

    Image of data written in scheme-block rt variable

    Short version of the problem: why is the e/s no variable writes in with the converted correctly data?

    Okay, Yes, it's that I was the one proposed. Regarding the news of the error, if you look at the bottom of your image to DSM, you see a little commfail and an error code, but it seems that those are OK.

    The only thing I can think is that DSM (or another function) is written for a range of values that includes 400004. I suggest you to put into service 4-going to a range of 3. 3 s are entered only (perspective control), then you can be sure that the master is not trampling on the data. Once you have checked that, look at DSM and any other code running to make sure q EU not accidentally write 0s to the same reg.

  • Shared data varying variable published network write error

    In my project in real time, on the VI host running on my Windows PC, I try to write in a number of published network shared variables.  All these write operations are successful (which means that I can read them on the RT target, then a cRIO-9012), except for these shared variables network-published with data type defined as Variant.  I'm not sure what is causing the problem.

    I take the table of clusters shown here...

    .. .and going through one "in Variant' VI and then subsequently in writing to the shared variable (data type: Variant).  Diagnosis of the failure of the VI in real-time to read the data, I found that variable writing shared on the host VI produced the following error:

    Error - 2147467259 appeared to Variable shared in the PC host TTS CTRL.vi

    Possible reasons:

    LabVIEW: Unspecified error (Hex 0x80004005).
    =========================
    System OR Configuration: Various operating default (Hex 0x80004005).

    This error or warning occurred when writing the following shared Variable:
    Shared \\My Computer\Network Variables\TC trust Array Group - network
    Shared \\128.144.90.143\Network Variables\TC trust Array Group - network

    .. where 128.144.90.143 is the IP address of the PC.

    Any thoughts?

    Sean

    I saw this post, and when I found myself with no other option, I have redefined the variables in question to the string data type and replaced all the "to variant" and "given Variant of ' functions with functions 'Flatten channel' and"The string Unflatten"respectively.  Initially, it did not work - functions "Chain Unflatten" would produce error 74, until I realized that the "data includes array or string of size? (T)"input on each 'string Unflatten" function must be set to FALSE. Wiring a constant false for each instance of "Unflatten to the string" seems to have corrected the problem.

    I have still no idea why wouldn t Variant.  Shared variables Editor allows to define a variant data type, so I guess it's supposed to?

    Sean

  • read into the buffer variable published network shared

    I use a shared variable that is published in the network buffer to write data to an RT target and read data buffered by the host application.

    I followed a different behavior regarding data buffering using Variable vs reading read the shared Variable node.

    There is no problem the shared variable node read but using the results of reading variable function of loss of data, such as access without alkaline reserve. I can read only some of my data values.

    I see no difference in access in the buffer in LV2009 help.

    against

    Any help is appreciated

    Christian

    Hi Christian,

    The behavior you describe is because the client side PSP buffering is not applied to the Variable API shared in LabVIEW 2009.  It was a design decision, but eventually, we hope to include this feature in a future version of LabVIEW.  This bug here as you pointed out is the lack of documentation for it.  Corrective Action Request # 202159 has been filed for this issue.

    Let me know if you need assistance working around this issue.

    See you soon,.

  • shared - variables multi-network

    Hello

    I have problems of publication of multiple variables shared in a network configuration to the correct network. (NIC1, NIC2, wireless)

    I followed the info in Spreading of Variables shared for a specific network adapter

    For a Windows-based system:
    If one does not already exist, create a file in the C:\WINDOWS directory named logos.ini and add the following lines to the file:
    [LOGOS]
    ServiceBindTo=XX:XX:XX:XX:XX:XX
    where XX:XX:XX:XX:XX:XX is the MAC address of the Ethernet card to want to bind to.
    
    Right-click on My Computer within the LabVIEW Project Explorer, click on Properties. Under the General tab, click the Specify Custom Address checkbox, and enter the IP address of the network card that the shared variables will be deployed to.
    

    but it comes to 8.2.1 - is still topical for 8.5?

    After these changes my shared variables always deployed to the default (wireless)

    I am running XP on the computers and LabVIEW 8.5

    Hello Al,.

    I think you may need to change your default interface card just.

    Here is an article that should help you further:

    http://digital.NI.com/public.nsf/allkb/FB4B94AE226BEA2986257559006D0FF1

    And also, point number 8 on this refers to a similar route of troubleshooting:

    http://digital.NI.com/public.nsf/allkb/6E37AC5435E44F9F862570D2005FEF25

    I hope this helps.

    Let me know if the problem persists.

    Kind regards

    Michael S.
    Technical sales engineer
    NEITHER UK & Ireland

  • VI refuses to run when the published network shared variable is not available

    I have a VI of logging data on my PC that gathers data from several sources, including several shared variable published network hosted on an RT target.

    The problem I have is that the data logger VI refuses to start if the target RT is disabled and the VI is abandoned if the network connection is interrupted.

    Is there an easy way to detect when running, be published these variable network are available and use a placeholder value, if they are not rather than the current behavior of refusing to work?

    I saw many people using data sockets, but I try to avoid the overhead of setting up and testing a loop of treatment relatively complex network on both ends when the network has published shared variables are so simple to use and works perfectly as this abnormal behavior.

    You can replace them with programmatic access (shared variable aperture and friends) and the dummy data placeholders if the variable is not accessible.

  • not possible to bind a variable shared via Ethernet network

    Hello!

    I have computer A and B with windows xp, sp3 and labview 8.6, professional edition. The two computers are in the ethernet network. I'd like to Exchange data between two applications of LV using shared variables. I create a shared variable (published network) on both computers.
    The problem is in the properties of shared variables not possible to bind the variable of the remote computer to the local computer. In the first step, there is even no possible to see any computer on the network. After the registration of the computer (Tools-> shared-> computer registry variable)
    I see the computer remote, but without any variable sharing.

    Do you have any idea how to solve this problem?

    Thank you for the answers.

    Hi ,

    Visit this link, maybe it can help you.

  • to connect to a shared variable (android)

    Hello

    I just started to learn how to use the dashboard data Labview for android.

    I made a very simple project, with a VI that generates random numbers. I also added a variable published network shared in this project, and I write the random number generated for this variable shared every second.

    I would like to read this value on my phone (Motorola Razr i, Android 4.1.2) android using the dashboard of data for an Android application.

    I have a wireless access point and both my laptop (that hosts the project, LabView, Labview 2013) and my smart phone is properly connected to the wireless router, and both gets from dynamic IP addresses.

    I start running my VI on the laptop and the variable shared within the lvlib correctly deployed and began to broadcast (I guess) its value to the network.

    I start the DD application on my Smartphone, I choose 'Connect shared variable to', I type the local IP address of my laptop, which is 192.168.0.100, and I try to connect.

    After some 'research' and waiting, I get a message "connection error".

    Do I did wrong?

    Thank you much for the help.

    Best regards


  • shared variable LAN configuration

    Hello everyone,

    I have a problem with deployment variable published network share and I hope that the experts of Labview in this forum could help me.

    I'm contacting a compactRIO (IP 192.168.10.100) via the published network shared variable. 32-bit LabVIEW version 2014. CompactRIO is AES.

    On the target, computer laptop, there is a port LAN (the usual) and it is used to connect to the internet with the IP (for example 10.115.22.200). There is also a USB adapter to ethernet, and it is used to connect to the compactRIO using IP 192.168.10.10. I am able to ping the compactRIo of the laptop.

    I called up the Manager of distributed system, but I couldn't see the compactRIO. I could see all the other devices on the 10.115.22.200 network.

    My question is, is it possible to set up a laptop with two IP addresses (192.168.10.10 and 10.115.22.200) with different subnets? I suspect that this is not possible and this is the reason why I do not see the compactRIO.

    Thanks in advance for your advice.

    chati

    Yes, shared variables are deployed.

    There is a solution. Apparently affecting USB) 1 Ethernet adapter to the network of 'Home' and 2) gateway defaults to the IP address of the cRIO, solves the problem.

    Thanks for the suggestions and the entries of Sam and natasftw.

    Your

    chati

  • delay in shared variable writing

    Hi all.

    I use LV 2010 SP 1 on a Windows platform.

    I have a Boolean indicator of façade and a shared Boolean variable that I write to simultaneously. My shared variable is network published with buffering enabled.

    Elsewhere in the same program, I read that the shared Boolean variable *. My problem is that sometimes there seems to be a delay in updating the value of the shared variable. The front panel indicator change, but when I question the common variable must seconds surveys repeated before its value also changes.

    Has anyone else seen this problem? Is there a simple solution?

    Thank you

    Zola

    * Yes, I know I can use the shared variable unique process affecting to communicate within a program, but the shared variable is also used in another monitoring program.

    Check if you write the data at all times and read at the same pace. Since you're using buffer if the receiving party is not fast enough to read the data as your write speed, it may take time to read the data and so it looks like a delay for you. Try turning off the buffer and simply use it as a global variable.

  • (correct) different behavior when a shared variable IO node is replaced with programming

    I work with the following system:

    LV2010 running in Windows 7 and a cRIO-9073

    My RT and FPGA code is generated and deployed.  I have a pair of variables published network hosted and deployed on the cRIO.  I wrote a simple application for my PC save variables of network in the disc.  The vi running on my PC uses the variables nodes that were driven from the project window and are configured as "absolute".  When I run this logging vi he told me that variables are part of a startup RT application and the system must be restarted.  It makes no sense to me - they are hosted and already deployed on the cRIO.

    When I right click on both variable nodes and replace them with "programmatic access" (and do NOTHING ELSE), I can run this VI without any problem.  It "clearly a bug here or I don't use node IO variable shared properly."  Any ideas?

    Thank you!

    Ethan

    In your project, right-click on desktop and select 'Disable Autodeploy Variables'

  • Array of string to a shared variable

    I'm writing a table 1 d of channels to a variable published network shared, but apparently not to write it. On the host, I can read the variable after that I write for her, but I can't read it on the remote system (real time). It's always empty. I checked System Manager, and it also shows the null variable.

    Hello

    Looks like there could be a problem with the way in which you post your shared network variables. Do you have any other shared variable of another type that works?

    Which machine hosts the variables? In both cases, make sure that their deployment correctly. If the variables are hosted on your PC, check the Variable Manager and ensure that your variable is listed and that it is properly updated. If this is the case, make sure that your network is not blocking the port traffic (disable the firewall). Also, make sure that the path to the shared real-time variable points to the correct location of the shared variable engine.

  • Are published network shared variable write & read Atomic actions

    Hello

    I have a very basic question about shered (published network) variable.

    I think I know the answer already, but since I couldn't find in my documentation, I thought that it is more prudent to request...

    Are reading and writing on a shared variable of stocks Atomic?

    To be more precise: on my target real time I create an array with data (each element being the configuration item or a cluster containing name, value, and type) and when the table is finished I am this store in a published network shared variable.

    On my host (Windows), I'm voting (in a loop) until the table contains at least 1 item, when this is true I'm parsing all the elements in the table.

    Is there a chance that, reading of the shared variable, the table contains a subset of the original painting on RT target (i.e. the action of reading takes place while writing is still ongoing).

    Or is the action of reading delayed until the write is completed? (i.e. both write and read actions are atomic even over the network)

    I think the latter is true but not could find no evidence in the documentation.

    Kind regards

    SoC

    Hello Rob,

    Yes, you can access the entire value, data type - you use both. For the table data type, the integer value is actually the full picture. So, Yes, you can see reading and writing as Atomic actions.

    But, on the other hand, you can lose data if the RT system rewrites the variable before the host had the time to read. To avoid this, you can enable buffering for the variable. See the following links for more information:

    http://www.NI.com/white-paper/4679/en

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

    Finally, you can also activate a FIFO RT on your target RT if you need to send data through the variable in a deterministic section of the RT. See also, more information:

    http://zone.NI.com/reference/en-XX/help/370622H-01/lvrtconcepts/rt_projectvariable/

  • network Publish shared variable

    I'm hosting the OAS of a sbRIO engine, developing with LV10.  I share an array of Boolean values on the sbRIO and I need to be modified by (1) the sbRIO by programming the control array, and (2) a LV GUI running on PC graphically (i.e. option boxes).  I share the table and PC HMI can connect and view the States of the button as established by the sbRIO, but when I try to click on one of the radio buttons, the sbRIO seems to outweigh demand and turn the reverse button (I know demand is through, I see a very rapid change in the State of button/table on a temporary HMI connected through the sbRIO project).

    Do I need a separate shared table for applications for PC/HMI that I must then analyze via w/Combinatorial logic and find the changes then send updates until the sbRIO to write in the "master" control programmatically array?  Or is it a type of feature for arbitration to a shared Variable NP?

    THX

    Hey Atlas,

    This looks like a problem that arises from the conditions of competition, access to shared variables. You always read or write variables in a loop on each application? If the Boolean values are poised to the HMI, you must use a "send" or the "write" button that writes to the shared variable. If the HMI application is constantly reading and writing to the shared variable, you can overwhelm network variable motor and see problems like these. If you still have problems, feel free to post your screws or block diagram screenshots so that we can see what you're doing.

  • published RT cRIO-9030 with network-a project of shared variables cannot communicate with host VI when compiled and deployed as executable startup.

    I have a project including a VI RT running on a cRIO-9030 and a host VI running on a desktop computer.  The two programs communicate via shared variables that are hosted on the cRIO.  As shows, when I run the screw of the project, everything works as expected.  When I compile the RT VI in a start-up executable can deploy for the cRIO, as well as the libraries of shared variables (the record of support in the build specification-oriented), I am unable to connect to the executable running in real time.

    I have 'Disable Autodeploy Variables' checked on the cRIO target, if I no longer get the prompt to stop the currently running application to deploy the variables.  The host VI opens and appears to run, but has no connection with shared variables (data does not update).  Compilation of the host VI as an executable file and it works outside the project result in the same behavior.

    I read some relevant posts / knowledge base articles related to this problem, but still can't seem to find a way around it.  I note a number of articles on the series in double bond of variables, but this is in contradiction with my possible behavior for this system: I finally have a number of cRIO controllers identical all runnning the same executable RT and want to be able to have a single host VI which allows the user to select from a list of available controllers (using the screw system configuration) and extract the host name of the controller selected, that would be later used for programmatic addressing of the variables on the host of part VI.

    In any case, I want to start with the simple fact of being able to get that first controller running without an open connection to the RT VI project.  With the deployed executable start, I checked via programmed behavior of LED application of the RT and FPGA are running on the cRIO.  The problem, I think, has to do with shared variables, but I'm not sure where to go from here.  I want to connect to RT executable running from the VI to the host (in project) to verify that the compiled executable of RT works as expected and then the subsequently compile host VI in an executable that can be run from any desktop on the local subnet.

    Thoughts?

    It seems that the error has now been corrected.  There were three things, I changed: the file startup.aliases in the startup on the target directory (Home: / lvuser/natinst/bin) put in 'localhost' as an alias for the controller.  I changed it to the IP address of the controller.  Then, I got some features of IO files in my application RT relative paths using the path obtained by the 'current path VI' VI.  As this path changes according to the location / delivery system, I had to create a VI that has used the Application property: type with a case properly structure band / build railroads desired regardless of the runtime system data files.  This may have broke my RT request.  Finally, I got a property node in one of my RT SubVIs, who attempted to change an indicator in the Subvi, which is not taken care of in an RT compiled executable.  I can't do this for debugging purposes somewhere along the way, but in any case, I removed it, and after a recompilation and the deployment of the executable of RT, everything seems to work as expected today.  The host VI on the desktop can connect to the application of the RT project, and when it is compiled into an executable file, which also works.

Maybe you are looking for

  • Tecra M4-138: update BIOS (i) 3.40 (ii) Slim Select Bay HD

    (i) recently (12/06/2007), Toshiba has released an update of the 3.40 BIOS which can be done only through windows. I own a Tecra M4 - 138 running Win XP Tablet Ed and since now I've updated windows fron BIOS (now it is under v3.30). But the last upda

  • Epson Stylus printer 610 is skip lines in Word and Excel

    Original title: Epson Stylus 610 My printer is skip lines in Word and Excel.  How can I fix it.

  • Problem with the game on XP XP3

    I ran into this problem on my XP computer. I know, I know. Old school freak who has not made a change for Vista... closing. In any case, I'm having a problem with the compatibility of the SP3 with a SP2 game, otherwise known as Grand Theft Auto San A

  • How can I stop PC interpreter pop-up from happening?

    It is the lower part of this pop up that I don't want to download it in order to uninstall the evaluation version.  How can I avoid cela irritating pop up? Toby T. All information © 2011 appround.net. For your convenience a weekly notice will offer t

  • File setupdd.sys could not be loaded

    My installation of Windows XP Edition family became damaged and would not start.  I inserted the CD original and rebooted.  The PC has started from the CD.  It was not long before I got this error message: File setupdd.sys could not be loaded.  The e