Topic | Scilab Script for visualization of Mooshimeter Log files

Home Forums Mooshimeter Support Scilab Script for visualization of Mooshimeter Log files

This topic contains 4 replies, has 2 voices, and was last updated by  Richard 4 weeks ago.

  • Author
    Posts
  • #18392 Reply

    Richard

    Hey Folks,
    for my own needs I wrote an Scilab script to visualize the mooshimeter log data. … aaand I figured someone else might find this useful as well, so here you go:
    https://hastebin.com/apumeyojig.php

    Features:
    – 2-Axes Plot for CH1 and CH2 with different colors
    – Automatic time scaling (sec, min, hrs, …) depending on log duration
    – Lots of log information
    – Automatic saving of the graph as PDF

    To state the obvious: this script is catered for my needs, so you probably need to customize it for your own needs. However there should be plenty of example code in it, also I commented a lot of the code.

    Have fun!
    richard

    PS:
    Tested only under Linux, but it should work under Windows as well.

    PPS:
    Here you can get the software: http://www.scilab.org/
    (free and open source)

  • #18875 Reply

    Harry
    Participant

    Hey Richard,

    fortunately the good James could recover my response, so here it follows (it was btw, because of an to sensitive acting spam filter .. I had another topic affected completely by that, so I got in touch with him)

    I just found the time and it’s awesome, but also a very komplex application. ^^

    I’m a technician (Mechatroniker, to be exact) but I haven’t studied, so komplex math and scripting skills aren’t unfortunately my level. But I understand at least the substance of your code. So putting the desc via an if condition on file name was no problem. But the next I didn’t get and need a little help there.

    The output looks really nice, but I wish there where straight lines plotted from the left y axis (if possible the right too) and the x axis.
    I think it should look nice and useful if the lines where in the color of axis and very thin. I read a while trough documentation, plot2d, axes properties,… but I didn’t find anything about, nor an example code. That surprised me a bit. I don’t think such an mighty application can not handle this? Can you help me out how to realize that in your code?

    And I have 2 additional questions:

    1) I have 2 (now a couple more) logs where the additional Info box isn’t printed. From the code, as far as I understood, It should always be printed. Or is there something I don’t understand correctly? I could give you the logfiles + pdf if you will have a look on it. This is not life-important – but I really would like to unterstand why. :)

    2) The generated PDFs are in landscape mode, but turned over 90° (so in fact standard DINA4 portrait, but I have to turn it manually to read without neck hurting ^^). I found out that, if it’s set instead to ‘portrait’ in the code, the output file is in proper landscape mode. Do you have an explanation for that? :D

    Thx in advance for your time!
    cheers Harry

    PS: We could also write in german, but I thought this may could be interesting for other users too (now or then..), so if my poor english don’t bother you … ^^

  • #18941 Reply

    Richard

    Hey Harry,
    glad your post could be recovered. Scilab is indeed a very powerful application and as such needs some training to get used to. But I would say it is totally worth it, especially in your career as a mechatronic or for private hobbies. :-)

    Regarding your questions, right now I’m not on PC with scilab installed so I can’t test it, but my thoughts:
    1. “thin lines”
    Could it be that you mean a grid? If so you should check out:
    https://help.scilab.org/docs/6.0.0/en_US/xgrid.html

    2. infobox
    Unfortunately there is no way (yet) to tell the infobox to have it in the “lower left”, instead I had to hardcode the coordinates:
    > xstring(1,0.1,infobox,0,1);
    In this case 0 / 0.1 – so if this is outside your axes boundary, you will not see the infobox. You can check this by zooming out in the graph window. To fix it, try changing the coordinates in the script.

    3. PDF
    Need to check this, might be a bug (or feature) of scilab.

    Hope this helps and feel free to ask again. :-)
    cheers
    richard

  • #18942 Reply

    Richard

    PS:
    About the grid actually it can be set as an axes property:
    https://help.scilab.org/docs/6.0.0/en_US/axes_properties.html

  • #19110 Reply

    Richard
Reply To: Scilab Script for visualization of Mooshimeter Log files
Your information: