Discussion:
About live streaming data plot
JAMES WATT
2018-07-16 03:02:58 UTC
Permalink
Hello Kst experts,
Kst is a such a wonderful tool for plotting live streaming data.
It just works.
I can validate it by opening a .txt data file by Notepad and change it on
the fly and see the change is reflected within Kst.
However, I have another application that generates to streaming data and
export it to a .txt file in real time.
Once I open Kst and set this file as the data source, the application
prompts 'Could not write to file.(Cannot open file...The process cannot
access the file because it is being used by another process.)'
My question is why is Kst compatible with the plain Notepade.exe but not to
the other application?
If Kst only reads to a .txt file, can I set it to a more "recessive" mode
so that the other application won't deem it as a writing race condition
risk.
Thank you for any comments.
Barth Netterfield
2018-07-16 13:06:53 UTC
Permalink
Hmmm...

This sounds like  Windows race condition.

Alas, I only use Linux, so have no idea how to fix this.  :-(  I do know
that people have successfully used kst real time in windows though.

Does anyone else on the list have any suggestions?

cbn
Post by JAMES WATT
Hello Kst experts,
Kst is a such a wonderful tool for plotting live streaming data.
It just works.
I can validate it by opening a .txt data file by Notepad and change it
on the fly and see the change is reflected within Kst.
However, I have another application that generates to streaming data
and export it to a .txt file in real time.
Once I open Kst and set this file as the data source, the application
prompts 'Could not write to file.(Cannot open file...The process
cannot access the file because it is being used by another process.)'
My question is why is Kst compatible with the plain Notepade.exe but
not to the other application?
If Kst only reads to a .txt file, can I set it to a more "recessive"
mode so that the other application won't deem it as a writing race
condition risk.
Thank you for any comments.
--
C. Barth Netterfield
416-845-0946
Steve Maher
2018-07-16 14:26:18 UTC
Permalink
Hi,

I suspect Notepad reads the entire file and then closes the file, let's you
view/edit, and then. when you write it also closes after the write. By the
time KST sees the change, Notepad does not have a file handle open to the
file.

Having said that, I use KST on windows - writing both .txt files and
dirfiles from a custom (Java) application. The application keeps the
dirfile file handles open continuously and that kst plugin has no problem
reading updates. Perhaps the KST .txt reader is a little more finicky.
Our .txt writer opens, writes, and closes the .txt file for each (1 Hz)
update so again, KST is probably the only file user when it retrieves
updates to the .txt file. I suggest you change your .txt writer to
open/write/close for each update.

Steve


On Mon, Jul 16, 2018 at 9:06 AM Barth Netterfield <
Post by Barth Netterfield
Hmmm...
This sounds like Windows race condition.
Alas, I only use Linux, so have no idea how to fix this. :-( I do know
that people have successfully used kst real time in windows though.
Does anyone else on the list have any suggestions?
cbn
Hello Kst experts,
Kst is a such a wonderful tool for plotting live streaming data.
It just works.
I can validate it by opening a .txt data file by Notepad and change it on
the fly and see the change is reflected within Kst.
However, I have another application that generates to streaming data and
export it to a .txt file in real time.
Once I open Kst and set this file as the data source, the application
prompts 'Could not write to file.(Cannot open file...The process cannot
access the file because it is being used by another process.)'
My question is why is Kst compatible with the plain Notepade.exe but not
to the other application?
If Kst only reads to a .txt file, can I set it to a more "recessive" mode
so that the other application won't deem it as a writing race condition
risk.
Thank you for any comments.
--
C. Barth Netterfield
416-845-0946
Huber, Jörg
2018-07-16 14:32:37 UTC
Permalink
Hi Barth, Hi James,
I’m using Kst (Windows Version Kst-2.0.8 Revision 29f1416) to plot live streaming data.
A Windows data logger program reads data from PLC’s (~ 200-300 data points = columns) and writes a new dataset to a CSV file each 1000ms –even 100ms will work.
At the same time Kst Plot reads from this file without any problems.
I had the same problem when the CSV file writer from the datalogger program was not closed after each dataset. I guess this is your problem!

See attached screenshot of 30 days data plot with Kst.
A new CSV file is generated every day, so even a period of several days can be displayed!
So you are right - Kst is a wonderful tool.

Best regards
Joerg


Registergericht / Register Court: Freiburg HRB 390485
Vorsitzender des Aufsichtsrates / Chairman of the Supervisory Board:
Hans-Jörg Vetter
Vorstand / Board of Management:
Dr.-Ing. E. h. Martin Herrenknecht, Vorsitzender / Chairman
Dipl.-Wirtsch.-Ing. Michael Sprang, CFO und Stellvertreter / Vice Chairman
Dipl.-Ing. (FH) GÃŒnter Richter
Dipl.-Ing. (FH) Ulrich Schaffhauser

Weitere Informationen zum Datenschutz finden Sie unter https://www.herrenknecht.com/de/funktionen/datenschutz.html



Von: Kst <kst-***@kde.org> Im Auftrag von Barth Netterfield
Gesendet: Montag, 16. Juli 2018 15:07
An: ***@kde.org; JAMES WATT <***@gmail.com>
Betreff: Re: About live streaming data plot


Hmmm...

This sounds like Windows race condition.

Alas, I only use Linux, so have no idea how to fix this. :-( I do know that people have successfully used kst real time in windows though.

Does anyone else on the list have any suggestions?

cbn

On 2018-07-15 11:02 PM, JAMES WATT wrote:
Hello Kst experts,
Kst is a such a wonderful tool for plotting live streaming data.
It just works.
I can validate it by opening a .txt data file by Notepad and change it on the fly and see the change is reflected within Kst.
However, I have another application that generates to streaming data and export it to a .txt file in real time.
Once I open Kst and set this file as the data source, the application prompts 'Could not write to file.(Cannot open file...The process cannot access the file because it is being used by another process.)'
My question is why is Kst compatible with the plain Notepade.exe but not to the other application?
If Kst only reads to a .txt file, can I set it to a more "recessive" mode so that the other application won't deem it as a writing race condition risk.
Thank you for any comments.
--
C. Barth Netterfield

416-845-0946
Loading...