README.md
branchwxPython4
changeset 3635 5107a2712b17
parent 3606 2bec3d8a9d01
child 3637 08a078a04f95
equal deleted inserted replaced
3634:db3ea47b0d0b 3635:5107a2712b17
       
     1 <!---
     1 [![docs](https://readthedocs.org/projects/beremiz/badge/?version=latest)](https://beremiz.readthedocs.io)
     2 [![docs](https://readthedocs.org/projects/beremiz/badge/?version=latest)](https://beremiz.readthedocs.io)
       
     3 -->
     2 
     4 
     3 # Beremiz #
     5 # Beremiz #
     4 
     6 
     5 Beremiz is an integrated development environment for machine automation. It is Free Software, conforming to IEC-61131 among other standards.
     7 Beremiz is an integrated development environment for machine automation. It is Free Software, conforming to IEC-61131 among other standards.
     6 
     8 
    13 * Integrated Development Environment (IDE), Beremiz.py. It is running on user's computer and is used to write/compile/debug PLC programs and control PLC runtime.
    15 * Integrated Development Environment (IDE), Beremiz.py. It is running on user's computer and is used to write/compile/debug PLC programs and control PLC runtime.
    14 * Reference runtime implementation in python, Beremiz_service.py. It's running on target platform, communicates with I/O and executes PLC program.
    16 * Reference runtime implementation in python, Beremiz_service.py. It's running on target platform, communicates with I/O and executes PLC program.
    15 
    17 
    16 See official [Beremiz website](http://www.beremiz.org/) for more information.
    18 See official [Beremiz website](http://www.beremiz.org/) for more information.
    17 
    19 
    18 ## Build on Linux ##
    20 ## Install latest release ##
    19 
    21 
    20 * Prerequisites
    22 Windows installer and Snap package for Linux are available in [Github releases](https://github.com/beremiz/beremiz/releases) and [Snapcraft's store](https://snapcraft.io/beremiz)
    21 
    23 
    22   	# Ubuntu/Debian :
    24 ## Tutorials and examples ##
    23   	sudo apt-get install build-essential bison flex autoconf
    25 
    24   	sudo apt-get install python2-dev libpython2.7-dev libgtk-3-dev libssl-dev libgl1-mesa-dev libglu1-mesa-dev python-setuptools python-lxml 
    26 In IDE, find menu "File>Tutorials and examples" to quickly open examples that should run as-is.
    25   	
    27 
    26   	python2 -m pip install wxPython==4.1.1
    28 There are more examples in 'tests/projects' and 'exemples' directories.
    27   	python2 -m pip install pyro mercurial==5.9.3 nevow matplotlib lxml zeroconf2 cycler autobahn msgpack u-msgpack-python sslpsk posix_spawn future enum34 twisted click opcua pycountry fonttools Brotli python-config
    29 
    28 
    30 Some example and test are shown on [Beremiz youtube channel](https://www.youtube.com/channel/UCcE4KYI0p1f6CmSwtzyg-ZA).
    29 * Prepare
    31 
    30 
    32 ## Development with Beremiz ##
    31 		mkdir ~/Beremiz
    33 
    32 		cd ~/Beremiz
    34 Developers are invited to subscribe to [mailing list](https://sourceforge.net/p/beremiz/mailman/beremiz-devel/) (beremiz-devel@lists.sourceforge.net).
    33 
    35 
    34 * Get Source Code
    36 The list is moderated and requires subscription before posting.
    35 
    37 
    36 		cd ~/Beremiz
    38 To subscribe to the mailing list go [here](https://sourceforge.net/p/beremiz/mailman/beremiz-devel/).
    37 		hg clone https://bitbucket.org/automforge/beremiz
    39 
    38 		hg clone https://bitbucket.org/automforge/matiec
    40 Searchable archive using search engine of your choice is available [here](http://beremiz-devel.2374573.n4.nabble.com/).
    39 
    41 
    40 * Build MatIEC compiler
    42 ## Build on Linux (developer setup) ##
    41 
    43 
    42 		cd ~/Beremiz/matiec
    44 ### Prerequisites (Ubuntu/Debian) :
    43 		autoreconf -i
    45 ```
    44 		./configure
    46 sudo apt-get install build-essential bison flex autoconf
    45 		make
    47 sudo apt-get install python2-dev libpython2.7-dev libgtk-3-dev libssl-dev libgl1-mesa-dev libglu1-mesa-dev python-setuptools
    46 
    48 
    47 * Build CanFestival (optional)  
    49 python2 -m pip install  \
    48   Only needed for CANopen support. Please read CanFestival manual to choose CAN interface other than 'virtual'.
    50     future              \
    49 
    51     matplotlib          \
    50 		cd ~/Beremiz
    52     msgpack_python      \
    51 		hg clone http://dev.automforge.net/CanFestival-3
    53     u-msgpack-python    \
    52 		cd ~/Beremiz/CanFestival-3
    54     zeroconf2           \
    53 		./configure --can=virtual
    55     enum34              \
    54 		make
    56     pyro                \
    55 
    57     sslpsk              \
    56 * Build Modbus library (optional)
    58     posix_spawn         \
    57   Only needed for Modbus support.
    59     twisted             \
    58 
    60     nevow               \
    59 		cd ~/Beremiz
    61     autobahn            \
    60 		hg clone https://bitbucket.org/mjsousa/modbus Modbus
    62     click               \
    61 		cd ~/Beremiz/Modbus
    63     opcua               \
    62 		make
    64     pycountry           \
    63 
    65     fonttools           \
    64 * Build BACnet (optional)
    66     Brotli              \
    65   Only needed for BACnet support.
    67     lxml==4.5.0         \
    66 
    68     wxPython==4.1.1
    67 		cd ~/Beremiz
    69 
    68 		svn checkout https://svn.code.sf.net/p/bacnet/code/trunk/bacnet-stack/ BACnet
    70 ```
    69 		cd BACnet
    71 
    70 		make MAKE_DEFINE='-fPIC' MY_BACNET_DEFINES='-DPRINT_ENABLED=1 -DBACAPP_ALL -DBACFILE -DINTRINSIC_REPORTING -DBACNET_TIME_MASTER -DBACNET_PROPERTY_LISTS=1 -DBACNET_PROTOCOL_REVISION=16' library
    72 ### Prepare build directory
    71 
    73 
    72 
    74 All commands hereafter assume that selected directory to contain all downloaded source code and build results is '~/Beremiz'
    73 * Launch Beremiz IDE
    75 
    74 
    76 ```
    75 		cd ~/Beremiz/beremiz
    77 mkdir ~/Beremiz
    76 		python Beremiz.py
    78 cd ~/Beremiz
       
    79 ```
       
    80 
       
    81 ### Get Source Code (Mercurial)
       
    82 
       
    83 ```
       
    84 cd ~/Beremiz
       
    85 hg clone https://hg.beremiz.org/beremiz
       
    86 hg clone https://hg.beremiz.org/matiec
       
    87 ```
       
    88 
       
    89 ### Get Source Code (Git)
       
    90 
       
    91 ```
       
    92 cd ~/Beremiz
       
    93 git clone https://github.com/beremiz/beremiz
       
    94 git clone https://github.com/beremiz/matiec
       
    95 ```
       
    96 
       
    97 ### Build MatIEC compiler
       
    98 
       
    99 ```
       
   100 cd ~/Beremiz/matiec
       
   101 autoreconf -i
       
   102 ./configure
       
   103 make
       
   104 ```
       
   105 
       
   106 ### Build CanFestival (optional)
       
   107 
       
   108 Only needed for CANopen support. Please read CanFestival manual to choose CAN interface other than 'virtual'.
       
   109 
       
   110 ```
       
   111 cd ~/Beremiz
       
   112 hg clone http://hg.beremiz.org/CanFestival-3
       
   113 cd ~/Beremiz/CanFestival-3
       
   114 ./configure --can=virtual
       
   115 make
       
   116 ```
       
   117 
       
   118 ### Build Modbus library (optional)
       
   119 
       
   120 Only needed for Modbus support.
       
   121 
       
   122 ```
       
   123 cd ~/Beremiz
       
   124 hg clone https://hg.beremiz.org/Modbus
       
   125 cd ~/Beremiz/Modbus
       
   126 make
       
   127 ```
       
   128 
       
   129 ### Build BACnet (optional)
       
   130 
       
   131 Only needed for BACnet support.
       
   132 
       
   133 ```
       
   134 cd ~/Beremiz
       
   135 svn checkout https://svn.code.sf.net/p/bacnet/code/trunk/bacnet-stack/ BACnet
       
   136 cd BACnet
       
   137 make MAKE_DEFINE='-fPIC' MY_BACNET_DEFINES='-DPRINT_ENABLED=1 -DBACAPP_ALL -DBACFILE -DINTRINSIC_REPORTING -DBACNET_TIME_MASTER -DBACNET_PROPERTY_LISTS=1 -DBACNET_PROTOCOL_REVISION=16' library
       
   138 ```
       
   139 
       
   140 ### Launch Beremiz IDE
       
   141 
       
   142 ```
       
   143 cd ~/Beremiz/beremiz
       
   144 python Beremiz.py
       
   145 ```
       
   146 
       
   147 ## Run standalone Beremiz runtime ##
       
   148 
       
   149 * Start standalone Beremiz service
       
   150 
       
   151 ```
       
   152 mkdir ~/beremiz_runtime_workdir
       
   153 python Beremiz_service.py -p 61194 -i localhost -x 0 -a 1 ~/beremiz_runtime_workdir
       
   154 ```
       
   155 
       
   156 To connect IDE with runtime, enter target location URI in project's settings (project->Config->BeremizRoot/URI_location) pointed to your running Beremiz service in this case :
       
   157 
       
   158 ```
       
   159 PYRO://127.0.0.1:61194
       
   160 ```
       
   161 
       
   162 If project's URL is 'LOCAL://', then IDE launches on demand a local instance of Beremiz python runtime working on a temporary directory.
    77 
   163 
    78 ## Build documentation
   164 ## Build documentation
    79 
   165 
    80 Source code for Beremiz user manual is stored in
   166 Source code for documentation is stored in [doc](tree/default/doc) directory in project's source tree.
    81 [doc](tree/default/doc)
   167 It's written in reStructuredText (ReST) and uses Sphinx to generate documentation in different formats.
    82 directory in project's source tree.
       
    83 It's written in reStructuredText (ReST) and uses Sphinx to build documentation in different formats.
       
    84 
       
    85 
   168 
    86 To build documentation you need following packages on Ubuntu/Debian:
   169 To build documentation you need following packages on Ubuntu/Debian:
    87 
   170 
    88 ```
   171 ```
    89 sudo apt-get install build-essential python-sphynx
   172 sudo apt-get install build-essential python-sphynx
   119 
   202 
   120 ```
   203 ```
   121 
   204 
   122 Result documentation is stored in 'doc/\_build/latex/Beremiz.pdf'.
   205 Result documentation is stored in 'doc/\_build/latex/Beremiz.pdf'.
   123 
   206 
   124 ## Run standalone Beremiz runtime ##
       
   125 
       
   126 Runtime implementation can be different on different platforms.
       
   127 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.
       
   128 This section will describe how to run it.
       
   129 
       
   130 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.
       
   131 
       
   132 If you want to run Beremiz_service.py as standalone service, then follow these instructions:
       
   133 
       
   134 * Start standalone Beremiz service
       
   135 
       
   136 		mkdir ~/beremiz_workdir
       
   137 		python Beremiz_service.py -p 61194 -i localhost -x 0 -a 1 ~/beremiz_workdir
       
   138 
       
   139 * Launch Beremiz IDE
       
   140 
       
   141 		python Beremiz.py
       
   142 
       
   143 * Open/Create PLC project in Beremiz IDE.  
       
   144   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).
       
   145   Save project and connect to running Beremiz service.
       
   146 
       
   147 ## Examples ##
       
   148 
       
   149 Almost for all functionality exists example in ['tests'](tree/default/tests/projects) and ['exemples'](tree/default/tests/projects) directories.
       
   150 
       
   151 Most of examples are shown on [Beremiz youtube channel](https://www.youtube.com/channel/UCcE4KYI0p1f6CmSwtzyg-ZA).
       
   152 
       
   153 ## Documentation ##
   207 ## Documentation ##
   154 
   208 
   155  * See [Beremiz youtube channel](https://www.youtube.com/channel/UCcE4KYI0p1f6CmSwtzyg-ZA) to get quick information how to use Beremiz IDE.
   209  * See [Beremiz youtube channel](https://www.youtube.com/channel/UCcE4KYI0p1f6CmSwtzyg-ZA) to get quick information how to use Beremiz IDE.
   156 
   210 
   157  * [Official user manual](http://beremiz.readthedocs.io/) is built from sources in doc directory.
   211  * [Official documentation](http://beremiz.readthedocs.io/) is built from sources in doc directory.
   158    Documentation does not cover all aspects of Beremiz use yet.
   212    Documentation does not cover all aspects of Beremiz use yet.
   159    Contribution are very welcome!
   213    Contribution are very welcome!
   160    
   214    
   161  * [User manual](http://www.sm1820.ru/files/beremiz/beremiz_manual.pdf) from INEUM (Russian).
   215  * [User manual](http://www.sm1820.ru/files/beremiz/beremiz_manual.pdf) from INEUM (Russian).
   162    Be aware that it contains some information about functions available only in INEUM's fork of Beremiz.
   216    Be aware that it contains some information about functions available only in INEUM's fork of Beremiz.
   166 
   220 
   167  * Outdated short [user manual](https://www.scribd.com/document/76101511/Manual-Beremiz#scribd) from LOLI Tech (English).
   221  * Outdated short [user manual](https://www.scribd.com/document/76101511/Manual-Beremiz#scribd) from LOLI Tech (English).
   168 
   222 
   169  * See official [Beremiz website](http://www.beremiz.org/) for more information.
   223  * See official [Beremiz website](http://www.beremiz.org/) for more information.
   170 
   224 
   171 ## Support and development ##
       
   172 
       
   173 Main community support channel is [mailing list](https://sourceforge.net/p/beremiz/mailman/beremiz-devel/) (beremiz-devel@lists.sourceforge.net).
       
   174 
       
   175 The list is moderated and requires subscription for posting to it.
       
   176 
       
   177 To subscribe to the mailing list go [here](https://sourceforge.net/p/beremiz/mailman/beremiz-devel/).
       
   178 
       
   179 Searchable archive using search engine of your choice is available [here](http://beremiz-devel.2374573.n4.nabble.com/).