Send data from PLC to web (Rest API)

markus_hmi

Member
Join Date
Jun 2016
Location
DE
Posts
3
[FONT=&quot]Dear forum members,[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]I have a special request, I need to send data from PLC to the web. They will be stored in the database and processed with other data in a cloud. I was thinking about node.js as I can see it is widely used in IT world and would fit my requirements, but I don't know how to connect node.js and PLC. I am using Siemens S7 PLCs, but would like to have universal solution. Can you help? :unsure:[/FONT]
 
[FONT=&quot]Dear markus,[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]the only solution I am aware of is to use a SCADA system to read values from PLCs and then send them to the cloud. There is only one product on the market supporting Node.js (others are stuck with their own custom scripting like Wonderware, or use old legacy Visual Basic 6) and it is mySCADA. I have done similar task with them, reading data from PLCs and sending it to mySQL database in a cloud. It turned out to be quite simple[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]1. I downloaded myDESIGNER for project creation and installed a runtime called myPRO[/FONT]
[FONT=&quot]2. I have created a table for reading values from PLC[/FONT]
[FONT=&quot]3. mySCADA has node.js embedded including a debugger! It is great to use, much better than debug using a console..[/FONT]
[FONT=&quot]4. I periodically read values from PLC and send them to mySQL database[/FONT]
[FONT=&quot]5. mySCADA has database drivers included so I just used integrated function to send the data[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]All code has around 30 lines and I made it running within couple of hours. [/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Sending data to a cloud over rest api should be even easier.[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]I can share a tutorial how to do it, if someone is interested.[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Oh one more thing, mySCADA is paid SW, but you can download fully functional demo version for non-comercial use.
[/FONT]
[FONT=&quot]Good luck.
[/FONT]
 
Maple System HMI (All of Maple Systems HMI are MQTT Publishers)

They are very affordable, even if you don't want to incorporate an HMI in you project, you could use it just as your EDGE GATEWAY.

I also believe "Cirrus Link" has an EDGE GATEWAY that uses the Raspberry Pi 3 and this board can be purchased starting at about $29.00 USD, it is also an MQTT publisher/subscriber but I think you are limited to about 500 tags.

I'm sure there are many more. MQTT would be a great choice for the Protocol should you move forward with this project.
 
If you can get node.js to play nice, you can try to use the Snap7 dll to connect to the PLC and read the data.
 
It sounds like you want to move data from the PLC to a database. You don't need node.js to do that. Any SCADA package will do that.

You could also purchase a direct driver. You would use the driver in a custom app that you would write. The app/service would connect to the PLC and to a DB through a common DB connector. Once the data is in the DB, you can do whatever you want.
 

Similar Topics

I'm fairly new to the PLC world. We are adding a pc to a line at my work the pc is to track good/bad parts and up/down time of the machine maybe...
Replies
8
Views
2,423
Hi All, I'm using AB plc 5370(Modbus TCP slave progm type) with GE cimplicity scada V8.1. For DI,DO,AI communication is working good. But, I...
Replies
10
Views
2,535
Hi, I want to send the data from ML1400 to ABB PLC. Can anyone help me to send the data through MSG instruction setup. Best Regards, Prasanna
Replies
1
Views
1,353
I have written a computer program that generates a number that needs to be sent to a PLC. What's the best way of doing this? The computer is...
Replies
10
Views
4,660
I have a delta plc that want to send and recive data from it. I use this code for open serial port. SerialPort port = new...
Replies
4
Views
4,981
Back
Top Bottom