Pi-Plates
What would be required to add support for the industrial line of Pi-Plates to OpenPLC? These boards support isolated 4-20mA loop measurements, isolated digital inputs for both NPN and PNP signals, and relays capable of switching 3 amp loads. Control requires a combination of SPI and GPIO signals. See  https://pi-plates.com/scientific-and-industrial-catalog/ for more product details.
Reply 0 0
thiagoralves
Someone needs to write a driver so that OpenPLC can control those boards. If the company is interested in some form of partnership to make it happen, OpenPLC has some interesting sponsoring options on Patreon:  http://patreon.com/join/openplc . The highest tier has specific benefits for hardware integration.
Reply 0 0
Pi-Plates
A bit rich for my blood at this time. Are there resources available for the creation and verification of a new driver?
Reply 0 0
thiagoralves
Basically you have two possible ways to add new drivers. The "official" way requires you to know C / C++ to write a new hardware layer for OpenPLC. You can follow the implementation on the current platforms. All hardware layers are available here:  https://github.com/thiagoralves/OpenPLC_v3/tree/master/webserver/core/hardware_layers . You can just get one of these files and replace the content with your own code. Once you do that you will have to re-enable the hardware you edited on the Hardware tab. This will make OpenPLC compile that hardware layer again with your code and set everything up. 

An easier approach is using PSM. PSM allows you to write drivers in pure Python. There are several PSM examples here in the forum, you can just search for it. But in a nutshell, all you have to do is enable PSM for Linux on the Hardware tab. That will give you a little code window for you to add your code. The code that is populated there has a lot of instructions about how PSM works, it should be fairly straightforward. 
Reply 0 0
Reply