diff options
author | rtniveditait | 2016-04-22 12:15:39 +0530 |
---|---|---|
committer | rtniveditait | 2016-04-22 12:15:39 +0530 |
commit | 51f9deafc64f070f0e5af4709b7711b58ad8aac0 (patch) | |
tree | 100187709cc8962bba101e5a49cdc8a87e705f56 /Experiments | |
parent | 3605658a18362114c330a5d88d27fedd1c3804ea (diff) | |
download | OpenPLC-51f9deafc64f070f0e5af4709b7711b58ad8aac0.tar.gz OpenPLC-51f9deafc64f070f0e5af4709b7711b58ad8aac0.tar.bz2 OpenPLC-51f9deafc64f070f0e5af4709b7711b58ad8aac0.zip |
adding experiments folder
Diffstat (limited to 'Experiments')
-rw-r--r-- | Experiments/1_LED-PLC/LED.rst | 32 | ||||
-rw-r--r-- | Experiments/1_LED-PLC/blinking.ld | 22 | ||||
-rw-r--r-- | Experiments/2_Motor-PLC/motor-on-off.ld | 29 | ||||
-rw-r--r-- | Experiments/2_Motor-PLC/motor.rst | 30 | ||||
-rw-r--r-- | Experiments/2_Motor-PLC/motor.rst~ | 29 | ||||
-rw-r--r-- | Experiments/2_Motor-PLC/switch-motor.ld | 20 |
6 files changed, 162 insertions, 0 deletions
diff --git a/Experiments/1_LED-PLC/LED.rst b/Experiments/1_LED-PLC/LED.rst new file mode 100644 index 0000000..c67d4e5 --- /dev/null +++ b/Experiments/1_LED-PLC/LED.rst @@ -0,0 +1,32 @@ +Light Emitting Diode +==================== + +Overview +-------- + +LEDs (light emitting diodes) are used in all sorts of +clever things which is why we have induced them in the kit. +We will start off with something very simple, turning one +ON and OFF, repeatedly,producing a pleasant blinking effect. +In the ld micro insert coil and insert contacts and also +insert Ton and Toff and give particular timings for both. +Burn the code to OpenPLC and watch the output + + +Components required +------------------- + +OpenPLC board + + +blinking of LED +--------------- + +For blinking of LED we use timers in ldmicro, On timer(Ton) and Off timer(Toff). The LED is connected to pin 35 on the board. +The code blinkin.ld illustrates above logic. + +switch on LED +------------- + +We can control on/off LED by using an input to the PLC. The input switch is connnected to pin 1 and LED is connedted to the same pin 35. +The code for this experiment is switch-led.ld diff --git a/Experiments/1_LED-PLC/blinking.ld b/Experiments/1_LED-PLC/blinking.ld new file mode 100644 index 0000000..2dc1811 --- /dev/null +++ b/Experiments/1_LED-PLC/blinking.ld @@ -0,0 +1,22 @@ +LDmicro0.1
+MICRO=Atmel AVR ATmega16 40-PDIP
+CYCLE=10000
+CRYSTAL=4000000
+BAUD=2400
+COMPILED=Z:\home\nivedita\Downloads\LLED.hex
+
+IO LIST
+ Yled at 3
+END
+
+PROGRAM
+RUNG
+ CONTACTS Rosc 0
+ TON Ton 1000000
+ TOF Toff 1000000
+ COIL Rosc 1 0 0
+END
+RUNG
+ CONTACTS Rosc 0
+ COIL Yled 0 0 0
+END
diff --git a/Experiments/2_Motor-PLC/motor-on-off.ld b/Experiments/2_Motor-PLC/motor-on-off.ld new file mode 100644 index 0000000..2ee739d --- /dev/null +++ b/Experiments/2_Motor-PLC/motor-on-off.ld @@ -0,0 +1,29 @@ +LDmicro0.1
+MICRO=Atmel AVR ATmega16 40-PDIP
+CYCLE=10000
+CRYSTAL=16000000
+BAUD=2400
+COMPILED=Z:\home\nivedita\Documents\OpenPLC\ladder-files\motor-on-off.hex
+
+IO LIST
+ XOFF at 2
+ XON at 1
+ Ym1 at 19
+ Ym2 at 20
+END
+
+PROGRAM
+RUNG
+ CONTACTS XON 1
+ PARALLEL
+ COIL Ym1 0 1 0
+ COIL Ym2 0 0 1
+ END
+END
+RUNG
+ CONTACTS XOFF 1
+ PARALLEL
+ COIL Ym1 0 0 1
+ COIL Ym2 0 0 1
+ END
+END
diff --git a/Experiments/2_Motor-PLC/motor.rst b/Experiments/2_Motor-PLC/motor.rst new file mode 100644 index 0000000..bcb5ba4 --- /dev/null +++ b/Experiments/2_Motor-PLC/motor.rst @@ -0,0 +1,30 @@ +DC motor +======== + +Overview +-------- + +DC Motor, like the general purpose motors, are used in providing high RPM for rotation purposes, like for a pulley or in lifting action. Motors, are generally heavy duty, which means, connecting it directly to the controller pins may end up frying it up! So, to source higher +current, transistors or motor driver ICs are used. These are great as they can be easily used to turn your motor in either direction, just by giving digital high or low to the input pins of L293D Motor Driver IC. The easy part is, controlling the speed can be done by just changing the voltage bias given to the driver IC. + +Components required +------------------- + +OpenPLC board + +DC motor + +Switch ON motor +--------------- + +In this experiment using an input switch, PLC turns on the motor connected to it. Motor is driven by l293d as explained above. L293d inputs are conncted to controller pin number 19 and 20. The switch is connected to pin number 1. + +To run motor we always need two coils on ldmicro and one should be 'set' and other 'reset'. If we swap the coil status motor will run in opposite direction. + +Motor-on-off +------------ + +We now know how to turn on a motor, Similarly we can turn it Off by giving another input. To stop motor, status of both the coils should be Reset, So in new rung we can give a switch and reset both the coils. +Anothr switch is connected to pin number 2. + + diff --git a/Experiments/2_Motor-PLC/motor.rst~ b/Experiments/2_Motor-PLC/motor.rst~ new file mode 100644 index 0000000..d0deb8e --- /dev/null +++ b/Experiments/2_Motor-PLC/motor.rst~ @@ -0,0 +1,29 @@ +DC motor +======== + +Overview +-------- + +DC Motor, like the general purpose motors, are used in providing high RPM for rotation purposes, like for a pulley or in lifting action. Motors, are generally heavy duty, which means, connecting it directly to the controller pins may end up frying it up! So, to source higher +current, transistors or motor driver ICs are used. These are great as they can be easily used to turn your motor in either direction, just by giving digital high or low to the input pins of L293D Motor Driver IC. The easy part is, controlling the speed can be done by just changing the voltage bias given to the driver IC. + +Components required +------------------- + +OpenPLC board +DC motor + +Switch ON motor +--------------- + +In this experiment using an input switch, PLC turns on the motor connected to it. Motor is driven by l293d as explained above. L293d inputs are conncted to controller pin number 19 and 20. The switch is connected to pin number 1. + +To run motor we always need two coils on ldmicro and one should be 'set' and other 'reset'. If we swap the coil status motor will run in opposite direction. + +Motor-on-off +------------ + +We now know how to turn on a motor, Similarly we can turn it Off by giving another input. To stop motor, status of both the coils should be Reset, So in new rung we can give a switch and reset both the coils. +Anothr switch is connected to pin number 2. + + diff --git a/Experiments/2_Motor-PLC/switch-motor.ld b/Experiments/2_Motor-PLC/switch-motor.ld new file mode 100644 index 0000000..6a4c894 --- /dev/null +++ b/Experiments/2_Motor-PLC/switch-motor.ld @@ -0,0 +1,20 @@ +LDmicro0.1
+MICRO=Atmel AVR ATmega16 40-PDIP
+CYCLE=10000
+CRYSTAL=16000000
+BAUD=2400
+
+IO LIST
+ Xswitch at 1
+ Ym1 at 19
+ Ym2 at 20
+END
+
+PROGRAM
+RUNG
+ CONTACTS Xswitch 1
+ PARALLEL
+ COIL Ym1 0 1 0
+ COIL Ym2 0 0 1
+ END
+END
|