Page 1 of 2 1 2 LastLast
Showing results 1 to 10 of 11

Thread: Data import from other database system

  1. #1
    Join Date
    25.03.2018
    Posts
    4

    Default Data import from other database system

    Hello,

    I am not a Zenon user myself but am asking on behalf of my customer.
    My customer wants me to import data from our measuring database into his Zenon database
    because he likes working with Zenon and prefers to have all data in one place.
    That's fine with me. Now the question is: which possibilities do we have?

    I list some more information,  ideas and restrictions:

    - the data to import have 15-minute interval, we have around 100 measuring points, which makes around 10000 records per day

    - the import must be automated on a regular basis, f.e. every 6 hours

    - we could provide an automated CSV export from our system. Can Zenon be automated to import CSV files by some task/job/timer?

    - we could as well do some C# programming. Is it possible to directly write to the database with, f.e. ADO.NET etc.?

    If necessary, I can ask my customer for more information on his version, installation, etc. This post is just supposed to ask for the
    general direction.

    My customer and I would be thankful for any information on how to accomplish this and some pointer to useful documentation.

    Nicolas

  2. #2
    Join Date
    28.02.2013
    Posts
    170

    Default Re: Data import from other database system

    Dear nicolasr25,

    there are different options to get this data into zenon.
    The preferred is to use one of our over 300 communication drivers.
    For example there is one to read data from SQL databases.

    There is another driver reading data from files.

    And there is also the option to include your self programmed  .NET code (our AddIn-Framework) to access data if no communication driver exists.
    To clarify which opition is best, more information about the other system is needed.
    What type of system it is? How is the data stored there and what interfaces does this system offer?

    Best regards,
    Felix

  3. #3
    Join Date
    25.03.2018
    Posts
    4

    Default AW: Data import from other database system

    Dear Felix,
    thanks for your reply. That's a start :-)

    Our system is a FlashFiler2 database. Pretty out-dated these days. We have a native 32-bit Windows DLL for executing SQL queries on it and there is a native ODBC-driver for it, although, I seem to remember that the latter one had compatibility issues at least with MS Excel 2010 up.

    We have good expericences with the DLL in combination with C# programs, restricted of course to 32-bit applications because the DLL is 32-bit.

    The most compatible way would probably be plain CSV files.

    I take it there is no way from an external C# program to directly import the data into the Zenon database?

    The structure is quite simple. All measuring points (variables in Zenon?) could be prepared by my customer with all aditional information like physical units etc.
    Then only records of this structure

    Date; Time; MeasuringPoint; Tariff; Value

    would need to be imported (the tariff part may be dispensible, I would have to check with my customer).
    The main point is that this needs to be automated!

    Best regards,
    Nicolas
    Last edited by nicolasr75 : 26th March 2018 at 20:49

  4. #4
    Join Date
    28.02.2013
    Posts
    170

    Default Re: AW: Data import from other database system

    Good Morning - if you are in Europe - Nicolas

    basically I see three options here:

    1 Use our SQL-driver
    2 Order a customized driver
    3 Create your own code


    Details:
    1:
    We offer a driver (that's how we retrieve data from various sources) that reads values for variables (yes, your measuring points) from a SQL server.
    The main pro here is, that you don't need to code anything (within zenon) on your own, everything is well tested and this apporach is totally included into our support and maintainance.
    One con could be, that the table format is fixed. So you cannot define your own queries but need to fill a predefined table with a fixed format:



    2:
    We can (if technically possible) also create new drivers on your request. If you are interrested in details about pricing etc. please contact your local sales representative.

    3:
    We offer the possibility to extend the functionallity of our zenon platform by your own code. The actual technology for that is our AddIn-Framework. Here you can create Wizard-Extensions (Code that is called and executed once) and Service-Extensions (Code that stays loaded, listens to events etc.). For that Visual Studio, C#, the .Net-Framework etc. can be used. You can also include third party DLLs, database requests, read csv files and the other stuff that might be needed here. But you need to be firm with programming itself, the zenon-API, and some do's and dont's about zenon and coding. So I strongly recommend to go for some special training prior starting the design of your code.
    The pro here is that you have all the freedom the tools mentioned above offer you.
    The main con is, that you have to develop, test, maintain your code this is out of our support service.

    Any of the cases above can automate the data retrieval. So no worries here -> we offer an ergonomic automation platform

    Best regards,
    Felix
    Attached Thumbnails Attached Thumbnails 2018-03-27 08_41_58-zenon 7.60 - Help.png  

  5. #5
    Join Date
    18.12.2017
    Posts
    14

    Default Re: Data import from other database system

    Hi nicolasr25 and felixst!

    If you can export your data as CSV I would suggest the good old DATEI32 driver in zenon.
    You can choose between binary and ASCII data but the format is the same:

    File format 2 - ASCII data:

    Below the header, all data are written to the file in the following format:
    (TZ: separator; can be configured in the driver configuration)


    Header

    Reference date

    10 bytes

    String & TZ
    (e.g.: 10/08/1998)
    Reserve
    90 bytes
    String & <CR><LF>


    Data
    Net address
    10 bytes

    String & TZ

    (e.g. 000000003, Station 01)

    Variable type
    1 byte
    String & TZ
    (B=Bit, W=Word, D=Double word)
    Variable address

    4 bytes

    String & TZ
    (0...9999)
    Value

    10 bytes

    String & TZ
    (0...2147483647)
    time stamp

    8 bytes

    String & TZ
    (0... 99999999)

    In the time stamp, you can specify the time with milliseconds, separated by "." or ",".

    The time stamp of the data is a seconds offset to the reference date (00:00:00) in the header.

    Example for a data line: Address 01;W;0001;0123456789;00055555



    Best regards

    Fredrik


  6. #6
    Join Date
    28.02.2013
    Posts
    170

    Default Re: Data import from other database system

    Hi Fredrik,

    thanks for your addition!

    One thing to take into consideration when talking about this driver is that it only supports integer values. No floating points.
    So if one can live with this limitation, this is also a good option here.

    Regards,
    Felix
    Last edited by felixst : 27th March 2018 at 10:20

  7. #7
    Join Date
    25.03.2018
    Posts
    4

    Default AW: Data import from other database system

    Hello Fredrik and Felix,

    these are very helpful informations.

    About Felix' option 1:
    I don't see how the driver should contact our somewhat exotic FlashFiler database.
    Even if our database is SQL-based, how would the driver connect? Via ODBC?
    I imagine we could also use an intermediate transfer database, f.e. SQLite or PostgreSql.
    Is there a list of supported database systems for Zenon?

    About Fredriks idea:
    that sounds pretty straight forward apart from the fact that we would have to up-scale
    our floating point values to include all decimals in the Integer and later down-scale it
    in Zenon, if that is somehow possible.

    Thanks for your time!
    Nicolas

  8. #8
    Join Date
    28.02.2013
    Posts
    170

    Default Re: AW: Data import from other database system

    Hi Nicolas,

    we support connections to DBs that support ODBC.
    I personally worked with MS SQL (express is also free) and PostgreSql and our dirver.

    The scaling form zenon side is basically not a problem. Either it can be done direct on variable side (but without testing I am not sure about that in this special constellation) or by the uses of some bulit in math functionallity in our system.

    You can also contact your local sales represantative and ask for a demo version. Then you can try on your own.
    But, as you are new to zenon, I strongly recommend to do some training or ask for some consulting in order to have a fast and smoth proof-of-concept.

    Where are you geographically located?

    Regards,
    Felix

  9. #9
    Join Date
    25.03.2018
    Posts
    4

    Default AW: Data import from other database system

    Hi Felix,

    thanks, it looks like the ODBC import could be the most simple.
    Is there any documentation for it? My customer of course has the documentation
    with the software but I guess he doesn't know where to look.

    By coincidence my customer has a training tomorrow (in Salzburg if I'm correct).
    I will tell him everything we discussed and maybe he can test it with his coach.

    Thank you very much!
    Nicolas

  10. #10
    Join Date
    28.02.2013
    Posts
    170

    Default Re: AW: Data import from other database system

    Hi Nicolas and other readers,

    as agreed together with your customer on our phonecall, we will continue to work on this topic in our email support channel.
    This will enable us to share details and confidential customer documents.

    Regards,
    Felix

Similar Threads

  1. Data Types Var Export/Import Issue
    By nkadishi in forum zenon Supervisor
    Replies: 1
    Last Post: 21st July 2016, 08:04
  2. Import DATA mit IEC61850
    By tsit in forum zenon Energy Edition
    Replies: 6
    Last Post: 12th February 2016, 15:26
  3. Import DATA mit IEC61850
    By tsit in forum Drivers
    Replies: 6
    Last Post: 12th February 2016, 15:26
  4. Replies: 2
    Last Post: 7th January 2013, 15:26
  5. Automatic import of report data into Excel
    By jegloco in forum zenon Supervisor
    Replies: 1
    Last Post: 11th January 2011, 16:33

Tags for this Thread

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •