Looking for Open Source Automation Framework

Thread Starter

Sigdl

Joined Feb 20, 2022
11
Hi everyone. I'm in search of a free general industrial automation framework, something to implement a general process control system, which allows me to configure and arbitrary set of network nodes (Ethernet, CAN, WiFi, etc), each one with an arbitrary set of I/O, in a way that I can program any control loop, discrete or continuous.

Is there something like that? I don't want to reinvent the wheel

Thanks in advance
 

MaxHeadRoom

Joined Jul 18, 2013
26,291
Do you mean something like Modbus with the suitable hardware at each node?
The hardware will depend on the control process required.
 

Thread Starter

Sigdl

Joined Feb 20, 2022
11
Thanks for your response

I don't know Modbus very well but I believe it's only the communication protocol and doesn't provide an organization for the whole network, nor works with most topologies like CAN or WiFi

I'd like something that creates a map between every I/O and its path so central node can manage the whole network no matter the involved topologies and gateways (for example Node<=WiFi=>Node<=CAN=>Node-I/O
 

strantor

Joined Oct 3, 2010
6,338
Your question could mean a lot of different things.

I use Python to construct SCADA-like systems. It has many libraries for automation comms. I have PC-based systems online at several facilities which run a multi-threaded PyQt app that performs simultaneous continuous communication with:
  • Siemens PLC over ethernet using Snap7 library
  • AutomationDirect Productivity PLC over ethernet with pyModbus (modbus TCP)
  • Markem Imaje printer with built-in serial library (RS232)
  • ThingMagic/Jadak RFID reader using telnet
  • OAK-D POE camera using ethernet comms built into DepthAI library
  • Public Ercot server (fetch current electric power cost) using 'requests' library (automated web scraping)
  • Local data server API using JSON and requests.
  • Diris power quality meter using modbus RTU (RS485)
  • AutomationDirect Click PLC with pyModbus (TCP)
  • Omron PLC with FINS protocol over ethernet.
  • Advantech Adam serial IO using ASCII serial (RS485)
  • Microsoft Exchange server (send automated notification emails and receive admin overrides) with IMAP and SMTP emails
  • Public OCR server API (submit camera image, receive text translation).
  • Multiple Stellar soft starter with modbus RTU
  • Toshiba soft starter with modbus RTU.
  • Fetch weather data from openWeatherMap API server
  • Data storage in CSV format to NAS
  • Laumas weigh scale using Modbus TCP
  • Raspberry Pi with telnet
  • Barcode scanner as USB keyboard input
My python script runs all these tasks cyclically. When one is done it gets put back into the thread queue and runs again immediately as soon as it can. Some only get added to the queue on a time interval (ex: weather data fetched at 30min intervals) but for the most part it's polling all these things, all the time, very fast.

The system functions as a relay station for data; get image from camera, send to OCR server for translation, compare to data from RFID reader and local server, exercise inhibit control over local machines if data discrepancy exists - send email to manager and relax inhibit control if manager gives approval via email. Get weather data, power usage data, etc (thousands of data points), log to NAS. Get power price data from ERCOT server and shut down local equipment if price goes too high. Exchange & re-format data between siemens PLC and AD PLCs. Get stencil information from local server over ethernet, format, and forward it to Markem printer over RS232. Display relevant information locally to operator and accept human inputs, And on and on. It does a lot, but what it does not do, is directly control machines. PLCs are used for that.

The system is infinitely configurable, but very manual. If you're looking for something with "drag and drop" levels of convenience this is not for you. But if you want the answer to "but can you do________?" to be always YES, then it is.
 
Last edited:

Thread Starter

Sigdl

Joined Feb 20, 2022
11
After MaxHeadRoom's response, I kept researching and realized SCADA is exactly what I'm looking for. I knew a bit about SCADA but didn't realize that's the place where the construct I need is

I'm not looking exactly for a "drag and drop" but at least something that has the basic foundation: how to do the abstraction mechanism that converts any I/O in any node of any type of network into a unified space which can be used by a control loop in a general way. That sort of things

Any advice on a good system for general I/O virtualization will be greatly appreciated
 

strantor

Joined Oct 3, 2010
6,338
After MaxHeadRoom's response, I kept researching and realized SCADA is exactly what I'm looking for. I knew a bit about SCADA but didn't realize that's the place where the construct I need is

I'm not looking exactly for a "drag and drop" but at least something that has the basic foundation: how to do the abstraction mechanism that converts any I/O in any node of any type of network into a unified space which can be used by a control loop in a general way. That sort of things

Any advice on a good system for general I/O virtualization will be greatly appreciated
I don't know of any open source or free SCADA software. That's why I made my own with Python.

This is something typically only needed by large corporations which are able to pay big bucks, so there is little incentive to offer it for free or even for cheap.

This is a "if you have to ask, you can't afford it" kind of situation so most providers of SCADA software don't advertise price. The only one I know of that does, is Ignition. You can check out their website to build a package that works for your needs and get an idea of how much it costs.
 

