What is FLProg

 

FLProg - система визуального программирования плат Arduino

 

Currently, the world has been a boom in the use of microcontrollers in various projects and startups. Indeed, the price of microcontrollers has fallen, and their capabilities are constantly growing. Yes, and our friends, the Chinese, learned how to make peripherals for them, and sell it to the same ridiculous prices. But with programming microcontrollers is not so rosy…

How it all began and how it developed

Since the advent of microprocessors, the development of the principles of working with them goes the way of the growth of abstraction. The first stage was represented by programming directly in machine code. The programming was complex, long and required a very specific mindset. Therefore, programmers were very few.

But people being lazy, and laziness is an engine of progress. Came up with the first level of abstraction – Assembly language. Writing programs became easier and more fun. The number of programmers has increased. But still the Assembly is not very different from machine code.

So there was another level of abstraction. High level language. The main purpose of these languages was the opportunity to explain to the machine what they want from it, in language as close as possible to the human. This allowed us to do programming for people with less specific mindset. Therefore, with the development of high-level languages number of programmers increased, and, accordingly, a growing number of useful programs that they created.

As things are now

Of course, to start working directly with the controller requires some preparation. We need a programmer configured for programming the computer, and, of course, knowledge of the programming language. In addition, requires the ability to work with a soldering iron, printed circuit Board design, knowledge in electrical and electronics. So the threshold of entry into the area of creating their own devices to the microcontroller remains high.

In addition, for such work requires a combination of skills that rarely occur together. Programmers rarely make friends with a soldering iron, and electronics are often not programmers. For programmers, the problem was solved by the creation of the Arduino Board which allows you to collect the device without the use of tools.

 

FLProg - система визуального программирования плат Arduino

 

For electronics and electricians all worse. Until recently, in order to create their device using a microcontroller, they had two options. Either by to study the programming language “C”, or to ask for help from the programmer. Both ways are not the best. In order to become a programmer requires a certain mindset, are not always compatible with the experience of reading electrical circuits. A friend of the programmer may not be at hand.

At the same time, there has long been a programming environment adapted to the ordinary electronics engineer, or electrician. I mean environment for programming industrial controllers. PLC. They allow you to create software for the controllers in the languages FBD and LAD. In fact, as those languages they are not. Rather, it is a graphical environment for drawing in principle or in logic circuits.

FBD (Function Block Diagram)

– graphical programming language standard IEC 61131-3. The program is formed from the list of circuits to be performed sequentially from top to bottom. When programming uses sets of library units. Block (element) – is a subroutine, function, or function block (AND, OR, NOT, triggers, timers, counters, blocks of analog signal processing, mathematical operations, etc.). Each individual chain is an expression that is composed graphically from the individual elements. To the output of the unit is connected the next block, forming a chain. Within the circuit blocks are executed in the order of their connection. The result of the calculation circuit written in an internal variable or output it to the controller.

Ladder Diagram (LD, LAD, РКС)

– ladder  logic. The syntax of the language easy to replace logic circuits, made on relay technology. The language is designed for engineers in automation, working in industrial enterprises. Provides a visual logic interface controller to facilitate not only the task of actually programming and commissioning, but and fast Troubleshooting the plug-in to the controller hardware. A program in ladder logic is visual and intuitive electrical engineers graphical interface, representing the logical operations like electrical circuit closed and open contacts. The flow or absence of current in this circuit corresponds to the result of the logical operation (true if the current flows; false – if the current does not flow). The basic elements of language are the contacts that can be figuratively likened to a pair of relay contacts or buttons. Pair of contacts is identified with a Boolean variable, and the condition of this pair – with variable value. Vary normally closed and normally open contact elements that can be mapped with normally closed and normally open buttons in electrical circuits.

FLProg - система визуального программирования плат Arduino

This approach proved to be very convenient for easy entry into the development of automated control system of electrical engineers and electronics engineers. Developing projects of installations, they can easily bind these settings to the algorithms of the controller. Maintenance of these installations also better when the existing staff can easily check the operation of the control system to find the problem. And there is no need to call every little thing a programmer from the “Center”. And this approach is justified. To date, almost all of the industrial automation system is created using such tools.

FLProg - система визуального программирования плат Arduino

