Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
509 views
in Technique[技术] by (71.8m points)

sql - Where should I start with my OPC-UA client?

I need to create something to read data from a PLC and write it to a SQL database. I mostly work with Siemens (and Sigmatek) and I think OPC-UA would be a good solution. My problem is that I don't know what the "right" way would be to start with this. With a PLC you sometimes come in contact with C or C++ (I always forget which one). So I think that would be a good starting point, but a good connection to an SQL-database would be very handy. That's where things gets blurry for me.

In the past I made some code (in C#) to read data from an OPC-UA server (on a Sigmatek PLC). Once I was able to read the data in C# it was easy to visualise it with a windows form application and export the data to an excel-file.

I want to start a "project" to learn how to get my data from the OPC-Server, into an SQL-database, generate a report (and create a GUI).

I'm hoping to get a good starting points, suggestions on which programming language to use and maybe a good read that gives me a better understanding of what I'm working with.

Thanks in advance!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

If you are just looking to move data from a PLC to a database then take a look at Node-Red. Here is a video that should help you get started. Node-Red can do OPC-UA or just talk direct to the PLC with out the need for OPC in the middle it's your choice. If you need more help just ask!!

https://www.youtube.com/watch?v=LaUmhhMdoyY

Node-Red can also do the GUI.

For the reporting you can use https://grafana.com/.

If you would like a good Database to log to look at https://www.timescale.com/.

Grafana and Timescale work well together!!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...