LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data repetition

I am looking for some help with this program I am working on.

One of my old coworkers wrote this program and I am at a loss on why we are getting this data repetition while still getting good timestamping on the data samples. 

We are using a cRIO-9040, The system is running labview professional 24, we are using the cRIO to monitor shared variables over modbus TCP from a yaskawa multi axis controller, as well as internal signals from cards on the cRIO.

We are trying to get the system to write this data at a 100hz frequency. But even when we slow that down to 50hz we are still seeing data repetition.

 

Attached are some screen shots of the sections of the code where this data is being gathered, written to a buffer and then transferred to the UI and then written to the file.

I have pared down the data from 20+ registers to 4 to try and help but I am seeing the data still repeat. I have looked into the loop finishing on time and that is working at the user defined rate.

The cRIO has the scan time set to 10hz as well. It is important to note that not all the variables are being pulled over modbus TCP, we are gathering variables like water level and external encoder from cards on the cRIO, and that data is repeating as well.

I believe we are writing "stale' data to the file at this point. But I can't see where that is happening.

 

 

The data flow in the screenshots attached are, RSI-Acquisition -> Stream Timestamped Data (True case when the data logger is toggled) -> Data logging loop on the UI -> UI - Data Stream Read Write.

0 Kudos
Message 1 of 3
(187 Views)

Unfortunately, what you are seeing is classic when using Network Published Shared Variables. It takes time to update those variables and they hold the old data until it finally gets updated.

 

I highly recommend using a Network Stream or raw TCP/IP to stream your data from the cRIO to the PC.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(179 Views)

We are using a network stream to get the data from the cRIO to the UI on the host pc. 

The issue seems to be gathering the data at the cRIO in our acquisition loop. 

We checked the loop and it is completing properly and sending the data as an array through the network stream to the host PC.

 

The time stamps never skip, but we are seeing repeated data as shown in the attachment here. 

 

0 Kudos
Message 3 of 3
(156 Views)