This development environment is from Siemens, ABB, Schneider Electric… and almost all manufacturers PLC. It would seem the perfect solution for lovers of homemade products. But, as there is always a “but”. All of these programming environments is linked to the industrial controller of a specific manufacturer. And the prices for these controllers a little inspiring. Very rarely a family budget will allow you to purchase the controller with a price of a few tens of thousands of rubles.

But Arduino is perfect for homebrew, and unfortunately, which our country has always been, is and will be rich. But again “but”. These boards are programmed in C. For most of these intelligent people, with very straight arms growing out of allotted space, the C language is the Chinese alphabet. They can think, draw, build, debug and run complex schemes, but If, For, Case, Void, etc. is not for them. Of course, you can read the instructions on the Internet to play for some time, blinked led by example. But for more serious applications requires detailed study of the language. And why should they?

They are not going to be professional programmers. They have a different way. They were up to something. Yes, it’s easier and prettier to assemble with a microcontroller, but becomes for this programmer, after spending months learning the language? No, of course. Gather the old, simpler, of course, but in their field.

FLProg - система визуального программирования плат Arduino

On the basis of these calculations and the project was created FLProg. The main idea of the project is to combine the principles of industrial programming cheapness and ease of Arduino. The project offers a new level of abstraction with a rather bold statement –

To program the microcontrollers do not have to know programming languages!

The result is a tool that allows you to create your projects on the Arduino, any person familiar with electrical engineering and electronics, enabling it to establish its product using data boards.

The project consists of two parts.

The first part is a desktop application FLProg, which is a graphical programming environment Arduino boards.

Secondly, this website through which members of the community of users can communicate among themselves, learn the latest project news, download the latest version of the program, and to find the necessary information on the application.

Let’s start in order

The program FLProg allows you to create firmware for Arduino boards using the graphical languages FBD and LAD, which are a standard in programming industrial controllers. When creating a program I tried to use the achievements of programmers Siemens, ABB, Schneider Electric in their programming environments.

I slightly expanded the classic features of these languages, adding functional blocks, responsible for working with external devices. They are “wrappers” over the libraries designed to work with them. The program runs on a computer running OS Windows, Linux-32 and Linux 64

When you create a new project you will be prompted to choose the programming language in which you will create the project and the controller on which this project will be implemented.

FLProg - система визуального программирования плат Arduino

Here is a list of Arduino boards supported by the program to date:

Arduino Duemilanove
Arduino Leonardo
Arduino Lilypad
Arduino Mega 2560
Arduino Micro
Arduino Mini
Arduino Nano (ATmega168)
Arduino Nano (ATmega328)
Arduino Pro Mini
Arduino Pro (ATmega168)
Arduino Pro (ATmega328)
Arduino Uno
Intel-Galileo

Over time, as acquisitions, we plan to support boards based on the controllers STM.

A project in FL Prod is a set of circuit boards, each of which is assembled a complete module of the General scheme. For convenience, each card has the name and comments. As each charge can be minimized (to save space in the work area when the work is finished) and deploy. The red led in the name of the Board indicates that in the circuit Board there are errors.

The view window of the program in the FBD language.

FLProg - система визуального программирования плат Arduino

 

Вид окна программы в режиме языка LAD.

FLProg - система визуального программирования плат Arduino

 

In the right part of the working area place the library elements. In the diagram, the elements are transferred by simple drag and drop. By double clicking on the item will shows the information about it.

Here is a list of units currently available

FBD:

Базовые элементы

[XOR]
[AND]
[OR]
[Bounce]

Специальные блоки

[Scale]

Триггеры

[SR]
[TT]
[RS]
[Rtrig]

Таймеры

[Generator]
[Timer]

Счетчики

[Counter]
[SpeedCounter]

Математика

[SUM(+)]
[MUL(*)]
[SUB(-)]
[DIV(/)]
Алгебра
[SIN]
[COS]
[TAN]
[ABS]
[SQ]
[SQRT]
[MIN]
[MAX]
[POW]
[RANDOM]

Сравнение

[Comparator]

Com –порт

Send
SendVariable
ReceiveVariable

Переключатель

[SWITCH]
[MUX]
[DMS]

Моторы

ServoMotor
StepMotor

Часы реального времени

[Alarm]
[GetTime]
[SetTime]

Дисплеи

