<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=OpenPLC-with-LDmicro%2FC2%2FNegated-Coil-and-Negated-Contact%2FEnglish</id>
		<title>OpenPLC-with-LDmicro/C2/Negated-Coil-and-Negated-Contact/English - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=OpenPLC-with-LDmicro%2FC2%2FNegated-Coil-and-Negated-Contact%2FEnglish"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=OpenPLC-with-LDmicro/C2/Negated-Coil-and-Negated-Contact/English&amp;action=history"/>
		<updated>2026-04-30T12:40:00Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=OpenPLC-with-LDmicro/C2/Negated-Coil-and-Negated-Contact/English&amp;diff=55302&amp;oldid=prev</id>
		<title>Nirmala Venkat: Created page with &quot; {| style=&quot;border-spacing:0;&quot; | style=&quot;border:1pt solid #000000;padding:0.176cm;&quot;| &lt;center&gt;'''Visual Cue'''&lt;/center&gt; | style=&quot;border:1pt solid #000000;padding:0.176cm;&quot;| &lt;cent...&quot;</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=OpenPLC-with-LDmicro/C2/Negated-Coil-and-Negated-Contact/English&amp;diff=55302&amp;oldid=prev"/>
				<updated>2021-06-28T12:56:20Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot; {| style=&amp;quot;border-spacing:0;&amp;quot; | style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &amp;lt;center&amp;gt;&amp;#039;&amp;#039;&amp;#039;Visual Cue&amp;#039;&amp;#039;&amp;#039;&amp;lt;/center&amp;gt; | style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &amp;lt;cent...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Slide 1: &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Welcome to the spoken tutorial on''' Negated Coil &amp;amp; Negated Contact.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Slide 2: Learning Objectives:&lt;br /&gt;
&lt;br /&gt;
* Negated Coil&lt;br /&gt;
* Negated Contact&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| In this tutorial, we will learn about working of&lt;br /&gt;
&lt;br /&gt;
* '''Negated Coil'''&lt;br /&gt;
* '''Negated Contact'''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Slide 3: System Requirements&lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu Linux''' 18.04 OS&lt;br /&gt;
* '''LDmicro'''&lt;br /&gt;
* '''OpenPLC''' '''Mainboard'''&lt;br /&gt;
* 24V, 2A '''SMPS'''&lt;br /&gt;
* '''USBasp programmer'''&lt;br /&gt;
* '''Traffic Light module'''&lt;br /&gt;
* '''Switchboard module'''&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| To record this tutorial I am using:&lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu Linux 18.04''' operating system&lt;br /&gt;
* '''LDmicro'''&lt;br /&gt;
* '''OpenPLC Mainboard'''&lt;br /&gt;
* '''24V, 2A SMPS'''&lt;br /&gt;
* '''USBasp''' programmer&lt;br /&gt;
* '''Traffic Light''' module&lt;br /&gt;
* '''Switchboard''' module&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Slide 4: Pre-requisites&lt;br /&gt;
&lt;br /&gt;
* Program OpenPLC Mainboard and&lt;br /&gt;
* Interface OpenPLC modules with Mainboard. &lt;br /&gt;
&lt;br /&gt;
If not, please refer to the relevant tutorials from [https://spoken-tutorial.org/ Home | spoken-tutorial.org]&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
* To follow this tutorial, you should know how to &lt;br /&gt;
*# program '''OpenPLC Mainboard''' and&lt;br /&gt;
*# interface '''OpenPLC''' modules with '''Mainboard'''. &lt;br /&gt;
* If not, please refer to the relevant tutorials in this series on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Slide 5: Prerequisites - Hardware setup&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Connect''' SMPS''' and '''USBasp''' to the '''Mainboard''' as shown in the picture.&lt;br /&gt;
&lt;br /&gt;
Keep these connections throughout this tutorial.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Open LDmicro &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us open '''LDmicro'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| First, we’ll learn about working of a '''Negated Coil'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click ‘Instructions -&amp;gt; Insert Coil’&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Insert a '''Coil''' from '''Instructions''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Double-click on the coil&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Double-click on the '''Coil'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click ‘Negated’ radio button &amp;gt;&amp;gt; Type LED in the name column&lt;br /&gt;
&lt;br /&gt;
Click OK button&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Select the ‘'''Negated'''’ option in the '''Type''' column. &lt;br /&gt;
&lt;br /&gt;
Rename the '''Coil''' as '''LED''' and click on the '''OK''' button.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight coil&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We can observe a '''slash''' between the brackets for a '''Negated Coil'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We will now check the working of this '''logic'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click ‘Simulate -&amp;gt; Simulation mode’&lt;br /&gt;
&lt;br /&gt;
Click ‘Simulate -&amp;gt; Real-time simulation’&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us turn on the '''Simulation mode'''.&lt;br /&gt;
&lt;br /&gt;
For that, click '''Simulate''' and then on '''Simulation mode.'''&lt;br /&gt;
&lt;br /&gt;
Next, start real-time '''simulation''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight I/O list&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Observe the state of '''YLED''' in the '''I/O list.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight the state of YLED in I/O list at the bottom of the screen&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We can observe that the state of '''YLED''' is 0.&lt;br /&gt;
&lt;br /&gt;
That is for a '''Negated Coil''' when the '''input''' is '''logic''' 1, the '''output''' will be '''logic''' 0.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click Simulate -&amp;gt; Halt Simulation &amp;gt;&amp;gt; Click Simulate -&amp;gt; Simulation Mode&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now, turn off the '''Simulation mode'''.&lt;br /&gt;
&lt;br /&gt;
For that, click '''Simulate''' and then on '''Halt Simulation.'''&lt;br /&gt;
&lt;br /&gt;
Then click '''Simulate''' and '''Simulation Mode.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Narration only&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now let us '''compile''' the '''logic'''.&lt;br /&gt;
&lt;br /&gt;
The detailed steps on how to '''compile''' and save the '''logic''' are explained in the earlier tutorials. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on Settings &amp;gt;&amp;gt; Click on Microcontroller &amp;gt;&amp;gt; Select AVR ATmega16 40-PDIP &lt;br /&gt;
&lt;br /&gt;
Click on Settings &amp;gt;&amp;gt; Click on MCU parameters &amp;gt;&amp;gt; Change Crystal frequency to 16&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on '''Settings''' and select the '''micro-controller AVR ATmega16 40-PDIP.''' &lt;br /&gt;
&lt;br /&gt;
Adjust its '''parameters''' as shown here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Double-click on YLED in I/O list &amp;gt;&amp;gt; Select PA0 &amp;gt;&amp;gt; Click OK button&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Then, assign '''pin PA0''' to the '''Coil YLED'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on Compile &amp;gt;&amp;gt; Click on Compile &amp;gt;&amp;gt; Go to Desktop/LDmicro folder &amp;gt;&amp;gt; Rename it as ‘negatedcoil.hex’ &amp;gt;&amp;gt; Click on Save.&lt;br /&gt;
&lt;br /&gt;
Click OK button&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''Compile''' the '''logic''' as '''negatedcoil.hex''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on File &amp;gt;&amp;gt; Click on Save &amp;gt;&amp;gt; Go to Desktop/LDmicro folder &amp;gt;&amp;gt; Rename it as ‘negatedcoil.ld’ &amp;gt;&amp;gt; Click on Save&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Then save the '''ladder diagram''' as '''negatedcoil.ld''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now we will see the working of this '''logic''' on hardware.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Connect Mainboard to PC using USBasp&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Connect the '''Mainboard''' to your laptop using '''USBasp'''.&lt;br /&gt;
&lt;br /&gt;
Turn on the '''power supply'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Open terminal &amp;gt;&amp;gt; Type cd Desktop/LDmicro &amp;gt;&amp;gt; Press ENTER &amp;gt;&amp;gt; type ‘'''avrdude -c usbasp -p m16 -U flash:w:negatedcoil.hex’ '''&amp;gt;&amp;gt; Press ENTER&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Open the '''terminal''' by pressing '''CTRL+ALT+T''' keys simultaneously.&lt;br /&gt;
&lt;br /&gt;
Go to the folder where you have saved the '''hex file'''.&lt;br /&gt;
&lt;br /&gt;
Type the '''command''' as shown to upload the '''hex file''' to the '''Mainboard'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Remove the '''USBasp''' connection from the laptop.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Turn off the '''power supply'''.&lt;br /&gt;
&lt;br /&gt;
Remove the '''USBasp connection''' from the laptop.&lt;br /&gt;
&lt;br /&gt;
This will prevent any hardware damage.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us see the connection details now. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Show the connections as per the narration&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Connect '''+5V pin''' of the red '''LED''' of '''Traffic Light module''' to '''5V pin''' of the '''Mainboard'''.&lt;br /&gt;
&lt;br /&gt;
Then connect the '''GND pin''' of the red '''LED''' to '''PA0 pin''' of the '''Mainboard'''.&lt;br /&gt;
&lt;br /&gt;
Make the connections as shown in the picture.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point as per the narration&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Note the difference in the connections with that of a '''Normal Coil'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Turn on the power&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| After making all the connections properly turn on the '''power supply'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point to the output&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We can observe that the red '''LED''' is glowing.&lt;br /&gt;
&lt;br /&gt;
That is the '''I/O pin PA0''' gives the '''output''' of the '''Coil''' which is '''logic''' 0.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Thus we learnt the working of a '''Negated Coil''' using an '''LED'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Turn off the power&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Turn off the '''power supply'''.&lt;br /&gt;
&lt;br /&gt;
Remove the connections made for this example.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Next, we will learn about the working of '''Negated Contact.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Switch back to LDmicro&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Switch back to '''LDmicro'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Narration only&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Instead of creating a new file, we will make changes in the previous file itself.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Place the cursor to the left of the coil &amp;gt;&amp;gt; Click on Instruction -&amp;gt; Insert Contact&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Place a '''Contact''' to the left of the '''Coil''' as shown here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Double-click on the Contact &amp;gt;&amp;gt; Check the ‘Negated' box&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Double-click on the '''Contact''' and check the '''Negated''' box.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Narration only&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''Negated Contact''' will pass the state of the '''signal''' when its state is '''logic''' 0.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Type switch in the name box &amp;gt;&amp;gt; Click the OK button&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Rename the Contact as '''‘switch’''' and click the OK button.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We will now check the working of this '''logic'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click Simulate -&amp;gt; Simulation mode &amp;gt;&amp;gt; Click Simulate -&amp;gt; Real-time simulation&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Start real-time '''simulation''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight the states of both Xswitch and YLED in the I/O list&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Observe the state of the '''Contact''' and the '''Coil''' in the '''I/O list'''.&lt;br /&gt;
&lt;br /&gt;
Initially the state of both '''Xswitch''' and '''YLED''' are 0.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Double-click on Xswitch&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Change the state of the '''Xswitch''' to 1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight the states of both Xswitch and YLED in the I/O list&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We can observe that the state of '''YLED''' is also 1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Show the connections as per the narration&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Thus, when the state of a '''Negated Contact''' is 1 it doesn’t pass the signal through it.&lt;br /&gt;
&lt;br /&gt;
That is the '''output''' from a '''Negated Contact''' is 0, when its '''input''' is '''logic''' 1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click Simulate -&amp;gt; Halt Simulation &amp;gt;&amp;gt; Click Simulate -&amp;gt; Simulation Mode&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Turn off the '''simulation mode''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We will now '''compile''' this '''logic'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Highlight the status bar at the bottom of the screen&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We can observe that the '''microcontroller''' and its '''parameters''' are already set.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Double-click on Xswitch in I/O list &amp;gt;&amp;gt; Select PC0 &amp;gt;&amp;gt; Click OK button&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Assign the '''pin PC0''' to '''Xswitch'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on Compile &amp;gt;&amp;gt; Click on Compile as &amp;gt;&amp;gt; Go to Desktop/LDmicro folder &amp;gt;&amp;gt; Rename it as ‘negatedcontact.hex’ &amp;gt;&amp;gt; Click on Save.&lt;br /&gt;
&lt;br /&gt;
Click OK button&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| '''Compile''' the '''logic''' as '''negatedcontact.hex '''using the '''‘Compile As’''' option. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Click on File &amp;gt;&amp;gt; Click on Save As &amp;gt;&amp;gt; Go to Desktop/LDmicro folder &amp;gt;&amp;gt; Rename it as ‘negated-contact.ld’ &amp;gt;&amp;gt; Click on Save&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Then save the '''ladder diagram''' as '''negatedcontact.ld '''using the '''‘Save As’''' option.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now we will see the working of this '''logic''' on hardware.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Connect Mainboard to PC using USBasp&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Connect the '''Mainboard''' to your laptop using '''USBasp'''.&lt;br /&gt;
&lt;br /&gt;
Turn on the '''power supply'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Switch back to terminal &amp;gt;&amp;gt; type ‘'''avrdude -c usbasp -p m16 -U flash:w:negatedcontact.hex’ '''&amp;gt;&amp;gt; Press ENTER&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Switch back to the '''terminal'''.&lt;br /&gt;
&lt;br /&gt;
Go to the folder where you have saved the '''hex file'''.&lt;br /&gt;
&lt;br /&gt;
Type the '''command''' as shown and upload this '''hex file''' to the '''Mainboard'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Remove the '''USBasp''' connection from the laptop.&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Turn off the '''power supply'''.&lt;br /&gt;
&lt;br /&gt;
Remove the '''USBasp''' connection from the laptop.&lt;br /&gt;
&lt;br /&gt;
This will prevent any hardware damage.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us see the connection details now. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Show the connections as per the narration&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Connect '''GND''' and '''5V''' of switchboard to '''GND''' and '''5V''' of the '''Mainboard''' respectively.&lt;br /&gt;
&lt;br /&gt;
Then connect '''NO1''' of the '''switchboard''' to '''PC0''' of the '''Mainboard.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;|Show the connections as per the narration&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Connect '''+5V pin''' of the red LED of '''Traffic Light module''' to '''5V pin''' of the '''Mainboard'''.&lt;br /&gt;
&lt;br /&gt;
Then connect the '''GND pin''' of the red '''LED''' to '''PA0 pin''' of the '''Mainboard'''.&lt;br /&gt;
&lt;br /&gt;
Make the connections as shown in the picture.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;|Turn on the power &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| After making all the connections properly, turn on the '''power supply'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point as per narration&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| We can observe that the '''LED''' glows even before the switch '''NO1''' is pressed.&lt;br /&gt;
&lt;br /&gt;
The red '''LED''' turns off whenever the '''NO1''' is pressed.&lt;br /&gt;
&lt;br /&gt;
That is the corresponding switch '''LED''' and the red '''LED''' glows alternately.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Show the connections as per the narration&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now connect '''PC0''' to '''NC1''' instead of '''NO1 '''as shown in the picture.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point as per narration&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Let us see the live demo now.&lt;br /&gt;
&lt;br /&gt;
We can observe the red '''LED''' is off initially.&lt;br /&gt;
&lt;br /&gt;
It is ON whenever the switch''' NC1''' is pressed.&lt;br /&gt;
&lt;br /&gt;
That is the corresponding switch '''LED''' and the red '''LED''' glows simultaneously.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Show the connections as per the narration&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Now connect '''PC0''' to '''L1 '''as shown in the picture.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Point as per narration&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Initially, the red '''LED''' is on.&lt;br /&gt;
&lt;br /&gt;
The red '''LED''' turns off when the '''L1''' is pressed.&lt;br /&gt;
&lt;br /&gt;
Thus the corresponding switch '''LED''' and the red '''LED''' glows alternately.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This shows how a '''Negated Contact''' behaves with different types of switches.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Turn off the power&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Turn off the '''power supply'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| &lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This brings us to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
Let us summarize&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Slide 5: Summary&lt;br /&gt;
&lt;br /&gt;
* Negated Coil&lt;br /&gt;
* Negated Contact&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| In this tutorial, we learnt about working of&lt;br /&gt;
&lt;br /&gt;
* '''Negated Coil'''&lt;br /&gt;
* '''Negated Contact'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Slide 6: Assignment&lt;br /&gt;
&lt;br /&gt;
Try cross combination and observe the results&lt;br /&gt;
&lt;br /&gt;
* Normal Contact with Negated Coil&lt;br /&gt;
* Negated Contact with Normal Coil&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| As an assignment, try cross-combination and observe the results.&lt;br /&gt;
&lt;br /&gt;
*That is, '''Normal Contact''' with the '''Negated Coil'''.&lt;br /&gt;
*And '''Negated Contact''' with the '''Normal Coil'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Slide 7:&lt;br /&gt;
&lt;br /&gt;
About Spoken Tutorial project&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Slide 8:&lt;br /&gt;
&lt;br /&gt;
Spoken Tutorial workshops&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| The''' Spoken Tutorial Project''' team conducts workshops using spoken tutorials and gives certificates on passing online tests.&lt;br /&gt;
&lt;br /&gt;
For more details, please write to us&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Slide 9:&lt;br /&gt;
&lt;br /&gt;
Forum for specific questions:&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Please post your timed queries in this forum&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Slide 10:&lt;br /&gt;
&lt;br /&gt;
Forum for specific questions:&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Do you have any general / technical questions on OpenPLC?&lt;br /&gt;
&lt;br /&gt;
Please visit the FOSSEE forum and post your question.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Slide 11:&lt;br /&gt;
&lt;br /&gt;
Acknowledgement&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Spoken Tutorial Project is funded by MHRD, Government of India.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| Slide 12:&lt;br /&gt;
&lt;br /&gt;
Thank you slide&lt;br /&gt;
| style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;| This tutorial has been contributed by FOSSEE and Spoken Tutorial Project, IIT Bombay.&lt;br /&gt;
&lt;br /&gt;
And this is Harsha Priyanka from FOSSEE team, signing off.&lt;br /&gt;
&lt;br /&gt;
Thanks for watching.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Nirmala Venkat</name></author>	</entry>

	</feed>