Why Do I Receive Duplicate Data When Reading From Shared Variables Hosted on My Real-Time Controller?Primary Software: LabVIEW Modules>>Real-Time ModulePrimary Software Version: 8.2.1 Primary Software Fixed Version: N/A Secondary Software: N/A
Problem: I am writing to shared variables on my Real-Time controller and reading from them on a client running on my host PC. When I view the data by outputting it to an array or writing to a file, I notice many duplicate data points. If I read the timestamp from the shared variable node as well, I see duplicate timestamps. How can I avoid viewing the same data point more than once? Solution: You can avoid viewing the same data point more than once by enabling the RT FIFO on your network published shared variables, and configuring it to be Multi-Element. When writing to a network published shared variable without the RT FIFO enabled, or with it enabled and configured for Single Element, the data point will remain in the buffer until it is replaced by a new data point. When the client reads from this buffer it will read the same data over and over again until new data is available. When you enable the RT FIFO and configure it for Multi-Element, the data remains in the buffer only until it is read by the client. Once the data is read by the client, it is removed from the buffer and cannot be read again. The client will not update until there is new data available. Related Links: Developer Zone Tutorial: Using the LabVIEW Shared Variable Attachments:
Report Date: 11/14/2008 Last Updated: 11/14/2008 Document ID: 4RD9RI3S |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
