This documentation is out of date.

The new version of the documentation is here: https://cannylogic.com/docs

CANNY 7, PLC

From CANNY Wiki
Revision as of 08:23, 21 March 2016 by MEGA (Talk | contribs) (Как работает ПЛК)


Jump to: navigation, search

Basic definitions and abbreviations used

PC   personal computer.
PLC   programmable logic controller
CFD   Canny Functional Diagram, graphical programming language used in an integrated environment CannyLab development.

What is the controller?

The controller - a control device, used in industry, on transport, other industries and households, for the automatic control equipment for a given algorithm. The controllers are widely used to control technological process, maintenance of the physical parameters of the control object at a given level, and similar tasks on the content.

One of the most promising types of controllers, to date, is an electronic programmable logic controller (PLC), algorithms of which describes software, are stored in the controller's internal memory and executed by a microprocessor built in PLC. Interaction of electronic controller with the controlling objects occurs through incoming and outgoing electrical signals.

Programmable logic controllers are widely used in embedded systems, monitoring and control systems, have a relatively easy-to-understand architecture. Structurally, it is usually quite compact unit consisting of one or more interconnected electronic modules, containing the connectors for supplying power to the controller and the external input and output power lines to allow the controller to communicate with the outside world.

PLC Software

Modern PLC has developed software complex consisting of PLC operating system, provided by the controller manufacturer and third-party or proprietary software, designed for the development, debugging and loading user programs in to the controller.

The operating system, responsible for user application execution, serves controller's low-level IO system , data interfaces, controls memory allocation, power modes, timers, performs error handling, allowing the user developing applications to fully concentrate on the algorithmic solutions of the application.

Custom software development and debugging tools, allows to create and adjust the programs that implement the controller algorithms, simulate on a PC program execution process, observe the intermediate calculations results , as well as load the software in the controller.

How does PLC work

Before using the PLC, it is necessary to load the operating system and application software, designed for specific applications. ll PLC software is usually located in the non-volatile memory and is protected from damage in the event of a power reset. Change application code in the PLC memory can be carried out repeatedly by the user.

Typical PLC work outline can be described as follows:

The external controllers' input channel connecting sensors, to output channels - actuators. The controller is powered and its operating system immediately begins to cyclically perform users application.

application execution cycle consists of the following, successive stages:

  • the operating system reads the status of each input channel and writes it into controller internal memory;
  • operating system consistently, command by command, performs whole user application- each executable application command reads from the internal memory the data it needs, calculates them and record the results of its calculations to the internal memory of the controller;
  • the operating system receives the values from the internal memory, that needs to be displayed on the controller output, and converts the output channels in the appropriate mode, and then, the entire execution cycle is repeated from the beginning.

The present approach to the architecture of the user program runtime, an opportunity to realize a logical parallel execution of multiple tasks within a single user program, allowing to automate the management of multiple simultaneously occurring processes using a single PLC.

Программирование без программиста

Одной из базовых идей, лежащих в основе использования ПЛК, является упрощение системы программирования и повышение наглядности языковых средств до уровня, доступного для понимания техническому специалисту хорошо знающему и непосредственно эксплуатирующему оборудование, но не обладающему специальными знаниями в области разработки программного обеспечения.

Такой специалист, получив простой и понятный инструмент выражения своих знаний об алгоритмах управления процессами, находящимися в его ведении, во многих случаях будет способен самостоятельно реализовать и отладить программу ПЛК, а при необходимости перенастроить параметры работы оборудования и своевременно изменить программу управления.

Зачастую качество программы ПЛК созданной таким специалистом оказывается выше, чем программы, написанной по его заданию профессиональным программистом не знакомым со всеми особенностями работы автоматизируемого процесса.