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

SQL for codesys 3.5

lucasys
2014-06-27
2022-03-29
  • lucasys - 2014-06-27

    I use CoDeSys 3.5 SP3 for panels Wachendorff with linux operating system
    I need connecting to database LiteSQL using SQL by lines of code.

    I see one example end library SQL4CODESYS downloaded from the store

    Wachendorff with CoDeSys 3.5base is sufficient for running application?

    thanks Luca

     
  • r.kunz - 2014-07-09

    Hi Luca

    The SQL4CODESYS library uses the SysSocket library for communicating over TCP/IP to the SQL4automation Connector service.
    If your system supports that, it should be possible to use SQL4automation to connect to any database that supports ODBC.

    Is there an ODBC driver for LiteSQL? Or did you mean SQLite?

    Roger

     
  • Thom - 2016-10-11

    Hi,

    I'm looking too about a SQL library for CodeSys. But I only want to manage a local database in a first time.

    So, SQL4CODESYS can exchange with a database store into a local memory of my PLC or I need other library ?

    Thomas.

     
  • Anonymous - 2016-10-14

    Originally created by: KevinR

    Hello Thom,

    you can also use the library for MySQL (see store: http://store.codesys.com/mysql-library-sl.html.
    The library doesn't need any 3rd-party software as ODBC-Drivers or other software, you can execute sql commands from your controller.

    If you have permissions and an compatible operating system, then you can also install an MySQL Server directly on your controller.

    Best Regards,
    Kevin

     
  • alesam - 2021-08-25

    Hello! I am new to Codesys and I need to send data from my Festo PLC (CPX-CEC) to a microsoft sql database. I am basing myself on the examples from the library MsSQL for CODESYS and the ones from the library SQL4CODESYS. The problem is that with the mssql library, I can't even log into the database because the error "gc iLengthOfByteArrays is longer thanPLC can handle. " keeps appearing whenever I do anything. I tried changing the value of gc iLengthOfByteArrays to something smaller like it says to do in the user manual but if I put anything under 29 it tells me that there are numbers not defined and if I put anything above 29 I get the errror of the byte arrarys being longer than the PLC. I tried the SQL4CODESYS library and i also get an error relating to the lenght of the query being too long.

    What can i do? Where is my error? I really need help and i can't find any information on this.

     
  • steve - 2022-03-29

    Hi, I want to use an external PostgreSQL Database to log production events.

    Will any of the above libraries work fort that,
    or will I have to use MySQL for it to be compatible?

    Would be very grateful for a hint.

    Greetings Steve

     

Log in to post a comment.