1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# Introduction
A Programmable Logic Controller generally has a set of input and output ports to which the external peripherals are connected, which are
to be electrically controlled by the PLC.
Looking into the flow of working with the PLC, the processor tries to make decisions in accordance with the program, generally written by the user using some programming language is used to write the logic and program these units.
Some of the languages commonly used are Function Block Diagram, Ladder Diagram, Structured Text, Sequential Function Chart and Instruction List.
The objective is to create an Open Source PLC, which has the capabilities of an industrial PLC, but at a much affordable and simpler user interface. Currently we have 2 versions
1. Version 1 - It incorporates a development board, that works on AVR’s ATmega16A IC, giving up to 40 pins, most of which can be used and programmed as the Input-Output pins as it’s done on a PLC.
Here the Programming language used here is Ladder Logic which is one of the easiest and also, robust in terms of its efficiency.
The main point here is, this device is a standalone device, which can work without the host system being there, just being powered by a source.
HEX files to be generated according to the controller are generated by a software called __LDMicro__, freely available for Windows and Linux users alike.
The programming on the board is done via an *USB-ASP* device through ISP headers.
All the processor wants now is a code to be dumped on it to start automating your small needs.
2. Version 2 - It uses Function Block(FB) programming language to write the logic. The system is build around a Raspberry Pi Zero, which runs a realtime environment build for IEC61499 standard. The platform we are using is **4diac**, which is implementation of IEC 16499. It has got 2 components :
* 4diac IDE - the programming interface for writing logics using FBs.
* FORTE - the runtime present in the actual hardware-- here a Raspberry Pi.
### The Modules
We have developed 4 different modules that goes along with the PLCs for performing experiments; trying various control methods.
* Motor module - for controlling a motor
* Temperature Sensing and control
* Switches - array of various types of switches
* Traffic light
The OpenPLC setup is shown below:
![OpenPLC Version 1(early prototype)](/Images/openplc.png "OpenPLC Version 1")
![OpenPLC Version 2](/Images/v2.jpg "OpenPLC Version 1")
|