https://script.spoken-tutorial.org/index.php?title=OpenPLC-with-LDmicro/C2/OpenPLC-Traffic-Light-and-Switchboard-Modules/English&feed=atom&action=historyOpenPLC-with-LDmicro/C2/OpenPLC-Traffic-Light-and-Switchboard-Modules/English - Revision history2024-03-29T00:39:50ZRevision history for this page on the wikiMediaWiki 1.23.17https://script.spoken-tutorial.org/index.php?title=OpenPLC-with-LDmicro/C2/OpenPLC-Traffic-Light-and-Switchboard-Modules/English&diff=55309&oldid=prevPriyanka.guntaka123 at 04:47, 30 June 20212021-06-30T04:47:00Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 04:47, 30 June 2021</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 5:</td>
<td colspan="2" class="diff-lineno">Line 5:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|| '''NARRATION'''</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|| '''NARRATION'''</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|-</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|-</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>|| Slide 1:  </div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>|| Slide 1: <ins class="diffchange diffchange-inline">Welcome Slide</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|| Welcome to the spoken tutorial on '''OpenPLC Traffic Light & Switchboard modules.'''</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|| Welcome to the spoken tutorial on '''OpenPLC Traffic Light & Switchboard modules.'''</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|-  </div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|-  </div></td></tr>
</table>Priyanka.guntaka123https://script.spoken-tutorial.org/index.php?title=OpenPLC-with-LDmicro/C2/OpenPLC-Traffic-Light-and-Switchboard-Modules/English&diff=55285&oldid=prevNirmala Venkat: Created page with " {| border="1" |- || '''VISUAL CUE''' || '''NARRATION''' |- || Slide 1: || Welcome to the spoken tutorial on '''OpenPLC Traffic Light & Switchboard modules.''' |- || Slide 2..."2021-06-21T11:10:19Z<p>Created page with " {| border="1" |- || '''VISUAL CUE''' || '''NARRATION''' |- || Slide 1: || Welcome to the spoken tutorial on '''OpenPLC Traffic Light & Switchboard modules.''' |- || Slide 2..."</p>
<p><b>New page</b></p><div><br />
{| border="1"<br />
|-<br />
|| '''VISUAL CUE'''<br />
|| '''NARRATION'''<br />
|-<br />
|| Slide 1: <br />
|| Welcome to the spoken tutorial on '''OpenPLC Traffic Light & Switchboard modules.'''<br />
|- <br />
|| Slide 2: Learning Objectives<br />
* OpenPLC''' '''Traffic light module<br />
* OpenPLC Switchboard module<br />
<br />
|| In this tutorial, we will learn about<br />
* '''OpenPLC Traffic light''' module<br />
* '''OpenPLC Switchboard''' module<br />
|- <br />
|| Slide 3: System Requirements<br />
* Ubuntu Linux 18.04 operating system<br />
* OpenPLC Traffic light module<br />
* OpenPLC Switchboard module<br />
* OpenPLC Mainboard<br />
* 24V, 2A SMPS<br />
<br />
|| To record this tutorial I am using:<br />
* '''Ubuntu Linux 18.04''' operating system<br />
* '''OpenPLC''' '''Traffic light''' module<br />
* '''OpenPLC Switchboard''' module<br />
* '''OpenPLC Mainboard'''<br />
* '''24V, 2A SMPS'''<br />
|- <br />
|| Slide 4: Pre-requisites<br />
* OpenPLC Mainboard<br />
* If not, please refer to the relevant tutorials from [https://spoken-tutorial.org/ Home | spoken-tutorial.org]<br />
<br />
|| <br />
* To follow this tutorial, you should know about '''OpenPLC''' '''Mainboard'''.<br />
* If not, please refer to the relevant tutorials in this series on this website.<br />
<br />
|- <br />
|| <br />
|| First we will learn about the '''OpenPLC Traffic light module'''.<br />
|- <br />
|| Slide 5: Traffic Light module<br />
<br />
This '''module''' is used to <br />
* implement the working of '''traffic lights'''<br />
* visualize the status of any process with the '''built-in LEDs'''<br />
|| <br />
This '''module''' is used to<br />
* implement the working of '''traffic lights''' and<br />
* visualize the status of any process with the '''built-in LEDs'''.<br />
<br />
|- <br />
|| Traffic.jpg<br />
<br />
|| This is a picture of the '''Traffic light module'''.<br />
<br />
This '''module''' replicates a '''traffic light'''. <br />
<br />
It has one red '''LED''' marked as '''STOP''' and one yellow '''LED''' marked as '''READY'''. <br />
<br />
At the bottom, it has 3 green '''LEDs''' marked as '''LEFT, GO '''and''' RIGHT.'''<br />
|- <br />
|| led-connectors.png<br />
<br />
|| You can access all these '''LEDs''' using the '''connectors''' present below. <br />
|- <br />
|| traffic-sled.png or (traffic.jpg)<br />
<br />
|| The red '''LED''' can also be accessed through the two '''connectors''' on the right of it.<br />
<br />
If you want to use a single '''LED''' you can use these '''connectors'''.<br />
|- <br />
|| <br />
|| Let us see how to do simple experiments using a single '''LED'''.<br />
|- <br />
|| traffic.jpg<br />
|| The '''anode''' and '''cathode''' of the red '''LED''' are given as '''connectors''' to the right of it.<br />
<br />
The '''anode''' is marked as '''+5V''' and '''cathode''' as '''GND''', which is '''Ground'''.<br />
|-<br />
|- <br />
|| <br />
<br />
|| These '''connectors''' can be connected in 3 different ways.<br />
<br />
We will see one by one.<br />
|- <br />
|| traffic.jpg<br />
<br />
|| We can connect '''+5V pin''' to '''5V''' and '''GND pin''' to any '''I/O pin''' of the '''microcontroller'''.<br />
|- <br />
|| traffic.jpg<br />
|| Connect '''GND pin''' to 0V and '''+5V pin''' to any '''I/O pin''' of the '''microcontroller'''.<br />
|- <br />
|| traffic.jpg<br />
|| Otherwise connect both '''+5V''' and '''GND pins''' to the '''I/O pins''' of the '''microcontroller'''. <br />
|- <br />
|| Led-connectors.png<br />
<br />
traffic.jpg image<br />
|| We will see how to use '''LEDs''' with the '''connectors''' at the bottom of the '''module'''.<br />
<br />
Each '''LED’s cathode''' is taken out through the '''connectors''' at the bottom of the '''module'''.<br />
<br />
Note that the rightmost '''pin''' marked as '''‘EN’''' is not an '''LED connector'''. <br />
|-<br />
|- <br />
|| Led-connectors.png<br />
<br />
traffic.jpg image<br />
|| Each '''connector''' is marked with the first letter of the respective '''LED''' name.<br />
<br />
We will see one by one starting from right.<br />
# '''Ri''' is for green '''LED''' marked as '''RIGHT'''<br />
# '''S''' is for red '''LED''' marked as '''STOP'''<br />
# '''Re''' is for yellow '''LED''' marked as '''READY'''<br />
# '''G''' is for green '''LED''' marked as '''GO'''<br />
# '''L''' is for green '''LED''' marked as '''LEFT'''.<br />
<br />
|- <br />
|| traffic-enable.png<br />
|| '''‘EN’''' is an '''active low enable pin''' which enables all the '''LED pins'''.<br />
<br />
To the left of the yellow '''LED''', we can find a '''connector''' marked '''+5V'''.<br />
<br />
This is the '''power pin''' of the '''module'''.<br />
<br />
That is, none of the '''LED''' glows unless you make these two connections.<br />
|- <br />
|| Slide 6: LED to glow <br />
* +5V pin should be given 5V.<br />
* EN and the respective '''LED''' pin should be grounded or given a logic-low signal.<br />
<br />
|| Therefore, for any '''LED''' to glow you should follow the below:<br />
# '''+5V pin''' should be given '''5V'''.<br />
# '''EN''' and the respective '''LED pin''' should be '''ground'''ed or given a '''logic-low signal'''.<br />
<br />
|- <br />
|| <br />
|| Now we’ll see the working of the '''module'''.<br />
|- <br />
|| Slide 7: How can the '''Traffic Light module''' be powered?<br />
<br />
'''Traffic Light module''' can be powered using the output power pins of the Mainboard<br />
|| How can the '''Traffic Light module''' be powered?<br />
<br />
It can be powered using the output '''power pins''' of the '''Mainboard'''.<br />
|- <br />
|| SMPS-Mainboard.jpg - add in editing<br />
|| Connect the '''SMPS''' to the '''Mainboard''' as shown here.<br />
|- <br />
|| led-connectors.png<br />
|| First we will see the demo of this '''module''' using the '''connectors''' available at the bottom.<br />
|- <br />
|| demo1.png<br />
<br />
Point to the image as per narration<br />
|| Connect '''5V''' to the '''power pin''' i.e. '''+5V pin''' to the left of the yellow '''LED'''. <br />
<br />
Connect '''0V''' to the '''‘EN’ pin'''.<br />
<br />
Then, connect '''0V''' to any of the '''LEDs'''.<br />
<br />
I’m connecting it to the '''pins''' marked '''‘G’''', '''‘Re’''' and '''‘S’'''.<br />
|- <br />
|| demo1.png<br />
|| Make the connections as shown in the picture.<br />
<br />
Remember to turn '''off''' the '''power supply''' when you change or make new connections.<br />
|- <br />
|| Turn '''on''' the '''power supply''' <br />
|| After making all the connections turn '''on''' the '''power supply''' of the '''Mainboard'''.<br />
<br />
The red, yellow and middle green '''LED''' has started glowing.<br />
|- <br />
|| <br />
|| Do not use '''I/O pins''' of the '''Mainboard''' to power up the '''pin''' marked '''+5V'''.<br />
<br />
Because it may affect the intensity of the '''LED'''. <br />
|- <br />
|| Disconnect the '''‘EN’ pin'''<br />
|| Now disconnect the '''‘EN’ pin'''.<br />
<br />
We can observe that all '''LEDs''' go '''off'''.<br />
|- <br />
|| Turn '''off''' the '''power supply'''<br />
|| Turn '''off''' the '''power supply'''.<br />
|- <br />
|| traffic-sled.png<br />
|| Next, we will see the demo on how to use this '''module''' when a single '''LED''' is needed.<br />
|- <br />
|| demo2.png<br />
|| Connect '''5V''' to the '''+5V pin''' on the right of the red '''LED'''.<br />
<br />
Connect '''0V''' to the '''pin''' marked '''GND'''.<br />
|- <br />
|| Turn '''on''' the '''power supply'''<br />
|| Turn '''on''' the '''power supply'''.<br />
<br />
This will make only the red '''LED''' to glow.<br />
<br />
Thus, there is no need to connect power and enable '''pins''' for this connection.<br />
|- <br />
|| Turn '''off''' the '''power supply'''<br />
|| Turn '''off''' the '''power supply'''.<br />
|- <br />
|| <br />
|| We have seen how '''Traffic light module''' can be used in different ways.<br />
|- <br />
|| <br />
|| Now we’ll learn about the '''OpenPLC Switchboard module'''.<br />
|- <br />
|| Slide 5: Switchboard module<br />
* The goal of this '''module''' is to get familiarized with different types of '''switches'''<br />
* In particular their usage in the real time applications in industries<br />
|| <br />
<br />
The goal of this '''module''' is to get familiarized with different types of '''switches'''.<br />
<br />
In particular their usage in the real time applications in industries.<br />
|- <br />
|| Slide 6: Main Components<br />
* 4 Normally Open '''switches'''<br />
* 4 Normally Closed '''switches'''<br />
* 2 '''Latched action switches''' and<br />
* '''LEDs''' for each '''switch'''<br />
<br />
|| This module has<br />
* 4 Normally Open '''switches'''<br />
* 4 Normally Closed '''switches'''<br />
* 2 '''Latched action switches''' and<br />
* '''LEDs''' for each '''switch'''<br />
<br />
|- <br />
|| switchboard.jpg<br />
|| This is the '''Switchboard module'''.<br />
|- <br />
|| Slide 7: Types of Switches:<br />
* Normally open (NO)<br />
* Normally closed (NC)<br />
* Latched action (L)<br />
<br />
|| In this '''module''', there are three kinds of '''switches''' available.<br />
<br />
They are '''Normally Open, Normally Closed '''and''' Latched action switches.'''<br />
<br />
'''Normally Open''' is represented as '''NO''' and '''Normally Closed''' is represented as '''NC'''.<br />
<br />
'''Latched action switches''' are represented as '''L'''.<br />
|- <br />
|| SB-switches.png<br />
|| We will now look at their arrangement on the '''module''' from bottom to top.<br />
|- <br />
|| SB-switches.png<br />
<br />
Highlight Latch switches<br />
<br />
Then NC and then NO<br />
|| At the bottom, we have two '''Latched action switches'''.<br />
<br />
Above that we have 4 '''Normally Closed''' and then 4 '''Normally Open switches'''.<br />
|- <br />
|| SB-leds.png<br />
<br />
|| Above these '''switches''' we have '''LEDs''' corresponding to each '''switch'''. <br />
<br />
The '''LEDs''' are arranged in the same order as that of '''switches'''.<br />
|- <br />
|| <br />
|| Each '''LED''' glow indicates a corresponding '''switch''' press.<br />
|- <br />
|| SB-connectors.png<br />
|| On the top we have '''female berg connectors''' for connections.<br />
|- <br />
|| SB-connectors-z.png<br />
<br />
Point to each particular pin<br />
|| Next, we will see about the '''pins'''.<br />
<br />
Starting from the right, the first two '''pins''' are '''GND''' and '''5V''' respectively.<br />
<br />
These are the input '''power pins''' of this '''module.'''<br />
<br />
Then we have 4 '''pins''' for 4 '''NO switches '''and 4 pins for 4 '''NC switches.''' <br />
<br />
The last 2 '''pins''' are for 2 '''latched action switches'''.<br />
|- <br />
|| Slide 8: Important Note<br />
* NO and latched action '''switches''' must be connected to the '''I/Os''' of the '''microcontroller'''<br />
* Only then the '''LEDs''' of the corresponding '''switches''' will work<br />
* '''LEDs''' of '''NC switches''' will work, even if they are not connected to '''I/Os'''<br />
<br />
|| '''NO''' and '''Latched action switches''' must be connected to the '''I/Os''' of the '''microcontroller'''.<br />
<br />
Only then the '''LEDs''' of the corresponding '''switches''' will work.<br />
<br />
LEDs of '''NC switches''' will work, even if they are not connected to the '''I/Os''' of the '''microcontroller'''.<br />
|- <br />
|| <br />
|| Now, we’ll learn how each type of the '''switch''' works.<br />
|- <br />
|| Slide 9: Normally Open Switch<br />
* The output '''pin''' of a '''NO switch '''will read '''logic 0''' when it is not pressed<br />
* When the '''switch''' is pressed, the output '''pin''' will read '''5V'''<br />
* This is due to the supply from the '''microcontroller'''’s internal '''pull up register'''<br />
<br />
|| The output '''pin''' of a '''NO switch '''will read '''logic 0''' when it is not pressed.<br />
<br />
When the '''switch''' is pressed, the output '''pin''' will read '''5V'''.<br />
<br />
This is due to the supply from the '''microcontroller'''’s internal '''pull up register'''.<br />
|- <br />
|| Slide 10: Normally Closed switch<br />
* The output '''pin''' of a '''NC switch''' will read '''5V''' when it is not pressed<br />
* This is due to the supply from the '''microcontroller'''’s internal '''pull up register'''<br />
* Upon '''switch''' press, the output '''pin''' will read '''logic 0''' or '''ground'''<br />
<br />
|| The output '''pin''' of a '''NC switch''' will read '''5V''' when it is not pressed.<br />
<br />
This is due to the supply from the '''microcontroller'''’s internal '''pull up register'''.<br />
<br />
Upon '''switch''' press, the output '''pin''' will read '''logic 0''' or '''ground'''.<br />
|- <br />
|| Slide 11: Latched action switch<br />
* It is basically a '''push-to-make, push-to-break''' type of '''switch'''<br />
* That is, the output '''pin''' will read '''5V''', when it is pressed for the first time<br />
* The output '''pin''' will read '''0V''', when it is pressed for the second time<br />
<br />
|| '''Latched action switch''' is basically a '''push-to-make, push-to-break''' type of '''switch'''.<br />
<br />
That is, the output '''pin''' will read '''5V''', when it is pressed for the first time.<br />
<br />
The output '''pin''' will read '''0V''', when it is pressed for the second time.<br />
<br />
Working of the '''LED''' of a''' latched action switch '''corresponds to that of a''' NO switch.'''<br />
|- <br />
|| Slide 12: How can the Switchboard module be powered?<br />
<br />
'''Switchboard module''' can be powered using the output '''power pins''' of the '''Mainboard'''<br />
|| How can the '''Switchboard module''' be powered?<br />
<br />
It can be powered using the output '''power pins''' of the '''Mainboard'''.<br />
|- <br />
|| <br />
|| We have learnt about the different types of '''switches''' in the '''Switchboard module'''.<br />
|- <br />
|| <br />
|| Using these '''modules''' we will learn about '''LDmicro''' instructions on '''OpenPLC''' in future tutorials.<br />
|- <br />
|| <br />
|| This brings us to the end of this tutorial.<br />
<br />
Let us summarize.<br />
|- <br />
|| Slide 8: Summary<br />
* '''OpenPLC Traffic light module'''<br />
* '''OpenPLC Switchboard module'''<br />
<br />
|| In this tutorial, we learnt about<br />
* '''OpenPLC Traffic light module'''<br />
* '''OpenPLC Switchboard module'''<br />
|- <br />
|| Slide 9: About<br />
<br />
Spoken Tutorial project<br />
|| The video at the following link summarises the Spoken Tutorial project.<br />
<br />
Please download and watch it<br />
|- <br />
|| Slide 10:<br />
<br />
Spoken Tutorial workshops<br />
|| The''' Spoken Tutorial Project''' team:<br />
*conducts workshops using spoken tutorials and<br />
*gives certificates on passing online tests.<br />
<br />
For more details, please write to us.<br />
|- <br />
|| Slide 11:<br />
<br />
Forum for specific questions:<br />
|| Please post your timed queries in this forum.<br />
|- <br />
|| Slide 12:<br />
<br />
Forum for specific questions:<br />
|| Do you have any general / technical questions on OpenPLC?<br />
<br />
Please visit the FOSSEE forum and post your question.<br />
|- <br />
|| Slide 13:<br />
<br />
Acknowledgement<br />
|| Spoken Tutorial Project is funded by MHRD, Government of India.<br />
|- <br />
|| Slide 14:<br />
<br />
Thank you slide<br />
|| This tutorial has been contributed by FOSSEE and Spoken Tutorial Project, IIT Bombay.<br />
<br />
And this is Harsha Priyanka from the FOSSEE team, signing off.<br />
<br />
Thanks for watching.<br />
|-<br />
|}</div>Nirmala Venkat