Stäubli
For Stäubli CS8C and CS9 robot controllers running VAL3, SQL4automation provides the SQL4Val3 library and a sample project. SQL4Val3 can be directly integrated as a library and runs on all Stäubli CS8 and Stäubli CS9 controllers with firmware version V7 or higher. In addition, the library can be tested directly on the Stäubli Emulator.
Connecting Stäubli Robots to SQL Databases, MES, ERP
For Stäubli robots, SQL4automation provides a sample project and a library. SQL4Val3 can be directly integrated as a library and runs on all Stäubli CS8 and Stäubli CS9 controllers with firmware version V7 or higher. In addition, the library can be tested directly on the Stäubli Emulator. The library receives parameters such as the socket connection, a structure for the SQL request, and a structure for the SQL response. The return values of the SQL query are written to the two-dimensional string array S4AResultMain.sValues.
Integration of the SQL4Val3 Library
SQL4Val3 consists of a library module and user-defined data types (S4ARequest for the request, S4AResult for the response). These are added to the VAL3 project via the References tab in Stäubli Robotics Studio. The socket is defined as a client with configurable IP address, port, and timeout. A database request is executed by calling SQL4Val3(sioSocket, S4ARequest, S4AResult).

SQL4automation Link Settings
The SQL4automation Connector is operated with the target setting "Staeubli Val3" for Stäubli CS8C & CS9 controllers. The IP address and port of the Connector are configured in the socket settings within the VAL3 project.

Tested Stäubli Controllers
The SQL4Val3 library has been tested on the following Stäubli robot controllers:
- Stäubli CS8C V7 and higher
- Stäubli SC9
- Stäubli Emulator V7 and higher
FAQ’s
Frequently Asked Questions to Stäubli
Which Stäubli robot controllers are compatible with SQL4automation?
SQL4automation supports Stäubli CS8C and CS9 control systems running VAL3 Version 7.0 or above. The integration uses the TCP interface of the CS8/CS9. The sample project can be tested in the Stäubli Robotics Studio emulator (use 127.0.0.1 as Connector IP) before deploying to physical hardware.
SQL4automation supports Stäubli CS8C and CS9 control systems running VAL3 Version 7.0 or above. The integration uses the TCP interface of the CS8/CS9. The sample project can be tested in the Stäubli Robotics Studio emulator (use 127.0.0.1 as Connector IP) before deploying to physical hardware.
The SQL request is assembled in the S4ARequest.sRequest string array and passed to the SQL4Val3 function. The response is returned in the S4AResult structure: nState contains the status code (0 = success), nRows and nColumns report the result dimensions, sHeaders contains column names, and sValues is a 2D string array with the query result data. The SQL request is assembled in the S4ARequest.sRequest string array and passed to the SQL4Val3 function. The response is returned in the S4AResult structure: nState contains the status code (0 = success), nRows and nColumns report the result dimensions, sHeaders contains column names, and sValues is a 2D string array with the query result data.
What target setting must be used in the SQL4automation Connector for Stäubli?
The dedicated target setting "Staeubli Val3" 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.
Can the SQL4Val3 library be tested without a physical CS8C/CS9 controller?
Yes. The sample project can be executed in the Stäubli Robotics Studio emulator. When testing in the emulator, use 127.0.0.1 as the Connector IP address since the emulator and Connector run on the same PC.
Which SQL databases can a Stäubli VAL3 controller connect to via SQL4automation?
All ODBC-compatible databases are supported, including Microsoft SQL Server, MySQL, MariaDB, PostgreSQL, Oracle, and SQLite. The database selection is made exclusively in the SQL4automation Connector. No changes to the VAL3 project are required when switching databases.
Which Stäubli robot systems has SQL4automation been tested on?
SQL4automation has been tested on the Stäubli CS8C control system running Val3 Version 7.0 and above. Testing was performed both in the Stäubli Robotics Studio emulator (using 127.0.0.1 as the Connector IP) and on a physical CS8C controller. Other Stäubli CS8C-based systems running Val3 7.0+ should be compatible.
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.