Дисплей на чипе НD44780
Подсветка дисплея на чипе НD44780 I2C
Блок декодирования семисегментного индикатора

Строки

Сложение строк

Датчики

[Ultrasonic HC-SR04]
[DHT11, DHT21, DHT22]
[DS18x2x]
[IR Ressive] [BMP-085]

SD карта

Запись переменной на SD карту
Выгрузка файла с SD карты

Конвертация типов

Преобразование строк
Преобразование Float в Integer

Микросхемы расширений

Расширитель выводов 74HC595

Операции с битами

Шифратор
Дешифратор
Чтение бита
Запись бита

Разное

Матричная клавиатура
Пьезодинамик

EEPROM

Запись в EEPROM
Чтение из EEPROM

Коммуникации

SendVariableFromCommunication
RessiveVariableFromCommunication
WebServerPage
WebClient

[collapse]
LAD:

 

Базовые блоки

Контакт
Катушка
Защита от дребезга
Выделение переднего фронта

Специальные реле

Двустабильное реле
Реле времени
Генератор
Реле сравнения

Алгебра

SIN
COS
TAN
ABS
MAX
MIN
SQ
SQRT
POW
RANDOM

Аналоговые блоки

Масштабирование
Математика
Счетчик
Аналоговый переключатель
Переключатель много к одному
Переключатель один ко многим
Аналоговый вход контроллера
Аналоговый выход контроллера
Вход аналогового соединителя
Выход аналогового соединителя
Скоростной счетчик

CommPort

Передача в ComPort
Передача переменной через Comm port
Прием переменной через Comm port

Моторы

Сервомотор
Шаговый двигатель

Часы реального времени

Получить данные
Будильник
Установка времени

Дисплеи

Дисплей на чипе HD44780
Блок управления подсветкой дисплея на чипе HD4480 I2C
Блок декодирования семисегментного индикатора

Строки

Сложение строк

Датчики

Ультразвуковой дальномер HC-SR04
Датчик температуры и влажности DHT11 (DHT21, DHT22)
Датчик температуры DS18x2x
IR Ressive
BMP-085

SD карта

Запись переменной на SD карту
Выгрузка файла с SD карты

Конвертирование типов

Конвертация строк
Преобразование Float в Integer

Микросхемы расширений

Расширитель выводов 74HC595

Операции с битами

Шифратор
Дешифратор
Чтение бита
Запись бита

Разное

Матричная клавиатура
Пьезодинамик

EEPROM

Запись в EEPROM
Чтение из EEPROM

Коммуникации

Блок отправки переменной через коммуникации
Прием переменной через коммуникации
Страница Web сервера
Web клиент

[collapse]

 

Currently under development of functional units for working with triaxial gyro, luxometer, and other transducers and sensors. Work is also underway on the organization of data exchange via the radio channel and Wi-Fi. In future plans. development of SCADA system for the organization of the interface systems developed in the program FLProg on a personal computer or graphic displays.

The list of peripherals supported by the program, available here

For part of the equipment in the section of the site contains review articles that facilitate the understanding of its application in the program.

In the upper part of the working area is a list of tags (variables and inputs / outputs) (FBD) or installed equipment (LAD). Tags or equipment are transferred to the diagram by dragging and dropping.

In the upper part of the working area is a list of tags (variables and inputs / outputs) (FBD) or installed equipment (LAD). Tags or equipment are transferred to the diagram by dragging and dropping.For part of the equipment in the section of the site contains review articles that facilitate the understanding of its application in the program.

FLProg - система визуального программирования плат Arduino    FLProg - система визуального программирования плат Arduino

 

After completion of the project is its compilation. After compilation will automatically open the program “Arduino 1.5.7” with the loaded sketch of your project. In the “Arduino IDE 1.5.7” you will need to specify the number of the COM port that is connected to your controller, select it, and then pour in the sketch to the controller. Read more about “Arduino IDE 1.5.7” can be read on the website Arduino.ru.

Where to download FLProg?

On the downloads page.

You can download the program without registering on the website, but for registered users the functionality of the site significantly expands. Registration is very simple and requires only the confirmation email. No other data input is not required.

On the download page of the program always is available in two versions: installer and portable version that requires no installation. If possible, I also post the update file is significantly smaller, allowing you to upgrade from a previous version