CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Thu Jun 22, 2017 5:20 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Fri Mar 31, 2017 8:49 pm 
Offline

Joined: Tue Jan 26, 2016 2:20 pm
Posts: 16
Hi there,
I'm using RPI with Codesys and would like to know - is there any possibility to log the value of any variable to file, including some sort of timestamp. Is it possible without complex CSV or whatever file operations?

In my application I have a temperature sensor, which I want to log.

Thank you


Top
   
PostPosted: Fri Mar 31, 2017 9:02 pm 
Offline

Joined: Thu Apr 23, 2015 4:51 pm
Posts: 29
syoma wrote:
Hi there,
I'm using RPI with Codesys and would like to know - is there any possibility to log the value of any variable to file, including some sort of timestamp. Is it possible without complex CSV or whatever file operations?

In my application I have a temperature sensor, which I want to log.

Thank you

How long do you want to log the variable for and at what frequency?

Sent from my SM-N9005 using Tapatalk


Top
   
PostPosted: Fri Mar 31, 2017 9:30 pm 
Offline

Joined: Tue Jan 26, 2016 2:20 pm
Posts: 16
For example, I have a PID controller, running at 100ms rate. I want to capture transient process of about 20 seconds by logging temperature and controller output every 100ms to make offline analysis and calculate better tuning coefficients for it.


Top
   
PostPosted: Fri Mar 31, 2017 9:45 pm 
Offline

Joined: Thu Apr 23, 2015 4:51 pm
Posts: 29
OK. In my opinion the best way to do it is still using the standard libraries in Codesys.

See this thread for a good explanation.

viewtopic.php?t=7089


Sent from my SM-N9005 using Tapatalk


Top
   
PostPosted: Fri Mar 31, 2017 9:54 pm 
Offline

Joined: Thu Apr 23, 2015 4:51 pm
Posts: 29
The oscat network library is the library you would need.

Sent from my SM-N9005 using Tapatalk


Top
   
PostPosted: Sun May 07, 2017 5:20 pm 
Offline

Joined: Tue Feb 28, 2017 8:43 pm
Posts: 7
Hi, I am resurrecting this thread as I am having some issues with my CSV logging. I am using the CAA file library standard example for creating a CSV file, this works fine and this writes my string to a CSV file. The issue I am having is that rather than writing the string to the CSV file in a new line each time it is triggered to do so, it just overwrites the old data. I have opened the file in append mode and the last part of my string is '$R $N'. I am not sure where I am going wrong.

Does anyone know or have faced this issue before?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 6 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited