summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/Creating-Ladders.rst65
-rw-r--r--Documentation/Creating-Ladders.rst~ (renamed from Resources/Creating-Ladders.rst)0
-rw-r--r--Documentation/Programming-OpenPLC.rst (renamed from Resources/Programmming-the-controller.rst)8
-rw-r--r--Documentation/Software-requirements.rst (renamed from Resources/Software-requirements.rst)10
-rw-r--r--Documentation/Software-requirements.rst~153
-rw-r--r--Images/Comm.png (renamed from Resources/images/Comm.png)bin4400 -> 4400 bytes
-rw-r--r--Images/Downloading-LD-Micro.png (renamed from Resources/images/Downloading-LD-Micro.png)bin80514 -> 80514 bytes
-rw-r--r--Images/Figcmd.png (renamed from Resources/images/Figcmd.png)bin32606 -> 32606 bytes
-rw-r--r--Images/PIN.png (renamed from Resources/images/PIN.png)bin24765 -> 24765 bytes
-rw-r--r--Images/Setup.png (renamed from Resources/images/Setup.png)bin4944 -> 4944 bytes
-rw-r--r--Images/avrdude1.png (renamed from Resources/images/avrdude1.png)bin25627 -> 25627 bytes
-rw-r--r--Images/change.png (renamed from Resources/images/change.png)bin11498 -> 11498 bytes
-rw-r--r--Images/cont.png (renamed from Resources/images/cont.png)bin29227 -> 29227 bytes
-rw-r--r--Images/fuse1.png (renamed from Resources/images/fuse1.png)bin111615 -> 111615 bytes
-rw-r--r--Images/fuse2.png (renamed from Resources/images/fuse2.png)bin91216 -> 91216 bytes
-rw-r--r--Images/ld1.png (renamed from Resources/images/ld1.png)bin13229 -> 13229 bytes
-rw-r--r--Images/manavrdude.png (renamed from Resources/images/manavrdude.png)bin174706 -> 174706 bytes
-rw-r--r--Images/prop.png (renamed from Resources/images/prop.png)bin4880 -> 4880 bytes
-rw-r--r--Images/states.png (renamed from Resources/images/states.png)bin9574 -> 9574 bytes
-rw-r--r--Images/usb.png (renamed from Resources/images/usb.png)bin169092 -> 169092 bytes
20 files changed, 227 insertions, 9 deletions
diff --git a/Documentation/Creating-Ladders.rst b/Documentation/Creating-Ladders.rst
new file mode 100644
index 0000000..6bc50b8
--- /dev/null
+++ b/Documentation/Creating-Ladders.rst
@@ -0,0 +1,65 @@
+Creating Ladders using Ld micro
+===============================
+
+LD Micro’s simple user interface is really easy to use and is self explanatory.To get started working with LD Micro, just double click the LD Micro executable present in your system. Once opened, you shall get such a GUI.
+
+.. image:: Images/ld1.png
+ :height: 540px
+ :width: 750px
+ :scale: 150
+
+Before starting to make the ladder, first make the necessary changes in
+the default settings, so as to generate the HEX code for your microcontroller.
+
+Under Settings tab, select the MCU Parameters Option
+
+.. image:: Images/Setup.png
+ :height: 340px
+ :width: 450px
+ :scale: 150
+
+Then after selecting, change the clock frequency to 16MHz and if using
+UART change the baud rate to 9600.
+
+.. image:: Images/cont.png
+ :height: 540px
+ :width: 650px
+ :scale: 150
+
+Now that the configurations are set, the next step can be followed to
+design the ladder with the appropriate logic.
+
+Start off with having a look at the Instruction tab. It has a lot of
+instructions that are in accordance with the Ladder logic followed for the PLCs and work in the same way and are similar to the ones described above under the ’Understanding the Instructions’ section.
+
+After selecting the appropriate instruction, just double click the instruction to edit the name of the variable and other parameters related to the particular instruction.
+
+.. image:: Images/change.png
+ :height: 540px
+ :width: 650px
+ :scale: 150
+
+After making the appropriate ladder for the application, the digital input and outputs should be given an appropriate pin number of the controller and the connections should be done accordingly. This can be done by double clicking the appropriate pin to be configured in the consolidated table just below the ladder made.
+
+.. image:: Images/PIN.png
+ :height: 540px
+ :width: 600px
+ :scale: 150
+
+Now that the logic is set, the ladder can be simulated to verify it’s working. This is done by clicking the Simulate tab and Simulation Mode option under it. This is then followed by a similar screen where Blue indicates LOW and Pink indicates HIGH. To start the simulation, under Simulate tab click Start Real-Time Simulation option. After this, to change the state, just double click the instruction. The appropriate changes and values pertaining to different variables can be seen in the consolidated instruction table under the State column. To come out of simulation mode, click the same Simulation Mode option.
+
+.. image:: Images/states.png
+ :height: 340px
+ :width: 450px
+ :scale: 150
+
+After the ladder along with assigning the appropriate pin numbers, the
+HEX code can be generated. This can be done by first saving the ladder
+under the File tab with the Save As option. Save the file in the appropriate destination folder with a suitable name. Remember the final destination of the same for future. Now, to generate the HEX file, select the Compile tab and then the option Compile As. Then save this text file in the desired destination folder. The location shall be noted as it’d be needed to burn the code onto the controller using the command line arguments later.
+
+
+
+
+
+
+
diff --git a/Resources/Creating-Ladders.rst b/Documentation/Creating-Ladders.rst~
index 07f87bd..07f87bd 100644
--- a/Resources/Creating-Ladders.rst
+++ b/Documentation/Creating-Ladders.rst~
diff --git a/Resources/Programmming-the-controller.rst b/Documentation/Programming-OpenPLC.rst
index 1357aab..b669fdb 100644
--- a/Resources/Programmming-the-controller.rst
+++ b/Documentation/Programming-OpenPLC.rst
@@ -1,4 +1,4 @@
-Programming the Controller
+Programming the OpenPLC Board
==========================
There are several programmers available to program any controller IC. They are called as ISPs. USBASP is one of them. Before programming the IC, we need to set the fuses.
@@ -25,14 +25,14 @@ Type the following command into the Terminal:
Screen like below will pop up after giving the command line
-.. image:: images/fuse1.png
+.. image:: Images/fuse1.png
:height: 540px
:width: 450px
:scale: 100
You can read fust bits after setting up, as shown below,
-.. image:: images/fuse2.png
+.. image:: Images/fuse2.png
:height: 540px
:width: 450px
:scale: 100
@@ -65,7 +65,7 @@ get such a result. Whilst it’s burning the code, the red light on the USBASP w
Remember, after the fuses are set (covered in the following sections in
detail), then the -B10 flag is necessary and can be deleted.
-.. image:: images/usb.png
+.. image:: Images/usb.png
:height: 540px
:width: 450px
:scale: 100
diff --git a/Resources/Software-requirements.rst b/Documentation/Software-requirements.rst
index f6b2bd3..01f12f6 100644
--- a/Resources/Software-requirements.rst
+++ b/Documentation/Software-requirements.rst
@@ -20,14 +20,14 @@ Setting up WINAVR
Step 1: First, open up the start screen and then search : Command Prompt
-.. image:: images/Figcmd.png
+.. image:: Images/Figcmd.png
:height: 540px
:width: 550px
:scale: 150
Step 2: Then, a screen like this shall pop up.
-.. image:: images/Comm.png
+.. image:: Images/Comm.png
:height: 540px
:width: 550px
:scale: 150
@@ -36,7 +36,7 @@ Step 3: Enter into the command prompt for windows: avrdude
You should get prompts and flags mentioned like this, which implies that you have downloaded the software properly.
-.. image:: images/avrdude1.png
+.. image:: Images/avrdude1.png
:height: 440px
:width: 650px
:scale: 100
@@ -52,7 +52,7 @@ name AVRDUDE. Just enter the below command line on your terminal
You would see a screen full of text, something like the one below. To
exit press q. If you don’t get a screen like that, then open Ubuntu Software Center and on the search bar enter avrdude, then install it. Enter the same command into the terminal again and you shall see the manual.
-.. image:: images/manavrdude.png
+.. image:: Images/manavrdude.png
:height: 540px
:width: 450px
:scale: 100
@@ -62,7 +62,7 @@ Setting up the Ld micro executable
To download the software on your Windows system, go to [#] `<http://cq.cx/ladder.pl/>`_ The download is a direct executable, there’s no need to install it.
-.. image:: images/Downloading-LD-Micro.png
+.. image:: Images/Downloading-LD-Micro.png
:height: 540px
:width: 450px
:scale: 100
diff --git a/Documentation/Software-requirements.rst~ b/Documentation/Software-requirements.rst~
new file mode 100644
index 0000000..01f12f6
--- /dev/null
+++ b/Documentation/Software-requirements.rst~
@@ -0,0 +1,153 @@
+Software requirements
+=====================
+
+Many software support PLC simulation in various logics.
+The software that has been used in the subsequent sections is
+LDMicro, that incorporates Ladder Logic, supporting
+many microcontrollers, along with the AVR's ATmega16A. This
+software helps produce the HEX files according to the microcontroller
+and the pin selected which can be directly dumped onto the
+core.
+
+For windows based system
+------------------------
+
+The IC is a standalone one without the Bootloader. One of the ways of
+dumping the code, is using an In System Programmer or an ISP. So, for burning the same we use the softwares: AVRDUDE1 - AVR Downloader Uploader is a program for downloading and uploading the on-chip memories of Atmels AVR microcontrollers. It can program the Flash and EEPROM, and where supported by the serial programming protocol, it can program fuse and lock bits. It’s available as WINAVR for Windows and can be downloaded from here [#] '<https://sourceforge.net/projects/winavr/files/WinAVR/20100110>'
+
+Setting up WINAVR
+~~~~~~~~~~~~~~~~~
+
+Step 1: First, open up the start screen and then search : Command Prompt
+
+.. image:: Images/Figcmd.png
+ :height: 540px
+ :width: 550px
+ :scale: 150
+
+Step 2: Then, a screen like this shall pop up.
+
+.. image:: Images/Comm.png
+ :height: 540px
+ :width: 550px
+ :scale: 150
+
+Step 3: Enter into the command prompt for windows: avrdude
+
+You should get prompts and flags mentioned like this, which implies that you have downloaded the software properly.
+
+.. image:: Images/avrdude1.png
+ :height: 440px
+ :width: 650px
+ :scale: 100
+
+For Linux based system
+~~~~~~~~~~~~~~~~~~~~~~
+
+Instead if you have Linux system, it’s already pre-installed under the
+name AVRDUDE. Just enter the below command line on your terminal
+
+**man avrdude**
+
+You would see a screen full of text, something like the one below. To
+exit press q. If you don’t get a screen like that, then open Ubuntu Software Center and on the search bar enter avrdude, then install it. Enter the same command into the terminal again and you shall see the manual.
+
+.. image:: Images/manavrdude.png
+ :height: 540px
+ :width: 450px
+ :scale: 100
+
+Setting up the Ld micro executable
+----------------------------------
+
+To download the software on your Windows system, go to [#] `<http://cq.cx/ladder.pl/>`_ The download is a direct executable, there’s no need to install it.
+
+.. image:: Images/Downloading-LD-Micro.png
+ :height: 540px
+ :width: 450px
+ :scale: 100
+
+
+Getting started with Ld micro
+-----------------------------
+
+A PLC is largely programmed using Ladder Logic, which is used in
+this software. It allows us to select the microcontroller that
+we wish to program via its HEX codes generated, ATmega16A in this case. The naming convention is very intuitive and is easy to get accustomed to. Some of the naming conventions followed are:
+
+[1] *Yvar* implies the component is connected to an input pin on the micro-controller, something like a push button that is user dependent. This generally works for the digital inputs, HIGH(+5V) or LOW(GND).
+
+[2] *Xvar* implies the component is connected to an output pin on the mi-crocontroller. This can be something like an LED or a Buzzer that is used to show the outputs. It’s generally used to display digital outputs, HIGH(+5V) or LOW(GND).
+
+[3] *Tvar* implies, a timer. It can be a turn on, turn off or a retentive timer, just like the ones used in the actual PLCs.
+
+[4] *Cvar* implies a counter. The arguments in this are simple logical
+operands to decide the upper bound upto which the counter shall work.
+There are circular counter too, which count circularly, without any
+bound.
+
+[5] *Avar* implies the values read from the Analog pins of the controller.This can be used to take the intermediate readings say from components like Potentiometers, IR sensors etc.
+
+Things to remember are:
+
+- Variable names can incorporate alphabets, numbers and underscores.
+ It doesn’t support the special characters.
+- Do not start the name of the variable with a number.
+- The variable names are case sensitive, the variable names Relay1 and
+ relay1 signify two different variables.
+- The instructions such as the arithmetic ones can manipulate the vari-
+ ables associated with the timers, counters or input, output pins.
+- The variables are 16 bit signed decimals, so the variables can also
+ be containing values that are negative pertaining to that range.
+- As counters, timers in physical sense are internal in the microcontroller,we can only assign the pins to the Xname, Yname and Aname objects and not others.
+
+Now that the basic ideas are clear, the use of certain instructions can be discussed.
+
+We shall understand normally open and normally closed connections. In
+normally open case, the contacts are open generally, which means, giving a high input closes the contact, hereby passing the signal over the rung.Whereas, a normally closed connection would imply a high signal to the connection would break the circuit hence giving low as the output.
+
+[1] **Contacts** are something like a prototype of a switch, which implies, if the signal going into the contact is true, only then it’ll be reflected as output, if false, then output is false for normally open case. These can be used as internal relays too.
+
+[2] **Coils** are basically corresponding to the output devices. They can set the output true, if the signal going into them is true for the normally open case, else it’s the other way. They can be used with internal relays too. There is an option of Set only (Reset-only) which are set(reset) when the input goes from Low to High, and retain their states. Hence they are used with Reset-Only(Set-Only) coils to change the states as and when wanted.
+
+[3] **Internal Relays** are the ones that are never assigned pin numbers.Basically, they are the ones that are used for counters or triggers, which are not given inputs or outputs, hence no pin on the controller.
+
+[4] **Turn on Delay** simply means delaying turning on of any coil. This mean the sensor, if gives a high at the input, it delays the turning on of the next part of the rung by those many units of time
+
+[5] **Turn off Delay** literally means turning off of any coil with some delay.This mean the sensor, if gives a false or a low at the input, it delays the turning off of the next part of the rung by those many units of time
+
+[6] **Retentive timer** is used to keep track of the how much time the
+module under consideration has been true, it cumulates the total time,
+if the input has been on for atleast that much time, the output of the
+timer is true. It will always reamin true after this, hence it should be reset by using Reset instruction manually
+
+[7] **Counter** is used to count upto the given value threshold.The count is changed as the input to the counter is made high. This is used as an up counter, down counter or a circular counter. The variables can be manipulated and be suited for the application
+
+[8] **Mov** is used to move any value, be it character or numeric into the variable named under destination.
+
+[9] **Arithmetic operands** are used to manipulate the variables values to suit the logic, they cn be used on any kind of variables like the counters variables.
+
+These are the basic ones that are used. A detailed help for the more
+instructions and general guidelines is provided on the Manual of the
+software under the Help menu.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Resources/images/Comm.png b/Images/Comm.png
index 78567a8..78567a8 100644
--- a/Resources/images/Comm.png
+++ b/Images/Comm.png
Binary files differ
diff --git a/Resources/images/Downloading-LD-Micro.png b/Images/Downloading-LD-Micro.png
index 6f5037d..6f5037d 100644
--- a/Resources/images/Downloading-LD-Micro.png
+++ b/Images/Downloading-LD-Micro.png
Binary files differ
diff --git a/Resources/images/Figcmd.png b/Images/Figcmd.png
index 6c8197b..6c8197b 100644
--- a/Resources/images/Figcmd.png
+++ b/Images/Figcmd.png
Binary files differ
diff --git a/Resources/images/PIN.png b/Images/PIN.png
index aba755c..aba755c 100644
--- a/Resources/images/PIN.png
+++ b/Images/PIN.png
Binary files differ
diff --git a/Resources/images/Setup.png b/Images/Setup.png
index 400f652..400f652 100644
--- a/Resources/images/Setup.png
+++ b/Images/Setup.png
Binary files differ
diff --git a/Resources/images/avrdude1.png b/Images/avrdude1.png
index f35669f..f35669f 100644
--- a/Resources/images/avrdude1.png
+++ b/Images/avrdude1.png
Binary files differ
diff --git a/Resources/images/change.png b/Images/change.png
index b0d2000..b0d2000 100644
--- a/Resources/images/change.png
+++ b/Images/change.png
Binary files differ
diff --git a/Resources/images/cont.png b/Images/cont.png
index f03205a..f03205a 100644
--- a/Resources/images/cont.png
+++ b/Images/cont.png
Binary files differ
diff --git a/Resources/images/fuse1.png b/Images/fuse1.png
index 9995c99..9995c99 100644
--- a/Resources/images/fuse1.png
+++ b/Images/fuse1.png
Binary files differ
diff --git a/Resources/images/fuse2.png b/Images/fuse2.png
index e1e1086..e1e1086 100644
--- a/Resources/images/fuse2.png
+++ b/Images/fuse2.png
Binary files differ
diff --git a/Resources/images/ld1.png b/Images/ld1.png
index 328f268..328f268 100644
--- a/Resources/images/ld1.png
+++ b/Images/ld1.png
Binary files differ
diff --git a/Resources/images/manavrdude.png b/Images/manavrdude.png
index 1c2458c..1c2458c 100644
--- a/Resources/images/manavrdude.png
+++ b/Images/manavrdude.png
Binary files differ
diff --git a/Resources/images/prop.png b/Images/prop.png
index 35626f8..35626f8 100644
--- a/Resources/images/prop.png
+++ b/Images/prop.png
Binary files differ
diff --git a/Resources/images/states.png b/Images/states.png
index d858496..d858496 100644
--- a/Resources/images/states.png
+++ b/Images/states.png
Binary files differ
diff --git a/Resources/images/usb.png b/Images/usb.png
index c28f491..c28f491 100644
--- a/Resources/images/usb.png
+++ b/Images/usb.png
Binary files differ