KUKA
For KUKA KRC4 robot controllers, SQL4automation provides the SQL4KUKA library via the Ethernet KRL XML Interface. SQL4KUKA consists of a configuration file (sql4kuka.xml), the library (sql4kuka.src / sql4kuka.dat), and an example program. The Ethernet KRL XML Interface is available from KUKA as an option.
Connection KUKA robot to SQL database, MES, ERP
SQL4KUKA establishes a TCP/IP connection from the KUKA KRC4 controller to the SQL4automation Connector via the Ethernet KRL XML Interface. The IP and port of the Connector are configured in the sql4kuka.xml configuration file. Database requests are assembled using helper functions for type conversion and submitted via the XML interface. Results are returned as string arrays accessible through table accessor functions.
Integration of the SQL4KUKA library
The SQL4KUKA library is passed as a parameter of the SQL string. The return values of the SQL query can be read out using type-specific functions (Table_To_XXX). Installation requires copying sql4kuka.xml to \krc\roboter\config\user\common\EthernetKRL and the sql4kuka folder to \krc\roboter\krc\r1\program. The EKI Network Editor is used to configure the local IP of the TCP/IP connection. 7 free digital output ports must be assigned and must match between sql4kuka.xml and sql4kuka.dat. After a cold reboot, the sample can be tested.

SQL4automation Link Settings
The SQL4automation Connector is operated with the target setting "KUKA" for KUKA KRC4 controllers. This is a dedicated target type, not "Standard". The IP and port of the Connector are configured in sql4kuka.xml.

FAQ’s
Frequently Asked Questions to KUKA
Which KUKA robot controllers are compatible with SQL4automation?
SQL4KUKA supports KUKA KRC4 controllers and above that have the Ethernet KRL XML Interface option installed. This option must be ordered separately from KUKA. Older KRC2 controllers are not supported.
What is the Ethernet KRL XML Interface and why is it needed?
The Ethernet KRL XML Interface (EKI) is a KUKA option that enables TCP/IP socket communication directly from KRL programs. SQL4KUKA uses EKI to establish the connection to the SQL4automation Connector. Without EKI, KUKA KRL programs cannot initiate TCP socket connections.
How is SQL4KUKA installed on the KRC4 controller?
Copy sql4kuka.xml to the EthernetKRL directory (\krc\roboter\config\user\common\EthernetKRL) and copy the sql4kuka program folder to the program directory (\krc\roboter\krc\r1\program). Then configure 7 free digital output ports in the EKI Network Editor, matching the port assignments in sql4kuka.xml and sql4kuka.dat. Perform a cold reboot to apply all changes.
What target setting must be used in the SQL4automation Connector for KUKA?
The dedicated target setting "KUKA" must be selected in the SQL4automation Connector. This is different from the "Standard" target used for most other controllers. Using the wrong target will prevent communication.
How are query results accessed in a KRL program after a successful SQL query?
Results are stored in DataTable[Row][Column] as string values. The SQL4KUKA library provides helper functions (Table_To_INT, Table_To_REAL, Table_To_STRING, etc.) to extract typed values from the result table. The return value of the SqlRequest function indicates success (0) or an error code.
Which KUKA robot controllers has SQL4automation been tested on?
SQL4automation has been tested on KUKA KRC4 controllers with the Ethernet KRL XML Interface (EKI) option installed. The KRC4 is the minimum supported generation; older KRC2 systems are not supported. Testing required configuring 7 free digital output ports, placing the sql4kuka.xml file in the EthernetKRL directory, and performing a cold reboot after installation.
Technical Data
Switch to SQL4automation Now.
Connect industrial controllers directly with SQL databases. Field-proven since 2007 for maximum performance and security, completely without middleware.