Showing results for 
Search instead for 
Did you mean: 

Chart not updating on WebVI

Go to solution

I have a data logging application running in LabVIEW 2019 which uploads a single double value to SystemLinkCloud every second.


I made a WebVI, in LabVIEW NXG 5.0, which should display this data on a chart. It works fine for displaying the double values, but when I try convert the data to a waveform for the chart to use the timestamp information, the chart doesn't update properly. The chart shows a line for a split second, then that disappears (see the attached screenshot for an example of the line before it disappears). However, if I switch to another tab in the browser, then switch back, it shows multiple data-points for a split second, before deleting them again.


The WebVI is running in SystemLinkCloud. I have attached the LabVIEW NXG code here.


I have tried on multiple browsers (Edge, Firefox, Chrome).

Download All
0 Kudos
Message 1 of 5

Hey Ben,


I'm still running NXG 4.0 so I can't open your file to see what you've tried but maybe you can try building a waveform and then editing the properties to write your data to the chart. It's a combination of building an array from the DBL data and setting the waveform properties with constants. I've attached a picture of code I've used in the past. See if it works for you. 

0 Kudos
Message 2 of 5

Hi ben.klapaukh


From the provided NXG 5 example, which I'll create a snippet as follows:




I can see that if Read Tag (or one of the previous VIs like Open Configuration API Key or Open Tag) results in an error, then the value is still passed to the chart.


In error cases the chart will be passed a waveform that uses the default timestamp for the start time and NaN as the value. If you modify the VI to perform error checking, for example by avoiding writing to the chart if an error is returned from Read Tag, does the VI still behave as described?


if you still see the problematic behavior with error checking added could you try to create a reproducing example that does not rely on the Read Tag calls? For instance capture the values returned by Read Tag in an array and create a new example that shows the behavior with those values.


0 Kudos
Message 3 of 5
Accepted by topic author ben.klapaukh

Hi Kbement93 and MilanR,


It wasn't throwing an error. The problem was that ReadTag would output the latest value that is stored in the tag,  even if it had already been read. It was trying to write duplicate values, with duplicate timestamps, to the chart, and that was making it act strangely.


I fixed it by using a shift register, and only writing to the chart if the timestamp was different than the last one.



Thanks for your help!

Message 4 of 5

Hi ben.klapaukh,


Thank you for replying back with your investigation and workaround. It does look like the WebVI chart is behaving differently from the Desktop chart when duplicate values are passed. I created Bug 1046460 to further investigate the behavior.

0 Kudos
Message 5 of 5