Skip to content
Simple examples about how to use MATIEC compiler for IEC 61131-3
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
and_logic generalizando make file para pegar automaticamente os arquivos gerado… Mar 4, 2017
and_logic_arduino * add example and_logic_stm32f4 -> matiec compiling for stm32f4 Feb 14, 2017
and_logic_debug * add example and_logic_stm32f4 -> matiec compiling for stm32f4 Feb 14, 2017
and_logic_debug_located_vars
and_logic_stm32f4 generalizando make file para pegar automaticamente os arquivos gerado… Mar 4, 2017
arithmetic_1 removing some files and updating .gitignore Feb 9, 2017
concepts generalizando make file para pegar automaticamente os arquivos gerado… Mar 4, 2017
contact_seil removing some files and updating .gitignore Feb 9, 2017
debug_program * add example and_logic_stm32f4 -> matiec compiling for stm32f4 Feb 14, 2017
debug_program_vars * add example and_logic_stm32f4 -> matiec compiling for stm32f4 Feb 14, 2017
pid removing some files and updating .gitignore Feb 9, 2017
.gitignore removing stm32 folder Feb 14, 2017
README.md

README.md

MATIEC examples

MATIEC is a opensource compiler for programming languages defined in IEC 61131-3. This examples show how to use this compiler to test IEC 61131-3 programs in a softplc program.

Prerequisites

Installing MATIEC

To compile MATIEC you need to download and install flex and bison. You can download compile and isntall or use your preferred package manager.

	$ cd ~/
	$ hg clone ssh://hg@bitbucket.org/mjsousa/matiec
	$ cd matiec
	$ autoreconf -i
	$ ./configure
	$ make

Setting some enviromnent variables

To use MATIEC is need define some enviromnent variables used in the makefile of the examples

	$ export MATIEC_INCLUDE_PATH=/home/user/matiec/lib
	$ export MATIEC_C_INCLUDE_PATH=/home/user/matiec/lib/C
	$ export PATH=/home/user/matiec:$PATH

Compiling the examples

You can edit the logic using PLCOpenEditor from Beremiz project. The project format is a XML format for IEC 61131-3.

	$ cd ~/
	$ git clone https://github.com/Felipeasg/matiec_examples.git
	$ cd matiec_examples
	$ cd and_logic
	$ make

This will generate a executable softplc.

You can’t perform that action at this time.