andrej@1728: [![docs](https://readthedocs.org/projects/beremiz/badge/?version=latest)](https://beremiz.readthedocs.io) andrej@1727: andrej@1679: # Beremiz # andrej@1679: andrej@1679: Beremiz is an integrated development environment for machine automation. It is Free Software, conforming to IEC-61131 among other standards. andrej@1679: andrej@1679: It relies on open standards to be independent of the targeted device, and let you turn any processor into a PLC. Beremiz includes tools to create HMI, and to connect your PLC programs to existing supervisions, databases, or fieldbuses. andrej@1679: andrej@1679: With Beremiz, you conform to standards, avoid vendor lock, and contribute to the better future of Automation. andrej@1679: andrej@2253: Beremiz consists of two components: andrej@2253: andrej@2253: * Integrated Development Environment (IDE), [Beremiz.py](https://bitbucket.org/automforge/beremiz/src/tip/Beremiz.py?at=default). It's running on user's computer and is used to write/compile/debug PLC programs and control PLC runtime. andrej@2253: * Reference runtime implementation in python, [Beremiz_service.py](https://bitbucket.org/automforge/beremiz/src/tip/Beremiz_service.py?at=default). It's running on target platform, communicates with I/O and executes PLC program. andrej@2253: andrej@1679: See official [Beremiz website](http://www.beremiz.org/) for more information. andrej@1679: andrej@2253: ## Build on Linux ## andrej@1679: andrej@1679: * Prerequisites andrej@1679: andrej@2253: # Ubuntu/Debian : andrej@2253: sudo apt-get install build-essential bison flex autoconf andrej@2253: sudo apt-get install python-wxgtk3.0 pyro mercurial andrej@2253: sudo apt-get install python-nevow python-matplotlib python-lxml python-zeroconf python-cycler andrej@2292: sudo apt-get install python-autobahn python-u-msgpack andrej@2253: andrej@1679: * Prepare andrej@2253: andrej@2253: mkdir ~/Beremiz andrej@2253: cd ~/Beremiz andrej@1679: andrej@1679: * Get Source Code andrej@1679: andrej@2253: cd ~/Beremiz andrej@2253: hg clone https://bitbucket.org/skvorl/beremiz andrej@2253: hg clone https://bitbucket.org/mjsousa/matiec andrej@1679: andrej@1679: * Build MatIEC compiler andrej@1679: andrej@2253: cd ~/Beremiz/matiec andrej@2253: autoreconf -i andrej@2253: ./configure andrej@2253: make andrej@1679: andrej@2253: * Build CanFestival (optional) andrej@2253: Only needed for CANopen support. Please read CanFestival manual to choose CAN interface other than 'virtual'. andrej@1679: andrej@2276: cd ~/Beremiz andrej@2276: hg clone http://dev.automforge.net/CanFestival-3 andrej@2276: cd ~/Beremiz/CanFestival-3 andrej@2276: ./configure --can=virtual andrej@2276: make andrej@2253: andrej@2253: * Build Modbus library (optional) andrej@2253: Only needed for Modbus support. andrej@2253: andrej@2253: cd ~/Beremiz andrej@2253: hg clone https://bitbucket.org/mjsousa/modbus Modbus andrej@2253: cd ~/Beremiz/Modbus andrej@2253: make andrej@1679: andrej@2276: * Build BACnet (optional) andrej@2276: Only needed for BACnet support. andrej@2276: andrej@2276: cd ~/Beremiz andrej@2276: svn checkout https://svn.code.sf.net/p/bacnet/code/trunk/bacnet-stack/ BACnet andrej@2276: cd BACnet andrej@2276: make MAKE_DEFINE='-fPIC' all andrej@2276: andrej@1679: * Launch Beremiz IDE andrej@1679: andrej@2253: cd ~/Beremiz/beremiz andrej@2253: python Beremiz.py andrej@1679: andrej@2253: ## Run standalone Beremiz runtime ## andrej@2253: andrej@2253: Runtime implementation can be different on different platforms. andrej@2253: For example, PLC used Cortex-M most likely would have C-based runtime. Beremiz project contains reference implementation in python, that can be easily run on GNU/Linux, Windows and Mac OS X. andrej@2253: This section will describe how to run it. andrej@2253: andrej@2253: If project's URL is 'LOCAL://', then IDE launches temprorary instance of Beremiz python runtime (Beremiz_service.py) localy as user tries to connect to PLC. This allows to debug programs localy without PLC. andrej@2253: andrej@2253: If you want to run Beremiz_service.py as standalone service, then follow these instructions: andrej@1679: andrej@1679: * Start standalone Beremiz service andrej@1679: andrej@2253: cd ~/Beremiz andrej@2253: mkdir beremiz_workdir andrej@2253: cd ~/beremiz andrej@2253: python Beremiz_service.py -p 61194 -i localhost -x 0 -a 1 ~/Beremiz/beremiz_workdir andrej@1679: andrej@1679: * Launch Beremiz IDE andrej@1679: andrej@2253: cd ~/Beremiz/beremiz andrej@2253: python Beremiz.py andrej@2253: andrej@2253: * Open/Create PLC project in Beremiz IDE. andrej@2253: Enter target location URI in project's settings (project->Config->BeremizRoot/URI_location) pointed to your running Beremiz service (For example, PYRO://127.0.0.1:61194). andrej@2253: Save project and connect to running Beremiz service. andrej@2253: andrej@2253: ## Examples ## andrej@2253: andrej@2253: Almost for all functionality exists example in ['tests'](https://bitbucket.org/automforge/beremiz/src/tip/tests/?at=default) directory. andrej@2253: Most of examples are shown on [Beremiz youtube channel](https://www.youtube.com/channel/UCcE4KYI0p1f6CmSwtzyg-ZA). andrej@2253: andrej@2253: ## Documentation ## andrej@1679: andrej@1679: * See [Beremiz youtube channel](https://www.youtube.com/channel/UCcE4KYI0p1f6CmSwtzyg-ZA) to get quick information how to use Beremiz IDE. andrej@1679: andrej@1729: * [Official user manual](http://beremiz.readthedocs.io/) is built from sources in doc directory. andrej@1729: Documentation does not cover all aspects of Beremiz use yet. andrej@1729: Contribution are very welcome! andrej@1727: andrej@1679: * [User manual](http://www.sm1820.ru/files/beremiz/beremiz_manual.pdf) from INEUM (Russian). andrej@1679: Be aware that it contains some information about functions available only in INEUM's fork of Beremiz. andrej@1679: andrej@1679: * [User manual](http://www.beremiz.org/LpcManager_UserManual.pdf) from Smarteh (English). andrej@1679: Be aware that it contains some information about functions available only in Smarteh's fork of Beremiz. andrej@1679: andrej@1679: * Outdated short [user manual](https://www.scribd.com/document/76101511/Manual-Beremiz#scribd) from LOLI Tech (English). andrej@1679: andrej@1679: * See official [Beremiz website](http://www.beremiz.org/) for more information. andrej@1679: andrej@2253: ## Support and development ## andrej@1679: andrej@1679: Main community support channel is [mailing list](https://sourceforge.net/p/beremiz/mailman/beremiz-devel/) (beremiz-devel@lists.sourceforge.net). andrej@1679: andrej@1679: The list is moderated and requires subscription for posting to it. andrej@1679: andrej@1679: To subscribe to the mailing list go [here](https://sourceforge.net/p/beremiz/mailman/beremiz-devel/). andrej@1679: andrej@1679: Searchable archive using search engine of your choice is available [here](http://beremiz-devel.2374573.n4.nabble.com/).