Thread Starter

Sigdl

Joined Feb 20, 2022
11
There are several free SCADA packages, most of them abandonware or almost. But all of them are focused on typical industrial environments, not a basic framework for any automation task, except maybe MBLogic, which I've never understood.

Maybe I'm wrong and need to study those packages more carefully.
 

strantor

Joined Oct 3, 2010
6,338
There are several free SCADA packages, most of them abandonware or almost. But all of them are focused on typical industrial environments, not a basic framework for any automation task, except maybe MBLogic, which I've never understood.

Maybe I'm wrong and need to study those packages more carefully.
Again, I don't understand what you want. "Any automation task" means...?

It's like asking "I want a basic solution for any transportation task." Well are you transporting people? Water? Depleted uranium? Are you transporting it between rooms in a building? Between states? Continents?

You could be asking for anything from a hand dolly to a space shuttle.

There is no one-size-fits-all solution. Please state an actual criteria.
 

Thread Starter

Sigdl

Joined Feb 20, 2022
11
"Any automation task" means any automation task:

1- Outside lamps must turn off at day and turn on at night
2- Weighting system opens supply bin's gate to start weighting and closes it when required weight is reached. Then opens output gate
3- Room temperature control keeps temp at 25ºC

Any of these can use the same model: Abstracted input -> control rutiny -> abstracted output

A general framework which abstracts I/O and allows definition of any control rutiny, is like using high level language with libraries instead of hand-coded assembler
 

strantor

Joined Oct 3, 2010
6,338
"Any automation task" means any automation task:

1- Outside lamps must turn off at day and turn on at night
2- Weighting system opens supply bin's gate to start weighting and closes it when required weight is reached. Then opens output gate
3- Room temperature control keeps temp at 25ºC

Any of these can use the same model: Abstracted input -> control rutiny -> abstracted output

A general framework which abstracts I/O and allows definition of any control rutiny, is like using high level language with libraries instead of hand-coded assembler
The 3 examples you gave would typically be 2 or 3 different controllers, for good reason. The "weighing system" could be a pharmaceutical application responsible for dispensing 30.000mg of substance, not 31mg or even 30.05mg. If that is the case, it will not be prudent to have it controlled by the same system that is turning on the lights in the parking lot. Parking lot lights can be controlled on a level even lower than a zoned thermostat; just sensors and relays.

I get that maybe you want to do it all from the same controller regardless, because maybe it's not a pharmaceutical application and weight tolerance is loose enough that you can get away with sending weight as TCP packet, having that packet wait in the buffer of a remotely located controller until it has time to process it in, and then send the "stop" signal as another TCP packet to the buffer of an output device.

I suggest you look into PLCs. They can do everything you mentioned and most have remote I/O capabilities. They are the antithesis of "open source" though. Some have free programming software However (and none of them make you program like assembly language). I suggest the "Productivity" line from automation direct.

But I'm still not sure whether you're asking for hardware or software or both.
 

Thread Starter

Sigdl

Joined Feb 20, 2022
11
"The "weighing system" could be..."

Eliminating common sense and good practice from example is called strawman fallacy

"weight tolerance is loose enough that you can get away with sending weight as TCP packet"

It's funny you say that because my example was a real example:
Batch plant with SIX weighting bins loading up to ten tonnes each in parallel with +/-1% tolerance, outputs controlling pneumatic valves for gates were in remote SBCs connected via Ethernet, receiving OPEN and CLOSE commands via UDP. Worked like a charm for 7 years in mission critical plants

"I suggest you look into PLCs"

I know PLCs since FESTO 202 back in 1989
 

Thread Starter

Sigdl

Joined Feb 20, 2022
11
"there's obviously nothing you can learn here"

I can learn what I asked for:

Any advice on a good system for general I/O virtualization will be greatly appreciated
 

strantor

Joined Oct 3, 2010
6,338
I can learn what I asked for:

Any advice on a good system for general I/O virtualization will be greatly appreciated
Well that's easy. It's Not what you asked for initially, but at least it's something that exists.

General purpose remote IO modules using a vendor-agnostic comms protocol like Modbus TCP can be networked to nearly any PLC, laptop, server, arduino, whatever.

They're not open source and they don't do any of the other stuff you asked for, but they do nicely fit the niche you just described.

Or... are you asking about software? Still not clear on that.
 

tsan

Joined Sep 6, 2014
128
Various hardware I/O modules are integral part of PLC system. I assume that whatever the modules are, they can be controlled with some existing protocol. For software side there are at least these two:
openPLC and node-RED
 

Thread Starter

Sigdl

Joined Feb 20, 2022
11
For software side there are at least these two:
openPLC and node-RED
Thanks, openPLC is more like it, albeit terribly limited due to the PLC monomania. For example, it doesn't do CAN, let alone CAN gateways to other networks. And of course, a unified I/O space for all networks completely out of question. But it provides a base for getting ideas about what could be done to create a broader solution

If anyone is interested in developing such system, feel free to give ideas
 
Top