Read PostGre SQL data and write them in OPC UA

Forum Home Forums Communicating with Devices Read PostGre SQL data and write them in OPC UA

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #14186
    loudurin
    Participant

    Hello,
    I’m currently working with a dataset of 30 variables between a PostGre SQL database and a ProSys OPC UA server. What I’m trying to do is:
    -Every minute, run a query that returns 30 variables having an id and a value
    -Write all of the values to an OPC UA server (Prosys) according to the variable ids, which are the same in the database and in the server

    Is RapidScada capable of “transfering” the data from an input channel (PostGreSQL) to an output channel (OPC UA) by mapping the ids ? If so, can you describe the configuration required ?

    • This topic was modified 1 year, 6 months ago by loudurin.
    • This topic was modified 1 year, 6 months ago by loudurin.
    #14194
    Mikhail
    Moderator

    Hello,
    OPC UA server that is provided by DrvDsOpcUaServer.dll works on the level of the Communicator application. Therefore, it cannot access to channels that are managed by the Server application. It can access to data collected by other Communicator drivers. However, there is DrvDbImport.dll driver that reads data from a SQL database. Probably, you can read data from the DB by the DB Import driver, and then provide it using Rapid SCADA OPC UA server.

    #14195
    Mikhail
    Moderator

    If the above works for you, there are 2 steps:
    1. Read data from the DB with DrvDbImport.dll
    2. Enable OPC UA server to provide data to other apps.

    #14197
    loudurin
    Participant

    Hello,
    Thank you for your reply. I have already managed to read data from the database using DB Import. I have also configured the UA OPC server and I can now read and write data to it, like manually. What I’d like to do is using the result of my SQL query to write those data automatically to the OPC UA server. I don’t know how to map the 2 devices. Here is the configuration I have.
    Thanks in advance

    https://ibb.co/dMj8kP2
    https://ibb.co/t4RFq9k
    https://ibb.co/zhCYbLM
    https://ibb.co/t25K3jm

    #14201
    Mikhail
    Moderator

    Oh, you use Rapid SCADA 5. The required feature (OPC UA server) is in version 6.

    #14203
    loudurin
    Participant

    I’ve downloaded the version 6 and managed to retrieve the SQL data. If I correctly understand, there’s a way to use a server OPC UA which is provided by rapid scada ? Can you explain how to configure it ? Should I have an OPC UA device on my line ? If not, what is the adress of the “local rapid scada opc UA server” ?

    https://ibb.co/31qcdPr

    #14204
    loudurin
    Participant

    I’ve added an OpcUaServer and configured it as follows, but I can’t access it in UA Expert for example. How can I create variables in this server so that I can use them later to write the data retrieved by SQL?

    https://ibb.co/61zskfV
    https://ibb.co/2Mn5yH4
    https://ibb.co/pnjm4bT

    #14212
    Mikhail
    Moderator

    Please check this video. It should help to connect to OPC UA server. In the video Prosys OPC browser is used. However, any client is OK.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.