Forum Home › Forums › Communicating with Devices › Read PostGre SQL data and write them in OPC UA
- This topic has 7 replies, 2 voices, and was last updated 1 year, 6 months ago by
Mikhail.
-
AuthorPosts
-
March 11, 2024 at 3:27 pm #14186
loudurin
ParticipantHello,
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 serverIs 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 ?
March 12, 2024 at 6:46 am #14194Mikhail
ModeratorHello,
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.March 12, 2024 at 6:48 am #14195Mikhail
ModeratorIf 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.March 12, 2024 at 9:29 am #14197loudurin
ParticipantHello,
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 advancehttps://ibb.co/dMj8kP2
https://ibb.co/t4RFq9k
https://ibb.co/zhCYbLM
https://ibb.co/t25K3jmMarch 12, 2024 at 10:50 am #14201Mikhail
ModeratorOh, you use Rapid SCADA 5. The required feature (OPC UA server) is in version 6.
March 12, 2024 at 2:00 pm #14203loudurin
ParticipantI’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” ?
March 12, 2024 at 2:56 pm #14204loudurin
ParticipantI’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/pnjm4bTMarch 14, 2024 at 5:12 am #14212 -
AuthorPosts
- You must be logged in to reply to this topic.