Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Trends from database data

witalis
2017-12-30
2017-12-31
  • witalis - 2017-12-30

    Hi all,

    I'm considering to use Codesys 3.5 (Control Win SL) as simple SCADA software. Is there possibility to draw trends for historical data stored e.g in MySQL or PostgreSQL database?
    I would do it as loading the data(specified timeperiod from database) buffer to array, then this array would be presented as the trend.
    Is there easy way to do this or You have better ideas?
    I have few knowledge about Codesys.

     
  • eschwellinger

    eschwellinger - 2017-12-31

    Hi,
    the integrated trend is using a sqlite database.
    At the moment it is not possible to connect this to an external database.
    Sure to access your sql database is possible by the following store products:
    https://store.codesys.com/catalogsearch/result/?q=sql
    Not sure if this helps,
    if you have these values in an array you might use the new xy element (since 3.5SP12 available )to show the values.

    If you need an XY element example project please let me know - there will come an example to the CODESYS store,
    this will take some time.
    BR
    Edwin

     
  • witalis - 2017-12-31

    Thank You Edwin for You fast answer

    I think, I will try with the integrated sqlite. Probably this is enough for this project.
    As I understand -> there is option to record observed variables, whose values are stored in integrated SQLite, is it right? I need to store data for at least 2 years, I will have about 15 analog variables.

    I will also play with XY element. Maybe I will put 2 buttons "<<" ">>" with the trend. Pressing these buttons would load another time period from database to temporary array. This I think would automatically refresh the trend.

     

Log in to post a comment.