This is an old revision of the document!


SSCP to SQL Bridge

This daemon-based service allows bi-directional data transfer between an Unipi PLC running Mervis and a SQL database through an SSCP protocol (the proprietary protocol used by Mervis runtime and Mervis IDE). The daemon can run anywhere - on the system with Mervis runtime running, on the same system as a database server or another remote machine.

  • Daemon runs on the PLC
    • In this case the daemon runs on the PLC right next to the Mervis RT and send the data to a remote database. Requires IP connection between the PLC and the database server.
  • Daemon runs a different machine/server
    • This can be divided into two scenarios depending on the network connection.
    • Daemon has IP access to the PLC
      • This is the reverse installation of the first case, where the Daemon runs on the PLC.
      • The Daemon is installed to a server and communicates with the PLC and send the data to the database server.
      • The database server can run on the same server as the daemon or totally different machine.
    • Daemon does NOT have IP access to the PLC
      • This option will be available soon
      • This scenario uses Mervis Proxy server to read the data from the PLC and send them to the database server. The advantage is that the Daemon does not require IP access to he PLC so the server running the Daemon can be on the other side of the World (behind NAT or firewall limiting access to the internal network).
      • Requires the PLC to be connected to the Proxy server.
      • Limited by the speed of the Proxy.
  1. SELECT - This action will read a row from the specified table and force the values to the relevant Mervis variables within the PLC. The row can be specified using the “where” parameter, which will be directly used as a “WHERE” clause in the SQL query. (Set Mervis variable according to the DB)
  2. UPDATE - This action will update a row in the specified table with the variable values in the PLC. The row can be specified using the “where” parameter, which will be directly used as a “WHERE” clause in the SQL query. (Set DB row according to the Mervis variable)
  3. INSERT - This action will insert a row with current PLC values into the specified table each time the variable state is read from the PLC. (Log Mervis variable to the DB)
  • The program is designed to work on both x64 and ARM* platforms including all Unipi PLCs.
  • The SW is distributed as a binary Debian (.deb) package tested on the Debian 9/10 based Linux distributions.
  • As the SW is not an open-source product, contact Unipi support in case you need to operate the SW on another platform.

*Currently arm64 and armhf are supported