Allen Bradley Micro820 PLC data logging to sql server

johnsmith

Member
Join Date
Sep 2022
Location
Kl
Posts
9
Hi everyone,

I have a small project where I need to use plc to get sensor data and log them to an sql server locally or remote.

I have found two library that helps to read tags from plc device which are as following:

- https://github.com/dmroeder/pylogix (PYTHON)
- https://github.com/msvargas/node-logix/blob/master/src/PLC.ts (JAVASCRIPT)

But for above libraries i need to have a middleman device/server to listen to plc tags and help store them to sql server. (I have used both libraries and both works and I can read the tags from plc)

And my question -> is it possible to configure PLC to direct write to sql without any middle man device to help us lower the cost.


PLC Model: Link
 
Welcome to the PLCTalk Forum community !

Unfortunately, most small PLC controllers lack the computing power to directly act as an SQL client. Those that do are typically based on Linux, rather than a more conventional RTOS like VxWorks.

The Micro 800 series of controllers do not have operating system functions or even expansion modules that allow them to directly read or write to SQL databases.
 
most small PLC controllers lack the computing power to directly act as an SQL client. ...

The Micro 800 series of controllers do not have operating system functions or even expansion modules that allow them to directly read or write to SQL databases.
+1

Bottom line: most PLCs are simple, reading data, performing logic, changing outputs.

It may be counter-intuitive, but the middle-man lowers the cost; to do this without a middleman would require different hardware than the Micro8xx line. For example, if the Micro820 in OP's project is only reading sensor data, and not executing logic and changing outputs in response to sensor and HMI inputs, then finding sensors that can be connected to a device that can communicate with the SQL server might be the way to go.

Alternatively, to eliminate the middle-man device, the middle-man software could run on the SQL server itself, if data can be pulled by that server from the PLC, or if the PLC could push the data to a middleman server, e.g. Modbus or custom, on the host running SQL.
 
Welcome to the PLCTalk Forum community !

Unfortunately, most small PLC controllers lack the computing power to directly act as an SQL client. Those that do are typically based on Linux, rather than a more conventional RTOS like VxWorks.

The Micro 800 series of controllers do not have operating system functions or even expansion modules that allow them to directly read or write to SQL databases.
Sound like a Job for a RedLion Datalogger

https://www.redlion.net/products/industrial-automation/controllers-and-data-acquisition/data-station-plus


Another alternative would be run Cogent Datahub or nodeRed to get data and push to the SQL, but I think the Redlion would do the job.
 
Hi everyone,

Thank you very much for your informative replies really appreciated.

Quick update:

- Currently I have decided to use nodejs server which pulls the data from Micro820 PLC and stores them to a sql db using the mentioned javascript library above.

- the library is really cool and have very useful features, for example you can discover all the plc in your network and also get all the tags from plc.


Question:

- is this approach better than using Modbus as mentioned by @drbitboy ?
 

Similar Topics

Hi Everyone, I have a small project where I need to read plc data from sensors and store them into a sql db. Currently looking for: - heat...
Replies
7
Views
2,752
Hello to all. I am new to PLC’s as well as this forum so if I make any mistakes please forgive me. I am having an issue using the 2080 OF2...
Replies
9
Views
2,779
Trying to export my tags to a CSV, according to the help file just select the tags and copy then paste into excel, this works for local variables...
Replies
5
Views
2,453
Can someone give me some advice on how to download a program onto this processor? Am using a crossover cable but not able to see the processor in...
Replies
3
Views
2,014
I am looking to connect an Allen Bradley Micro820 processor and an C200 HMI panel via Serial Connection. Anyone have any suggestions?
Replies
4
Views
9,258
Back
Top Bottom