K8055 Logger

Functions
[ul]
[li]Connect to #0-3[/li]
[li]Show live chart with custom timer[/li]
[li]Save live chart as a png image[/li]
[li]Log data from Analog 1 and 2 and save to analog_1 and analog_2 .txt with the format “dd-mm-YYYY, value” for easy processing by other software[/li][/ul]

Download
Current
[ul][li]V0.02http://bld-live.dk/files/K8055LoggerV0.02.rar[/li][/ul]
Older
[ul][li]V0.01B: http://bld-live.dk/files/K8055LoggerV0.01B.rar[/li][/ul]

To Do
[ul]
[li]Get the “Save path” working[/li]
[li]Put XML read/write in for saving and reading configuation[/li]
[li]Create a function to import stored log files[/li]
[li]Generate charts by loading the stored log files (day/week/month)[/li]
[li]Store data every 100ms for 1 sec (or higher timers), and calculate the avg based on timer interval[/li][/ul]

Example of a log file: (1 sec timer)

09-04-2010 22:07:38,112
09-04-2010 22:07:39,112
09-04-2010 22:07:40,112
09-04-2010 22:07:41,112
09-04-2010 22:07:42,111
09-04-2010 22:07:43,111
09-04-2010 22:07:44,112
09-04-2010 22:07:45,112
09-04-2010 22:07:46,112
09-04-2010 22:07:47,112

Example of a digital log file: (1 sec timer)

10-04-2010 00:56:15,0,0,0,0,0
10-04-2010 00:56:16,1,0,0,0,0
10-04-2010 00:56:17,0,1,0,0,0
10-04-2010 00:56:18,0,0,1,0,0
10-04-2010 00:56:19,0,0,0,1,0
10-04-2010 00:56:20,0,0,0,0,1

Example of a chart saved to the hdd:

Change log:

V0.03 (still unreleased) (~1400 lines, and counting...)
  Made individual "Save path" function for both chart and text logging
  Added logging to file with date formatting in file name
  Added multiple levels of logging for later functions
  Changed format of text in the logging window
  Preparing layout for analog+digital outputs
  Added individual date formatting for both text and chart logging
  Added control for the digital open collector outputs
  Added the option for custom chart scales
  Changed the chart entry limit fro 100 to 1000
  Optimized communication to the K8055 so commands won't be send twice if they are the same

V0.02 (~800 lines)
  Added logging for the digital inputs
  Added background color for the timers running
  Changed start/stop procedure for the timers
  Added tabs for a smaller form and more functions
  Added logging for debugging purposes
  Fixed Connect/Disconnect
  Changed interval validation for the timers
  Removed "Main" start/stop of the timers
  Changed the way the charts are generated, so they will now only update when the tab is visible or "Save to disk" is enabled

V0.01 (~400 lines)
  Got the basic functions down and working
V0.02
    Added logging for the digital inputs
    Added background color for the timers running
    Changed start/stop procedure for the timers
    Added tabs for a smaller form and more functions
    Added logging for debugging purposes
    Fixed Connect/Disconnect
    Changed interval validation for the timers
    Removed "Main" start/stop of the timers
    Changed the way the charts are generated, so they will now only update when the tab is visible or "Save to disk" is enabled

Nice work indeed! :slight_smile:

The link is to the version 0.01B.

[quote=“VEL255”]Nice work indeed! :slight_smile:

The link is to the version 0.01B.[/quote]
Updated, was 2am, and I forgot to upload the program :blush:

Progress on Version 0.03



Time to get some rest again :stuck_out_tongue:

Just passed 1300 lines, and that was even after making some functions to make things simpler. But the digital outputs work now, on/off based on Analog 1 or 2 input.

Update:
And I didn’t get much rest :stuck_out_tongue: Instead i made it possible to scale the charts to custom ranges instead.

And a little video of it running, sadly I only got my mobile phone to do the recording, so the quality is after that too.

youtube.com/watch?v=53GxhO4eBtI

Changed chart entries to 10000 instead of 1000, just to be sure there would be plenty… and 10000 is totally useless, so many entries what you can’t see what is what.

Performance with two charts with 10000 entries in each, and a 1ms timer makes 12% load on my i7 920 processor, and takes 19 mb memory

And a little update… Working on auto scaling, so it can both scale the chart in top and bottom, and also working on the function to save and restore configuration

Sample picture of auto scaling

The chart is measured input from a little solar panel, with the sun going down. 240 entries, 1 min interval

could you could help me with vb 2008 code for an anolog graph similar to the one you use, i have searched and hunted everywere and cant find much help anyware. it would be a beautiful finish to my program that ive built over the past few months, please help a novice !!

BLD,

One word.
WOW!
You do really nice work.

hello bld
can you please give me a litle help???
how can i contact with you ?? i cant find an e mail…

Contact can be found on my website bld-live.dk/ (and you also found it :wink:) I changed my site to Joomla, and still in the progress of adding stuff to it, so the logger isn’t there yet, but it will return to it.

In the meantime, you can have a look at my wireless light switch, controlled by my K8055
bld-live.dk/index.php?option=com … &Itemid=78 :smiley:

Was a easy, fun, safe, and use full less-than-60-minutes project to control a 230V outlet, without even coming close to any high voltage.

[quote=“bld”]Progress on Version 0.03



[/quote]

Does anybody know where this software is located as it’s just what I’m looking for

This seems to be the best software for the K8055 ever created, especially V 0.3 seems to be very promising. If the download links would be working it would be even more great :slight_smile:

Hello,

Maybe you can have a look at the source code of RRD Tool, that works well to with the K8055 under Linux. I’ve seen on their website that it also works under Windows :

mrtg.org/rrdtool/

They might have implemented the autoscaling and usefull things you might want to include in yours.

David.