summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSudhakarKuma2021-05-05 12:31:01 +0530
committerSudhakarKuma2021-05-05 12:31:01 +0530
commitccd523eb095682f47315ba684219b56414ce6939 (patch)
tree0a7ed4963672fd29ee1ee4ef1bc93c5490aa9606
parentae03c834419fde652af3146ad8e0311578ca27ab (diff)
downloadFLOSS-Arduino-Book-ccd523eb095682f47315ba684219b56414ce6939.tar.gz
FLOSS-Arduino-Book-ccd523eb095682f47315ba684219b56414ce6939.tar.bz2
FLOSS-Arduino-Book-ccd523eb095682f47315ba684219b56414ce6939.zip
Fix chapter on DC motor
-rw-r--r--bibliography.bib13
-rw-r--r--floss-arduino.OpenModelicad12
-rw-r--r--floss-arduino.ard6
-rw-r--r--floss-arduino.aux596
-rw-r--r--floss-arduino.bbl5
-rw-r--r--floss-arduino.blg42
-rw-r--r--floss-arduino.cod16
-rw-r--r--floss-arduino.fdb_latexmk66
-rw-r--r--floss-arduino.fls75
-rw-r--r--floss-arduino.juliad12
-rw-r--r--floss-arduino.lof36
-rw-r--r--floss-arduino.log304
-rw-r--r--floss-arduino.lot21
-rw-r--r--floss-arduino.pdfbin21055546 -> 21071979 bytes
-rw-r--r--floss-arduino.pyd12
-rw-r--r--floss-arduino.thm62
-rw-r--r--floss-arduino.toc67
-rw-r--r--indent.log25
-rw-r--r--user-code/dcmotor/dcmotor.tex1448
-rw-r--r--user-code/servo/servo.tex2
-rw-r--r--user-code/sw-env/sw-env.tex3
21 files changed, 1660 insertions, 1163 deletions
diff --git a/bibliography.bib b/bibliography.bib
index 2a801be..8adec9b 100644
--- a/bibliography.bib
+++ b/bibliography.bib
@@ -218,3 +218,16 @@ note = {Seen on 2 May 2021},
OPTannote = {}
}
+@Misc{arduino-pwm,
+OPTkey = {},
+author = {},
+title = {Secrets of Arduino PWM},
+howpublished = {https://www.arduino.cc/en/Tutorial/SecretsOfArduinoPWM},
+OPTmonth = {},
+year = {},
+note = {Seen on 5 May 2021},
+OPTannote = {}
+}
+
+
+
diff --git a/floss-arduino.OpenModelicad b/floss-arduino.OpenModelicad
index f50d9ef..b8a8c48 100644
--- a/floss-arduino.OpenModelicad
+++ b/floss-arduino.OpenModelicad
@@ -21,10 +21,10 @@
\contentsline {section}{\numberline {9.{3}}Rotating the servomotor in steps of $20^\circ $}{193}%
\contentsline {section}{\numberline {9.{4}}Rotating the servomotor to a degree specified by the potentiometer}{194}%
\addvspace {10pt}
-\contentsline {section}{\numberline {10.{1}}Rotating the DC motor}{216}%
-\contentsline {section}{\numberline {10.{2}}Rotating the DC motor in both directions}{216}%
-\contentsline {section}{\numberline {10.{3}}Rotating the DC motor in both directions in a loop}{217}%
+\contentsline {section}{\numberline {10.{1}}Rotating the DC motor}{222}%
+\contentsline {section}{\numberline {10.{2}}Rotating the DC motor in both directions}{223}%
+\contentsline {section}{\numberline {10.{3}}Rotating the DC motor in both directions in a loop}{223}%
\addvspace {10pt}
-\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{236}%
-\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{236}%
-\contentsline {section}{\numberline {11.{3}}Code for Single Phase Active Power Output}{237}%
+\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{242}%
+\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{242}%
+\contentsline {section}{\numberline {11.{3}}Code for Single Phase Active Power Output}{243}%
diff --git a/floss-arduino.ard b/floss-arduino.ard
index d11c37d..b03b254 100644
--- a/floss-arduino.ard
+++ b/floss-arduino.ard
@@ -22,7 +22,7 @@
\contentsline {section}{\numberline {9.{4}}Rotating the servomotor through the potentiometer}{176}%
\addvspace {10pt}
\contentsline {section}{\numberline {10.{1}}Rotating the DC motor}{201}%
-\contentsline {section}{\numberline {10.{2}}Rotating the DC motor in both directions}{201}%
-\contentsline {section}{\numberline {10.{3}}Rotating the DC motor in both directions in a loop}{201}%
+\contentsline {section}{\numberline {10.{2}}Rotating the DC motor in both directions}{202}%
+\contentsline {section}{\numberline {10.{3}}Rotating the DC motor in both directions in a loop}{202}%
\addvspace {10pt}
-\contentsline {section}{\numberline {11.{1}}First 10 lines of the firmware for Modbus Energy Meter experiment}{231}%
+\contentsline {section}{\numberline {11.{1}}First 10 lines of the firmware for Modbus Energy Meter experiment}{237}%
diff --git a/floss-arduino.aux b/floss-arduino.aux
index bea07bd..72e8caf 100644
--- a/floss-arduino.aux
+++ b/floss-arduino.aux
@@ -127,6 +127,7 @@
\@writefile{lof}{\contentsline {figure}{\numberline {3.6}{\ignorespaces Linux terminal to launch Scilab\relax }}{27}\protected@file@percent }
\newlabel{linux-cd}{{3.6}{27}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2.3}Scilab-Arduino toolbox}{27}\protected@file@percent }
+\newlabel{sec:sci-ard-toolbox}{{3.2.3}{27}}
\newlabel{9@xvr}{{}{27}}
\newlabel{9@vr}{{}{27}}
\@writefile{lof}{\contentsline {figure}{\numberline {3.7}{\ignorespaces Browsing toolbox directory\relax }}{28}\protected@file@percent }
@@ -275,7 +276,7 @@
\newlabel{om-simulate}{{3.40}{62}}
\@writefile{lof}{\contentsline {figure}{\numberline {3.41}{\ignorespaces Output window of OMEdit\relax }}{63}\protected@file@percent }
\newlabel{om-sim-success}{{3.41}{63}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {3.6.4}OpenModelica Arduino toolbox}{63}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.6.4}OpenModelica-Arduino toolbox}{63}\protected@file@percent }
\newlabel{sec:load-om-toolbox}{{3.6.4}{63}}
\newlabel{15@xvr}{{}{63}}
\newlabel{15@vr}{{}{63}}
@@ -1242,6 +1243,7 @@
\newlabel{126@vr}{{}{194}}
\newlabel{OpenModelica:servo-pot}{{9.{4}}{194}}
\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo\textunderscore pot.mo}{194}\protected@file@percent }
+\citation{arduino-pwm}
\@writefile{toc}{\contentsline {chapter}{\numberline {10}Controlling a DC motor}{197}\protected@file@percent }
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
@@ -1251,12 +1253,18 @@
\newlabel{fig:motordriverboard}{{10.1}{198}}
\@writefile{lof}{\contentsline {figure}{\numberline {10.2}{\ignorespaces A schematic of DC motor connections\relax }}{199}\protected@file@percent }
\newlabel{fig:dcm-schematic}{{10.2}{199}}
-\@writefile{lof}{\contentsline {figure}{\numberline {10.3}{\ignorespaces How to connect the DC motor to the Arduino Uno\ board\relax }}{199}\protected@file@percent }
-\newlabel{fig:dcmotorconn}{{10.3}{199}}
\@writefile{toc}{\contentsline {section}{\numberline {10.2}Controlling the DC motor from Arduino}{199}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {10.2.1}Controlling the DC motor}{199}\protected@file@percent }
\newlabel{sec:dcm-ard}{{10.2.1}{199}}
-\@writefile{thm}{\contentsline {egmass}{{Exercise}{10.{1}}{}}{200}\protected@file@percent }
+\@writefile{toc}{\contentsline {paragraph}{Note:}{199}\protected@file@percent }
+\@writefile{lof}{\contentsline {figure}{\numberline {10.3}{\ignorespaces How to connect the DC motor to the Arduino Uno\ board\relax }}{200}\protected@file@percent }
+\newlabel{fig:dcmotorconn}{{10.3}{200}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor\textendash clock/dcmotor\textendash clock.ino}{200}\protected@file@percent }
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor\textendash clock/dcmotor\textendash clock.ino}{200}\protected@file@percent }
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor\textendash clock/dcmotor\textendash clock.ino}{200}\protected@file@percent }
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor\textendash both/dcmotor\textendash both.ino}{201}\protected@file@percent }
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor\textendash both/dcmotor\textendash both.ino}{201}\protected@file@percent }
+\@writefile{thm}{\contentsline {egmass}{{Exercise}{10.{1}}{}}{201}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {10.2.2}Arduino Code}{201}\protected@file@percent }
\newlabel{sec:dcmotor-arduino-code}{{10.2.2}{201}}
\@writefile{ard}{\addvspace {10pt}}
@@ -1265,301 +1273,318 @@
\newlabel{127@xvr}{{}{201}}
\newlabel{127@vr}{{}{201}}
\newlabel{ard:dcmotor-clock}{{10.{1}}{201}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor\textendash clock/dcmotor\textendash clock.ino}{201}\protected@file@percent }
-\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{10.{2}}{}}{201}\protected@file@percent }
-\@writefile{ard}{\contentsline {section}{\numberline {10.{2}}Rotating the DC motor in both directions}{201}\protected@file@percent }
-\newlabel{128@xvr}{{}{201}}
-\newlabel{128@vr}{{}{201}}
-\newlabel{ard:dcmotor-both}{{10.{2}}{201}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor\textendash both/dcmotor\textendash both.ino}{201}\protected@file@percent }
-\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{10.{3}}{}}{201}\protected@file@percent }
-\@writefile{ard}{\contentsline {section}{\numberline {10.{3}}Rotating the DC motor in both directions in a loop}{201}\protected@file@percent }
-\newlabel{129@xvr}{{}{201}}
-\newlabel{129@vr}{{}{201}}
-\newlabel{ard:dcmotor-loop}{{10.{3}}{201}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor\textendash clock/dcmotor\textendash clock.ino}{202}\protected@file@percent }
+\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{10.{2}}{}}{202}\protected@file@percent }
+\@writefile{ard}{\contentsline {section}{\numberline {10.{2}}Rotating the DC motor in both directions}{202}\protected@file@percent }
+\newlabel{128@xvr}{{}{202}}
+\newlabel{128@vr}{{}{202}}
+\newlabel{ard:dcmotor-both}{{10.{2}}{202}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor\textendash both/dcmotor\textendash both.ino}{202}\protected@file@percent }
+\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{10.{3}}{}}{202}\protected@file@percent }
+\@writefile{ard}{\contentsline {section}{\numberline {10.{3}}Rotating the DC motor in both directions in a loop}{202}\protected@file@percent }
+\newlabel{129@xvr}{{}{202}}
+\newlabel{129@vr}{{}{202}}
+\newlabel{ard:dcmotor-loop}{{10.{3}}{202}}
\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor\textendash loop/dcmotor\textendash loop.ino}{202}\protected@file@percent }
-\@writefile{toc}{\contentsline {section}{\numberline {10.3}Controlling the DC motor from Scilab}{202}\protected@file@percent }
-\newlabel{sec:dcm-sci}{{10.3}{202}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {10.3.1}Initialization}{202}\protected@file@percent }
-\@writefile{lot}{\contentsline {table}{\numberline {10.1}{\ignorespaces A numbering convention used in the DC motor breakout board\relax }}{203}\protected@file@percent }
-\newlabel{table:convention}{{10.1}{203}}
-\@writefile{lot}{\contentsline {table}{\numberline {10.2}{\ignorespaces Parameters for DC motor initialization\relax }}{203}\protected@file@percent }
-\newlabel{tab:dcmotor-init}{{10.2}{203}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{203}\protected@file@percent }
-\@writefile{toc}{\contentsline {subsection}{\numberline {10.3.2}Rotation for a specified time}{203}\protected@file@percent }
-\newlabel{sec:dc-both}{{10.3.2}{203}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{203}\protected@file@percent }
+\@writefile{toc}{\contentsline {section}{\numberline {10.3}Controlling the DC motor from Scilab}{203}\protected@file@percent }
+\newlabel{sec:dcm-sci}{{10.3}{203}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {10.3.1}Controlling the DC motor}{203}\protected@file@percent }
+\@writefile{toc}{\contentsline {paragraph}{Note:}{203}\protected@file@percent }
+\@writefile{lot}{\contentsline {table}{\numberline {10.1}{\ignorespaces Values in the Scilab\ command for different H-Bridge circuits\relax }}{204}\protected@file@percent }
+\newlabel{table:convention}{{10.1}{204}}
\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{204}\protected@file@percent }
\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{204}\protected@file@percent }
-\@writefile{thm}{\contentsline {egmass}{{Exercise}{10.{2}}{}}{204}\protected@file@percent }
-\@writefile{toc}{\contentsline {subsection}{\numberline {10.3.3}Using the capabilities of Scilab}{204}\protected@file@percent }
-\@writefile{toc}{\contentsline {subsection}{\numberline {10.3.4}Scilab Code}{205}\protected@file@percent }
-\newlabel{sec:dcmotor-scilab-code}{{10.3.4}{205}}
-\@writefile{cod}{\addvspace {10pt}}
-\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{10.{1}}{}}{205}\protected@file@percent }
-\@writefile{cod}{\contentsline {section}{\numberline {10.{1}}Rotating the DC motor}{205}\protected@file@percent }
-\newlabel{130@xvr}{{}{205}}
-\newlabel{130@vr}{{}{205}}
-\newlabel{sci:dcmotor-clock}{{10.{1}}{205}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{205}\protected@file@percent }
-\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{10.{2}}{}}{205}\protected@file@percent }
-\@writefile{cod}{\contentsline {section}{\numberline {10.{2}}Rotating the DC motor in both directions}{205}\protected@file@percent }
-\newlabel{131@xvr}{{}{205}}
-\newlabel{131@vr}{{}{205}}
-\newlabel{sci:dcmotor-both}{{10.{2}}{205}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{204}\protected@file@percent }
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{204}\protected@file@percent }
+\@writefile{toc}{\contentsline {paragraph}{Note:}{205}\protected@file@percent }
\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash both.sce}{205}\protected@file@percent }
-\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{10.{3}}{}}{205}\protected@file@percent }
-\@writefile{cod}{\contentsline {section}{\numberline {10.{3}}Rotating the DC motor in both directions in a loop}{205}\protected@file@percent }
-\newlabel{132@xvr}{{}{205}}
-\newlabel{132@vr}{{}{205}}
-\newlabel{sci:dcmotor-loop}{{10.{3}}{205}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash loop.sce}{205}\protected@file@percent }
-\@writefile{lof}{\contentsline {figure}{\numberline {10.4}{\ignorespaces Control of DC motor for a specified time from Xcos}}{206}\protected@file@percent }
-\newlabel{134@xvr}{{}{206}}
-\newlabel{134@vr}{{}{206}}
-\newlabel{fig:dcmotor-clock}{{10.4}{206}}
-\@writefile{toc}{\contentsline {section}{\numberline {10.4}Controlling the DC Motor from Xcos}{206}\protected@file@percent }
-\@writefile{lot}{\contentsline {table}{\numberline {10.3}{\ignorespaces Xcos parameters to drive the DC motor for a specified time\relax }}{207}\protected@file@percent }
-\newlabel{tab:dcmotor-clock}{{10.3}{207}}
-\newlabel{135@xvr}{{}{207}}
-\newlabel{135@vr}{{}{207}}
-\@writefile{thm}{\contentsline {egmass}{{Exercise}{10.{3}}{}}{207}\protected@file@percent }
-\@writefile{lof}{\contentsline {figure}{\numberline {10.5}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{208}\protected@file@percent }
-\newlabel{137@xvr}{{}{208}}
-\newlabel{137@vr}{{}{208}}
-\newlabel{fig:dcmotor-both}{{10.5}{208}}
-\@writefile{lot}{\contentsline {table}{\numberline {10.4}{\ignorespaces Xcos parameters to drive the DC motor in forward and reverse directions\relax }}{208}\protected@file@percent }
-\newlabel{tab:dcmotor-both}{{10.4}{208}}
-\newlabel{138@xvr}{{}{208}}
-\newlabel{138@vr}{{}{208}}
-\@writefile{lof}{\contentsline {figure}{\numberline {10.6}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{209}\protected@file@percent }
-\newlabel{140@xvr}{{}{209}}
-\newlabel{140@vr}{{}{209}}
-\newlabel{fig:dcmotor-loop}{{10.6}{209}}
-\@writefile{toc}{\contentsline {section}{\numberline {10.5}Controlling the DC Motor from Python}{209}\protected@file@percent }
-\@writefile{toc}{\contentsline {subsection}{\numberline {10.5.1}Controlling the DC Motor}{209}\protected@file@percent }
-\@writefile{lot}{\contentsline {table}{\numberline {10.5}{\ignorespaces Xcos parameters to drive the DC motor in a loop\relax }}{210}\protected@file@percent }
-\newlabel{tab:dcmotor-loop}{{10.5}{210}}
-\newlabel{141@xvr}{{}{210}}
-\newlabel{141@vr}{{}{210}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {10.5.2}Python Code}{211}\protected@file@percent }
-\newlabel{sec:dcmotor-python-code}{{10.5.2}{211}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash both.sce}{205}\protected@file@percent }
+\@writefile{thm}{\contentsline {egmass}{{Exercise}{10.{2}}{}}{205}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {10.3.2}Scilab Code}{206}\protected@file@percent }
+\newlabel{sec:dcmotor-scilab-code}{{10.3.2}{206}}
+\@writefile{cod}{\addvspace {10pt}}
+\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{10.{1}}{}}{206}\protected@file@percent }
+\@writefile{cod}{\contentsline {section}{\numberline {10.{1}}Rotating the DC motor}{206}\protected@file@percent }
+\newlabel{130@xvr}{{}{206}}
+\newlabel{130@vr}{{}{206}}
+\newlabel{sci:dcmotor-clock}{{10.{1}}{206}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{206}\protected@file@percent }
+\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{10.{2}}{}}{206}\protected@file@percent }
+\@writefile{cod}{\contentsline {section}{\numberline {10.{2}}Rotating the DC motor in both directions}{206}\protected@file@percent }
+\newlabel{131@xvr}{{}{206}}
+\newlabel{131@vr}{{}{206}}
+\newlabel{sci:dcmotor-both}{{10.{2}}{206}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash both.sce}{206}\protected@file@percent }
+\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{10.{3}}{}}{206}\protected@file@percent }
+\@writefile{cod}{\contentsline {section}{\numberline {10.{3}}Rotating the DC motor in both directions in a loop}{206}\protected@file@percent }
+\newlabel{132@xvr}{{}{206}}
+\newlabel{132@vr}{{}{206}}
+\newlabel{sci:dcmotor-loop}{{10.{3}}{206}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash loop.sce}{206}\protected@file@percent }
+\@writefile{lof}{\contentsline {figure}{\numberline {10.4}{\ignorespaces Control of DC motor for a specified time from Xcos}}{207}\protected@file@percent }
+\newlabel{134@xvr}{{}{207}}
+\newlabel{134@vr}{{}{207}}
+\newlabel{fig:dcmotor-clock}{{10.4}{207}}
+\@writefile{toc}{\contentsline {section}{\numberline {10.4}Controlling the DC Motor from Xcos}{207}\protected@file@percent }
+\@writefile{lot}{\contentsline {table}{\numberline {10.2}{\ignorespaces Xcos parameters to drive the DC motor for a specified time\relax }}{208}\protected@file@percent }
+\newlabel{tab:dcmotor-clock}{{10.2}{208}}
+\newlabel{135@xvr}{{}{208}}
+\newlabel{135@vr}{{}{208}}
+\@writefile{thm}{\contentsline {egmass}{{Exercise}{10.{3}}{}}{208}\protected@file@percent }
+\@writefile{lof}{\contentsline {figure}{\numberline {10.5}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{209}\protected@file@percent }
+\newlabel{137@xvr}{{}{209}}
+\newlabel{137@vr}{{}{209}}
+\newlabel{fig:dcmotor-both}{{10.5}{209}}
+\@writefile{lot}{\contentsline {table}{\numberline {10.3}{\ignorespaces Xcos parameters to drive the DC motor in forward and reverse directions\relax }}{209}\protected@file@percent }
+\newlabel{tab:dcmotor-both}{{10.3}{209}}
+\newlabel{138@xvr}{{}{209}}
+\newlabel{138@vr}{{}{209}}
+\@writefile{lof}{\contentsline {figure}{\numberline {10.6}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{210}\protected@file@percent }
+\newlabel{140@xvr}{{}{210}}
+\newlabel{140@vr}{{}{210}}
+\newlabel{fig:dcmotor-loop}{{10.6}{210}}
+\@writefile{toc}{\contentsline {section}{\numberline {10.5}Controlling the DC Motor from Python}{210}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {10.5.1}Controlling the DC Motor}{210}\protected@file@percent }
+\@writefile{lot}{\contentsline {table}{\numberline {10.4}{\ignorespaces Xcos parameters to drive the DC motor in a loop\relax }}{211}\protected@file@percent }
+\newlabel{tab:dcmotor-loop}{{10.4}{211}}
+\newlabel{141@xvr}{{}{211}}
+\newlabel{141@vr}{{}{211}}
+\@writefile{toc}{\contentsline {paragraph}{Note:}{211}\protected@file@percent }
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash clock.py}{212}\protected@file@percent }
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash clock.py}{212}\protected@file@percent }
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash clock.py}{212}\protected@file@percent }
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash clock.py}{212}\protected@file@percent }
+\@writefile{toc}{\contentsline {paragraph}{Note:}{212}\protected@file@percent }
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash both.py}{213}\protected@file@percent }
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash both.py}{213}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {10.5.2}Python Code}{213}\protected@file@percent }
+\newlabel{sec:dcmotor-python-code}{{10.5.2}{213}}
\@writefile{pyd}{\addvspace {10pt}}
-\@writefile{thm}{\contentsline {pymass}{{Python Code}{10.{1}}{}}{211}\protected@file@percent }
-\@writefile{pyd}{\contentsline {section}{\numberline {10.{1}}Rotating the DC motor}{211}\protected@file@percent }
-\newlabel{142@xvr}{{}{211}}
-\newlabel{142@vr}{{}{211}}
-\newlabel{py:dcmotor-clock}{{10.{1}}{211}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash clock.py}{211}\protected@file@percent }
-\@writefile{thm}{\contentsline {pymass}{{Python Code}{10.{2}}{}}{212}\protected@file@percent }
-\@writefile{pyd}{\contentsline {section}{\numberline {10.{2}}Rotating the DC motor in both directions}{212}\protected@file@percent }
-\newlabel{143@xvr}{{}{212}}
-\newlabel{143@vr}{{}{212}}
-\newlabel{py:dcmotor-both}{{10.{2}}{212}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash both.py}{212}\protected@file@percent }
-\@writefile{thm}{\contentsline {pymass}{{Python Code}{10.{3}}{}}{212}\protected@file@percent }
-\@writefile{pyd}{\contentsline {section}{\numberline {10.{3}}Rotating the DC motor in both directions in a loop}{212}\protected@file@percent }
-\newlabel{144@xvr}{{}{212}}
-\newlabel{144@vr}{{}{212}}
-\newlabel{py:dcmotor-loop}{{10.{3}}{212}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash loop.py}{212}\protected@file@percent }
-\@writefile{toc}{\contentsline {section}{\numberline {10.6}Controlling the DC Motor from Julia}{214}\protected@file@percent }
-\@writefile{toc}{\contentsline {subsection}{\numberline {10.6.1}Controlling the DC Motor}{214}\protected@file@percent }
-\@writefile{toc}{\contentsline {subsection}{\numberline {10.6.2}Julia Code}{214}\protected@file@percent }
-\newlabel{sec:dcmotor-julia-code}{{10.6.2}{214}}
+\@writefile{thm}{\contentsline {pymass}{{Python Code}{10.{1}}{}}{213}\protected@file@percent }
+\@writefile{pyd}{\contentsline {section}{\numberline {10.{1}}Rotating the DC motor}{213}\protected@file@percent }
+\newlabel{142@xvr}{{}{213}}
+\newlabel{142@vr}{{}{213}}
+\newlabel{py:dcmotor-clock}{{10.{1}}{213}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash clock.py}{213}\protected@file@percent }
+\@writefile{thm}{\contentsline {pymass}{{Python Code}{10.{2}}{}}{214}\protected@file@percent }
+\@writefile{pyd}{\contentsline {section}{\numberline {10.{2}}Rotating the DC motor in both directions}{214}\protected@file@percent }
+\newlabel{143@xvr}{{}{214}}
+\newlabel{143@vr}{{}{214}}
+\newlabel{py:dcmotor-both}{{10.{2}}{214}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash both.py}{214}\protected@file@percent }
+\@writefile{thm}{\contentsline {pymass}{{Python Code}{10.{3}}{}}{215}\protected@file@percent }
+\@writefile{pyd}{\contentsline {section}{\numberline {10.{3}}Rotating the DC motor in both directions in a loop}{215}\protected@file@percent }
+\newlabel{144@xvr}{{}{215}}
+\newlabel{144@vr}{{}{215}}
+\newlabel{py:dcmotor-loop}{{10.{3}}{215}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash loop.py}{215}\protected@file@percent }
+\@writefile{toc}{\contentsline {section}{\numberline {10.6}Controlling the DC Motor from Julia}{216}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {10.6.1}Controlling the DC Motor}{216}\protected@file@percent }
+\@writefile{toc}{\contentsline {paragraph}{Note:}{216}\protected@file@percent }
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash clock.jl}{217}\protected@file@percent }
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash clock.jl}{217}\protected@file@percent }
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash clock.jl}{217}\protected@file@percent }
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash clock.jl}{217}\protected@file@percent }
+\@writefile{toc}{\contentsline {paragraph}{Note:}{218}\protected@file@percent }
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash both.jl}{218}\protected@file@percent }
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash both.jl}{218}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {10.6.2}Julia Code}{218}\protected@file@percent }
+\newlabel{sec:dcmotor-julia-code}{{10.6.2}{218}}
\@writefile{juliad}{\addvspace {10pt}}
-\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{10.{1}}{}}{214}\protected@file@percent }
-\@writefile{juliad}{\contentsline {section}{\numberline {10.{1}}Rotating the DC motor}{214}\protected@file@percent }
-\newlabel{145@xvr}{{}{214}}
-\newlabel{145@vr}{{}{214}}
-\newlabel{julia:dcmotor-clock}{{10.{1}}{214}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash clock.jl}{214}\protected@file@percent }
-\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{10.{2}}{}}{215}\protected@file@percent }
-\@writefile{juliad}{\contentsline {section}{\numberline {10.{2}}Rotating the DC motor in both directions}{215}\protected@file@percent }
-\newlabel{146@xvr}{{}{215}}
-\newlabel{146@vr}{{}{215}}
-\newlabel{julia:dcmotor-both}{{10.{2}}{215}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash both.jl}{215}\protected@file@percent }
-\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{10.{3}}{}}{215}\protected@file@percent }
-\@writefile{juliad}{\contentsline {section}{\numberline {10.{3}}Rotating the DC motor in both directions in a loop}{215}\protected@file@percent }
-\newlabel{147@xvr}{{}{215}}
-\newlabel{147@vr}{{}{215}}
-\newlabel{julia:dcmotor-loop}{{10.{3}}{215}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash loop.jl}{215}\protected@file@percent }
-\@writefile{toc}{\contentsline {section}{\numberline {10.7}Controlling the DC Motor from OpenModelica}{215}\protected@file@percent }
-\@writefile{toc}{\contentsline {subsection}{\numberline {10.7.1}Controlling the DC Motor}{215}\protected@file@percent }
-\@writefile{toc}{\contentsline {subsection}{\numberline {10.7.2}OpenModelica Code}{216}\protected@file@percent }
-\newlabel{sec:dcmotor-OpenModelica-code}{{10.7.2}{216}}
+\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{10.{1}}{}}{218}\protected@file@percent }
+\@writefile{juliad}{\contentsline {section}{\numberline {10.{1}}Rotating the DC motor}{218}\protected@file@percent }
+\newlabel{145@xvr}{{}{218}}
+\newlabel{145@vr}{{}{218}}
+\newlabel{julia:dcmotor-clock}{{10.{1}}{218}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash clock.jl}{218}\protected@file@percent }
+\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{10.{2}}{}}{219}\protected@file@percent }
+\@writefile{juliad}{\contentsline {section}{\numberline {10.{2}}Rotating the DC motor in both directions}{219}\protected@file@percent }
+\newlabel{146@xvr}{{}{219}}
+\newlabel{146@vr}{{}{219}}
+\newlabel{julia:dcmotor-both}{{10.{2}}{219}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash both.jl}{219}\protected@file@percent }
+\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{10.{3}}{}}{219}\protected@file@percent }
+\@writefile{juliad}{\contentsline {section}{\numberline {10.{3}}Rotating the DC motor in both directions in a loop}{219}\protected@file@percent }
+\newlabel{147@xvr}{{}{219}}
+\newlabel{147@vr}{{}{219}}
+\newlabel{julia:dcmotor-loop}{{10.{3}}{219}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash loop.jl}{219}\protected@file@percent }
+\@writefile{toc}{\contentsline {section}{\numberline {10.7}Controlling the DC Motor from OpenModelica}{219}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {10.7.1}Controlling the DC Motor}{219}\protected@file@percent }
+\@writefile{toc}{\contentsline {paragraph}{Note:}{220}\protected@file@percent }
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash clock.mo}{220}\protected@file@percent }
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash clock.mo}{221}\protected@file@percent }
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash clock.mo}{221}\protected@file@percent }
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash clock.mo}{221}\protected@file@percent }
+\@writefile{toc}{\contentsline {paragraph}{Note:}{221}\protected@file@percent }
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash both.mo}{221}\protected@file@percent }
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash both.mo}{222}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {10.7.2}OpenModelica Code}{222}\protected@file@percent }
+\newlabel{sec:dcmotor-OpenModelica-code}{{10.7.2}{222}}
\@writefile{OpenModelicad}{\addvspace {10pt}}
-\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{1}}{}}{216}\protected@file@percent }
-\@writefile{OpenModelicad}{\contentsline {section}{\numberline {10.{1}}Rotating the DC motor}{216}\protected@file@percent }
-\newlabel{148@xvr}{{}{216}}
-\newlabel{148@vr}{{}{216}}
-\newlabel{OpenModelica:dcmotor-clock}{{10.{1}}{216}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash clock.mo}{216}\protected@file@percent }
-\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{2}}{}}{216}\protected@file@percent }
-\@writefile{OpenModelicad}{\contentsline {section}{\numberline {10.{2}}Rotating the DC motor in both directions}{216}\protected@file@percent }
-\newlabel{149@xvr}{{}{216}}
-\newlabel{149@vr}{{}{216}}
-\newlabel{OpenModelica:dcmotor-both}{{10.{2}}{216}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash both.mo}{217}\protected@file@percent }
-\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{3}}{}}{217}\protected@file@percent }
-\@writefile{OpenModelicad}{\contentsline {section}{\numberline {10.{3}}Rotating the DC motor in both directions in a loop}{217}\protected@file@percent }
-\newlabel{150@xvr}{{}{217}}
-\newlabel{150@vr}{{}{217}}
-\newlabel{OpenModelica:dcmotor-loop}{{10.{3}}{217}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash loop.mo}{217}\protected@file@percent }
-\@writefile{toc}{\contentsline {chapter}{\numberline {11}Implementation of Modbus Protocol}{219}\protected@file@percent }
+\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{1}}{}}{222}\protected@file@percent }
+\@writefile{OpenModelicad}{\contentsline {section}{\numberline {10.{1}}Rotating the DC motor}{222}\protected@file@percent }
+\newlabel{OpenModelica:dcmotor-clock}{{10.{1}}{222}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash clock.mo}{222}\protected@file@percent }
+\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{2}}{}}{223}\protected@file@percent }
+\@writefile{OpenModelicad}{\contentsline {section}{\numberline {10.{2}}Rotating the DC motor in both directions}{223}\protected@file@percent }
+\newlabel{OpenModelica:dcmotor-both}{{10.{2}}{223}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash both.mo}{223}\protected@file@percent }
+\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{3}}{}}{223}\protected@file@percent }
+\@writefile{OpenModelicad}{\contentsline {section}{\numberline {10.{3}}Rotating the DC motor in both directions in a loop}{223}\protected@file@percent }
+\newlabel{OpenModelica:dcmotor-loop}{{10.{3}}{223}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash loop.mo}{223}\protected@file@percent }
+\@writefile{toc}{\contentsline {chapter}{\numberline {11}Implementation of Modbus Protocol}{225}\protected@file@percent }
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
-\newlabel{modbus}{{11}{219}}
-\@writefile{toc}{\contentsline {section}{\numberline {11.1}Preliminaries}{219}\protected@file@percent }
-\newlabel{fig:mod-block}{{\caption@xref {fig:mod-block}{ on input line 72}}{220}}
-\@writefile{lof}{\contentsline {figure}{\numberline {11.1}{\ignorespaces Block diagram representation of the Protocol\relax }}{220}\protected@file@percent }
-\@writefile{lof}{\contentsline {figure}{\numberline {11.2}{\ignorespaces Master-Slave Query-Response Cycle\relax }}{220}\protected@file@percent }
-\newlabel{fig:mod-master-slave}{{11.2}{220}}
-\@writefile{lof}{\contentsline {figure}{\numberline {11.3}{\ignorespaces Pins in RS485 module\relax }}{221}\protected@file@percent }
-\newlabel{fig:rs-485}{{11.3}{221}}
-\@writefile{lot}{\contentsline {table}{\numberline {11.1}{\ignorespaces Interpretation of a request packet\relax }}{222}\protected@file@percent }
-\newlabel{tab:request-packet}{{11.1}{222}}
-\@writefile{lot}{\contentsline {table}{\numberline {11.2}{\ignorespaces Interpretation of a response packet\relax }}{222}\protected@file@percent }
-\newlabel{tab:response-packet}{{11.2}{222}}
-\@writefile{lot}{\contentsline {table}{\numberline {11.3}{\ignorespaces Hexadecimal to Decimal\relax }}{223}\protected@file@percent }
-\newlabel{tab:ieee-decimal}{{11.3}{223}}
-\@writefile{lot}{\contentsline {table}{\numberline {11.4}{\ignorespaces Single and Double Precision Representation\relax }}{223}\protected@file@percent }
-\newlabel{tab:single-precision}{{11.4}{223}}
-\@writefile{toc}{\contentsline {section}{\numberline {11.2}Objective}{224}\protected@file@percent }
-\@writefile{toc}{\contentsline {section}{\numberline {11.3}Energy Meter set up for Modbus protocol with Arduino Uno}{224}\protected@file@percent }
-\@writefile{lof}{\contentsline {figure}{\numberline {11.4}{\ignorespaces MODBUS Set Up for Energy Meter\relax }}{225}\protected@file@percent }
-\newlabel{fig:full-set-up}{{11.4}{225}}
-\@writefile{toc}{\contentsline {section}{\numberline {11.4}Software}{225}\protected@file@percent }
-\@writefile{lof}{\contentsline {figure}{\numberline {11.5}{\ignorespaces Block Diagram for Energy Meter Setup\relax }}{226}\protected@file@percent }
-\newlabel{fig:block-diagram}{{11.5}{226}}
-\@writefile{toc}{\contentsline {section}{\numberline {11.5}Output}{226}\protected@file@percent }
-\@writefile{lof}{\contentsline {figure}{\numberline {11.6}{\ignorespaces Flowchart of Arduino firmware\relax }}{227}\protected@file@percent }
-\newlabel{fig:modbus-firmware}{{11.6}{227}}
-\@writefile{lof}{\contentsline {figure}{\numberline {11.7}{\ignorespaces Flow Chart of the Modbus Energy Meter Implementation\relax }}{228}\protected@file@percent }
-\newlabel{fig:flow-chart}{{11.7}{228}}
-\@writefile{toc}{\contentsline {section}{\numberline {11.6}Reading Parameters from Xcos}{228}\protected@file@percent }
-\@writefile{lof}{\contentsline {figure}{\numberline {11.8}{\ignorespaces Single Phase Current Output on Scilab Console\relax }}{229}\protected@file@percent }
-\newlabel{fig:current-console}{{11.8}{229}}
-\@writefile{lof}{\contentsline {figure}{\numberline {11.9}{\ignorespaces Single Phase Current Output on Energy Meter\relax }}{229}\protected@file@percent }
-\newlabel{fig:current-meter}{{11.9}{229}}
-\@writefile{lof}{\contentsline {figure}{\numberline {11.10}{\ignorespaces Single Phase Voltage Output on Scilab Console\relax }}{230}\protected@file@percent }
-\newlabel{fig:voltage-console}{{11.10}{230}}
-\@writefile{lof}{\contentsline {figure}{\numberline {11.11}{\ignorespaces Single Phase Voltage Output on Energy Meter\relax }}{230}\protected@file@percent }
-\newlabel{fig:voltage-meter}{{11.11}{230}}
-\@writefile{lof}{\contentsline {figure}{\numberline {11.12}{\ignorespaces Single Phase Voltage Output on Scilab Console\relax }}{231}\protected@file@percent }
-\newlabel{fig:power-console}{{11.12}{231}}
-\@writefile{lof}{\contentsline {figure}{\numberline {11.13}{\ignorespaces Single Phase Voltage Output on Energy Meter\relax }}{231}\protected@file@percent }
-\newlabel{fig:power-meter}{{11.13}{231}}
-\@writefile{toc}{\contentsline {section}{\numberline {11.7}Code}{231}\protected@file@percent }
-\@writefile{toc}{\contentsline {subsection}{\numberline {11.7.1}Arduino Code}{231}\protected@file@percent }
-\newlabel{sec:firmware-modbus}{{11.7.1}{231}}
+\newlabel{modbus}{{11}{225}}
+\@writefile{toc}{\contentsline {section}{\numberline {11.1}Preliminaries}{225}\protected@file@percent }
+\newlabel{fig:mod-block}{{\caption@xref {fig:mod-block}{ on input line 72}}{226}}
+\@writefile{lof}{\contentsline {figure}{\numberline {11.1}{\ignorespaces Block diagram representation of the Protocol\relax }}{226}\protected@file@percent }
+\@writefile{lof}{\contentsline {figure}{\numberline {11.2}{\ignorespaces Master-Slave Query-Response Cycle\relax }}{226}\protected@file@percent }
+\newlabel{fig:mod-master-slave}{{11.2}{226}}
+\@writefile{lof}{\contentsline {figure}{\numberline {11.3}{\ignorespaces Pins in RS485 module\relax }}{227}\protected@file@percent }
+\newlabel{fig:rs-485}{{11.3}{227}}
+\@writefile{lot}{\contentsline {table}{\numberline {11.1}{\ignorespaces Interpretation of a request packet\relax }}{228}\protected@file@percent }
+\newlabel{tab:request-packet}{{11.1}{228}}
+\@writefile{lot}{\contentsline {table}{\numberline {11.2}{\ignorespaces Interpretation of a response packet\relax }}{228}\protected@file@percent }
+\newlabel{tab:response-packet}{{11.2}{228}}
+\@writefile{lot}{\contentsline {table}{\numberline {11.3}{\ignorespaces Hexadecimal to Decimal\relax }}{229}\protected@file@percent }
+\newlabel{tab:ieee-decimal}{{11.3}{229}}
+\@writefile{lot}{\contentsline {table}{\numberline {11.4}{\ignorespaces Single and Double Precision Representation\relax }}{229}\protected@file@percent }
+\newlabel{tab:single-precision}{{11.4}{229}}
+\@writefile{toc}{\contentsline {section}{\numberline {11.2}Objective}{230}\protected@file@percent }
+\@writefile{toc}{\contentsline {section}{\numberline {11.3}Energy Meter set up for Modbus protocol with Arduino Uno}{230}\protected@file@percent }
+\@writefile{lof}{\contentsline {figure}{\numberline {11.4}{\ignorespaces MODBUS Set Up for Energy Meter\relax }}{231}\protected@file@percent }
+\newlabel{fig:full-set-up}{{11.4}{231}}
+\@writefile{toc}{\contentsline {section}{\numberline {11.4}Software}{231}\protected@file@percent }
+\@writefile{lof}{\contentsline {figure}{\numberline {11.5}{\ignorespaces Block Diagram for Energy Meter Setup\relax }}{232}\protected@file@percent }
+\newlabel{fig:block-diagram}{{11.5}{232}}
+\@writefile{toc}{\contentsline {section}{\numberline {11.5}Output}{232}\protected@file@percent }
+\@writefile{lof}{\contentsline {figure}{\numberline {11.6}{\ignorespaces Flowchart of Arduino firmware\relax }}{233}\protected@file@percent }
+\newlabel{fig:modbus-firmware}{{11.6}{233}}
+\@writefile{lof}{\contentsline {figure}{\numberline {11.7}{\ignorespaces Flow Chart of the Modbus Energy Meter Implementation\relax }}{234}\protected@file@percent }
+\newlabel{fig:flow-chart}{{11.7}{234}}
+\@writefile{toc}{\contentsline {section}{\numberline {11.6}Reading Parameters from Xcos}{234}\protected@file@percent }
+\@writefile{lof}{\contentsline {figure}{\numberline {11.8}{\ignorespaces Single Phase Current Output on Scilab Console\relax }}{235}\protected@file@percent }
+\newlabel{fig:current-console}{{11.8}{235}}
+\@writefile{lof}{\contentsline {figure}{\numberline {11.9}{\ignorespaces Single Phase Current Output on Energy Meter\relax }}{235}\protected@file@percent }
+\newlabel{fig:current-meter}{{11.9}{235}}
+\@writefile{lof}{\contentsline {figure}{\numberline {11.10}{\ignorespaces Single Phase Voltage Output on Scilab Console\relax }}{236}\protected@file@percent }
+\newlabel{fig:voltage-console}{{11.10}{236}}
+\@writefile{lof}{\contentsline {figure}{\numberline {11.11}{\ignorespaces Single Phase Voltage Output on Energy Meter\relax }}{236}\protected@file@percent }
+\newlabel{fig:voltage-meter}{{11.11}{236}}
+\@writefile{lof}{\contentsline {figure}{\numberline {11.12}{\ignorespaces Single Phase Voltage Output on Scilab Console\relax }}{237}\protected@file@percent }
+\newlabel{fig:power-console}{{11.12}{237}}
+\@writefile{lof}{\contentsline {figure}{\numberline {11.13}{\ignorespaces Single Phase Voltage Output on Energy Meter\relax }}{237}\protected@file@percent }
+\newlabel{fig:power-meter}{{11.13}{237}}
+\@writefile{toc}{\contentsline {section}{\numberline {11.7}Code}{237}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {11.7.1}Arduino Code}{237}\protected@file@percent }
+\newlabel{sec:firmware-modbus}{{11.7.1}{237}}
\@writefile{ard}{\addvspace {10pt}}
-\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{11.{1}}{}}{231}\protected@file@percent }
-\@writefile{ard}{\contentsline {section}{\numberline {11.{1}}First 10 lines of the firmware for Modbus Energy Meter experiment}{231}\protected@file@percent }
-\newlabel{153@xvr}{{}{231}}
-\newlabel{153@vr}{{}{231}}
-\newlabel{ard:firmware-modbus}{{11.{1}}{231}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/arduino/send\textunderscore packet.ino}{231}\protected@file@percent }
-\@writefile{lof}{\contentsline {figure}{\numberline {11.14}{\ignorespaces Xcos diagram to read Energy Meter values}}{232}\protected@file@percent }
-\newlabel{152@xvr}{{}{232}}
-\newlabel{152@vr}{{}{232}}
-\newlabel{fig:mod-read}{{11.14}{232}}
-\@writefile{lot}{\contentsline {table}{\numberline {11.5}{\ignorespaces Xcos parameters to read Energy Meter\relax }}{232}\protected@file@percent }
-\newlabel{tab:mod-xcos-read}{{11.5}{232}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {11.7.2}Scilab Code}{233}\protected@file@percent }
-\newlabel{sec:modbus-scilab-code}{{11.7.2}{233}}
+\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{11.{1}}{}}{237}\protected@file@percent }
+\@writefile{ard}{\contentsline {section}{\numberline {11.{1}}First 10 lines of the firmware for Modbus Energy Meter experiment}{237}\protected@file@percent }
+\newlabel{150@xvr}{{}{237}}
+\newlabel{150@vr}{{}{237}}
+\newlabel{ard:firmware-modbus}{{11.{1}}{237}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/arduino/send\textunderscore packet.ino}{237}\protected@file@percent }
+\@writefile{lof}{\contentsline {figure}{\numberline {11.14}{\ignorespaces Xcos diagram to read Energy Meter values}}{238}\protected@file@percent }
+\newlabel{149@xvr}{{}{238}}
+\newlabel{149@vr}{{}{238}}
+\newlabel{fig:mod-read}{{11.14}{238}}
+\@writefile{lot}{\contentsline {table}{\numberline {11.5}{\ignorespaces Xcos parameters to read Energy Meter\relax }}{238}\protected@file@percent }
+\newlabel{tab:mod-xcos-read}{{11.5}{238}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {11.7.2}Scilab Code}{239}\protected@file@percent }
+\newlabel{sec:modbus-scilab-code}{{11.7.2}{239}}
\@writefile{cod}{\addvspace {10pt}}
-\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{11.{1}}{}}{233}\protected@file@percent }
-\@writefile{cod}{\contentsline {section}{\numberline {11.{1}}First 10 lines of the function for scifunc block}{233}\protected@file@percent }
-\newlabel{154@xvr}{{}{233}}
-\newlabel{154@vr}{{}{233}}
-\newlabel{sci:current-modbus}{{11.{1}}{233}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read\textunderscore val.sce}{233}\protected@file@percent }
-\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{11.{2}}{}}{233}\protected@file@percent }
-\@writefile{cod}{\contentsline {section}{\numberline {11.{2}}First 10 lines of the code for Single Phase Current Output}{233}\protected@file@percent }
-\newlabel{155@xvr}{{}{233}}
-\newlabel{155@vr}{{}{233}}
-\newlabel{sci:current-modbus}{{11.{2}}{233}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read\textunderscore current.sci}{233}\protected@file@percent }
-\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{11.{3}}{}}{233}\protected@file@percent }
-\@writefile{cod}{\contentsline {section}{\numberline {11.{3}}First 10 lines of the code for Single Phase Voltage Output}{233}\protected@file@percent }
-\newlabel{156@xvr}{{}{233}}
-\newlabel{156@vr}{{}{233}}
-\newlabel{sci:voltage-modbus}{{11.{3}}{233}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read\textunderscore voltage.sci}{233}\protected@file@percent }
-\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{11.{4}}{}}{234}\protected@file@percent }
-\@writefile{cod}{\contentsline {section}{\numberline {11.{4}}First 10 lines of the code for Single Phase Active Power Output}{234}\protected@file@percent }
-\newlabel{157@xvr}{{}{234}}
-\newlabel{157@vr}{{}{234}}
-\newlabel{sci:modbus-power}{{11.{4}}{234}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read\textunderscore active\textunderscore power.sci}{234}\protected@file@percent }
-\@writefile{toc}{\contentsline {subsection}{\numberline {11.7.3}Python Code}{234}\protected@file@percent }
-\newlabel{sec:modbus-python-code}{{11.7.3}{234}}
+\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{11.{1}}{}}{239}\protected@file@percent }
+\@writefile{cod}{\contentsline {section}{\numberline {11.{1}}First 10 lines of the function for scifunc block}{239}\protected@file@percent }
+\newlabel{151@xvr}{{}{239}}
+\newlabel{151@vr}{{}{239}}
+\newlabel{sci:current-modbus}{{11.{1}}{239}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read\textunderscore val.sce}{239}\protected@file@percent }
+\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{11.{2}}{}}{239}\protected@file@percent }
+\@writefile{cod}{\contentsline {section}{\numberline {11.{2}}First 10 lines of the code for Single Phase Current Output}{239}\protected@file@percent }
+\newlabel{152@xvr}{{}{239}}
+\newlabel{152@vr}{{}{239}}
+\newlabel{sci:current-modbus}{{11.{2}}{239}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read\textunderscore current.sci}{239}\protected@file@percent }
+\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{11.{3}}{}}{239}\protected@file@percent }
+\@writefile{cod}{\contentsline {section}{\numberline {11.{3}}First 10 lines of the code for Single Phase Voltage Output}{239}\protected@file@percent }
+\newlabel{153@xvr}{{}{239}}
+\newlabel{153@vr}{{}{239}}
+\newlabel{sci:voltage-modbus}{{11.{3}}{239}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read\textunderscore voltage.sci}{239}\protected@file@percent }
+\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{11.{4}}{}}{240}\protected@file@percent }
+\@writefile{cod}{\contentsline {section}{\numberline {11.{4}}First 10 lines of the code for Single Phase Active Power Output}{240}\protected@file@percent }
+\newlabel{154@xvr}{{}{240}}
+\newlabel{154@vr}{{}{240}}
+\newlabel{sci:modbus-power}{{11.{4}}{240}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read\textunderscore active\textunderscore power.sci}{240}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {11.7.3}Python Code}{240}\protected@file@percent }
+\newlabel{sec:modbus-python-code}{{11.7.3}{240}}
\@writefile{pyd}{\addvspace {10pt}}
-\@writefile{thm}{\contentsline {pymass}{{Python Code}{11.{1}}{}}{234}\protected@file@percent }
-\@writefile{pyd}{\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{234}\protected@file@percent }
-\newlabel{158@xvr}{{}{234}}
-\newlabel{158@vr}{{}{234}}
-\newlabel{py:current-modbus}{{11.{1}}{234}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read\textunderscore current.py}{234}\protected@file@percent }
-\@writefile{thm}{\contentsline {pymass}{{Python Code}{11.{2}}{}}{234}\protected@file@percent }
-\@writefile{pyd}{\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{234}\protected@file@percent }
-\newlabel{159@xvr}{{}{234}}
-\newlabel{159@vr}{{}{234}}
-\newlabel{py:voltage-modbus}{{11.{2}}{234}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read\textunderscore voltage.py}{234}\protected@file@percent }
-\@writefile{thm}{\contentsline {pymass}{{Python Code}{11.{3}}{}}{235}\protected@file@percent }
-\@writefile{pyd}{\contentsline {section}{\numberline {11.{3}}Code for Single Phase Active Power Output}{235}\protected@file@percent }
-\newlabel{160@xvr}{{}{235}}
-\newlabel{160@vr}{{}{235}}
-\newlabel{py:modbus-power}{{11.{3}}{235}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read\textunderscore active\textunderscore power.py}{235}\protected@file@percent }
-\@writefile{toc}{\contentsline {subsection}{\numberline {11.7.4}Julia Code}{235}\protected@file@percent }
-\newlabel{sec:modbus-julia-code}{{11.7.4}{235}}
+\@writefile{thm}{\contentsline {pymass}{{Python Code}{11.{1}}{}}{240}\protected@file@percent }
+\@writefile{pyd}{\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{240}\protected@file@percent }
+\newlabel{155@xvr}{{}{240}}
+\newlabel{155@vr}{{}{240}}
+\newlabel{py:current-modbus}{{11.{1}}{240}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read\textunderscore current.py}{240}\protected@file@percent }
+\@writefile{thm}{\contentsline {pymass}{{Python Code}{11.{2}}{}}{240}\protected@file@percent }
+\@writefile{pyd}{\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{240}\protected@file@percent }
+\newlabel{156@xvr}{{}{240}}
+\newlabel{156@vr}{{}{240}}
+\newlabel{py:voltage-modbus}{{11.{2}}{240}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read\textunderscore voltage.py}{240}\protected@file@percent }
+\@writefile{thm}{\contentsline {pymass}{{Python Code}{11.{3}}{}}{241}\protected@file@percent }
+\@writefile{pyd}{\contentsline {section}{\numberline {11.{3}}Code for Single Phase Active Power Output}{241}\protected@file@percent }
+\newlabel{157@xvr}{{}{241}}
+\newlabel{157@vr}{{}{241}}
+\newlabel{py:modbus-power}{{11.{3}}{241}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read\textunderscore active\textunderscore power.py}{241}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {11.7.4}Julia Code}{241}\protected@file@percent }
+\newlabel{sec:modbus-julia-code}{{11.7.4}{241}}
\@writefile{juliad}{\addvspace {10pt}}
-\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{11.{1}}{}}{235}\protected@file@percent }
-\@writefile{juliad}{\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{235}\protected@file@percent }
-\newlabel{161@xvr}{{}{235}}
-\newlabel{161@vr}{{}{235}}
-\newlabel{julia:current-modbus}{{11.{1}}{235}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readCurrent.jl}{235}\protected@file@percent }
-\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{11.{2}}{}}{235}\protected@file@percent }
-\@writefile{juliad}{\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{235}\protected@file@percent }
-\newlabel{162@xvr}{{}{235}}
-\newlabel{162@vr}{{}{235}}
-\newlabel{julia:voltage-modbus}{{11.{2}}{235}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readVoltage.jl}{235}\protected@file@percent }
-\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{11.{3}}{}}{236}\protected@file@percent }
-\@writefile{juliad}{\contentsline {section}{\numberline {11.{3}}First 10 lines of the code for Single Phase Active Power Output}{236}\protected@file@percent }
-\newlabel{163@xvr}{{}{236}}
-\newlabel{163@vr}{{}{236}}
-\newlabel{julia:modbus-power}{{11.{3}}{236}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readPower.jl}{236}\protected@file@percent }
-\@writefile{toc}{\contentsline {subsection}{\numberline {11.7.5}OpenModelica Code}{236}\protected@file@percent }
-\newlabel{sec:modbus-OpenModelica-code}{{11.7.5}{236}}
+\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{11.{1}}{}}{241}\protected@file@percent }
+\@writefile{juliad}{\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{241}\protected@file@percent }
+\newlabel{158@xvr}{{}{241}}
+\newlabel{158@vr}{{}{241}}
+\newlabel{julia:current-modbus}{{11.{1}}{241}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readCurrent.jl}{241}\protected@file@percent }
+\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{11.{2}}{}}{241}\protected@file@percent }
+\@writefile{juliad}{\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{241}\protected@file@percent }
+\newlabel{159@xvr}{{}{241}}
+\newlabel{159@vr}{{}{241}}
+\newlabel{julia:voltage-modbus}{{11.{2}}{241}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readVoltage.jl}{241}\protected@file@percent }
+\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{11.{3}}{}}{242}\protected@file@percent }
+\@writefile{juliad}{\contentsline {section}{\numberline {11.{3}}First 10 lines of the code for Single Phase Active Power Output}{242}\protected@file@percent }
+\newlabel{160@xvr}{{}{242}}
+\newlabel{160@vr}{{}{242}}
+\newlabel{julia:modbus-power}{{11.{3}}{242}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readPower.jl}{242}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {11.7.5}OpenModelica Code}{242}\protected@file@percent }
+\newlabel{sec:modbus-OpenModelica-code}{{11.7.5}{242}}
\@writefile{OpenModelicad}{\addvspace {10pt}}
-\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{1}}{}}{236}\protected@file@percent }
-\@writefile{OpenModelicad}{\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{236}\protected@file@percent }
-\newlabel{164@xvr}{{}{236}}
-\newlabel{164@vr}{{}{236}}
-\newlabel{OpenModelica:current-modbus}{{11.{1}}{236}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readCurrent.mo}{236}\protected@file@percent }
-\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{2}}{}}{236}\protected@file@percent }
-\@writefile{OpenModelicad}{\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{236}\protected@file@percent }
-\newlabel{165@xvr}{{}{236}}
-\newlabel{165@vr}{{}{236}}
-\newlabel{OpenModelica:voltage-modbus}{{11.{2}}{236}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readVoltage.mo}{236}\protected@file@percent }
+\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{1}}{}}{242}\protected@file@percent }
+\@writefile{OpenModelicad}{\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{242}\protected@file@percent }
+\newlabel{161@xvr}{{}{242}}
+\newlabel{161@vr}{{}{242}}
+\newlabel{OpenModelica:current-modbus}{{11.{1}}{242}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readCurrent.mo}{242}\protected@file@percent }
+\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{2}}{}}{242}\protected@file@percent }
+\@writefile{OpenModelicad}{\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{242}\protected@file@percent }
+\newlabel{162@xvr}{{}{242}}
+\newlabel{162@vr}{{}{242}}
+\newlabel{OpenModelica:voltage-modbus}{{11.{2}}{242}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readVoltage.mo}{242}\protected@file@percent }
\bibdata{bibliography.bib}
-\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{3}}{}}{237}\protected@file@percent }
-\@writefile{OpenModelicad}{\contentsline {section}{\numberline {11.{3}}Code for Single Phase Active Power Output}{237}\protected@file@percent }
-\newlabel{166@xvr}{{}{237}}
-\newlabel{166@vr}{{}{237}}
-\newlabel{OpenModelica:modbus-power}{{11.{3}}{237}}
-\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readPower.mo}{237}\protected@file@percent }
+\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{3}}{}}{243}\protected@file@percent }
+\@writefile{OpenModelicad}{\contentsline {section}{\numberline {11.{3}}Code for Single Phase Active Power Output}{243}\protected@file@percent }
+\newlabel{163@xvr}{{}{243}}
+\newlabel{163@vr}{{}{243}}
+\newlabel{OpenModelica:modbus-power}{{11.{3}}{243}}
+\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readPower.mo}{243}\protected@file@percent }
\bibcite{CNES-Scilab}{1}
\bibcite{scilab-arduino}{2}
\bibcite{oshw-ref}{3}
@@ -1574,10 +1599,11 @@
\bibcite{scilab-ref}{12}
\bibcite{scilab-interop}{13}
\bibcite{xcos-ref}{14}
-\@writefile{toc}{\contentsline {chapter}{\numberline {References}}{239}\protected@file@percent }
+\@writefile{toc}{\contentsline {chapter}{\numberline {References}}{245}\protected@file@percent }
\bibcite{python-ref}{15}
\bibcite{pySerial}{16}
\bibcite{julia-ref}{17}
\bibcite{julia-serial-ports}{18}
\bibcite{om-ref}{19}
\bibcite{therm-wiki}{20}
+\bibcite{arduino-pwm}{21}
diff --git a/floss-arduino.bbl b/floss-arduino.bbl
index ffcc6d7..3203ef0 100644
--- a/floss-arduino.bbl
+++ b/floss-arduino.bbl
@@ -106,4 +106,9 @@ Thermistor - wikipedia.
\newblock https://en.wikipedia.org/wiki/Thermistor.
\newblock Seen on 2 May 2021.
+\bibitem{arduino-pwm}
+Secrets of arduino pwm.
+\newblock https://www.arduino.cc/en/Tutorial/SecretsOfArduinoPWM.
+\newblock Seen on 5 May 2021.
+
\end{thebibliography}
diff --git a/floss-arduino.blg b/floss-arduino.blg
index 66b45de..7922b73 100644
--- a/floss-arduino.blg
+++ b/floss-arduino.blg
@@ -3,44 +3,44 @@ Capacity: max_strings=200000, hash_size=200000, hash_prime=170003
The top-level auxiliary file: floss-arduino.aux
The style file: unsrt.bst
Database file #1: bibliography.bib
-You've used 20 entries,
+You've used 21 entries,
1791 wiz_defined-function locations,
- 515 strings with 5211 characters,
-and the built_in function-call counts, 2277 in all, are:
-= -- 206
-> -- 29
+ 519 strings with 5316 characters,
+and the built_in function-call counts, 2386 in all, are:
+= -- 216
+> -- 30
< -- 0
-+ -- 23
++ -- 24
- -- 3
* -- 2
-:= -- 261
-add.period$ -- 63
-call.type$ -- 20
-change.case$ -- 20
+:= -- 272
+add.period$ -- 66
+call.type$ -- 21
+change.case$ -- 21
chr.to.int$ -- 0
-cite$ -- 20
-duplicate$ -- 100
-empty$ -- 361
+cite$ -- 21
+duplicate$ -- 105
+empty$ -- 379
format.name$ -- 3
-if$ -- 590
+if$ -- 619
int.to.chr$ -- 0
-int.to.str$ -- 20
+int.to.str$ -- 21
missing$ -- 0
-newline$ -- 106
+newline$ -- 111
num.names$ -- 3
-pop$ -- 157
+pop$ -- 165
preamble$ -- 1
purify$ -- 0
quote$ -- 0
-skip$ -- 56
+skip$ -- 59
stack$ -- 0
substring$ -- 0
-swap$ -- 20
+swap$ -- 21
text.length$ -- 0
text.prefix$ -- 0
top$ -- 0
type$ -- 0
warning$ -- 0
while$ -- 3
-width$ -- 22
-write$ -- 188
+width$ -- 23
+write$ -- 197
diff --git a/floss-arduino.cod b/floss-arduino.cod
index b3f93b5..cf31502 100644
--- a/floss-arduino.cod
+++ b/floss-arduino.cod
@@ -24,11 +24,11 @@
\contentsline {section}{\numberline {9.{3}}Rotating the servomotor in steps of $20^\circ $}{179}%
\contentsline {section}{\numberline {9.{4}}Rotating the servomotor to a degree specified by the potentiometer}{179}%
\addvspace {10pt}
-\contentsline {section}{\numberline {10.{1}}Rotating the DC motor}{205}%
-\contentsline {section}{\numberline {10.{2}}Rotating the DC motor in both directions}{205}%
-\contentsline {section}{\numberline {10.{3}}Rotating the DC motor in both directions in a loop}{205}%
-\addvspace {10pt}
-\contentsline {section}{\numberline {11.{1}}First 10 lines of the function for scifunc block}{233}%
-\contentsline {section}{\numberline {11.{2}}First 10 lines of the code for Single Phase Current Output}{233}%
-\contentsline {section}{\numberline {11.{3}}First 10 lines of the code for Single Phase Voltage Output}{233}%
-\contentsline {section}{\numberline {11.{4}}First 10 lines of the code for Single Phase Active Power Output}{234}%
+\contentsline {section}{\numberline {10.{1}}Rotating the DC motor}{206}%
+\contentsline {section}{\numberline {10.{2}}Rotating the DC motor in both directions}{206}%
+\contentsline {section}{\numberline {10.{3}}Rotating the DC motor in both directions in a loop}{206}%
+\addvspace {10pt}
+\contentsline {section}{\numberline {11.{1}}First 10 lines of the function for scifunc block}{239}%
+\contentsline {section}{\numberline {11.{2}}First 10 lines of the code for Single Phase Current Output}{239}%
+\contentsline {section}{\numberline {11.{3}}First 10 lines of the code for Single Phase Voltage Output}{239}%
+\contentsline {section}{\numberline {11.{4}}First 10 lines of the code for Single Phase Active Power Output}{240}%
diff --git a/floss-arduino.fdb_latexmk b/floss-arduino.fdb_latexmk
index 28a1172..be3c092 100644
--- a/floss-arduino.fdb_latexmk
+++ b/floss-arduino.fdb_latexmk
@@ -1,19 +1,19 @@
# Fdb version 3
-["bibtex floss-arduino"] 1620094019 "floss-arduino.aux" "floss-arduino.bbl" "floss-arduino" 1620094206
+["bibtex floss-arduino"] 1620197856 "floss-arduino.aux" "floss-arduino.bbl" "floss-arduino" 1620197995
"/usr/share/texlive/texmf-dist/bibtex/bst/base/unsrt.bst" 1292289607 18030 1376b4b231b50c66211e47e42eda2875 ""
- "bibliography.bib" 1619993144 4331 898f586dba696884b42be7c094b1315e ""
- "floss-arduino.aux" 1620094028 137471 a87faa89540acc556c2e239224ba4c60 "pdflatex"
+ "bibliography.bib" 1620178718 4558 9df9b0b27759d4cfc637a7b5fff89181 ""
+ "floss-arduino.aux" 1620197977 142055 3c9adbe1f02b38171411d8f9eb5e29d6 "pdflatex"
(generated)
- "floss-arduino.blg"
"floss-arduino.bbl"
-["makeindex floss-arduino.idx"] 1620092370 "floss-arduino.idx" "floss-arduino.ind" "floss-arduino" 1620094206
- "floss-arduino.idx" 1620094028 187 3ea6c935c61035ccb5c169fb34e1da05 "pdflatex"
+ "floss-arduino.blg"
+["makeindex floss-arduino.idx"] 1620196688 "floss-arduino.idx" "floss-arduino.ind" "floss-arduino" 1620197995
+ "floss-arduino.idx" 1620197977 187 3ea6c935c61035ccb5c169fb34e1da05 "pdflatex"
(generated)
- "floss-arduino.ind"
"floss-arduino.ilg"
-["pdflatex"] 1620094019 "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.tex" "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.pdf" "floss-arduino" 1620094206
+ "floss-arduino.ind"
+["pdflatex"] 1620197856 "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.tex" "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.pdf" "floss-arduino" 1620197995
"/etc/texmf/web2c/texmf.cnf" 1602253014 475 c0e671620eb5563b2130f56340a5fde8 ""
- "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.aux" 1620094028 137471 a87faa89540acc556c2e239224ba4c60 ""
+ "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.aux" 1620197977 142055 3c9adbe1f02b38171411d8f9eb5e29d6 ""
"/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.tex" 1620092361 4558 98aa7ac618326a3037ae9c9d0000888c ""
"/usr/share/texlive/texmf-dist/fonts/enc/dvips/base/8r.enc" 1165713224 4850 80dc9bab7f31fb78a000ccfed0e27cab ""
"/usr/share/texlive/texmf-dist/fonts/map/fontname/texfonts.map" 1577235249 3524 cb3e574dea2d1052e39280babc910dc8 ""
@@ -138,18 +138,18 @@
"/usr/share/texmf/web2c/texmf.cnf" 1581979058 38841 ce3692aa899bb693b90b87eaa5d4d84e ""
"/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map" 1604540077 4770781 1ed1abab22da9c3e2cc82e4db562318b ""
"/var/lib/texmf/web2c/pdftex/pdflatex.fmt" 1604540101 8258883 e8330f8aa4fe7c6cdcf08bf0b72237fd ""
- "floss-arduino.OpenModelicad" 1620094028 2294 ac130e048198c1df4cb7d4392d2be245 "pdflatex"
- "floss-arduino.ard" 1620094028 2072 fe1a39f1ca04ac6c60ab23151da74ab9 "pdflatex"
- "floss-arduino.aux" 1620094028 137471 a87faa89540acc556c2e239224ba4c60 "pdflatex"
- "floss-arduino.bbl" 1620094019 2782 f2a4ed925cf6e3e12688ffdf458c1df4 "bibtex floss-arduino"
- "floss-arduino.cod" 1620094028 2496 fdff9ecbb805f98b420e19facde91c03 "pdflatex"
- "floss-arduino.ind" 1620092370 228 9a9af8565fd0a0b7fd9f2f6d781fe4c6 "makeindex floss-arduino.idx"
- "floss-arduino.juliad" 1620094028 2328 052afe4539a8d1213f11e6d5cca27c40 "pdflatex"
- "floss-arduino.lof" 1620094028 13301 7fbcd6b866f83eae424a7d0c655907ff "pdflatex"
- "floss-arduino.lot" 1620094028 3702 a0f286e6ee2cc188b7e5ddd4084db085 "pdflatex"
- "floss-arduino.pyd" 1620094028 2323 7d8b2debc48bdf22d2f0ee7f6668a07b "pdflatex"
+ "floss-arduino.OpenModelicad" 1620197977 2294 40e2e23c39a022be21dea10d27626604 "pdflatex"
+ "floss-arduino.ard" 1620197977 2072 2ab0f4ce6f60daa81138bac0e30a2c4f "pdflatex"
+ "floss-arduino.aux" 1620197977 142055 3c9adbe1f02b38171411d8f9eb5e29d6 "pdflatex"
+ "floss-arduino.bbl" 1620197856 2925 895f098dadb71828a3cfe277ebaff5f6 "bibtex floss-arduino"
+ "floss-arduino.cod" 1620197977 2496 2a657aa8c5a8852d23c78dfe3546dc54 "pdflatex"
+ "floss-arduino.ind" 1620196688 228 9a9af8565fd0a0b7fd9f2f6d781fe4c6 "makeindex floss-arduino.idx"
+ "floss-arduino.juliad" 1620197977 2328 277569d91626c96de9945b6fe3d5379e "pdflatex"
+ "floss-arduino.lof" 1620197977 13301 0038d444132c4fe8013d31e15adbeaa2 "pdflatex"
+ "floss-arduino.lot" 1620197977 3596 f36d068cb1378a0e9d7cbc9fdc57a6f9 "pdflatex"
+ "floss-arduino.pyd" 1620197977 2323 ee68eadedfb59a7c5a12563da02548bb "pdflatex"
"floss-arduino.tex" 1620092361 4558 98aa7ac618326a3037ae9c9d0000888c ""
- "floss-arduino.toc" 1620094028 15732 d4f5ea4c6c51fd7213f0f8f5e8960aa3 "pdflatex"
+ "floss-arduino.toc" 1620197977 15922 13faa7d0f6a781f90ab6a8a65d3a17c8 "pdflatex"
"suppl/acr.tex" 1615963613 1926 fd6481c4666ee0d60331b7d4cc24b645 ""
"suppl/intro.tex" 1615963613 3437 b09628cf9e20fe17fa65b37a5997653c ""
"suppl/styles.tex" 1615963613 8143 aa3280f0b59c8631fe8ec44895c9e871 ""
@@ -167,7 +167,7 @@
"user-code/dcmotor/arduino/dcmotor-both/dcmotor-both.ino" 1620088994 504 8a85b1257282a49f134cec02b30182e2 ""
"user-code/dcmotor/arduino/dcmotor-clock/dcmotor-clock.ino" 1620088994 426 6316038efc09b67c75c077917c40e3e4 ""
"user-code/dcmotor/arduino/dcmotor-loop/dcmotor-loop.ino" 1620088994 665 a13b061f7e773a0ff7e178ed73915282 ""
- "user-code/dcmotor/dcmotor.tex" 1615963613 35419 acf00cf712b465581c4c33dac479bd10 ""
+ "user-code/dcmotor/dcmotor.tex" 1620197952 63900 916dd2ecfc8840b3dd0729045034a511 ""
"user-code/dcmotor/figures/dc_motor_description.jpg" 1615963613 694440 a424c50ad327bc459a4ab4808f398262 ""
"user-code/dcmotor/figures/dcmotor-both.png" 1615963613 32214 a1429a4cc0aee2d50d6c8b886530f9e9 ""
"user-code/dcmotor/figures/dcmotor-clock.png" 1615963613 26079 07178ea354fae535528fba334b484540 ""
@@ -326,7 +326,7 @@
"user-code/servo/scilab/servo-loop.sce" 1620088994 525 6a4902117c83c5390c1877a95a5e363e ""
"user-code/servo/scilab/servo-pot.sce" 1620088994 530 2d82664fdd3a16c6588b2a4dc4e66a22 ""
"user-code/servo/scilab/servo-reverse.sce" 1620088994 532 11110ec91f2ddb2261afbbec00198d94 ""
- "user-code/servo/servo.tex" 1615963614 31611 e3f0d13456b70c6dd1e59b883a572ee6 ""
+ "user-code/servo/servo.tex" 1620172500 31612 4a0557ac3bbe427718bf4ab406dd3b88 ""
"user-code/sw-env/figures/OMEdit-UI.png" 1618566985 1412111 17b388a3069a3685b7d14c6fb67ee8eb ""
"user-code/sw-env/figures/OMEdit-libraries.png" 1617394693 154031 fd27a1537f6271ab01c53fd1d2c9d214 ""
"user-code/sw-env/figures/arduino-palette.png" 1615963614 10751 8229db142816e63c5b5761df7ebf0e33 ""
@@ -366,7 +366,7 @@
"user-code/sw-env/figures/win-command-prompt.png" 1619057483 18481 e5638717dbbb0533251e1adcbc9b10f0 ""
"user-code/sw-env/figures/windows-cmd.png" 1619057155 18559 6c4f07f73f86b74127aa8c76e23f3285 ""
"user-code/sw-env/figures/xcos-help.png" 1615963614 87275 3c9b5157ebebe381cd7b5281cdd28482 ""
- "user-code/sw-env/sw-env.tex" 1619780680 91708 95fa657c1f21492e2c046423c051522a ""
+ "user-code/sw-env/sw-env.tex" 1620197995 91737 46243d4865344f39ad0d2a60d38eda86 ""
"user-code/thermistor/OpenModelica/therm-buzzer.mo" 1620088994 1299 e1551a279a3614eeaf9116b1002e12eb ""
"user-code/thermistor/OpenModelica/therm-read.mo" 1620088994 882 b7d88b5d1f38eff59552a98507af5858 ""
"user-code/thermistor/arduino/therm-buzzer/therm-buzzer.ino" 1620088994 436 95759b7a9f40f5df3f6bf578fac78e35 ""
@@ -389,18 +389,18 @@
"user-code/thermistor/scilab/therm-read.sce" 1619998644 399 3d4d94a3003c16014a51200a9b472b66 ""
"user-code/thermistor/thermistor.tex" 1620094206 41317 2326a2c871f17f79a710f7c64b8a31e5 ""
(generated)
- "floss-arduino.idx"
- "floss-arduino.toc"
- "floss-arduino.cod"
- "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.log"
"floss-arduino.log"
+ "floss-arduino.thm"
+ "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.log"
+ "floss-arduino.idx"
"floss-arduino.aux"
+ "floss-arduino.ard"
+ "floss-arduino.lot"
+ "floss-arduino.pdf"
+ "floss-arduino.cod"
+ "floss-arduino.pyd"
"/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.pdf"
"floss-arduino.lof"
- "floss-arduino.thm"
- "floss-arduino.pdf"
- "floss-arduino.OpenModelicad"
- "floss-arduino.lot"
"floss-arduino.juliad"
- "floss-arduino.ard"
- "floss-arduino.pyd"
+ "floss-arduino.OpenModelicad"
+ "floss-arduino.toc"
diff --git a/floss-arduino.fls b/floss-arduino.fls
index 6939896..c14abc0 100644
--- a/floss-arduino.fls
+++ b/floss-arduino.fls
@@ -1028,6 +1028,21 @@ INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schema
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dc_motor_description.jpg
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dc_motor_description.jpg
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dc_motor_description.jpg
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-clock/dcmotor-clock.ino
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-clock/dcmotor-clock.ino
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-clock/dcmotor-clock.ino
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-clock/dcmotor-clock.ino
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-clock/dcmotor-clock.ino
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-clock/dcmotor-clock.ino
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-clock/dcmotor-clock.ino
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-clock/dcmotor-clock.ino
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-clock/dcmotor-clock.ino
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-both/dcmotor-both.ino
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-both/dcmotor-both.ino
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-both/dcmotor-both.ino
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-both/dcmotor-both.ino
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-both/dcmotor-both.ino
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-both/dcmotor-both.ino
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/jknappen/ec/ecsi1095.tfm
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-clock/dcmotor-clock.ino
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-clock/dcmotor-clock.ino
@@ -1050,6 +1065,12 @@ INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-both.sce
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-both.sce
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-both.sce
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-both.sce
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-both.sce
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-both.sce
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce
@@ -1071,6 +1092,24 @@ INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmoto
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clock.py
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clock.py
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clock.py
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clock.py
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clock.py
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clock.py
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clock.py
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clock.py
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clock.py
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clock.py
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clock.py
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clock.py
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-both.py
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-both.py
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-both.py
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-both.py
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-both.py
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-both.py
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clock.py
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clock.py
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clock.py
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-both.py
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-both.py
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-both.py
@@ -1080,6 +1119,24 @@ INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-clock.jl
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-clock.jl
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-clock.jl
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-clock.jl
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-clock.jl
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-clock.jl
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-clock.jl
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-clock.jl
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-clock.jl
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-clock.jl
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-clock.jl
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-clock.jl
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-both.jl
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-both.jl
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-both.jl
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-both.jl
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-both.jl
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-both.jl
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-clock.jl
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-clock.jl
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-clock.jl
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-both.jl
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-both.jl
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-both.jl
@@ -1089,6 +1146,24 @@ INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-clock.mo
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-clock.mo
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-clock.mo
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-clock.mo
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-clock.mo
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-clock.mo
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-clock.mo
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-clock.mo
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-clock.mo
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-clock.mo
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-clock.mo
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-clock.mo
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-both.mo
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-both.mo
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-both.mo
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-both.mo
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-both.mo
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-both.mo
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-clock.mo
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-clock.mo
+INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-clock.mo
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-both.mo
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-both.mo
INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-both.mo
diff --git a/floss-arduino.juliad b/floss-arduino.juliad
index f381bf1..fccaf6e 100644
--- a/floss-arduino.juliad
+++ b/floss-arduino.juliad
@@ -21,10 +21,10 @@
\contentsline {section}{\numberline {9.{3}}Rotating the servomotor in steps of $20^\circ $}{190}%
\contentsline {section}{\numberline {9.{4}}Rotating the servomotor to a degree specified by the potentiometer}{191}%
\addvspace {10pt}
-\contentsline {section}{\numberline {10.{1}}Rotating the DC motor}{214}%
-\contentsline {section}{\numberline {10.{2}}Rotating the DC motor in both directions}{215}%
-\contentsline {section}{\numberline {10.{3}}Rotating the DC motor in both directions in a loop}{215}%
+\contentsline {section}{\numberline {10.{1}}Rotating the DC motor}{218}%
+\contentsline {section}{\numberline {10.{2}}Rotating the DC motor in both directions}{219}%
+\contentsline {section}{\numberline {10.{3}}Rotating the DC motor in both directions in a loop}{219}%
\addvspace {10pt}
-\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{235}%
-\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{235}%
-\contentsline {section}{\numberline {11.{3}}First 10 lines of the code for Single Phase Active Power Output}{236}%
+\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{241}%
+\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{241}%
+\contentsline {section}{\numberline {11.{3}}First 10 lines of the code for Single Phase Active Power Output}{242}%
diff --git a/floss-arduino.lof b/floss-arduino.lof
index 89bfadb..0ba296c 100644
--- a/floss-arduino.lof
+++ b/floss-arduino.lof
@@ -110,22 +110,22 @@
\addvspace {10\p@ }
\contentsline {figure}{\numberline {10.1}{\ignorespaces L293D motor driver board\relax }}{198}%
\contentsline {figure}{\numberline {10.2}{\ignorespaces A schematic of DC motor connections\relax }}{199}%
-\contentsline {figure}{\numberline {10.3}{\ignorespaces How to connect the DC motor to the Arduino Uno\ board\relax }}{199}%
-\contentsline {figure}{\numberline {10.4}{\ignorespaces Control of DC motor for a specified time from Xcos}}{206}%
-\contentsline {figure}{\numberline {10.5}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{208}%
-\contentsline {figure}{\numberline {10.6}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{209}%
+\contentsline {figure}{\numberline {10.3}{\ignorespaces How to connect the DC motor to the Arduino Uno\ board\relax }}{200}%
+\contentsline {figure}{\numberline {10.4}{\ignorespaces Control of DC motor for a specified time from Xcos}}{207}%
+\contentsline {figure}{\numberline {10.5}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{209}%
+\contentsline {figure}{\numberline {10.6}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{210}%
\addvspace {10\p@ }
-\contentsline {figure}{\numberline {11.1}{\ignorespaces Block diagram representation of the Protocol\relax }}{220}%
-\contentsline {figure}{\numberline {11.2}{\ignorespaces Master-Slave Query-Response Cycle\relax }}{220}%
-\contentsline {figure}{\numberline {11.3}{\ignorespaces Pins in RS485 module\relax }}{221}%
-\contentsline {figure}{\numberline {11.4}{\ignorespaces MODBUS Set Up for Energy Meter\relax }}{225}%
-\contentsline {figure}{\numberline {11.5}{\ignorespaces Block Diagram for Energy Meter Setup\relax }}{226}%
-\contentsline {figure}{\numberline {11.6}{\ignorespaces Flowchart of Arduino firmware\relax }}{227}%
-\contentsline {figure}{\numberline {11.7}{\ignorespaces Flow Chart of the Modbus Energy Meter Implementation\relax }}{228}%
-\contentsline {figure}{\numberline {11.8}{\ignorespaces Single Phase Current Output on Scilab Console\relax }}{229}%
-\contentsline {figure}{\numberline {11.9}{\ignorespaces Single Phase Current Output on Energy Meter\relax }}{229}%
-\contentsline {figure}{\numberline {11.10}{\ignorespaces Single Phase Voltage Output on Scilab Console\relax }}{230}%
-\contentsline {figure}{\numberline {11.11}{\ignorespaces Single Phase Voltage Output on Energy Meter\relax }}{230}%
-\contentsline {figure}{\numberline {11.12}{\ignorespaces Single Phase Voltage Output on Scilab Console\relax }}{231}%
-\contentsline {figure}{\numberline {11.13}{\ignorespaces Single Phase Voltage Output on Energy Meter\relax }}{231}%
-\contentsline {figure}{\numberline {11.14}{\ignorespaces Xcos diagram to read Energy Meter values}}{232}%
+\contentsline {figure}{\numberline {11.1}{\ignorespaces Block diagram representation of the Protocol\relax }}{226}%
+\contentsline {figure}{\numberline {11.2}{\ignorespaces Master-Slave Query-Response Cycle\relax }}{226}%
+\contentsline {figure}{\numberline {11.3}{\ignorespaces Pins in RS485 module\relax }}{227}%
+\contentsline {figure}{\numberline {11.4}{\ignorespaces MODBUS Set Up for Energy Meter\relax }}{231}%
+\contentsline {figure}{\numberline {11.5}{\ignorespaces Block Diagram for Energy Meter Setup\relax }}{232}%
+\contentsline {figure}{\numberline {11.6}{\ignorespaces Flowchart of Arduino firmware\relax }}{233}%
+\contentsline {figure}{\numberline {11.7}{\ignorespaces Flow Chart of the Modbus Energy Meter Implementation\relax }}{234}%
+\contentsline {figure}{\numberline {11.8}{\ignorespaces Single Phase Current Output on Scilab Console\relax }}{235}%
+\contentsline {figure}{\numberline {11.9}{\ignorespaces Single Phase Current Output on Energy Meter\relax }}{235}%
+\contentsline {figure}{\numberline {11.10}{\ignorespaces Single Phase Voltage Output on Scilab Console\relax }}{236}%
+\contentsline {figure}{\numberline {11.11}{\ignorespaces Single Phase Voltage Output on Energy Meter\relax }}{236}%
+\contentsline {figure}{\numberline {11.12}{\ignorespaces Single Phase Voltage Output on Scilab Console\relax }}{237}%
+\contentsline {figure}{\numberline {11.13}{\ignorespaces Single Phase Voltage Output on Energy Meter\relax }}{237}%
+\contentsline {figure}{\numberline {11.14}{\ignorespaces Xcos diagram to read Energy Meter values}}{238}%
diff --git a/floss-arduino.log b/floss-arduino.log
index f5a4d2d..9b49647 100644
--- a/floss-arduino.log
+++ b/floss-arduino.log
@@ -1,4 +1,4 @@
-This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex 2020.11.5) 4 MAY 2021 07:40
+This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex 2020.11.5) 5 MAY 2021 12:29
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
@@ -523,7 +523,7 @@ Overfull \hbox (74.6947pt too wide) detected at line 9
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2] [3] [4] [5]
-Overfull \hbox (42.2769pt too wide) detected at line 213
+Overfull \hbox (42.2769pt too wide) detected at line 220
\T1/cmr/bx/n/10.95 References
[]
@@ -840,10 +840,10 @@ File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/browse
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/browse-
directory.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/browse-directory.png used on input line 516.
+-env/figures/browse-directory.png used on input line 517.
(pdftex.def) Requested size: 357.73405pt x 260.23521pt.
-Overfull \hbox (19.3647pt too wide) in paragraph at lines 510--520
+Overfull \hbox (19.3647pt too wide) in paragraph at lines 511--521
[]\T1/cmr/m/n/10.95 Then, one has to browse to the tool-box folder \T1/fvm/m/n/
10.95 Origin/tools/scilab/windows
[]
@@ -855,10 +855,10 @@ r.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/builder
.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/builder.png used on input line 532.
+-env/figures/builder.png used on input line 533.
(pdftex.def) Requested size: 397.48499pt x 278.94795pt.
-Overfull \hbox (1.53204pt too wide) in paragraph at lines 526--536
+Overfull \hbox (1.53204pt too wide) in paragraph at lines 527--537
[]\T1/cmr/m/n/10.95 Next, type the fol-low-ing com-mand on the Scilab con-sole:
\T1/fvm/m/n/10.95 exec builder.sce
[]
@@ -872,7 +872,7 @@ File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/loader
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/loader.
png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/loader.png used on input line 548.
+-env/figures/loader.png used on input line 549.
(pdftex.def) Requested size: 300.37144pt x 210.78697pt.
[29 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/builde
r.png>]
@@ -883,7 +883,7 @@ File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/device
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/device-
manager.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/device-manager.png used on input line 576.
+-env/figures/device-manager.png used on input line 577.
(pdftex.def) Requested size: 397.48499pt x 298.12845pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/com-propert
ies.png, id=217, 602.25pt x 451.6875pt>
@@ -892,7 +892,7 @@ operties.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/com-pro
perties.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/com-properties.png used on input line 597.
+-env/figures/com-properties.png used on input line 598.
(pdftex.def) Requested size: 301.12425pt x 225.84319pt.
[30 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/loader
.png>]
@@ -903,11 +903,11 @@ port.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/linux-p
ort.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/linux-port.png used on input line 621.
+-env/figures/linux-port.png used on input line 622.
(pdftex.def) Requested size: 317.18422pt x 123.46094pt.
[31 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/device
-manager.png>]
-Overfull \hbox (22.98761pt too wide) in paragraph at lines 635--643
+Overfull \hbox (22.98761pt too wide) in paragraph at lines 636--644
[]\T1/cmr/m/n/10.95 Inside the \T1/fvm/m/n/10.95 Origin/tools/scilab \T1/cmr/m/
n/10.95 di-rec-tory, lo-cate a file \T1/fvm/m/n/10.95 test_firmware.sce\T1/cmr/
m/n/10.95 .
@@ -924,7 +924,7 @@ onsole.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/test-co
nsole.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/test-console.png used on input line 672.
+-env/figures/test-console.png used on input line 673.
(pdftex.def) Requested size: 300.37144pt x 210.78697pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/table_funct
ions_crop.pdf, id=231, 1055.945pt x 543.02875pt>
@@ -933,7 +933,7 @@ functions_crop.pdf Graphic file (type pdf)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/table_f
unctions_crop.pdf>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/table_functions_crop.pdf used on input line 697.
+-env/figures/table_functions_crop.pdf used on input line 698.
(pdftex.def) Requested size: 397.48499pt x 204.40587pt.
[33]
@@ -950,7 +950,7 @@ lk.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-bl
k.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/sine-blk.png used on input line 747.
+-env/figures/sine-blk.png used on input line 748.
(pdftex.def) Requested size: 357.73405pt x 357.76195pt.
[35] [36 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/si
@@ -962,7 +962,7 @@ lk.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/plot-bl
k.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/plot-blk.png used on input line 799.
+-env/figures/plot-blk.png used on input line 800.
(pdftex.def) Requested size: 357.73405pt x 125.90192pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/clock-blk.p
ng, id=253, 307.90031pt x 108.405pt>
@@ -971,7 +971,7 @@ blk.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/clock-b
lk.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/clock-blk.png used on input line 813.
+-env/figures/clock-blk.png used on input line 814.
(pdftex.def) Requested size: 357.73405pt x 125.95995pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-gen.pn
g, id=254, 207.77625pt x 253.69781pt>
@@ -980,7 +980,7 @@ en.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-ge
n.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/sine-gen.png used on input line 834.
+-env/figures/sine-gen.png used on input line 835.
(pdftex.def) Requested size: 178.86702pt x 218.40813pt.
[37 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/plot-b
lk.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/clo
@@ -992,7 +992,7 @@ utput.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-ou
tput.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/sine-output.png used on input line 845.
+-env/figures/sine-output.png used on input line 846.
(pdftex.def) Requested size: 258.36281pt x 124.36716pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/cscope-conf
ig.png, id=260, 310.15875pt x 289.08pt>
@@ -1001,10 +1001,10 @@ File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/cscope
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/cscope-
config.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/cscope-config.png used on input line 859.
+-env/figures/cscope-config.png used on input line 860.
(pdftex.def) Requested size: 258.36281pt x 240.8053pt.
-Overfull \hbox (0.16797pt too wide) in paragraph at lines 864--873
+Overfull \hbox (0.16797pt too wide) in paragraph at lines 865--874
\T1/fvm/m/n/10.95 Set Parameters \T1/cmr/m/n/10.95 win-dow will open. The first
pa-ram-e-ter is \T1/fvm/m/n/10.95 Final integration
[]
@@ -1019,7 +1019,7 @@ tup.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sim-set
up.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/sim-setup.png used on input line 876.
+-env/figures/sim-setup.png used on input line 877.
(pdftex.def) Requested size: 258.36281pt x 174.97539pt.
Underfull \vbox (badness 10000) has occurred while \output is active []
@@ -1033,7 +1033,7 @@ o-palette.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/arduino
-palette.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/arduino-palette.png used on input line 907.
+-env/figures/arduino-palette.png used on input line 908.
(pdftex.def) Requested size: 258.36281pt x 94.98553pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/xcos-help.p
ng, id=269, 617.30624pt x 466.74374pt>
@@ -1042,7 +1042,7 @@ elp.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/xcos-he
lp.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/xcos-help.png used on input line 914.
+-env/figures/xcos-help.png used on input line 915.
(pdftex.def) Requested size: 258.36281pt x 195.35445pt.
Underfull \vbox (badness 10000) has occurred while \output is active []
@@ -1058,7 +1058,7 @@ File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/python
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/python-
windows-install.JPG>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/python-windows-install.JPG used on input line 954.
+-env/figures/python-windows-install.JPG used on input line 955.
(pdftex.def) Requested size: 258.36281pt x 159.25491pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/windows-cmd
.png, id=277, 572.1375pt x 338.26375pt>
@@ -1067,7 +1067,7 @@ s-cmd.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/windows
-cmd.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/windows-cmd.png used on input line 973.
+-env/figures/windows-cmd.png used on input line 974.
(pdftex.def) Requested size: 258.36281pt x 152.75406pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/win-command
-prompt.png, id=278, 1353.055pt x 289.08pt>
@@ -1076,13 +1076,13 @@ mmand-prompt.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/win-com
mand-prompt.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/win-command-prompt.png used on input line 983.
+-env/figures/win-command-prompt.png used on input line 984.
(pdftex.def) Requested size: 258.36281pt x 55.19925pt.
[42 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/python
-windows-install.JPG>] [43 </home/fossee/Desktop/floss-scilab-arduino/user-code
/sw-env/figures/windows-cmd.png> </home/fossee/Desktop/floss-scilab-arduino/use
r-code/sw-env/figures/win-command-prompt.png>]
-Overfull \hbox (6.38388pt too wide) in paragraph at lines 1014--1018
+Overfull \hbox (6.38388pt too wide) in paragraph at lines 1015--1019
\T1/cmr/m/n/10.95 the Com-mand Prompt, ex-e-cute the fol-low-ing com-mand: \T1/
fvm/m/n/10.95 pip show pyserial
[]
@@ -1099,7 +1099,7 @@ download.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-d
ownload.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/julia-download.png used on input line 1175.
+-env/figures/julia-download.png used on input line 1176.
(pdftex.def) Requested size: 397.48499pt x 164.34962pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-windo
ws-install.png, id=298, 756.8275pt x 632.3625pt>
@@ -1108,7 +1108,7 @@ windows-install.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-w
indows-install.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/julia-windows-install.png used on input line 1182.
+-env/figures/julia-windows-install.png used on input line 1183.
(pdftex.def) Requested size: 258.36281pt x 215.86882pt.
[47] [48 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/ju
@@ -1121,7 +1121,7 @@ repl-windows.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-r
epl-windows.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/julia-repl-windows.png used on input line 1230.
+-env/figures/julia-repl-windows.png used on input line 1231.
(pdftex.def) Requested size: 397.48499pt x 225.70088pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-pkg-w
indows.png, id=308, 1353.055pt x 768.8725pt>
@@ -1130,7 +1130,7 @@ pkg-windows.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-p
kg-windows.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/julia-pkg-windows.png used on input line 1239.
+-env/figures/julia-pkg-windows.png used on input line 1240.
(pdftex.def) Requested size: 397.48499pt x 225.86513pt.
[49]
@@ -1139,13 +1139,13 @@ LaTeX Warning: Text page 50 contains only floats.
[50 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-r
epl-windows.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/fi
gures/julia-pkg-windows.png>]
-Overfull \hbox (5.34262pt too wide) in paragraph at lines 1263--1265
+Overfull \hbox (5.34262pt too wide) in paragraph at lines 1264--1266
[]\T1/cmr/m/n/10.95 First, up-date your sys-tem. Open the Ter-mi-nal. Type \T1/
fvm/m/n/10.95 sudo apt-get update
[]
-Overfull \hbox (12.2196pt too wide) in paragraph at lines 1280--1284
+Overfull \hbox (12.2196pt too wide) in paragraph at lines 1281--1285
\T1/fvm/m/n/10.95 sudo ln -s /opt/julia-1.6.0/bin/julia /usr/local/bin/julia
[]
@@ -1157,7 +1157,7 @@ terminal-repl.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-t
erminal-repl.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/julia-terminal-repl.png used on input line 1311.
+-env/figures/julia-terminal-repl.png used on input line 1312.
(pdftex.def) Requested size: 397.48499pt x 274.37646pt.
[52]
</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-pkg.p
@@ -1167,7 +1167,7 @@ pkg.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-p
kg.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/julia-pkg.png used on input line 1341.
+-env/figures/julia-pkg.png used on input line 1342.
(pdftex.def) Requested size: 397.48499pt x 274.37646pt.
Underfull \vbox (badness 3219) has occurred while \output is active []
@@ -1184,10 +1184,10 @@ delica-run-anyway.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/openmod
elica-run-anyway.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/openmodelica-run-anyway.png used on input line 1442.
+-env/figures/openmodelica-run-anyway.png used on input line 1443.
(pdftex.def) Requested size: 258.36281pt x 238.55693pt.
-Overfull \hbox (13.35912pt too wide) in paragraph at lines 1447--1453
+Overfull \hbox (13.35912pt too wide) in paragraph at lines 1448--1454
[]\T1/cmr/m/n/10.95 Once Open-Mod-el-ica has been in-stalled, Open-Mod-el-ica C
on-nec-tion Ed-i-tor (OMEdit)
[]
@@ -1199,7 +1199,7 @@ File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit-
libraries.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/OMEdit-libraries.png used on input line 1466.
+-env/figures/OMEdit-libraries.png used on input line 1467.
(pdftex.def) Requested size: 365.46649pt x 300.32292pt.
[56] [57 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/op
enmodelica-run-anyway.png>]
@@ -1210,7 +1210,7 @@ File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit-
UI.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/OMEdit-UI.png used on input line 1498.
+-env/figures/OMEdit-UI.png used on input line 1499.
(pdftex.def) Requested size: 397.48499pt x 238.5865pt.
[58 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit
-libraries.png>]
@@ -1221,7 +1221,7 @@ n-model.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-open
-model.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/om-open-model.png used on input line 1512.
+-env/figures/om-open-model.png used on input line 1513.
(pdftex.def) Requested size: 397.48499pt x 289.94313pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-Modeling
.png, id=353, 1368.11125pt x 791.95876pt>
@@ -1230,7 +1230,7 @@ eling.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-Mode
ling.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/om-Modeling.png used on input line 1519.
+-env/figures/om-Modeling.png used on input line 1520.
(pdftex.def) Requested size: 397.48499pt x 230.08511pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-modeling
-views.png, id=354, 673.01437pt x 373.395pt>
@@ -1239,7 +1239,7 @@ eling-views.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-mode
ling-views.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/om-modeling-views.png used on input line 1527.
+-env/figures/om-modeling-views.png used on input line 1528.
(pdftex.def) Requested size: 397.48499pt x 220.52904pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-text-vie
w.png, id=355, 1370.11874pt x 796.9775pt>
@@ -1248,7 +1248,7 @@ t-view.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-text
-view.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/om-text-view.png used on input line 1535.
+-env/figures/om-text-view.png used on input line 1536.
(pdftex.def) Requested size: 397.48499pt x 231.20267pt.
[59 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit
-UI.png>]
@@ -1259,7 +1259,7 @@ ulate.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-simu
late.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/om-simulate.png used on input line 1564.
+-env/figures/om-simulate.png used on input line 1565.
(pdftex.def) Requested size: 397.48499pt x 220.52904pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-sim-succ
ess.png, id=361, 647.41875pt x 516.93124pt>
@@ -1268,7 +1268,7 @@ File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-sim
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-sim-
success.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/om-sim-success.png used on input line 1571.
+-env/figures/om-sim-success.png used on input line 1572.
(pdftex.def) Requested size: 397.48499pt x 317.37051pt.
[60 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-ope
n-model.png>]
@@ -1284,20 +1284,20 @@ LaTeX Warning: Text page 62 contains only floats.
[62 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-text
-view.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/
om-simulate.png>]
-Overfull \hbox (0.4131pt too wide) in paragraph at lines 1582--1589
+Overfull \hbox (0.4131pt too wide) in paragraph at lines 1583--1590
\T1/fvm/m/n/10.95 openmodelica/windows \T1/cmr/m/n/10.95 or \T1/fvm/m/n/10.95 O
rigin/tools/openmodelica/linux \T1/cmr/m/n/10.95 di-rec-tory,
[]
[63 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-sim-
success.png>]
-Overfull \hbox (4.19868pt too wide) in paragraph at lines 1600--1602
+Overfull \hbox (4.19868pt too wide) in paragraph at lines 1601--1603
[]\T1/cmr/m/n/10.95 Navigate to \T1/fvm/m/n/10.95 Origin/tools/openmodelica/win
dows \T1/cmr/m/n/10.95 or \T1/fvm/m/n/10.95 Origin/tools/
[]
-Overfull \hbox (5.89722pt too wide) in paragraph at lines 1602--1610
+Overfull \hbox (5.89722pt too wide) in paragraph at lines 1603--1611
\T1/cmr/m/n/10.95 el-ica_Synchronous, Mod-el-ica_DeviceDrivers, and one model t
est_firmware.mo.
[]
@@ -1309,7 +1309,7 @@ lbox-loaded.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-tool
box-loaded.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw
--env/figures/om-toolbox-loaded.png used on input line 1627.
+-env/figures/om-toolbox-loaded.png used on input line 1628.
(pdftex.def) Requested size: 178.86702pt x 404.66306pt.
[64]
(/home/fossee/Desktop/floss-scilab-arduino/tools/openmodelica/windows//test_fir
@@ -2266,119 +2266,157 @@ or_board.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmoto
r_board.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dc
-motor/figures/dcmotor_board.png used on input line 62.
+motor/figures/dcmotor_board.png used on input line 68.
(pdftex.def) Requested size: 258.36281pt x 242.69075pt.
-[197]
+[197] [198 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures
+/dcmotor_board.png>]
</home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schematic.
-png, id=907, 415.5525pt x 467.7475pt>
+png, id=911, 415.5525pt x 467.7475pt>
File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schem
atic.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schema
tic.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dc
-motor/figures/schematic.png used on input line 102.
+motor/figures/schematic.png used on input line 110.
(pdftex.def) Requested size: 178.86702pt x 201.33447pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dc_motor_d
-escription.jpg, id=908, 2469.97781pt x 1973.12157pt>
+escription.jpg, id=912, 2469.97781pt x 1973.12157pt>
File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dc_mo
tor_description.jpg Graphic file (type jpg)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dc_mot
or_description.jpg>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dc
-motor/figures/dc_motor_description.jpg used on input line 108.
+motor/figures/dc_motor_description.jpg used on input line 116.
(pdftex.def) Requested size: 258.36281pt x 206.38603pt.
- [198 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmo
-tor_board.png>]
-Overfull \vbox (9.00647pt too high) has occurred while \output is active []
-
-
-[199 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schem
-atic.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/
-dc_motor_description.jpg>] [200]
+ [199 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/sche
+matic.png>]
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-cl
+ock/dcmotor-clock.ino)
(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-cl
ock/dcmotor-clock.ino)
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-cl
+ock/dcmotor-clock.ino) [200 </home/fossee/Desktop/floss-scilab-arduino/user-cod
+e/dcmotor/figures/dc_motor_description.jpg>]
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-bo
+th/dcmotor-both.ino)
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-bo
+th/dcmotor-both.ino)
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-cl
+ock/dcmotor-clock.ino [201])
(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-bo
th/dcmotor-both.ino)
(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-lo
-op/dcmotor-loop.ino [201])
-Underfull \hbox (badness 10000) in paragraph at lines 221--237
-
- []
-
-[202]
+op/dcmotor-loop.ino [202]) [203]
(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clo
ck.sce)
(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clo
-ck.sce) [203]
+ck.sce)
(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clo
ck.sce)
(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clo
ck.sce) [204]
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-bot
+h.sce)
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-bot
+h.sce) [205]
(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clo
ck.sce)
(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-bot
h.sce)
(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-loo
-p.sce [205])
+p.sce [206])
</home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-cl
-ock.png, id=938, 275.52937pt x 290.58563pt>
+ock.png, id=941, 275.52937pt x 290.58563pt>
File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmot
or-clock.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmoto
r-clock.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dc
-motor/figures/dcmotor-clock.png used on input line 399.
+motor/figures/dcmotor-clock.png used on input line 524.
(pdftex.def) Requested size: 178.86702pt x 188.64784pt.
- [206 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmo
+ [207 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmo
tor-clock.png>]
</home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-bo
-th.png, id=942, 292.09125pt x 322.95656pt>
+th.png, id=945, 292.09125pt x 322.95656pt>
File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmot
or-both.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmoto
r-both.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dc
-motor/figures/dcmotor-both.png used on input line 453.
+motor/figures/dcmotor-both.png used on input line 578.
(pdftex.def) Requested size: 178.86702pt x 197.77196pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-lo
-op.png, id=943, 281.55188pt x 307.90031pt>
+op.png, id=946, 281.55188pt x 307.90031pt>
File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmot
or-loop.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmoto
r-loop.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dc
-motor/figures/dcmotor-loop.png used on input line 497.
+motor/figures/dcmotor-loop.png used on input line 622.
(pdftex.def) Requested size: 178.86702pt x 195.60847pt.
- [207] [208 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figure
-s/dcmotor-both.png>] [209 </home/fossee/Desktop/floss-scilab-arduino/user-code/
-dcmotor/figures/dcmotor-loop.png>] [210]
+ [208] [209 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figure
+s/dcmotor-both.png>] [210 </home/fossee/Desktop/floss-scilab-arduino/user-code/
+dcmotor/figures/dcmotor-loop.png>] [211]
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clo
+ck.py)
(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clo
-ck.py) [211]
+ck.py)
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clo
+ck.py)
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clo
+ck.py) [212]
(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-bot
h.py)
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-bot
+h.py)
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clo
+ck.py [213])
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-bot
+h.py [214])
(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-loo
-p.py [212])
-Underfull \vbox (badness 10000) has occurred while \output is active []
-
- [213]
+p.py [215]) [216]
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-cloc
+k.jl)
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-cloc
+k.jl)
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-cloc
+k.jl)
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-cloc
+k.jl) [217]
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-both
+.jl)
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-both
+.jl)
(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-cloc
-k.jl) [214]
+k.jl [218])
(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-both
.jl)
(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-loop
-.jl) [215]
+.jl) [219]
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmot
+or-clock.mo) [220]
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmot
+or-clock.mo)
(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmot
or-clock.mo)
(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmot
-or-both.mo [216])
+or-clock.mo)
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmot
+or-both.mo)
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmot
+or-both.mo) [221]
(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmot
-or-loop.mo [217])) (./user-code/modbus/modbus.tex [218]
+or-clock.mo [222])
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmot
+or-both.mo)
+(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmot
+or-loop.mo [223])) (./user-code/modbus/modbus.tex [224]
Chapter 11.
-[219
+[225
]
</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig1.png, i
-d=987, 672.5125pt x 224.84pt>
+d=1007, 672.5125pt x 224.84pt>
File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig1.p
ng Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig1.pn
@@ -2387,7 +2425,7 @@ Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo
dbus/figures/fig1.png used on input line 71.
(pdftex.def) Requested size: 357.73405pt x 119.60033pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig2.png, i
-d=988, 360.34625pt x 375.4025pt>
+d=1008, 360.34625pt x 375.4025pt>
File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig2.p
ng Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig2.pn
@@ -2396,7 +2434,7 @@ Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo
dbus/figures/fig2.png used on input line 79.
(pdftex.def) Requested size: 178.86702pt x 186.33748pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig3.png, i
-d=989, 481.04718pt x 214.55156pt>
+d=1009, 481.04718pt x 214.55156pt>
File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig3.p
ng Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig3.pn
@@ -2404,12 +2442,12 @@ g>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo
dbus/figures/fig3.png used on input line 106.
(pdftex.def) Requested size: 357.73405pt x 159.55464pt.
- [220 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig1.
+ [226 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig1.
png (PNG copy)> </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/fig
-ures/fig2.png (PNG copy)>] [221 </home/fossee/Desktop/floss-scilab-arduino/user
--code/modbus/figures/fig3.png (PNG copy)>] [222] [223]
+ures/fig2.png (PNG copy)>] [227 </home/fossee/Desktop/floss-scilab-arduino/user
+-code/modbus/figures/fig3.png (PNG copy)>] [228] [229]
</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/Full-Set-Up
-.png, id=1005, 722.7pt x 542.025pt>
+.png, id=1024, 722.7pt x 542.025pt>
File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/Full-S
et-Up.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/Full-Se
@@ -2417,9 +2455,9 @@ t-Up.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo
dbus/figures/Full-Set-Up.png used on input line 300.
(pdftex.def) Requested size: 258.36281pt x 193.77246pt.
- [224]
+ [230]
</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/block-diagr
-am.PNG, id=1009, 398.23781pt x 255.95625pt>
+am.PNG, id=1028, 398.23781pt x 255.95625pt>
File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/block-
diagram.PNG Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/block-d
@@ -2428,7 +2466,7 @@ Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo
dbus/figures/block-diagram.PNG used on input line 329.
(pdftex.def) Requested size: 258.36281pt x 166.06104pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/arduino_cod
-e_flowchart.png, id=1010, 327.2225pt x 480.79625pt>
+e_flowchart.png, id=1029, 327.2225pt x 480.79625pt>
File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/arduin
o_code_flowchart.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/arduino
@@ -2436,10 +2474,10 @@ _code_flowchart.png>
Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo
dbus/figures/arduino_code_flowchart.png used on input line 348.
(pdftex.def) Requested size: 258.36281pt x 379.61945pt.
- [225 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/Full-
+ [231 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/Full-
Set-Up.png>]
</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/flowchart.p
-ng, id=1015, 482.55281pt x 362.10281pt>
+ng, id=1034, 482.55281pt x 362.10281pt>
File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/flowch
art.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/flowcha
@@ -2448,7 +2486,7 @@ Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo
dbus/figures/flowchart.png used on input line 376.
(pdftex.def) Requested size: 357.73405pt x 268.44914pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/current-out
-put.png, id=1016, 1028.34187pt x 578.16pt>
+put.png, id=1035, 1028.34187pt x 578.16pt>
File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/curren
t-output.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/current
@@ -2457,7 +2495,7 @@ Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo
dbus/figures/current-output.png used on input line 393.
(pdftex.def) Requested size: 397.48499pt x 223.4789pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/current-out
-put-setup.jpg, id=1017, 2509.375pt x 1411.2725pt>
+put-setup.jpg, id=1036, 2509.375pt x 1411.2725pt>
File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/curren
t-output-setup.jpg Graphic file (type jpg)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/current
@@ -2466,7 +2504,7 @@ Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo
dbus/figures/current-output-setup.jpg used on input line 400.
(pdftex.def) Requested size: 258.36281pt x 145.29163pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltage-out
-put.png, id=1018, 1028.34187pt x 578.16pt>
+put.png, id=1037, 1028.34187pt x 578.16pt>
File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltag
e-output.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltage
@@ -2475,7 +2513,7 @@ Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo
dbus/figures/voltage-output.png used on input line 412.
(pdftex.def) Requested size: 397.48499pt x 223.4789pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltage-out
-put-setup.jpg, id=1019, 2509.375pt x 1411.2725pt>
+put-setup.jpg, id=1038, 2509.375pt x 1411.2725pt>
File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltag
e-output-setup.jpg Graphic file (type jpg)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltage
@@ -2484,7 +2522,7 @@ Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo
dbus/figures/voltage-output-setup.jpg used on input line 419.
(pdftex.def) Requested size: 258.36281pt x 145.29163pt.
</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active-powe
-r-output.png, id=1020, 1028.34187pt x 578.16pt>
+r-output.png, id=1039, 1028.34187pt x 578.16pt>
File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active
-power-output.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active-
@@ -2493,10 +2531,10 @@ Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo
dbus/figures/active-power-output.png used on input line 429.
(pdftex.def) Requested size: 397.48499pt x 223.4789pt.
-[226 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/block-
+[232 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/block-
diagram.PNG>]
</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active-powe
-r-output-setup.jpg, id=1025, 2509.375pt x 1411.2725pt>
+r-output-setup.jpg, id=1044, 2509.375pt x 1411.2725pt>
File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active
-power-output-setup.jpg Graphic file (type jpg)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active-
@@ -2507,10 +2545,10 @@ dbus/figures/active-power-output-setup.jpg used on input line 436.
Underfull \vbox (badness 10000) has occurred while \output is active []
- [227 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/ardui
+ [233 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/ardui
no_code_flowchart.png>]
</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/read_value_
-xcos.png, id=1030, 635.37375pt x 455.7025pt>
+xcos.png, id=1049, 635.37375pt x 455.7025pt>
File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/read_v
alue_xcos.png Graphic file (type png)
<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/read_va
@@ -2529,46 +2567,46 @@ Overfull \hbox (16.70493pt too wide) in paragraph at lines 479--491
[][]
[]
-[228 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/flowch
-art.png (PNG copy)>] [229 </home/fossee/Desktop/floss-scilab-arduino/user-code/
+[234 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/flowch
+art.png (PNG copy)>] [235 </home/fossee/Desktop/floss-scilab-arduino/user-code/
modbus/figures/current-output.png (PNG copy)> </home/fossee/Desktop/floss-scila
b-arduino/user-code/modbus/figures/current-output-setup.jpg>]
Underfull \vbox (badness 10000) has occurred while \output is active []
- [230 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/volta
+ [236 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/volta
ge-output.png (PNG copy)> </home/fossee/Desktop/floss-scilab-arduino/user-code/
modbus/figures/voltage-output-setup.jpg>]
(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/arduino/send_packet
-.ino [231 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/a
+.ino [237 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/a
ctive-power-output.png (PNG copy)> </home/fossee/Desktop/floss-scilab-arduino/u
-ser-code/modbus/figures/active-power-output-setup.jpg>] [232 </home/fossee/Desk
+ser-code/modbus/figures/active-power-output-setup.jpg>] [238 </home/fossee/Desk
top/floss-scilab-arduino/user-code/modbus/figures/read_value_xcos.png>])
(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read_val.sce
)
(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read_current
.sci)
(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read_voltage
-.sci [233])
+.sci [239])
(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read_active_
power.sci)
(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read_current
.py)
(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read_voltage
-.py [234])
+.py [240])
(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read_active_
power.py)
(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readCurrent.j
l)
(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readVoltage.j
-l [235])
+l [241])
(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readPower.jl)
(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readCu
rrent.mo)
(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readVo
-ltage.mo [236])
+ltage.mo [242])
(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readPo
-wer.mo)) (./floss-arduino.bbl [237] [238
+wer.mo)) (./floss-arduino.bbl [243] [244
]
Underfull \hbox (badness 10000) in paragraph at lines 4--9
@@ -2599,17 +2637,23 @@ Overfull \hbox (15.39987pt too wide) in paragraph at lines 49--53
/Skittles_M%26M%27s
[]
-[239]
+[245]
Underfull \hbox (badness 1577) in paragraph at lines 95--98
[]\T1/cmr/m/n/10.95 Juliaio/serialports.jl: Se-ri-al-port io streams in ju-lia
backed by py-se-rial.
[]
+
+Overfull \hbox (34.60225pt too wide) in paragraph at lines 110--113
+[]\T1/cmr/m/n/10.95 Secrets of ar-duino pwm. https://www.arduino.cc/en/Tutoria
+l/SecretsOfArduinoPWM.
+ []
+
)
\tf@thm=\write13
\openout13 = `floss-arduino.thm'.
- [240] (./floss-arduino.aux)
+ [246] (./floss-arduino.aux)
LaTeX Warning: There were undefined references.
@@ -2618,10 +2662,10 @@ LaTeX Warning: There were multiply-defined labels.
)
Here is how much of TeX's memory you used:
- 9841 strings out of 481239
- 219867 string characters out of 5920377
+ 9885 strings out of 481239
+ 224169 string characters out of 5920377
733688 words of memory out of 5000000
- 24286 multiletter control sequences out of 15000+600000
+ 24280 multiletter control sequences out of 15000+600000
554670 words of font info for 69 fonts, out of 8000000 for 9000
1143 hyphenation exceptions out of 8191
50i,11n,53p,363b,1777s stack positions out of 5000i,500n,10000p,200000b,80000s
@@ -2648,10 +2692,10 @@ sr/share/texmf/fonts/type1/public/cm-super/sfrm1000.pfb></usr/share/texmf/fonts
/type1/public/cm-super/sfrm1095.pfb></usr/share/texmf/fonts/type1/public/cm-sup
er/sfsi1095.pfb></usr/share/texmf/fonts/type1/public/cm-super/sfss1095.pfb></us
r/share/texmf/fonts/type1/public/cm-super/sfti1095.pfb>
-Output written on floss-arduino.pdf (264 pages, 21055546 bytes).
+Output written on floss-arduino.pdf (270 pages, 21071979 bytes).
PDF statistics:
- 1168 PDF objects out of 1200 (max. 8388607)
- 681 compressed objects within 7 object streams
+ 1187 PDF objects out of 1200 (max. 8388607)
+ 694 compressed objects within 7 object streams
0 named destinations out of 1000 (max. 500000)
581 words of extra memory for PDF output out of 10000 (max. 10000000)
diff --git a/floss-arduino.lot b/floss-arduino.lot
index 4cd8b59..ebdeecf 100644
--- a/floss-arduino.lot
+++ b/floss-arduino.lot
@@ -27,14 +27,13 @@
\contentsline {table}{\numberline {9.4}{\ignorespaces Parameters to make the servomotor to sweep the entire range in increments\relax }}{183}%
\contentsline {table}{\numberline {9.5}{\ignorespaces Parameters to rotate the servomotor based on the input from the potentiometer\relax }}{184}%
\addvspace {10\p@ }
-\contentsline {table}{\numberline {10.1}{\ignorespaces A numbering convention used in the DC motor breakout board\relax }}{203}%
-\contentsline {table}{\numberline {10.2}{\ignorespaces Parameters for DC motor initialization\relax }}{203}%
-\contentsline {table}{\numberline {10.3}{\ignorespaces Xcos parameters to drive the DC motor for a specified time\relax }}{207}%
-\contentsline {table}{\numberline {10.4}{\ignorespaces Xcos parameters to drive the DC motor in forward and reverse directions\relax }}{208}%
-\contentsline {table}{\numberline {10.5}{\ignorespaces Xcos parameters to drive the DC motor in a loop\relax }}{210}%
-\addvspace {10\p@ }
-\contentsline {table}{\numberline {11.1}{\ignorespaces Interpretation of a request packet\relax }}{222}%
-\contentsline {table}{\numberline {11.2}{\ignorespaces Interpretation of a response packet\relax }}{222}%
-\contentsline {table}{\numberline {11.3}{\ignorespaces Hexadecimal to Decimal\relax }}{223}%
-\contentsline {table}{\numberline {11.4}{\ignorespaces Single and Double Precision Representation\relax }}{223}%
-\contentsline {table}{\numberline {11.5}{\ignorespaces Xcos parameters to read Energy Meter\relax }}{232}%
+\contentsline {table}{\numberline {10.1}{\ignorespaces Values in the Scilab\ command for different H-Bridge circuits\relax }}{204}%
+\contentsline {table}{\numberline {10.2}{\ignorespaces Xcos parameters to drive the DC motor for a specified time\relax }}{208}%
+\contentsline {table}{\numberline {10.3}{\ignorespaces Xcos parameters to drive the DC motor in forward and reverse directions\relax }}{209}%
+\contentsline {table}{\numberline {10.4}{\ignorespaces Xcos parameters to drive the DC motor in a loop\relax }}{211}%
+\addvspace {10\p@ }
+\contentsline {table}{\numberline {11.1}{\ignorespaces Interpretation of a request packet\relax }}{228}%
+\contentsline {table}{\numberline {11.2}{\ignorespaces Interpretation of a response packet\relax }}{228}%
+\contentsline {table}{\numberline {11.3}{\ignorespaces Hexadecimal to Decimal\relax }}{229}%
+\contentsline {table}{\numberline {11.4}{\ignorespaces Single and Double Precision Representation\relax }}{229}%
+\contentsline {table}{\numberline {11.5}{\ignorespaces Xcos parameters to read Energy Meter\relax }}{238}%
diff --git a/floss-arduino.pdf b/floss-arduino.pdf
index 9bfdbb8..ecf40c4 100644
--- a/floss-arduino.pdf
+++ b/floss-arduino.pdf
Binary files differ
diff --git a/floss-arduino.pyd b/floss-arduino.pyd
index b6317d9..cf43a8c 100644
--- a/floss-arduino.pyd
+++ b/floss-arduino.pyd
@@ -22,10 +22,10 @@
\contentsline {section}{\numberline {9.{3}}Rotating the servomotor in steps of $20^\circ $}{187}%
\contentsline {section}{\numberline {9.{4}}Rotating the servomotor to a degree specified by the potentiometer}{188}%
\addvspace {10pt}
-\contentsline {section}{\numberline {10.{1}}Rotating the DC motor}{211}%
-\contentsline {section}{\numberline {10.{2}}Rotating the DC motor in both directions}{212}%
-\contentsline {section}{\numberline {10.{3}}Rotating the DC motor in both directions in a loop}{212}%
+\contentsline {section}{\numberline {10.{1}}Rotating the DC motor}{213}%
+\contentsline {section}{\numberline {10.{2}}Rotating the DC motor in both directions}{214}%
+\contentsline {section}{\numberline {10.{3}}Rotating the DC motor in both directions in a loop}{215}%
\addvspace {10pt}
-\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{234}%
-\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{234}%
-\contentsline {section}{\numberline {11.{3}}Code for Single Phase Active Power Output}{235}%
+\contentsline {section}{\numberline {11.{1}}Code for Single Phase Current Output}{240}%
+\contentsline {section}{\numberline {11.{2}}Code for Single Phase Voltage Output}{240}%
+\contentsline {section}{\numberline {11.{3}}Code for Single Phase Active Power Output}{241}%
diff --git a/floss-arduino.thm b/floss-arduino.thm
index 103a214..67ca3fa 100644
--- a/floss-arduino.thm
+++ b/floss-arduino.thm
@@ -91,35 +91,35 @@
\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{2}}{}}{193}%
\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{3}}{}}{193}%
\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{4}}{}}{194}%
-\contentsline {egmass}{{Exercise}{10.{1}}{}}{200}%
+\contentsline {egmass}{{Exercise}{10.{1}}{}}{201}%
\contentsline {ardmass}{{Arduino Code}{10.{1}}{}}{201}%
-\contentsline {ardmass}{{Arduino Code}{10.{2}}{}}{201}%
-\contentsline {ardmass}{{Arduino Code}{10.{3}}{}}{201}%
-\contentsline {egmass}{{Exercise}{10.{2}}{}}{204}%
-\contentsline {codemass}{{Scilab Code}{10.{1}}{}}{205}%
-\contentsline {codemass}{{Scilab Code}{10.{2}}{}}{205}%
-\contentsline {codemass}{{Scilab Code}{10.{3}}{}}{205}%
-\contentsline {egmass}{{Exercise}{10.{3}}{}}{207}%
-\contentsline {pymass}{{Python Code}{10.{1}}{}}{211}%
-\contentsline {pymass}{{Python Code}{10.{2}}{}}{212}%
-\contentsline {pymass}{{Python Code}{10.{3}}{}}{212}%
-\contentsline {juliamass}{{Julia Code}{10.{1}}{}}{214}%
-\contentsline {juliamass}{{Julia Code}{10.{2}}{}}{215}%
-\contentsline {juliamass}{{Julia Code}{10.{3}}{}}{215}%
-\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{1}}{}}{216}%
-\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{2}}{}}{216}%
-\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{3}}{}}{217}%
-\contentsline {ardmass}{{Arduino Code}{11.{1}}{}}{231}%
-\contentsline {codemass}{{Scilab Code}{11.{1}}{}}{233}%
-\contentsline {codemass}{{Scilab Code}{11.{2}}{}}{233}%
-\contentsline {codemass}{{Scilab Code}{11.{3}}{}}{233}%
-\contentsline {codemass}{{Scilab Code}{11.{4}}{}}{234}%
-\contentsline {pymass}{{Python Code}{11.{1}}{}}{234}%
-\contentsline {pymass}{{Python Code}{11.{2}}{}}{234}%
-\contentsline {pymass}{{Python Code}{11.{3}}{}}{235}%
-\contentsline {juliamass}{{Julia Code}{11.{1}}{}}{235}%
-\contentsline {juliamass}{{Julia Code}{11.{2}}{}}{235}%
-\contentsline {juliamass}{{Julia Code}{11.{3}}{}}{236}%
-\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{1}}{}}{236}%
-\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{2}}{}}{236}%
-\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{3}}{}}{237}%
+\contentsline {ardmass}{{Arduino Code}{10.{2}}{}}{202}%
+\contentsline {ardmass}{{Arduino Code}{10.{3}}{}}{202}%
+\contentsline {egmass}{{Exercise}{10.{2}}{}}{205}%
+\contentsline {codemass}{{Scilab Code}{10.{1}}{}}{206}%
+\contentsline {codemass}{{Scilab Code}{10.{2}}{}}{206}%
+\contentsline {codemass}{{Scilab Code}{10.{3}}{}}{206}%
+\contentsline {egmass}{{Exercise}{10.{3}}{}}{208}%
+\contentsline {pymass}{{Python Code}{10.{1}}{}}{213}%
+\contentsline {pymass}{{Python Code}{10.{2}}{}}{214}%
+\contentsline {pymass}{{Python Code}{10.{3}}{}}{215}%
+\contentsline {juliamass}{{Julia Code}{10.{1}}{}}{218}%
+\contentsline {juliamass}{{Julia Code}{10.{2}}{}}{219}%
+\contentsline {juliamass}{{Julia Code}{10.{3}}{}}{219}%
+\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{1}}{}}{222}%
+\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{2}}{}}{223}%
+\contentsline {OpenModelicamass}{{OpenModelica Code}{10.{3}}{}}{223}%
+\contentsline {ardmass}{{Arduino Code}{11.{1}}{}}{237}%
+\contentsline {codemass}{{Scilab Code}{11.{1}}{}}{239}%
+\contentsline {codemass}{{Scilab Code}{11.{2}}{}}{239}%
+\contentsline {codemass}{{Scilab Code}{11.{3}}{}}{239}%
+\contentsline {codemass}{{Scilab Code}{11.{4}}{}}{240}%
+\contentsline {pymass}{{Python Code}{11.{1}}{}}{240}%
+\contentsline {pymass}{{Python Code}{11.{2}}{}}{240}%
+\contentsline {pymass}{{Python Code}{11.{3}}{}}{241}%
+\contentsline {juliamass}{{Julia Code}{11.{1}}{}}{241}%
+\contentsline {juliamass}{{Julia Code}{11.{2}}{}}{241}%
+\contentsline {juliamass}{{Julia Code}{11.{3}}{}}{242}%
+\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{1}}{}}{242}%
+\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{2}}{}}{242}%
+\contentsline {OpenModelicamass}{{OpenModelica Code}{11.{3}}{}}{243}%
diff --git a/floss-arduino.toc b/floss-arduino.toc
index 7308a7f..e27d996 100644
--- a/floss-arduino.toc
+++ b/floss-arduino.toc
@@ -54,7 +54,7 @@
\contentsline {subsection}{\numberline {3.6.1}Downloading and installing on Windows}{56}%
\contentsline {subsection}{\numberline {3.6.2}Downloading and installing on GNU/Linux Ubuntu}{57}%
\contentsline {subsection}{\numberline {3.6.3}Simulating models in OpenModelica}{57}%
-\contentsline {subsection}{\numberline {3.6.4}OpenModelica Arduino toolbox}{63}%
+\contentsline {subsection}{\numberline {3.6.4}OpenModelica-Arduino toolbox}{63}%
\contentsline {subsection}{\numberline {3.6.5}Firmware}{64}%
\contentsline {chapter}{\numberline {4}Interfacing a Light Emitting Diode}{67}%
\contentsline {section}{\numberline {4.1}Preliminaries}{67}%
@@ -181,33 +181,40 @@
\contentsline {section}{\numberline {10.1}Preliminaries}{197}%
\contentsline {section}{\numberline {10.2}Controlling the DC motor from Arduino}{199}%
\contentsline {subsection}{\numberline {10.2.1}Controlling the DC motor}{199}%
+\contentsline {paragraph}{Note:}{199}%
\contentsline {subsection}{\numberline {10.2.2}Arduino Code}{201}%
-\contentsline {section}{\numberline {10.3}Controlling the DC motor from Scilab}{202}%
-\contentsline {subsection}{\numberline {10.3.1}Initialization}{202}%
-\contentsline {subsection}{\numberline {10.3.2}Rotation for a specified time}{203}%
-\contentsline {subsection}{\numberline {10.3.3}Using the capabilities of Scilab}{204}%
-\contentsline {subsection}{\numberline {10.3.4}Scilab Code}{205}%
-\contentsline {section}{\numberline {10.4}Controlling the DC Motor from Xcos}{206}%
-\contentsline {section}{\numberline {10.5}Controlling the DC Motor from Python}{209}%
-\contentsline {subsection}{\numberline {10.5.1}Controlling the DC Motor}{209}%
-\contentsline {subsection}{\numberline {10.5.2}Python Code}{211}%
-\contentsline {section}{\numberline {10.6}Controlling the DC Motor from Julia}{214}%
-\contentsline {subsection}{\numberline {10.6.1}Controlling the DC Motor}{214}%
-\contentsline {subsection}{\numberline {10.6.2}Julia Code}{214}%
-\contentsline {section}{\numberline {10.7}Controlling the DC Motor from OpenModelica}{215}%
-\contentsline {subsection}{\numberline {10.7.1}Controlling the DC Motor}{215}%
-\contentsline {subsection}{\numberline {10.7.2}OpenModelica Code}{216}%
-\contentsline {chapter}{\numberline {11}Implementation of Modbus Protocol}{219}%
-\contentsline {section}{\numberline {11.1}Preliminaries}{219}%
-\contentsline {section}{\numberline {11.2}Objective}{224}%
-\contentsline {section}{\numberline {11.3}Energy Meter set up for Modbus protocol with Arduino Uno}{224}%
-\contentsline {section}{\numberline {11.4}Software}{225}%
-\contentsline {section}{\numberline {11.5}Output}{226}%
-\contentsline {section}{\numberline {11.6}Reading Parameters from Xcos}{228}%
-\contentsline {section}{\numberline {11.7}Code}{231}%
-\contentsline {subsection}{\numberline {11.7.1}Arduino Code}{231}%
-\contentsline {subsection}{\numberline {11.7.2}Scilab Code}{233}%
-\contentsline {subsection}{\numberline {11.7.3}Python Code}{234}%
-\contentsline {subsection}{\numberline {11.7.4}Julia Code}{235}%
-\contentsline {subsection}{\numberline {11.7.5}OpenModelica Code}{236}%
-\contentsline {chapter}{\numberline {References}}{239}%
+\contentsline {section}{\numberline {10.3}Controlling the DC motor from Scilab}{203}%
+\contentsline {subsection}{\numberline {10.3.1}Controlling the DC motor}{203}%
+\contentsline {paragraph}{Note:}{203}%
+\contentsline {paragraph}{Note:}{205}%
+\contentsline {subsection}{\numberline {10.3.2}Scilab Code}{206}%
+\contentsline {section}{\numberline {10.4}Controlling the DC Motor from Xcos}{207}%
+\contentsline {section}{\numberline {10.5}Controlling the DC Motor from Python}{210}%
+\contentsline {subsection}{\numberline {10.5.1}Controlling the DC Motor}{210}%
+\contentsline {paragraph}{Note:}{211}%
+\contentsline {paragraph}{Note:}{212}%
+\contentsline {subsection}{\numberline {10.5.2}Python Code}{213}%
+\contentsline {section}{\numberline {10.6}Controlling the DC Motor from Julia}{216}%
+\contentsline {subsection}{\numberline {10.6.1}Controlling the DC Motor}{216}%
+\contentsline {paragraph}{Note:}{216}%
+\contentsline {paragraph}{Note:}{218}%
+\contentsline {subsection}{\numberline {10.6.2}Julia Code}{218}%
+\contentsline {section}{\numberline {10.7}Controlling the DC Motor from OpenModelica}{219}%
+\contentsline {subsection}{\numberline {10.7.1}Controlling the DC Motor}{219}%
+\contentsline {paragraph}{Note:}{220}%
+\contentsline {paragraph}{Note:}{221}%
+\contentsline {subsection}{\numberline {10.7.2}OpenModelica Code}{222}%
+\contentsline {chapter}{\numberline {11}Implementation of Modbus Protocol}{225}%
+\contentsline {section}{\numberline {11.1}Preliminaries}{225}%
+\contentsline {section}{\numberline {11.2}Objective}{230}%
+\contentsline {section}{\numberline {11.3}Energy Meter set up for Modbus protocol with Arduino Uno}{230}%
+\contentsline {section}{\numberline {11.4}Software}{231}%
+\contentsline {section}{\numberline {11.5}Output}{232}%
+\contentsline {section}{\numberline {11.6}Reading Parameters from Xcos}{234}%
+\contentsline {section}{\numberline {11.7}Code}{237}%
+\contentsline {subsection}{\numberline {11.7.1}Arduino Code}{237}%
+\contentsline {subsection}{\numberline {11.7.2}Scilab Code}{239}%
+\contentsline {subsection}{\numberline {11.7.3}Python Code}{240}%
+\contentsline {subsection}{\numberline {11.7.4}Julia Code}{241}%
+\contentsline {subsection}{\numberline {11.7.5}OpenModelica Code}{242}%
+\contentsline {chapter}{\numberline {References}}{245}%
diff --git a/indent.log b/indent.log
deleted file mode 100644
index 8d6de3d..0000000
--- a/indent.log
+++ /dev/null
@@ -1,25 +0,0 @@
-INFO: latexindent version 3.7.1, 2019-09-07, a script to indent .tex files
- latexindent lives here: /usr/share/texlive/texmf-dist/scripts/latexindent/
- Tue May 4 06:51:32 2021
- Filename: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/__latexindent_temp.tex
-INFO: Processing switches:
- -y|--yaml: YAML settings specified via command line
- -c|--cruft: cruft directory
-INFO: Directory for backup files and /home/fossee/Desktop/floss-scilab-arduino/indent.log: /home/fossee/Desktop/floss-scilab-arduino/
-INFO: YAML settings read: defaultSettings.yaml
- Reading defaultSettings.yaml from /usr/share/texlive/texmf-dist/scripts/latexindent/defaultSettings.yaml
-INFO: YAML settings read: indentconfig.yaml or .indentconfig.yaml
- Home directory is /home/fossee (didn't find either indentconfig.yaml or .indentconfig.yaml)
- To specify user settings you would put indentconfig.yaml here: /home/fossee/indentconfig.yaml
- Alternatively, you can use the hidden file .indentconfig.yaml as: /home/fossee/.indentconfig.yaml
-INFO: YAML settings read: -y switch
- Updating masterSettings with defaultIndent:
-INFO: Phase 1: searching for objects
-INFO: Phase 2: finding surrounding indentation
-INFO: Phase 3: indenting objects
-INFO: Phase 4: final indentation check
-INFO: Output routine:
- Not outputting to file; see -w and -o switches for more options.
- --------------
-INFO: Please direct all communication/issues to:
- https://github.com/cmhughes/latexindent.pl
diff --git a/user-code/dcmotor/dcmotor.tex b/user-code/dcmotor/dcmotor.tex
index f305d8e..dbf7abb 100644
--- a/user-code/dcmotor/dcmotor.tex
+++ b/user-code/dcmotor/dcmotor.tex
@@ -4,40 +4,46 @@
\newcommand{\LocDCMfig}{\Origin/user-code/dcmotor/figures}
\newcommand{\LocDCMscicode}{\Origin/user-code/dcmotor/scilab}
\newcommand{\LocDCMscibrief}[1]{{\tt \seqsplit{
- Origin/user-code/dcmotor/scilab/#1}},
-see \fnrefp{fn:file-loc}}
+ Origin/user-code/dcmotor/scilab/#1}},
+ see \fnrefp{fn:file-loc}}
\newcommand{\LocDCMardcode}{\Origin/user-code/dcmotor/arduino}
\newcommand{\LocDCMardbrief}[1]{{\tt \seqsplit{
- Origin/user-code/dcmotor/arduino/#1}},
-see \fnrefp{fn:file-loc}}
+ Origin/user-code/dcmotor/arduino/#1}},
+ see \fnrefp{fn:file-loc}}
%%%%%%%%%%%%%python starts
\newcommand{\LocDCMpycode}{\Origin/user-code/dcmotor/python}
\newcommand{\LocDCMpybrief}[1]{{\tt \seqsplit{
- Origin/user-code/dcmotor/python/#1}},
-see \fnrefp{fn:file-loc}}
+ Origin/user-code/dcmotor/python/#1}},
+ see \fnrefp{fn:file-loc}}
%%%%%%%%%%%%%python ends
%%%%%%%%%%%%%julia starts
\newcommand{\LocDCMjuliacode}{\Origin/user-code/dcmotor/julia}
\newcommand{\LocDCMjuliabrief}[1]{{\tt \seqsplit{
- Origin/user-code/dcmotor/julia/#1}},
-see \fnrefp{fn:file-loc}}
+ Origin/user-code/dcmotor/julia/#1}},
+ see \fnrefp{fn:file-loc}}
%%%%%%%%%%%%%julia ends
%%%%%%OpenModelica Starts
\newcommand{\LocDCMOpenModelicacode}{\Origin/user-code/dcmotor/OpenModelica} %added for OpenModelica
\newcommand{\LocDCMOpenModelicabrief}[1]{{\tt \seqsplit{%
- Origin/user-code/led/OpenModelica/#1}}, see \fnrefp{fn:file-loc}} % added for OpenModelica
+ Origin/user-code/led/OpenModelica/#1}}, see \fnrefp{fn:file-loc}} % added for OpenModelica
%%%%%OpenModelcia Ends
-Motors are widely used in commercial applications. DC motor converts
-electric power obtained from direct current to the mechanical
-motion. This chapter describes an experiment to control DC motor with
-\arduino\ board. We will observe the direction of motion of DC motor
-being changed using the microcontroller on \arduino\ board. Control
-instruction will be sent to \arduino\ using Scilab scripts, Arduino IDE and Scilab Xcos.
+Motors are widely used in commercial applications.
+DC motor converts electric power obtained from direct current to
+mechanical motion. This chapter describes the experiments to
+control DC motor with \arduino\ board. We will observe the
+direction of motion of the DC motor being changed
+using the microcontroller on \arduino\ board.
+Control instruction will be sent to \arduino\ using Arduino IDE,
+Scilab scripts, Scilab Xcos, Python, Julia, and OpenModelica.
+The experiments provided in this chapter don't require the shield.
+Therefore, the readers must remove the shield from the \arduino\ before
+moving further in this chapter. Before removing the shield,
+the readers are advised to detach \arduino\ from the computer. 
\section{Preliminaries}
In order to change its direction, the sign of the voltage applied to
@@ -58,10 +64,10 @@ the diagram of a typical breakout board containing IC L293D, which will
be used in this book. \par
\begin{figure}
-\centering
-\includegraphics[width=\lgfig]{\LocDCMfig/dcmotor_board.png}
-\caption{L293D motor driver board}
-\label{fig:motordriverboard}
+ \centering
+ \includegraphics[width=\lgfig]{\LocDCMfig/dcmotor_board.png}
+ \caption{L293D motor driver board}
+ \label{fig:motordriverboard}
\end{figure}
Input from \arduino\ to H-bridge IC is in \index{pulse width
@@ -77,20 +83,22 @@ time. For example, if both ''switch-on'' time and ''switch-off'' time
are equal, average voltage on PWM pin will be 2.5V. To enable fast
switching of digital pin, a special hardware is provided in
microcontrollers. PWM is considered as an important resource of
-the microcontroller system. \arduino\ board has 6 PWM pins for each of
-which, the input can come from 8 bits. Thus we can generate 256
-different analog values in between 0-5V with these pins.
+the microcontroller system. \arduino\ board has 6 PWM pins (3, 5, 6, 9, 10, 11) \cite{arduino-pwm}.
+On an original \arduino\ board, these pins are marked with a tilde sign next to the pin number,
+as shown in Fig. For each of these pins, the input can come from 8 bits.
+Thus we can generate $2^8 = 256$ different analog values (from 0 to 255)
+in between 0-5V with these pins.
We now carry out the following connections:
\begin{enumerate}
-\item Connect input of L293D (M1\_IN) pins to two of the PWM pins
- available on \arduino. We have used pins 9 and 10 of the \arduino\
- board.
-\item Connect the output of the L293D (M1\_OUT) pins directly to the 2
- wires of the DC motor. As the direction is changed during the
- operation, the polarity of the connection does not matter.
-\item Connect supply (Vcc) and ground (Gnd) pins of L293D to 5V and
- Gnd pins of the \arduino\ board, respectively.
+ \item Connect input of L293D (M1\_IN) pins to two of the PWM pins
+ available on \arduino. We have used pins 9 and 10 of the \arduino\
+ board.
+ \item Connect the output of the L293D (M1\_OUT) pins directly to the 2
+ wires of the DC motor. As the direction is changed during the
+ operation, the polarity of the connection does not matter.
+ \item Connect supply (Vcc) and ground (Gnd) pins of L293D to 5V and
+ Gnd pins of the \arduino\ board, respectively.
\end{enumerate}
A schematic of these connections is given in
\figref{fig:dcm-schematic}. The actual connections can be seen in
@@ -98,16 +106,16 @@ A schematic of these connections is given in
\begin{figure}
-\centering
-\includegraphics[width=\smfig]{\LocDCMfig/schematic.png}
-\caption{A schematic of DC motor connections}
-\label{fig:dcm-schematic}
+ \centering
+ \includegraphics[width=\smfig]{\LocDCMfig/schematic.png}
+ \caption{A schematic of DC motor connections}
+ \label{fig:dcm-schematic}
\end{figure}
\begin{figure}
-\centering
-\includegraphics[width=\lgfig]{\LocDCMfig/dc_motor_description.jpg}
-\caption{How to connect the DC motor to the \arduino\ board}
-\label{fig:dcmotorconn}
+ \centering
+ \includegraphics[width=\lgfig]{\LocDCMfig/dc_motor_description.jpg}
+ \caption{How to connect the DC motor to the \arduino\ board}
+ \label{fig:dcmotorconn}
\end{figure}
\section{Controlling the DC motor from Arduino}
@@ -115,59 +123,77 @@ A schematic of these connections is given in
\label{sec:dcm-ard}
In this section, we will describe some experiments that will help
drive the DC motor from the Arduino IDE. We will also give the
-necessary code. We will present four experiments in this section. We
-assume the shield to be attached to the \arduino\ board while doing
-these experiments. The reader should go through the instructions
-given in \secref{sec:ard-start} before getting started.
+necessary code. We will present three experiments in this section.
+As mentioned earlier, the shield must be removed from
+the \arduino\ and the \arduino\ needs to be connected to the computer
+with a USB cable, as shown in \figref{arduino}. The reader should go through the
+instructions given in \secref{sec:ard-start} before getting started.
+
+\paragraph{Note:} The readers are advised to affix a small
+(very lightweight) piece of paper at the tip of the shaft of the DC motor.
+That will help them observe the direction of rotation
+of the DC motor while running the experiments. 
+
\begin{enumerate}
-\item We now demonstrate how to drive the DC motor from the Arduino
- IDE. \ardref{ard:dcmotor-clock} has the required code for this. It
- starts the serial port at a baud rate of 9600. Pins 9 and 10 are
- declared as output pins and hence values can be written on to them.
- Next, we write PWM 100 on pin 9 and PWM 0 on pin 10. Recall from
- \figref{fig:dcmotorconn} that pins 9 and 10 are connected to the
- input of the breakout board, which in turn makes the DC motor run at
- an intermediate speed. Recall from \secref{sec:led-pril} that a
- high on pin 9 also makes the blue LED come on. As a result, the
- blue LED also lights up.
-
- Some of the breakout boards may not have enough current driving
- capability and hence tend to heat up. To avoid these difficulties,
- the DC motor is run at an intermediate value of PWM 100.
-
- The line containing {\tt delay} makes the previous command execute
- for 3 seconds. As a result, the DC motor continues to rotate for 3
- seconds. After this, as we put a 0 in both pins 9 and 10, the motor
- comes to a halt. The blue LED is also turned off.
-
-\item It is easy to make the DC motor run in the reverse direction by
- interchanging the values put on pins 9 and 10. This is done in
- \ardref{ard:dcmotor-both}. In this program, we make the DC motor
- run in one direction for 3 seconds and then make it rotate in the
- reverse direction for 2 seconds. The rotation in reverse direction
- is achieved by putting 100 in pin 10. This makes the green LED
- light up, recall the discussion in \secref{sec:led-pril}. After
- that, we release the motor by writing 0 in both pins 9 and 10. This
- turns the green LED off.
-
-\item Next, we make the DC motor run in forward and reverse
- directions, in a loop. This is done through
- \ardref{ard:dcmotor-loop}. We first put PWM 100 in the motor for 3
- seconds. After that, make the motor stop for 2 seconds. Finally,
- make the motor rotate in the reverse direction by putting PWM -100
- for two seconds. Finally, we make the motor stop for one second.
- The entire thing is put in a loop.
+ \item We now demonstrate how to drive the DC motor from the Arduino
+ IDE. \ardref{ard:dcmotor-clock} has the required code for this. It
+ starts the serial port at a baud rate of 115200. Pins 9 and 10 are
+ declared as output pins and hence values can be written on to them. The following
+ lines are used to declare these two pins as output pins:
+ \lstinputlisting[firstline=3,lastline=4]
+ {\LocDCMardcode/dcmotor-clock/dcmotor-clock.ino}
+ Next, we write PWM 100 on pin 9 and PWM 0 on pin 10, as shown below:
+ \lstinputlisting[firstline=5,lastline=6]
+ {\LocDCMardcode/dcmotor-clock/dcmotor-clock.ino}
+ Recall from \figref{fig:dcmotorconn} that pins 9 and 10 are connected to the
+ input of the breakout board, which in turn makes the DC motor run at
+ an intermediate speed. Some of the breakout boards may not have enough current driving
+ capability and hence tend to heat up. To avoid these difficulties,
+ the DC motor is run at an intermediate value of PWM 100. Remember, we can
+ increase this value upto 255.
+ % As mentioned in \secref{sec:led-pril}, a high on pin 9 also makes the blue LED turn on.
+
+ The line containing {\tt delay} makes the previous command execute
+ for 3 seconds. As a result, the DC motor continues to rotate for 3
+ seconds. After this, we put a 0 in both pins 9 and 10, as shown below:
+ \lstinputlisting[firstline=8,lastline=9]
+ {\LocDCMardcode/dcmotor-clock/dcmotor-clock.ino}
+ With this, the motor comes to a halt.
+ % The blue LED is also turned off.
+
+ \item It is easy to make the DC motor run in the reverse direction by
+ interchanging the values put on pins 9 and 10. This is done in
+ \ardref{ard:dcmotor-both}. In this code, we make the DC motor
+ run in one direction for 3 seconds and then make it rotate in the
+ reverse direction for 2 seconds. The rotation in reverse direction
+ is achieved by putting 100 in pin 10, as shown below:
+ \lstinputlisting[firstline=8,lastline=9]
+ {\LocDCMardcode/dcmotor-both/dcmotor-both.ino}
+ % This makes the green LED light up as well, recall the discussion in \secref{sec:led-pril}. After
+ Next, we release the motor by writing 0 in both pins 9 and 10, as shown below:
+ \lstinputlisting[firstline=11,lastline=12]
+ {\LocDCMardcode/dcmotor-both/dcmotor-both.ino}
+ With this, the motor comes to a halt.
+ % This turns the green LED off as well.
+
+ \item Next, we make the DC motor run in forward and reverse
+ directions, in a loop. This is done through
+ \ardref{ard:dcmotor-loop}. We first write PWM 100 in pin 9 for 3
+ seconds. After that, make the motor stop for 2 seconds. Finally,
+ make the motor rotate in the reverse direction by writing PWM 100 in pin 10
+ for two seconds. Finally, we make the motor stop for one second.
+ The entire thing is put in a {\tt for} loop which runs for 5 iterations.
\end{enumerate}
\begin{exercise}
-Carry out the following exercise:
-\begin{enumerate}
-\item Try out some of the suggestions given above, \ie\ removing
- certain numbers from the code
-\item See if the DC motor runs if you put 1 instead of 100 as the PWM
- value. Explain why it does not run. Find out the smallest value at
- which it will start running.
-\end{enumerate}
+ Carry out the following exercise:
+ \begin{enumerate}
+ \item Try out some of the suggestions given above, \ie\ removing
+ certain numbers from the code
+ \item See if the DC motor runs if you put 1 instead of 100 as the PWM
+ value. Explain why it does not run. Find out the smallest value at
+ which it will start running.
+ \end{enumerate}
\end{exercise}
\subsection{Arduino Code}
@@ -176,164 +202,259 @@ Carry out the following exercise:
\addtocontents{ard}{\protect\addvspace{\codclr}}
\begin{ardcode}
-\acaption{Rotating the DC motor}
-{Rotating the DC motor. Available at
- \LocDCMardbrief{dcmotor-clock/dcmotor-clock.ino}.}
-\label{ard:dcmotor-clock}
-\lstinputlisting{\LocDCMardcode/dcmotor-clock/dcmotor-clock.ino}
+ \acaption{Rotating the DC motor}
+ {Rotating the DC motor. Available at
+ \LocDCMardbrief{dcmotor-clock/dcmotor-clock.ino}.}
+ \label{ard:dcmotor-clock}
+ \lstinputlisting{\LocDCMardcode/dcmotor-clock/dcmotor-clock.ino}
\end{ardcode}
\begin{ardcode}
-\acaption{Rotating the DC motor in both directions}{Rotating the DC
- motor in both directions.
- Available at
- \LocDCMardbrief{dcmotor-both/dcmotor-both.ino}.}
-\label{ard:dcmotor-both}
-\lstinputlisting{\LocDCMardcode/dcmotor-both/dcmotor-both.ino}
+ \acaption{Rotating the DC motor in both directions}{Rotating the DC
+ motor in both directions.
+ Available at
+ \LocDCMardbrief{dcmotor-both/dcmotor-both.ino}.}
+ \label{ard:dcmotor-both}
+ \lstinputlisting{\LocDCMardcode/dcmotor-both/dcmotor-both.ino}
\end{ardcode}
\begin{ardcode}
-\acaption{Rotating the DC motor in both directions in a loop}{Rotating
- the DC motor in both directions in a loop.
- Available at
- \LocDCMardbrief{dcmotor-loop/dcmotor-loop.ino}.}
-\label{ard:dcmotor-loop}
-\lstinputlisting{\LocDCMardcode/dcmotor-loop/dcmotor-loop.ino}
+ \acaption{Rotating the DC motor in both directions in a loop}{Rotating
+ the DC motor in both directions in a loop.
+ Available at
+ \LocDCMardbrief{dcmotor-loop/dcmotor-loop.ino}.}
+ \label{ard:dcmotor-loop}
+ \lstinputlisting{\LocDCMardcode/dcmotor-loop/dcmotor-loop.ino}
\end{ardcode}
-
-
\section{Controlling the DC motor from Scilab}
\label{sec:dcm-sci}
-In this section, we will explain a few experiments to rotate the DC
-motor. We will first initialize it and then rotate it clockwise and
-counterclockwise. We will explain some of the other required
-commands, such as sleep.
-
-\subsection{Initialization}
-In all the experiments in this section, we need to initialize the DC
-motor first, using a \scilab\ command of the following type:
-
-\begin{lstlisting}[style=nonumbers]
- cmd_dcmotor_setup(1,H-Bridge type,Motor number,PWM pin 1,PWM pin 2)
-\end{lstlisting}
-As mentioned earlier, number 1 in the above list refers to the
-\arduino\ board. We now discuss how to choose values for the other
-parameters in this command. As mentioned above, there are many
-H-bridge IC manufacturers. The inbuilt function {\tt
- cmd\_dcmotor\_setup} can work with most of the widely used ICs,
-through a suitable input parameter. Users have to provide the type
-number of the breakout board they have. Popular numbering convention
-for different types of DC motor breakout boards is given in
-\tabref{table:convention}. For example, L293D is type 3. Next, we
-have to provide the motor number we want to control. In our case, it
-is number 1. Finally we want to provide PWM pin numbers on \arduino.
-As mentioned earlier, we are using pins 10 and 11. In
-\tabref{tab:dcmotor-init}, we list the choices that we have made.
-Inserting these parameter values in the above shown \scilab\ command,
-we get the following command \\
-\lstinputlisting[firstline=2,lastline=2]
-{\LocDCMscicode/dcmotor-clock.sce}
-which is line number 2 in \sciref{sci:dcmotor-clock}. We have already
-seen
-the first two lines of this code and hence will not explain here. We
-will add more lines to this code as we go along.
-
-\begin{table}
-\centering
-\caption{A numbering convention used in the DC motor breakout board}
-\label{table:convention}
-\begin{tabular}{|c|c|}\hline
-DC Motor Type & Number \\ \hline
-MotorShield Rev3 & 1 \\
-PMODHB5/L298 & 2 \\
-L293D & 3 \\ \hline
-\end{tabular}
-\end{table}
-\begin{table}
-\centering
-\caption{Parameters for DC motor initialization}
-\label{tab:dcmotor-init}
-\begin{tabular}{|l|c|} \hline
-Parameter & Value \\ \hline
-H-Bridge type & 3 \\
-Motor number & 1 \\
-PWM 1 pin & 9 \\
-PWM 2 pin & 10 \\ \hline
-\end{tabular}
-\end{table}
-
-\subsection{Rotation for a specified time}
-\label{sec:dc-both}
-We will now explain how to run the DC motor. We have to provide motor
-number and the PWM value. The \scilab\ command is of the form,
-\begin{lstlisting}[style=nonumbers]
- cmd_dcmotor_run(1,Motor number,(sign)(PWM value))
-\end{lstlisting}
-Motor number is 1, as mentioned earlier. Considering that the input
-to a PWM pin comes from two 8 digital pins, we can provide values
-between $-255$ and +255. Positive values correspond to clockwise
-rotation while negative values correspond to anti-clockwise rotation.
-Based on the PWM value and polarity, corresponding analog voltage is
-generated. We put a PWM value of 100 to make the DC motor to
-run at an intermediate speed. Assigning these values, we get the
-following command:
-\lstinputlisting[firstline=3,lastline=3]{\LocDCMscicode/dcmotor-clock.sce}
-This is line number 3 in \sciref{sci:dcmotor-clock}. This command
-does not say for how long the motor should run. This is taken care of
-by the {\tt sleep} statement. The units of sleep are milliseconds.
-For example, line number 4 of \sciref{sci:dcmotor-clock}, given next,
-says that \scilab\ should go to sleep for three seconds.
-\lstinputlisting[firstline=4,lastline=4]{\LocDCMscicode/dcmotor-clock.sce}
-
-Line number 5 of \sciref{sci:dcmotor-clock}, shown below, is mandatory
-for every program.
-\lstinputlisting[firstline=5,lastline=5]{\LocDCMscicode/dcmotor-clock.sce}
-It releases the DC motor. The PWM functionality on the \arduino\ pins
-is ceased using this command. This has the motor number as an input
-parameter.
-
-If the sleep command discussed above were not present, the DC motor
-will not even run: soon after putting the value 100, the DC motor
-would be released, leaving no time in between. If on the other hand,
-the DC motor is not released (\ie\ line number 6 being absent), the DC
-motor will go on rotating. Line number 6 of \sciref{sci:dcmotor-clock}
-closes the serial port.
-
-We encourage you to run the above code without either line numbers 4,
-5 or 6 or all combinations. Go ahead and do it - you will not break
-anything. At the most, you may have to unplug the USB cable and
-restart the whole thing from the beginning.
-
-\sciref{sci:dcmotor-clock} can easily be extended to make the DC motor
-run in both directions. The modified code is available in
-\sciref{sci:dcmotor-both}.
+\subsection{Controlling the DC motor}
+In this section, we discuss how to carry out the experiments of the
+previous section from Scilab. We will list the same three experiments,
+in the same order. As mentioned earlier, the shield must be removed from
+the \arduino\ and the \arduino\ needs to be connected to the computer
+with a USB cable, as shown in \figref{arduino}. The reader should go through the instructions given in
+\secref{sec:sci-start} before getting started.
+
+\paragraph{Note:} The readers are advised to affix a small
+(very lightweight) piece of paper at the tip of the shaft of the DC motor.
+That will help them observe the direction of rotation
+of the DC motor while running the experiments. 
-\begin{exercise}
-Carry out the following exercise:
\begin{enumerate}
-\item Try out some of the suggestions given above, \ie\ removing
- certain numbers from the code
-\item See if the DC motor runs if you put 1 instead of 100 as the PWM
- value. Explain why it does not run. Find out the smallest value at
- which it will start running.
+ \item In the first experiment, we will learn how to drive the DC motor
+ from Scilab. The code for this experiment is
+ given in \sciref{sci:dcmotor-clock}. As explained earlier in \secref{sec:light-sci},
+ we begin with serial port initialization.
+ Next, the code has a command of the following form:
+ \begin{lstlisting}[style=nonumbers]
+ cmd_dcmotor_setup(1, H-Bridge type, Motor number, PWM pin 1, PWM pin 2)
+ \end{lstlisting}
+ As mentioned earlier, this chapter makes use of an H-Bridge circuit which
+ allows direction of the current passing through the DC motor to be changed.
+ We are using L293D as an H-Bridge circuit in this book. Thus, we will pass the value 3 for
+ H-Bridge type. The Scilab-Arduino toolbox, as explained in \secref{sec:sci-ard-toolbox},
+ supports three types of H-Bridge circuit. \tabref{table:convention}
+ provides the values to be passed for different H-Bridge circuits.
+ Next argument in the command given above is Motor number. Here, we pass the value 1.
+ Finally, we provide the PWM pins to which the DC motor is connected. As
+ shown in \figref{fig:dcmotorconn}, pins 9 and 10 are connected to the
+ input of the breakout board. As a result, the command {\tt cmd\_dcmotor\_setup} becomes
+ \lstinputlisting[firstline=2,lastline=2]
+ {\LocDCMscicode/dcmotor-clock.sce}
+
+ \begin{table}
+ \centering
+ \caption{Values in the \scilab\ command for different H-Bridge circuits}
+ \label{table:convention}
+ \begin{tabular}{llc}\hline
+ Type of H-Bridge circuit & Value \\ \hline
+ MotorShield Rev3 & 1 \\ \hline
+ PMODHB5/L298 & 2 \\ \hline
+ L293D & 3 \\ \hline
+ \end{tabular}
+ \end{table}
+
+ The next line of \sciref{sci:dcmotor-clock} is of the following form:
+ \begin{lstlisting}[style=nonumbers]
+ cmd_dcmotor_run(1, Motor number, [sign] PWM value)
+ \end{lstlisting}
+ Here, we will pass the value 1 in Motor number. As mentioned earlier,
+ for each of the PWM pins on \arduino\ board, the input can come from 8 bits.
+ Thus, these pins can supply values between $- 255$ and $+ 255$. Positive values correspond to clockwise
+ rotation while negative values correspond to anti-clockwise rotation. Based on the PWM value and polarity,
+ corresponding analog voltage is generated.
+ We put a PWM value of 100 to make the DC motor run at an intermediate speed.
+ As a result, the command {\tt cmd\_dcmotor\_run} becomes
+ \lstinputlisting[firstline=3,lastline=3]
+ {\LocDCMscicode/dcmotor-clock.sce}
+
+ The above-mentioned command does not say for how long the motor should run. This is taken care of
+ by the {\tt sleep} command, as given below:
+ \lstinputlisting[firstline=4,lastline=4]{\LocDCMscicode/dcmotor-clock.sce}
+ With this, the DC motor will run for 3000 milliseconds or 3 seconds. At last,
+ we release the DC motor, as shown below:
+ \lstinputlisting[firstline=5,lastline=5]{\LocDCMscicode/dcmotor-clock.sce}
+ With the execution of this command, the PWM functionality on the \arduino\ pins
+ is ceased. This has the motor number as an input
+ parameter. At last, we close the serial port.
+
+
+ \paragraph{Note:} If the sleep command (at line 4 of \sciref{sci:dcmotor-clock})
+ were not present, the DC motor will not even run: soon after putting the value 100,
+ the DC motor would be released, leaving no time in between. On the other hand, if
+ the DC motor is not released (\ie\ line number 5 of \sciref{sci:dcmotor-clock} being commented),
+ the DC motor will go on rotating. That's why, it may be inferred that
+ line number 5 of \sciref{sci:dcmotor-clock} is mandatory
+ for every program. We encourage the readers to run \sciref{sci:dcmotor-clock} by commenting
+ any one or two of the lines numbered 4, 5 or 6. Go ahead and do it - you will not break
+ anything. At the most, you may have to unplug the USB cable connected to \arduino\ and
+ restart the whole thing from the beginning.
+
+ \item It is easy to make the DC motor run in the reverse direction by
+ changing the sign of PWM value being written. This is done in
+ \sciref{sci:dcmotor-both}. In this code, we make the DC motor
+ run in one direction for 3 seconds and then make it rotate in the
+ reverse direction for 2 seconds. The rotation in reverse direction
+ is achieved by putting $- 100$ in the command {\tt cmd\_dcmotor\_run},
+ as shown below:
+ \lstinputlisting[firstline=5,lastline=5]
+ {\LocDCMscicode/dcmotor-both.sce}
+ % This makes the green LED light up as well, recall the discussion in \secref{sec:led-pril}. After
+ After adding a {\tt sleep} of 2 seconds, we release the motor by issuing
+ the command {\tt cmd\_dcmotor\_release}, followed by closing the serial port:
+ \lstinputlisting[firstline=7,lastline=8]
+ {\LocDCMscicode/dcmotor-both.sce}
+ With this, the motor comes to a halt.
+ % This turns the green LED off as well.
+
+ \item Next, we make the DC motor run in forward and reverse
+ directions, in a loop. This is done through
+ \sciref{sci:dcmotor-loop}. We first write PWM $+100$ for 3
+ seconds. After that, halt the motor for 2 seconds by writing zero PWM value.
+ Next, make the motor rotate in the reverse direction by writing PWM $-100$ for two seconds.
+ Next, we make the motor stop for one second. This procedure is put in a {\tt for} loop which runs for 4 iterations.
+ At last, we release the motor by issuing the command {\tt cmd\_dcmotor\_release}, followed by closing the serial port
+
\end{enumerate}
+
+% \subsection{Initialization}
+% In all the experiments in this section, we need to initialize the DC
+% motor first, using a \scilab\ command of the following type:
+
+% \begin{lstlisting}[style=nonumbers]
+% cmd_dcmotor_setup(1,H-Bridge type,Motor number,PWM pin 1,PWM pin 2)
+% \end{lstlisting}
+% As mentioned earlier, number 1 in the above list refers to the
+% \arduino\ board. We now discuss how to choose values for the other
+% parameters in this command. As mentioned above, there are many
+% H-bridge IC manufacturers. The inbuilt function {\tt
+% cmd\_dcmotor\_setup} can work with most of the widely used ICs,
+% through a suitable input parameter. Users have to provide the type
+% number of the breakout board they have. Popular numbering convention
+% for different types of DC motor breakout boards is given in
+% \tabref{table:convention}. For example, L293D is type 3. Next, we
+% have to provide the motor number we want to control. In our case, it
+% is number 1. Finally we want to provide PWM pin numbers on \arduino.
+% As mentioned earlier, we are using pins 10 and 11. In
+% \tabref{tab:dcmotor-init}, we list the choices that we have made.
+% Inserting these parameter values in the above shown \scilab\ command,
+% we get the following command \\
+% \lstinputlisting[firstline=2,lastline=2]
+% {\LocDCMscicode/dcmotor-clock.sce}
+% which is line number 2 in \sciref{sci:dcmotor-clock}. We have already
+% seen
+% the first two lines of this code and hence will not explain here. We
+% will add more lines to this code as we go along.
+
+
+
+
+% % \begin{table}
+% % \centering
+% % \caption{Parameters for DC motor initialization}
+% % \label{tab:dcmotor-init}
+% % \begin{tabular}{|l|c|} \hline
+% % Parameter & Value \\ \hline
+% % H-Bridge type & 3 \\
+% % Motor number & 1 \\
+% % PWM 1 pin & 9 \\
+% % PWM 2 pin & 10 \\ \hline
+% % \end{tabular}
+% % \end{table}
+
+% \subsection{Rotation for a specified time}
+% \label{sec:dc-both}
+% We will now explain how to run the DC motor. We have to provide motor
+% number and the PWM value. The \scilab\ command is of the form,
+% \begin{lstlisting}[style=nonumbers]
+% cmd_dcmotor_run(1,Motor number,(sign)(PWM value))
+% \end{lstlisting}
+% Motor number is 1, as mentioned earlier. Considering that the input
+% to a PWM pin comes from two 8 digital pins, we can provide values
+% between $-255$ and +255. Positive values correspond to clockwise
+% rotation while negative values correspond to anti-clockwise rotation.
+% Based on the PWM value and polarity, corresponding analog voltage is
+% generated. We put a PWM value of 100 to make the DC motor to
+% run at an intermediate speed. Assigning these values, we get the
+% following command:
+% \lstinputlisting[firstline=3,lastline=3]{\LocDCMscicode/dcmotor-clock.sce}
+% This is line number 3 in \sciref{sci:dcmotor-clock}. This command
+% does not say for how long the motor should run. This is taken care of
+% by the {\tt sleep} statement. The units of sleep are milliseconds.
+% For example, line number 4 of \sciref{sci:dcmotor-clock}, given next,
+% says that \scilab\ should go to sleep for three seconds.
+% \lstinputlisting[firstline=4,lastline=4]{\LocDCMscicode/dcmotor-clock.sce}
+
+% Line number 5 of \sciref{sci:dcmotor-clock}, shown below, is mandatory
+% for every program.
+% \lstinputlisting[firstline=5,lastline=5]{\LocDCMscicode/dcmotor-clock.sce}
+% It releases the DC motor. The PWM functionality on the \arduino\ pins
+% is ceased using this command. This has the motor number as an input
+% parameter.
+
+% If the sleep command discussed above were not present, the DC motor
+% will not even run: soon after putting the value 100, the DC motor
+% would be released, leaving no time in between. If on the other hand,
+% the DC motor is not released (\ie\ line number 6 being absent), the DC
+% motor will go on rotating. Line number 6 of \sciref{sci:dcmotor-clock}
+% closes the serial port.
+
+% We encourage you to run the above code without either line numbers 4,
+% 5 or 6 or all combinations. Go ahead and do it - you will not break
+% anything. At the most, you may have to unplug the USB cable and
+% restart the whole thing from the beginning.
+
+% \sciref{sci:dcmotor-clock} can easily be extended to make the DC motor
+% run in both directions. The modified code is available in
+% \sciref{sci:dcmotor-both}.
+
+\begin{exercise}
+ Carry out the following exercise:
+ \begin{enumerate}
+ \item Try out some of the suggestions given above, \ie\ removing
+ certain numbers from the code.
+ \item See if the DC motor runs if you put 1 instead of 100 as the PWM
+ value. Explain why it does not run. Find out the smallest value at
+ which it will start running.
+ \end{enumerate}
\end{exercise}
-\subsection{Using the capabilities of \scilab}
-Given that Scilab has a powerful programming syntax, a lot of
-different experiments can be tried out. We illustrate a few in this
-section. We begin with a {\tt for loop}.
-
-In the previous section, we presented \sciref{sci:dcmotor-both}, where
-we made the motor run in both directions, five seconds in the
-clockwise direction and two seconds in reverse. This code can be
-embedded in a loop and the motor be made to repeat a certain number of
-times. This idea is implemented through \sciref{sci:dcmotor-loop}.
-Through the {\tt for loop} in between line numbers 3 and 8, we make
-the DC motor repeat four times the cycle containing one rotation in
-each direction.
+% \subsection{Using the capabilities of \scilab}
+% Given that Scilab has a powerful programming syntax, a lot of
+% different experiments can be tried out. We illustrate a few in this
+% section. We begin with a {\tt for loop}.
+
+% In the previous section, we presented \sciref{sci:dcmotor-both}, where
+% we made the motor run in both directions, five seconds in the
+% clockwise direction and two seconds in reverse. This code can be
+% embedded in a loop and the motor be made to repeat a certain number of
+% times. This idea is implemented through \sciref{sci:dcmotor-loop}.
+% Through the {\tt for loop} in between line numbers 3 and 8, we make
+% the DC motor repeat four times the cycle containing one rotation in
+% each direction.
% \figref{fig:dcmotorfc} explains the entire operation
% through a flowchart.
% \begin{figure}
@@ -343,196 +464,200 @@ each direction.
% \label{fig:dcmotorfc}
% \end{figure}
-It is not difficult to see how some of the other features of the
-\scilab\ programming language can be used along with this DC motor.
-For example, it is possible to read a temperature value and based on
-its value, start or stop the motor. For real world applications, one
-has to provide extra current carrying capabilities through external
-hardware.
+% It is not difficult to see how some of the other features of the
+% \scilab\ programming language can be used along with this DC motor.
+% For example, it is possible to read a temperature value and based on
+% its value, start or stop the motor. For real world applications, one
+% has to provide extra current carrying capabilities through external
+% hardware.
\subsection{Scilab Code}
\label{sec:dcmotor-scilab-code}
\addtocontents{cod}{\protect\addvspace{\codclr}}
\begin{scicode}
-\ccaption{Rotating the DC motor}
-{Rotating the DC motor. Available at
- \LocDCMscibrief{dcmotor-clock.sce}.}
-\label{sci:dcmotor-clock}
-\lstinputlisting{\LocDCMscicode/dcmotor-clock.sce}
+ \ccaption{Rotating the DC motor}
+ {Rotating the DC motor. Available at
+ \LocDCMscibrief{dcmotor-clock.sce}.}
+ \label{sci:dcmotor-clock}
+ \lstinputlisting{\LocDCMscicode/dcmotor-clock.sce}
\end{scicode}
\begin{scicode}
-\ccaption{Rotating the DC motor in both directions}
-{Rotating DC motor in both directions. Available at
- \LocDCMscibrief{dcmotor-both.sce}.}
-\label{sci:dcmotor-both}
-\lstinputlisting{\LocDCMscicode/dcmotor-both.sce}
+ \ccaption{Rotating the DC motor in both directions}
+ {Rotating DC motor in both directions. Available at
+ \LocDCMscibrief{dcmotor-both.sce}.}
+ \label{sci:dcmotor-both}
+ \lstinputlisting{\LocDCMscicode/dcmotor-both.sce}
\end{scicode}
\begin{scicode}
-\ccaption{Rotating the DC motor in both directions in a loop}{Rotating
- the DC motor in both directions in a loop.
- Available at
- \LocDCMscibrief{dcmotor-loop.sce}.}
-\label{sci:dcmotor-loop}
-\lstinputlisting{\LocDCMscicode/dcmotor-loop.sce}
+ \ccaption{Rotating the DC motor in both directions in a loop}{Rotating
+ the DC motor in both directions in a loop.
+ Available at
+ \LocDCMscibrief{dcmotor-loop.sce}.}
+ \label{sci:dcmotor-loop}
+ \lstinputlisting{\LocDCMscicode/dcmotor-loop.sce}
\end{scicode}
\section{Controlling the DC Motor from Xcos}
-In this section, we will see how to drive the DC motor from Xcos. For
-each experiment, we will give the location of the zcos file and the
+In this section, we will see how to drive the DC motor from Scilab Xcos.
+We will carry out the same three experiments as in the previous
+sections. For each experiment, we will give the location of the zcos file and the
parameters to set. The reader should go through the instructions
-given in \secref{sec:xcos-start} before getting started. If the
-rotation of the DC motor is blocked by any obstacle in any of the
-experiments given below, you may want to hold it in your hand and let
-it run unhindered.
+given in \secref{sec:xcos-start} before getting started.
+
+
+% If the
+% rotation of the DC motor is blocked by any obstacle in any of the
+% experiments given below, you may want to hold it in your hand and let
+% it run unhindered.
\begin{enumerate}
-\item First we will see a simple code that drives the DC motor for a
- specified time. When the file required for this experiment is
- invoked, one gets the GUI as in \figref{fig:dcmotor-clock}. In
- the caption of this figure, one can see where to locate the file.
-
- \begin{figure}
- \centering
- \includegraphics[width=\smfig]{\LocDCMfig/dcmotor-clock.png}
- \caption[Control of DC motor for a specified time from Xcos]
- {Control of DC motor for a specified time from Xcos. This is what
- one sees when \LocDCMscibrief{dcmotor-clock.zcos}, is
- invoked.}
- \label{fig:dcmotor-clock}
- \end{figure}
-
- We will next explain how to set the parameters for this simulation.
- To set value on any block, one needs to right click and open the
- {\tt Block Parameters} or double click. The values for each block
- is tabulated in \tabref{tab:dcmotor-clock}. In case of {\tt
- DCMOTOR\_SB}, enter 3 to indicate for L293D board. After clicking
- on OK, another box will pop up. In that, enter the PWM pin numbers
- as 9 and 10 and click OK.
-All other parameters are to be left
- unchanged.
- \begin{table}
- \centering
- \caption{Xcos parameters to drive the DC motor for a specified time}
- \label{tab:dcmotor-clock}
- \begin{tabular}{llc} \hline
- Name of the block & Parameter name & Value \\ \hline
- ARDUINO\_SETUP & Identifier of Arduino Card & 1 \\
- & Serial com port number & 2\portcmd \\ \hline
- TIME\_SAMPLE & Duration of acquisition(s) & 10 \\
- & Sampling period(s) & 0.1 \\ \hline
- DCMOTOR\_SB & Type of Shield & 3 \\
- & Arduino card number & 1 \\
- & PWM pin numbers & 9 10 \\
- & Motor number & 1 \\ \hline
- STEP\_FUNCTION & Step time & 5 \\
- & Initial Value & 100 \\
- & Final Value & 0 \\ \hline
- \end{tabular}
- \end{table}
-
-% Can you find out for how long the DC motor will run when this program
-% is executed? In which block do we provide this information? The
-% answer is that the DC motor will stop only when we terminate the
-% program. As in the previous experiments, we can terminate the Xcos
-% program by pressing the stop button. The DC motor gets released when
-% the stop button is pressed.
-
-
-
-\item Next, we will describe the Xcos code that drives the DC motor in
- both forward and reverse directions. When the file required for
- this experiment is invoked, one gets the GUI as in
- \figref{fig:dcmotor-both}. In the caption of this figure, one can
- see where to locate the file.
-
- \begin{figure}
- \centering
- \includegraphics[width=\smfig]{\LocDCMfig/dcmotor-both.png}
- \caption[Xcos control of the DC motor in forward and reverse
- directions]{Xcos control of the DC motor in forward and reverse
- directions. This is what one sees when
- \LocDCMscibrief{dcmotor-both.zcos}, is invoked.}
- \label{fig:dcmotor-both}
- \end{figure}
-
- We will next explain how to set the parameters for this simulation.
- To set value on any block, one needs to right click and open the
- {\tt Block Parameters} or double click. The values for each block
- is tabulated in \tabref{tab:dcmotor-both}. All other parameters are
- to be left unchanged.
- \begin{table}
- \centering
- \caption{Xcos parameters to drive the DC motor in forward and
- reverse directions}
- \label{tab:dcmotor-both}
- \begin{tabular}{llc} \hline
- Name of the block & Parameter name & Value \\ \hline
- ARDUINO\_SETUP & Identifier of Arduino Card & 1 \\
- & Serial com port number & 2\portcmd \\ \hline
- TIME\_SAMPLE & Duration of acquisition(s) & 10 \\
- & Sampling period(s) & 0.1 \\ \hline
- DCMOTOR\_SB & Type of Shield & 3 \\
- & Arduino card number & 1 \\
- & PWM pin numbers & 9 10 \\
- & Motor number & 1 \\ \hline
- STEP\_FUNCTION & Step time & 5 \\
- & Initial Value & 100 \\
- & final value & 0 \\ \hline
- CLOCK\_c & Period & 1 \\
- & Initialisation Time & 0.1 \\ \hline
- \end{tabular}
- \end{table}
-
-\item Next, we will describe the Xcos code that drives the DC motor in
- a loop. When the file required for
- this experiment is invoked, one gets the GUI as in
- \figref{fig:dcmotor-loop}. In the caption of this figure, one can
- see where to locate the file.
-
- \begin{figure}
- \centering
- \includegraphics[width=\smfig]{\LocDCMfig/dcmotor-loop.png}
- \caption[Xcos control of the DC motor in forward and reverse
- directions]{Xcos control of the DC motor in forward and reverse
- directions. This is what one sees when
- \LocDCMscibrief{dcmotor-loop.zcos}, is invoked.}
- \label{fig:dcmotor-loop}
- \end{figure}
-
- We will next explain how to set the parameters for this simulation.
- To set value on any block, one needs to right click and open the
- {\tt Block Parameters} or double click. The values for each block
- is tabulated in \tabref{tab:dcmotor-loop}. All other parameters are
- to be left unchanged.
- \begin{table}
- \centering
- \caption{Xcos parameters to drive the DC motor in a loop}
- \label{tab:dcmotor-loop}
- \begin{tabular}{llc} \hline
- Name of the block & Parameter name & Value \\ \hline
- ARDUINO\_SETUP & Identifier of Arduino Card & 1 \\
- & Serial com port number & 2\portcmd \\ \hline
- TIME\_SAMPLE & Duration of acquisition(s) & 10 \\
- & Sampling period(s) & 0.1 \\ \hline
- DCMOTOR\_SB & Type of Shield & 3 \\
- & Arduino card number & 1 \\
- & PWM pin numbers & 9 10 \\
- & Motor number & 1 \\ \hline
- STEP\_FUNCTION 1 & Step time & 3 \\
- & Initial Value & 100 \\
- & Final Value & 0 \\ \hline
- STEP\_FUNCTION 2 & Step time & 5 \\
- & Initial Value & 0 \\
- & Final Value & 100 \\ \hline
- STEP\_FUNCTION 3 & Step time & 7 \\
- & Initial Value & 0 \\
- & Final Value & 100 \\ \hline
- BIGSOM\_f & Inputs ports signs/gain & [1;-1;1] \\ \hline
- \end{tabular}
- \end{table}
+ \item First we will see a simple code that drives the DC motor for a
+ specified time. When the file required for this experiment is
+ invoked, one gets the GUI as in \figref{fig:dcmotor-clock}. In
+ the caption of this figure, one can see where to locate the file.
+
+ \begin{figure}
+ \centering
+ \includegraphics[width=\smfig]{\LocDCMfig/dcmotor-clock.png}
+ \caption[Control of DC motor for a specified time from Xcos]
+ {Control of DC motor for a specified time from Xcos. This is what
+ one sees when \LocDCMscibrief{dcmotor-clock.zcos}, is
+ invoked.}
+ \label{fig:dcmotor-clock}
+ \end{figure}
+
+ We will next explain how to set the parameters for this simulation.
+ To set value on any block, one needs to right click and open the
+ {\tt Block Parameters} or double click. The values for each block
+ is tabulated in \tabref{tab:dcmotor-clock}. In case of {\tt
+ DCMOTOR\_SB}, enter 3 to indicate for L293D board. After clicking
+ on OK, another dialog box will pop up. In that, enter the PWM pin numbers
+ as 9 and 10 and click OK.
+ All other parameters are to be left
+ unchanged.
+ \begin{table}
+ \centering
+ \caption{Xcos parameters to drive the DC motor for a specified time}
+ \label{tab:dcmotor-clock}
+ \begin{tabular}{llc} \hline
+ Name of the block & Parameter name & Value \\ \hline
+ ARDUINO\_SETUP & Identifier of Arduino Card & 1 \\
+ & Serial com port number & 2\portcmd \\ \hline
+ TIME\_SAMPLE & Duration of acquisition(s) & 10 \\
+ & Sampling period(s) & 0.1 \\ \hline
+ DCMOTOR\_SB & Type of Shield & 3 \\
+ & Arduino card number & 1 \\
+ & PWM pin numbers & 9 10 \\
+ & Motor number & 1 \\ \hline
+ STEP\_FUNCTION & Step time & 5 \\
+ & Initial Value & 100 \\
+ & Final Value & 0 \\ \hline
+ \end{tabular}
+ \end{table}
+
+ % Can you find out for how long the DC motor will run when this program
+ % is executed? In which block do we provide this information? The
+ % answer is that the DC motor will stop only when we terminate the
+ % program. As in the previous experiments, we can terminate the Xcos
+ % program by pressing the stop button. The DC motor gets released when
+ % the stop button is pressed.
+
+
+
+ \item Next, we will describe the Xcos code that drives the DC motor in
+ both forward and reverse directions. When the file required for
+ this experiment is invoked, one gets the GUI as in
+ \figref{fig:dcmotor-both}. In the caption of this figure, one can
+ see where to locate the file.
+
+ \begin{figure}
+ \centering
+ \includegraphics[width=\smfig]{\LocDCMfig/dcmotor-both.png}
+ \caption[Xcos control of the DC motor in forward and reverse
+ directions]{Xcos control of the DC motor in forward and reverse
+ directions. This is what one sees when
+ \LocDCMscibrief{dcmotor-both.zcos}, is invoked.}
+ \label{fig:dcmotor-both}
+ \end{figure}
+
+ We will next explain how to set the parameters for this simulation.
+ To set value on any block, one needs to right click and open the
+ {\tt Block Parameters} or double click. The values for each block
+ is tabulated in \tabref{tab:dcmotor-both}. All other parameters are
+ to be left unchanged.
+ \begin{table}
+ \centering
+ \caption{Xcos parameters to drive the DC motor in forward and
+ reverse directions}
+ \label{tab:dcmotor-both}
+ \begin{tabular}{llc} \hline
+ Name of the block & Parameter name & Value \\ \hline
+ ARDUINO\_SETUP & Identifier of Arduino Card & 1 \\
+ & Serial com port number & 2\portcmd \\ \hline
+ TIME\_SAMPLE & Duration of acquisition(s) & 10 \\
+ & Sampling period(s) & 0.1 \\ \hline
+ DCMOTOR\_SB & Type of Shield & 3 \\
+ & Arduino card number & 1 \\
+ & PWM pin numbers & 9 10 \\
+ & Motor number & 1 \\ \hline
+ STEP\_FUNCTION & Step time & 5 \\
+ & Initial Value & 100 \\
+ & final value & 0 \\ \hline
+ CLOCK\_c & Period & 1 \\
+ & Initialisation Time & 0.1 \\ \hline
+ \end{tabular}
+ \end{table}
+
+ \item Next, we will describe the Xcos code that drives the DC motor in
+ a loop. When the file required for
+ this experiment is invoked, one gets the GUI as in
+ \figref{fig:dcmotor-loop}. In the caption of this figure, one can
+ see where to locate the file.
+
+ \begin{figure}
+ \centering
+ \includegraphics[width=\smfig]{\LocDCMfig/dcmotor-loop.png}
+ \caption[Xcos control of the DC motor in forward and reverse
+ directions]{Xcos control of the DC motor in forward and reverse
+ directions. This is what one sees when
+ \LocDCMscibrief{dcmotor-loop.zcos}, is invoked.}
+ \label{fig:dcmotor-loop}
+ \end{figure}
+
+ We will next explain how to set the parameters for this simulation.
+ To set value on any block, one needs to right click and open the
+ {\tt Block Parameters} or double click. The values for each block
+ is tabulated in \tabref{tab:dcmotor-loop}. All other parameters are
+ to be left unchanged.
+ \begin{table}
+ \centering
+ \caption{Xcos parameters to drive the DC motor in a loop}
+ \label{tab:dcmotor-loop}
+ \begin{tabular}{llc} \hline
+ Name of the block & Parameter name & Value \\ \hline
+ ARDUINO\_SETUP & Identifier of Arduino Card & 1 \\
+ & Serial com port number & 2\portcmd \\ \hline
+ TIME\_SAMPLE & Duration of acquisition(s) & 10 \\
+ & Sampling period(s) & 0.1 \\ \hline
+ DCMOTOR\_SB & Type of Shield & 3 \\
+ & Arduino card number & 1 \\
+ & PWM pin numbers & 9 10 \\
+ & Motor number & 1 \\ \hline
+ STEP\_FUNCTION 1 & Step time & 3 \\
+ & Initial Value & 100 \\
+ & Final Value & 0 \\ \hline
+ STEP\_FUNCTION 2 & Step time & 5 \\
+ & Initial Value & 0 \\
+ & Final Value & 100 \\ \hline
+ STEP\_FUNCTION 3 & Step time & 7 \\
+ & Initial Value & 0 \\
+ & Final Value & 100 \\ \hline
+ BIGSOM\_f & Inputs ports signs/gain & [1;-1;1] \\ \hline
+ \end{tabular}
+ \end{table}
\end{enumerate}
@@ -565,194 +690,416 @@ All other parameters are to be left
% the program by pressing the right arrow key.
\begin{exercise}
-Carry out the following exercise:
-\begin{enumerate}
-\item Keep reducing the PWM value and find out the minimum value
- required to run the DC motor. Is this value in agreement with what
- we found in the previous section?
-\item Change the PWM value to $-100$ and check if the DC motor rotates
- in the opposite direction.
-\item Find out the smallest PWM value required to make the motor run
- in the opposite direction. That is, find the least count for both
- directions.
-\item Come up with a method to rotate the motor in two directions for
- different time periods.
-\end{enumerate}
+ Carry out the following exercise:
+ \begin{enumerate}
+ \item Keep reducing the PWM value and find out the minimum value
+ required to run the DC motor. Is this value in agreement with what
+ we found in the previous section?
+ \item Change the PWM value to $-100$ and check if the DC motor rotates
+ in the opposite direction.
+ \item Find out the smallest PWM value required to make the motor run
+ in the opposite direction. That is, find the least count for both
+ directions.
+ \item Come up with a method to rotate the motor in two directions for
+ different time periods.
+ \end{enumerate}
\end{exercise}
\section{Controlling the DC Motor from Python}
\subsection{Controlling the DC Motor}
-In this section, we will explain a few experiments to rotate the DC
-motor. We will first initialize it and then rotate it clockwise and
-counterclockwise. We will explain some of the other required commands,
-such as sleep.
+In this section, we discuss how to carry out the experiments of the
+previous section from Python. We will list the same three experiments,
+in the same order. As mentioned earlier, the shield must be removed from
+the \arduino\ and the \arduino\ needs to be connected to the computer
+with a USB cable, as shown in \figref{arduino}. The reader should go through the instructions given in
+\secref{sec:python-start} before getting started.
+
+\paragraph{Note:} The readers are advised to affix a small
+(very lightweight) piece of paper at the tip of the shaft of the DC motor.
+That will help them observe the direction of rotation
+of the DC motor while running the experiments. 
+
+\begin{enumerate}
+ \item In the first experiment, we will learn how to drive the DC motor
+ from Python. The code for this experiment is
+ given in \pyref{py:dcmotor-clock}. As explained earlier in \secref{sec:light-py}, we begin with
+ importing necessary modules followed by setting up the serial port.
+ Next, the code has a command of the following form:
+ \begin{lstlisting}[style=nonumbers]
+ cmd_dcmotor_setup(1, H-Bridge type, Motor number, PWM pin 1, PWM pin 2)
+ \end{lstlisting}
+ As mentioned earlier, this chapter makes use of an H-Bridge circuit which
+ allows direction of the current passing through the DC motor to be changed.
+ We are using L293D as an H-Bridge circuit in this book. Thus, we will pass the value 3 for
+ H-Bridge type. The Python-Arduino toolbox, as explained in \secref{sec:python-toolbox},
+ supports three types of H-Bridge circuit. \tabref{table:convention}
+ provides the values to be passed for different H-Bridge circuits.
+ Next argument in the command given above is Motor number. Here, we pass the value 1.
+ Finally, we provide the PWM pins to which the DC motor is connected. As
+ shown in \figref{fig:dcmotorconn}, pins 9 and 10 are connected to the
+ input of the breakout board. As a result, the command {\tt cmd\_dcmotor\_setup} becomes
+ \lstinputlisting[firstline=27,lastline=27]
+ {\LocDCMpycode/dcmotor-clock.py}
+
+ The next line of \pyref{py:dcmotor-clock} is of the following form:
+ \begin{lstlisting}[style=nonumbers]
+ cmd_dcmotor_run(1, Motor number, [sign] PWM value)
+ \end{lstlisting}
+ Here, we will pass the value 1 in Motor number. As mentioned earlier,
+ for each of the PWM pins on \arduino\ board, the input can come from 8 bits.
+ Thus, these pins can supply values between $- 255$ and $+ 255$. Positive values correspond to clockwise
+ rotation while negative values correspond to anti-clockwise rotation. Based on the PWM value and polarity,
+ corresponding analog voltage is generated.
+ We put a PWM value of 100 to make the DC motor run at an intermediate speed.
+ As a result, the command {\tt cmd\_dcmotor\_run} becomes
+ \lstinputlisting[firstline=28,lastline=28]
+ {\LocDCMpycode/dcmotor-clock.py}
+
+ The above-mentioned command does not say for how long the motor should run. This is taken care of
+ by the {\tt sleep} command, as given below:
+ \lstinputlisting[firstline=29,lastline=29]{\LocDCMpycode/dcmotor-clock.py}
+ With this, the DC motor will run for or 3 seconds. At last,
+ we release the DC motor, as shown below:
+ \lstinputlisting[firstline=30,lastline=30]{\LocDCMpycode/dcmotor-clock.py}
+ With the execution of this command, the PWM functionality on the \arduino\ pins
+ is ceased. This has the motor number as an input
+ parameter. At last, we close the serial port.
+
+
+ \paragraph{Note:} If the sleep command (at line 29 of \pyref{py:dcmotor-clock})
+ were not present, the DC motor will not even run: soon after putting the value 100,
+ the DC motor would be released, leaving no time in between. On the other hand, if
+ the DC motor is not released (\ie\ line number 30 of \pyref{py:dcmotor-clock} being commented),
+ the DC motor will go on rotating. That's why, it may be inferred that
+ line number 30 of \pyref{py:dcmotor-clock} is mandatory
+ for every program. We encourage the readers to run \pyref{sci:dcmotor-clock} by commenting
+ any one or two of the lines numbered 29 and 30. Go ahead and do it - you will not break
+ anything. At the most, you may have to unplug the USB cable connected to \arduino\ and
+ restart the whole thing from the beginning.
+
+ \item It is easy to make the DC motor run in the reverse direction by
+ changing the sign of PWM value being written. This is done in
+ \pyref{py:dcmotor-both}. In this code, we make the DC motor
+ run in one direction for 3 seconds and then make it rotate in the
+ reverse direction for 2 seconds. The rotation in reverse direction
+ is achieved by putting $- 100$ in the command {\tt cmd\_dcmotor\_run},
+ as shown below:
+ \lstinputlisting[firstline=28,lastline=28]
+ {\LocDCMpycode/dcmotor-both.py}
+ % This makes the green LED light up as well, recall the discussion in \secref{sec:led-pril}. After
+ After adding a {\tt sleep} of 2 seconds, we release the motor by issuing
+ the command {\tt cmd\_dcmotor\_release}, followed by closing the serial port:
+ \lstinputlisting[firstline=30,lastline=30]
+ {\LocDCMpycode/dcmotor-both.py}
+ With this, the motor comes to a halt.
+ % This turns the green LED off as well.
+
+ \item Next, we make the DC motor run in forward and reverse
+ directions, in a loop. This is done through
+ \pyref{py:dcmotor-loop}. We first write PWM $+100$ for 3
+ seconds. After that, halt the motor for 2 seconds by writing zero PWM value.
+ Next, make the motor rotate in the reverse direction by writing PWM $-100$ for two seconds.
+ Next, we make the motor stop for one second. This procedure is put in a {\tt for} loop which runs for 4 iterations.
+ At last, we release the motor by issuing the command {\tt cmd\_dcmotor\_release}, followed by closing the serial port
+
+\end{enumerate}
-Initialization: In all the experiments in this section, we need to
-initialize the DC motor first, using a Python command of the following
-type:
-\begin{lstlisting}[style=nonumbers]
- cmd_dcmotor_setup(1,H-Bridge type,Motor number,PWM pin 1,PWM pin 2)
-\end{lstlisting}
+% Initialization: In all the experiments in this section, we need to
+% initialize the DC motor first, using a Python command of the following
+% type:
+% \begin{lstlisting}[style=nonumbers]
+% cmd_dcmotor_setup(1,H-Bridge type,Motor number,PWM pin 1,PWM pin 2)
+% \end{lstlisting}
-As mentioned earlier, number 1 in the above list refers to the Arduino Uno board.
-We now discuss how to choose values for the other parameters in this command. As
-mentioned above, Popular numbering convention for different types of DC motor breakout
-boards is given in Table 7.1. For example, L293D is type 3. Next, we have to provide
-the motor number we want to control. In our case, it is number 1. Finally we want
-to provide PWM pin numbers on Arduino Uno. As mentioned earlier, we are using
-pins 10 and 11. In Table 7.2, we list the choices that we have made. Inserting these
-parameter values in the above shown Python command, we get the following command
+% As mentioned earlier, number 1 in the above list refers to the Arduino Uno board.
+% We now discuss how to choose values for the other parameters in this command. As
+% mentioned above, Popular numbering convention for different types of DC motor breakout
+% boards is given in Table 7.1. For example, L293D is type 3. Next, we have to provide
+% the motor number we want to control. In our case, it is number 1. Finally we want
+% to provide PWM pin numbers on Arduino Uno. As mentioned earlier, we are using
+% pins 10 and 11. In Table 7.2, we list the choices that we have made. Inserting these
+% parameter values in the above shown Python command, we get the following command
-self.obj\_arduino.cmd\_dcmotor\_setup(1,3,1,self.pin1,self.pin2)
+% self.obj\_arduino.cmd\_dcmotor\_setup(1,3,1,self.pin1,self.pin2)
-To rotate the motor,we have to provide motor number
-and the PWM value. The Python command is of the form,
+% To rotate the motor,we have to provide motor number
+% and the PWM value. The Python command is of the form,
-cmd\_dcmotor\_run ( 1 , Motor number , ( sign ) (PWM value ) )
+% cmd\_dcmotor\_run ( 1 , Motor number , ( sign ) (PWM value ) )
-The PWM values to be given are as same as explained in Scilab code before.
+% The PWM values to be given are as same as explained in Scilab code before.
-To run the motor for specified amount of time,we will use sleep command
+% To run the motor for specified amount of time,we will use sleep command
-sleep(3) //sleep for 3 seconds
+% sleep(3) //sleep for 3 seconds
-To release the dc motor, we will use the following command
+% To release the dc motor, we will use the following command
-cmd\_dcmotor\_release(1,1) //Motor 1 is release
+% cmd\_dcmotor\_release(1,1) //Motor 1 is release
-To run motor in loop, for loop is used in Python code 7.3.
+% To run motor in loop, for loop is used in Python code 7.3.
\subsection{Python Code}
\label{sec:dcmotor-python-code}
\addtocontents{pyd}{\protect\addvspace{\codclr}}
\begin{pycode}
-\pcaption{Rotating the DC motor}
-{Rotating the DC motor. Available at
- \LocDCMpybrief{dcmotor-clock.py}.}
-\label{py:dcmotor-clock}
-\lstinputlisting{\LocDCMpycode/dcmotor-clock.py}
+ \pcaption{Rotating the DC motor}
+ {Rotating the DC motor. Available at
+ \LocDCMpybrief{dcmotor-clock.py}.}
+ \label{py:dcmotor-clock}
+ \lstinputlisting{\LocDCMpycode/dcmotor-clock.py}
\end{pycode}
\begin{pycode}
-\pcaption{Rotating the DC motor in both directions}
-{Rotating DC motor in both directions. Available at
- \LocDCMpybrief{dcmotor-both.py}.}
-\label{py:dcmotor-both}
-\lstinputlisting{\LocDCMpycode/dcmotor-both.py}
+ \pcaption{Rotating the DC motor in both directions}
+ {Rotating DC motor in both directions. Available at
+ \LocDCMpybrief{dcmotor-both.py}.}
+ \label{py:dcmotor-both}
+ \lstinputlisting{\LocDCMpycode/dcmotor-both.py}
\end{pycode}
\begin{pycode}
-\pcaption{Rotating the DC motor in both directions in a loop}{Rotating
- the DC motor in both directions in a loop.
- Available at
- \LocDCMpybrief{dcmotor-loop.py}.}
-\label{py:dcmotor-loop}
-\lstinputlisting{\LocDCMpycode/dcmotor-loop.py}
+ \pcaption{Rotating the DC motor in both directions in a loop}{Rotating
+ the DC motor in both directions in a loop.
+ Available at
+ \LocDCMpybrief{dcmotor-loop.py}.}
+ \label{py:dcmotor-loop}
+ \lstinputlisting{\LocDCMpycode/dcmotor-loop.py}
\end{pycode}
\section{Controlling the DC Motor from Julia}
\subsection{Controlling the DC Motor}
+In this section, we discuss how to carry out the experiments of the
+previous section from Julia. We will list the same three experiments,
+in the same order. As mentioned earlier, the shield must be removed from
+the \arduino\ and the \arduino\ needs to be connected to the computer
+with a USB cable, as shown in \figref{arduino}. The reader should go through the instructions given in \secref{sec:julia-start} before getting started.
-In this section, we will explain a few experiments to rotate the DC
-motor. We will first initialize it and then rotate it clockwise and
-counterclockwise. We will explain some of the other required commands,
-such as sleep.
+\paragraph{Note:} The readers are advised to affix a small
+(very lightweight) piece of paper at the tip of the shaft of the DC motor.
+That will help them observe the direction of rotation
+of the DC motor while running the experiments.
-Initialization: In all the experiments in this section, we need to
-initialize the DC motor first, using a Julia command of the following
-type:
-\begin{lstlisting}[style=nonumbers]
- DCMotorSetup(1,H-Bridge type,Motor number,PWM pin 1,PWM pin 2)
-\end{lstlisting}
-
-
-We now discuss how to choose values for the other parameters in this
-command. As mentioned above, choose the H-bridge accordingly as
-explained previously. THis is the second parameter given to the
-DCMotorSetup function. Next, we have to provide the motor number we
-want to control. In our case, it is number 1. Finally we want to
-provide PWM pin numbers on Arduino Uno. As mentioned earlier, we are
-using pins 9 and 10. In Table 7.2, we list the choices that we have
-made. Inserting these parameter values in the above shown Julia
-function command, we get the following command
-
-DCMotorSetup(1,3,1,9,10)
-
-To rotate the motor,we have to provide motor number
-and the PWM value. The Julia command is of the form,
-
-DCMotorRun ( 1 , Motor number , ( sign ) (PWM value ) )
-
-The PWM values to be given are as same as explained in Scilab code before.
-
-To run the motor for specified amount of time,we will use the sleep command
-
-sleep(3) //sleep for 3 seconds
-
-To release the dc motor, we will use the following command
-
-DCMotorRelease(ser,1) //Motor 1 is release
+\begin{enumerate}
+ \item In the first experiment, we will learn how to drive the DC motor
+ from Julia. The code for this experiment is
+ given in \juliaref{julia:dcmotor-clock}.
+ As explained earlier in \secref{sec:light-julia}, we begin with
+ importing necessary modules followed by setting up the serial port.
+ Next, the code has a command of the following form:
+ \begin{lstlisting}[style=nonumbers]
+ DCMotorSetup(1, H-Bridge type, Motor number, PWM pin 1, PWM pin 2)
+ \end{lstlisting}
+ As mentioned earlier, this chapter makes use of an H-Bridge circuit which
+ allows direction of the current passing through the DC motor to be changed.
+ We are using L293D as an H-Bridge circuit in this book. Thus, we will pass the value 3 for
+ H-Bridge type. The Julia-Arduino toolbox, as explained in \secref{sec:julia-toolbox},
+ supports three types of H-Bridge circuit. \tabref{table:convention}
+ provides the values to be passed for different H-Bridge circuits.
+ Next argument in the command given above is Motor number. Here, we pass the value 1.
+ Finally, we provide the PWM pins to which the DC motor is connected. As
+ shown in \figref{fig:dcmotorconn}, pins 9 and 10 are connected to the
+ input of the breakout board. As a result, the command {\tt DCMotorSetup} becomes
+ \lstinputlisting[firstline=5,lastline=5]
+ {\LocDCMjuliacode/dcmotor-clock.jl}
+
+ The next line of \juliaref{julia:dcmotor-clock} is of the following form:
+ \begin{lstlisting}[style=nonumbers]
+ DCMotorRun(1, Motor number, [sign] PWM value)
+ \end{lstlisting}
+ Here, we will pass the value 1 in Motor number. As mentioned earlier,
+ for each of the PWM pins on \arduino\ board, the input can come from 8 bits.
+ Thus, these pins can supply values between $- 255$ and $+ 255$. Positive values correspond to clockwise
+ rotation while negative values correspond to anti-clockwise rotation. Based on the PWM value and polarity,
+ corresponding analog voltage is generated.
+ We put a PWM value of 100 to make the DC motor run at an intermediate speed.
+ As a result, the command {\tt DCMotorRun} becomes
+ \lstinputlisting[firstline=6,lastline=6]
+ {\LocDCMjuliacode/dcmotor-clock.jl}
+
+ The above-mentioned command does not say for how long the motor should run. This is taken care of
+ by the {\tt sleep} command, as given below:
+ \lstinputlisting[firstline=7,lastline=7]{\LocDCMjuliacode/dcmotor-clock.jl}
+ With this, the DC motor will run for or 3 seconds. At last,
+ we release the DC motor, as shown below:
+ \lstinputlisting[firstline=8,lastline=8]{\LocDCMjuliacode/dcmotor-clock.jl}
+ With the execution of this command, the PWM functionality on the \arduino\ pins
+ is ceased. This has the motor number as an input
+ parameter. At last, we close the serial port.
+
+ \paragraph{Note:} If the sleep command (at line 7 of \juliaref{julia:dcmotor-clock})
+ were not present, the DC motor will not even run: soon after putting the value 100,
+ the DC motor would be released, leaving no time in between. On the other hand, if
+ the DC motor is not released (\ie\ line number 8 of \juliaref{julia:dcmotor-clock} being commented),
+ the DC motor will go on rotating. That's why, it may be inferred that
+ line number 8 of \juliaref{julia:dcmotor-clock} is mandatory
+ for every program. We encourage the readers to run \juliaref{julia:dcmotor-clock} by commenting
+ any one or two of the lines numbered 7 and 8. Go ahead and do it - you will not break
+ anything. At the most, you may have to unplug the USB cable connected to \arduino\ and
+ restart the whole thing from the beginning.
+
+ \item It is easy to make the DC motor run in the reverse direction by
+ changing the sign of PWM value being written. This is done in
+ \juliaref{julia:dcmotor-both}. In this code, we make the DC motor
+ run in one direction for 3 seconds and then make it rotate in the
+ reverse direction for 2 seconds. The rotation in reverse direction
+ is achieved by putting $- 100$ in the command {\tt DCMotorRun},
+ as shown below:
+ \lstinputlisting[firstline=8,lastline=8]
+ {\LocDCMjuliacode/dcmotor-both.jl}
+ % This makes the green LED light up as well, recall the discussion in \secref{sec:led-pril}. After
+ After adding a {\tt sleep} of 2 seconds, we release the motor by issuing
+ the command {\tt DCMotorRelease}, followed by closing the serial port:
+ \lstinputlisting[firstline=10,lastline=11]
+ {\LocDCMjuliacode/dcmotor-both.jl}
+ With this, the motor comes to a halt.
+ % This turns the green LED off as well.
+
+ \item Next, we make the DC motor run in forward and reverse
+ directions, in a loop. This is done through
+ \juliaref{julia:dcmotor-loop}. We first write PWM $+100$ for 3
+ seconds. After that, halt the motor for 2 seconds by writing zero PWM value.
+ Next, make the motor rotate in the reverse direction by writing PWM $-100$ for two seconds.
+ Next, we make the motor stop for one second. This procedure is put in a {\tt for} loop which runs for 4 iterations.
+ At last, we release the motor by issuing the command {\tt DCMotorRelease}, followed by closing the serial port.
+
+\end{enumerate}
-To run motor in loop, for loop is used in Julia code 7.3.
\subsection{Julia Code}
\label{sec:dcmotor-julia-code}
\addtocontents{juliad}{\protect\addvspace{\codclr}}
\begin{juliacode}
-\jcaption{Rotating the DC motor}
-{Rotating the DC motor. Available at
- \LocDCMjuliabrief{dcmotor-clock.jl}.}
-\label{julia:dcmotor-clock}
-\lstinputlisting{\LocDCMjuliacode/dcmotor-clock.jl}
+ \jcaption{Rotating the DC motor}
+ {Rotating the DC motor. Available at
+ \LocDCMjuliabrief{dcmotor-clock.jl}.}
+ \label{julia:dcmotor-clock}
+ \lstinputlisting{\LocDCMjuliacode/dcmotor-clock.jl}
\end{juliacode}
\begin{juliacode}
-\jcaption{Rotating the DC motor in both directions}
-{Rotating DC motor in both directions. Available at
- \LocDCMjuliabrief{dcmotor-both.jl}.}
-\label{julia:dcmotor-both}
-\lstinputlisting{\LocDCMjuliacode/dcmotor-both.jl}
+ \jcaption{Rotating the DC motor in both directions}
+ {Rotating DC motor in both directions. Available at
+ \LocDCMjuliabrief{dcmotor-both.jl}.}
+ \label{julia:dcmotor-both}
+ \lstinputlisting{\LocDCMjuliacode/dcmotor-both.jl}
\end{juliacode}
\begin{juliacode}
-\jcaption{Rotating the DC motor in both directions in a loop}{Rotating
- the DC motor in both directions in a loop.
- Available at
- \LocDCMjuliabrief{dcmotor-loop.jl}.}
-\label{julia:dcmotor-loop}
-\lstinputlisting{\LocDCMjuliacode/dcmotor-loop.jl}
+ \jcaption{Rotating the DC motor in both directions in a loop}{Rotating
+ the DC motor in both directions in a loop.
+ Available at
+ \LocDCMjuliabrief{dcmotor-loop.jl}.}
+ \label{julia:dcmotor-loop}
+ \lstinputlisting{\LocDCMjuliacode/dcmotor-loop.jl}
\end{juliacode}
\section{Controlling the DC Motor from OpenModelica}
\subsection{Controlling the DC Motor}
-Initialization of DC Motor : In all the experiments in this section,
-we need to initialize the DC motor first, using a OpenModelica command
-of the following type:
-
-\begin{lstlisting}[style=nonumbers]
- cmd_dcmotor_setup(1,H-Bridge type,Motor number,PWM pin 1,PWM pin 2)
-\end{lstlisting}
-cmd\_dcmotor\_setup(1,3,1,9,10)
-
-To rotate the motor,we have to provide motor number
-and the PWM value. The OpenModelica command is of the form,
+In this section, we discuss how to carry out the experiments of the
+previous section from OpenModelica. We will list the same three experiments,
+in the same order. As mentioned earlier, the shield must be removed from
+the \arduino\ and the \arduino\ needs to be connected to the computer
+with a USB cable, as shown in \figref{arduino}. The reader should go through the instructions given in
+\secref{sec:OpenModelica-start} before getting started.
-cmd\_dcmotor\_run ( 1 , Motor number , ( sign ) (PWM value ) )
-The PWM values to be given are as same as explained in Scilab code before.
-To run the motor for specified amount of time,we will use sleep command
+\paragraph{Note:} The readers are advised to affix a small
+(very lightweight) piece of paper at the tip of the shaft of the DC motor.
+That will help them observe the direction of rotation
+of the DC motor while running the experiments.
-delay(2000) //sleep for 2 seconds
-
-To release the dc motor, we will use the following command
+\begin{enumerate}
+ \item In the first experiment, we will learn how to drive the DC motor
+ from OpenModelica. The code for this experiment is
+ given in \OpenModelicaref{OpenModelica:dcmotor-clock}.
+ As explained earlier in \secref{sec:light-OpenModelica},
+ we begin with importing the two packages: Streams and SerialCommunication followed
+ by setting up the serial port. Next, the code has a command of the following form:
+ \begin{lstlisting}[style=nonumbers]
+ cmd_dcmotor_setup(1, H-Bridge type, Motor number, PWM pin 1, PWM pin 2)
+ \end{lstlisting}
+ As mentioned earlier, this chapter makes use of an H-Bridge circuit which
+ allows direction of the current passing through the DC motor to be changed.
+ We are using L293D as an H-Bridge circuit in this book. Thus, we will pass the value 3 for
+ H-Bridge type. The OpenModelica-Arduino toolbox, as explained in
+ \secref{sec:load-om-toolbox},
+ supports three types of H-Bridge circuit. \tabref{table:convention}
+ provides the values to be passed for different H-Bridge circuits.
+ Next argument in the command given above is Motor number. Here, we pass the value 1.
+ Finally, we provide the PWM pins to which the DC motor is connected. As
+ shown in \figref{fig:dcmotorconn}, pins 9 and 10 are connected to the
+ input of the breakout board. As a result, the command {\tt cmd\_dcmotor\_setup} becomes
+ \lstinputlisting[firstline=15,lastline=15]
+ {\LocDCMOpenModelicacode/dcmotor-clock.mo}
+
+ The next line of \OpenModelicaref{OpenModelica:dcmotor-clock} is of the following form:
+ \begin{lstlisting}[style=nonumbers]
+ cmd_dcmotor_run(1, Motor number, [sign] PWM value)
+ \end{lstlisting}
+ Here, we will pass the value 1 in Motor number. As mentioned earlier,
+ for each of the PWM pins on \arduino\ board, the input can come from 8 bits.
+ Thus, these pins can supply values between $- 255$ and $+ 255$. Positive values correspond to clockwise
+ rotation while negative values correspond to anti-clockwise rotation. Based on the PWM value and polarity,
+ corresponding analog voltage is generated.
+ We put a PWM value of 100 to make the DC motor run at an intermediate speed.
+ As a result, the command {\tt cmd\_dcmotor\_run} becomes
+ \lstinputlisting[firstline=16,lastline=16]
+ {\LocDCMOpenModelicacode/dcmotor-clock.mo}
+
+ The above-mentioned command does not say for how long the motor should run. This is taken care of
+ by the {\tt sleep} command, as given below:
+ \lstinputlisting[firstline=17,lastline=17]{\LocDCMOpenModelicacode/dcmotor-clock.mo}
+ With this, the DC motor will run for 3000 milliseconds or 3 seconds. At last,
+ we release the DC motor, as shown below:
+ \lstinputlisting[firstline=18,lastline=18]{\LocDCMOpenModelicacode/dcmotor-clock.mo}
+ With the execution of this command, the PWM functionality on the \arduino\ pins
+ is ceased. This has the motor number as an input
+ parameter. At last, we close the serial port.
+
+ \paragraph{Note:} If the sleep command (at line 17 of \OpenModelicaref{OpenModelica:dcmotor-clock})
+ were not present, the DC motor will not even run: soon after putting the value 100,
+ the DC motor would be released, leaving no time in between. On the other hand, if
+ the DC motor is not released (\ie\ line number 18 of \OpenModelicaref{OpenModelica:dcmotor-clock} being commented),
+ the DC motor will go on rotating. That's why, it may be inferred that
+ line number 18 of \OpenModelicaref{OpenModelica:dcmotor-clock} is mandatory
+ for every program. We encourage the readers to run \OpenModelicaref{OpenModelica:dcmotor-clock} by commenting
+ any one or two of the lines numbered 17 and 18. Go ahead and do it - you will not break
+ anything. At the most, you may have to unplug the USB cable connected to \arduino\ and
+ restart the whole thing from the beginning.
+
+ \item It is easy to make the DC motor run in the reverse direction by
+ changing the sign of PWM value being written. This is done in
+ \OpenModelicaref{OpenModelica:dcmotor-both}. In this code, we make the DC motor
+ run in one direction for 3 seconds and then make it rotate in the
+ reverse direction for 2 seconds. The rotation in reverse direction
+ is achieved by putting $- 100$ in the command {\tt cmd\_dcmotor\_run},
+ as shown below:
+ \lstinputlisting[firstline=17,lastline=17]
+ {\LocDCMOpenModelicacode/dcmotor-both.mo}
+ % This makes the green LED light up as well, recall the discussion in \secref{sec:led-pril}. After
+ After adding a {\tt sleep} of 2 seconds, we release the motor by issuing
+ the command {\tt cmd\_dcmotor\_release}, followed by closing the serial port:
+ \lstinputlisting[firstline=19,lastline=19]
+ {\LocDCMOpenModelicacode/dcmotor-both.mo}
+ With this, the motor comes to a halt.
+ % This turns the green LED off as well.
+
+ \item Next, we make the DC motor run in forward and reverse
+ directions, in a loop. This is done through
+ \OpenModelicaref{OpenModelica:dcmotor-loop}. We first write PWM $+100$ for 3
+ seconds. After that, halt the motor for 2 seconds by writing zero PWM value.
+ Next, make the motor rotate in the reverse direction by writing PWM $-100$ for two seconds.
+ Next, we make the motor stop for one second. This procedure is put in a {\tt for} loop which runs for 4 iterations.
+ At last, we release the motor by issuing the command {\tt cmd\_dcmotor\_release}, followed by closing the serial port.
+
+\end{enumerate}
-cmd\_dcmotor\_release(ser,1) //Motor 1 is release
-To run motor in loop, for loop is used in OpenModelica code 7.3
%%%%%%%OpenModelica description ends
@@ -822,30 +1169,35 @@ To run motor in loop, for loop is used in OpenModelica code 7.3
\subsection{OpenModelica Code}
\label{sec:dcmotor-OpenModelica-code}
+Unlike other code files, the code/ model for running experiments using OpenModelica are
+available inside the OpenModelica-Arduino toolbox, as explained in \secref{sec:load-om-toolbox}.
+Please refer to \figref{om-examples-toolbox} to know how to locate the experiments.
+
\addtocontents{OpenModelicad}{\protect\addvspace{\codclr}}
\begin{OpenModelicacode}
-\mcaption{Rotating the DC motor}
-{Rotating the DC motor. Available at
- \LocDCMOpenModelicabrief{dcmotor-clock.mo}.}
-\label{OpenModelica:dcmotor-clock}
-\lstinputlisting{\LocDCMOpenModelicacode/dcmotor-clock.mo}
+ \mcaption{Rotating the DC motor}
+ {Rotating the DC motor.
+ Available at Arduino -> SerialCommunication -> Examples -> dcmotor
+ -> dcmotor\_clock.}
+ \label{OpenModelica:dcmotor-clock}
+ \lstinputlisting{\LocDCMOpenModelicacode/dcmotor-clock.mo}
\end{OpenModelicacode}
\begin{OpenModelicacode}
-\mcaption{Rotating the DC motor in both directions}
-{Rotating DC motor in both directions. Available at
- \LocDCMOpenModelicabrief{dcmotor-both.mo}.}
-\label{OpenModelica:dcmotor-both}
-\lstinputlisting{\LocDCMOpenModelicacode/dcmotor-both.mo}
+ \mcaption{Rotating the DC motor in both directions}
+ {Rotating DC motor in both directions. Available at Arduino -> SerialCommunication -> Examples -> dcmotor
+ -> dcmotor\_both.}
+ \label{OpenModelica:dcmotor-both}
+ \lstinputlisting{\LocDCMOpenModelicacode/dcmotor-both.mo}
\end{OpenModelicacode}
\begin{OpenModelicacode}
-\mcaption{Rotating the DC motor in both directions in a loop}{Rotating
- the DC motor in both directions in a loop.
- Available at
- \LocDCMOpenModelicabrief{dcmotor-loop.mo}.}
-\label{OpenModelica:dcmotor-loop}
-\lstinputlisting{\LocDCMOpenModelicacode/dcmotor-loop.mo}
+ \mcaption{Rotating the DC motor in both directions in a loop}{Rotating
+ the DC motor in both directions in a loop.
+ Available at Arduino -> SerialCommunication -> Examples -> dcmotor
+ -> dcmotor\_loop.}
+ \label{OpenModelica:dcmotor-loop}
+ \lstinputlisting{\LocDCMOpenModelicacode/dcmotor-loop.mo}
\end{OpenModelicacode}
%%%%%%%%%%OpenModelica code ends
diff --git a/user-code/servo/servo.tex b/user-code/servo/servo.tex
index 97cdbb1..6a8d1a1 100644
--- a/user-code/servo/servo.tex
+++ b/user-code/servo/servo.tex
@@ -52,7 +52,7 @@ and printers.
Typical servomotors have a maximum range of $180^\circ$, although some
have different ranges\footnote{All the angles in a servomotor are
absolute angles, with respect to a fixed reference point, which can
- be taken as $0^\circ$.}
+ be taken as $0^\circ$.}.
Servomotors typically have a position sensor,
using which, rotate to the commanded angle. The minimum angle to
which a servomotor can be rotated is its least count, which varies
diff --git a/user-code/sw-env/sw-env.tex b/user-code/sw-env/sw-env.tex
index 68e74cc..13359c1 100644
--- a/user-code/sw-env/sw-env.tex
+++ b/user-code/sw-env/sw-env.tex
@@ -475,6 +475,7 @@ communicate with \arduino. This process is illustrated in
\end{figure}
\subsection{Scilab-Arduino toolbox}
+\label{sec:sci-ard-toolbox}
Scilab, by default, does not have the capability to connect to
Arduino. All such add-on functionalities are added to \scilab\ using
toolboxes. Just like we have different installation binaries of
@@ -1578,7 +1579,7 @@ Simulation finished successfully". Had there been any error in simulating the mo
we would not have received this message.
-\subsection{OpenModelica Arduino toolbox}\label{sec:load-om-toolbox}
+\subsection{OpenModelica-Arduino toolbox}\label{sec:load-om-toolbox}
OpenModelica, by default, does not have the capability to connect to Arduino.
All such add-on functionalities are added to OpenModelica using toolboxes.
The OpenModelica Arduino toolbox can be found inside {\tt Origin/tools/\\openmodelica/windows} or {\tt Origin/tools/openmodelica/linux} directory,