diff options
author | Norbert Preining <norbert@preining.info> | 2022-08-08 03:05:28 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-08-08 03:05:28 +0000 |
commit | f1e79c3669f68804c471699badc56a4a33a23246 (patch) | |
tree | 5e6feae427931b2043e96c6c0867e02ab647c9da /graphics/pgf/contrib/tikz-relay | |
parent | e56ef8f972de679101fb97ad8e180614d3fd4267 (diff) |
CTAN sync 202208080305
Diffstat (limited to 'graphics/pgf/contrib/tikz-relay')
-rw-r--r-- | graphics/pgf/contrib/tikz-relay/README.txt | 12 | ||||
-rw-r--r-- | graphics/pgf/contrib/tikz-relay/doc/BeamerAnimation.pdf | bin | 259993 -> 265601 bytes | |||
-rw-r--r-- | graphics/pgf/contrib/tikz-relay/doc/BeamerAnimation.tex | 8 | ||||
-rw-r--r-- | graphics/pgf/contrib/tikz-relay/doc/tikz-relay-doc.pdf | bin | 518421 -> 661245 bytes | |||
-rw-r--r-- | graphics/pgf/contrib/tikz-relay/doc/tikz-relay-doc.tex | 327 | ||||
-rw-r--r-- | graphics/pgf/contrib/tikz-relay/tex/tikzlibrarycircuits.ee.IEC.relay.code.tex | 72 |
6 files changed, 285 insertions, 134 deletions
diff --git a/graphics/pgf/contrib/tikz-relay/README.txt b/graphics/pgf/contrib/tikz-relay/README.txt index c7897d621e..68aba573ed 100644 --- a/graphics/pgf/contrib/tikz-relay/README.txt +++ b/graphics/pgf/contrib/tikz-relay/README.txt @@ -1,20 +1,20 @@ -Copyright (C) 2018 by Luis Paulo Laus, <laus@utfpr.edu.br> +Copyright (C) 2018-2022 by Luis Paulo Laus, <laus@utfpr.edu.br> ------------------------------------------------------------ The tikz-relay package may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1 of this license or (at your option) any later version. The latest version of this license is in: http://www.latex-project.org/lppl.txt and version 1 or later is part of all distributions of LaTeX version 1999/12/01 or later. -Version: 1.2 -Version date: 2018-06-13 +Version: 1.3 +Version date: 2022-08-07 ------------------------------------------------------------ -This package contains a collection of symbols for typesetting electrical wiring diagrams for relay control systems. The symbols are meant to be in agreement with international standard IEC-60617 which is worldwide adopted with perhaps the exception of USA. It extends and modify, when needed, the TikZ-libray circuits.ee.IEC. A few non-standard symbols are also included mainly to be used in presentations, particularly with beamer package. +This package contains a collection of symbols for typesetting electrical wiring diagrams for relay control systems. The symbols are meant to be in agreement with international standard IEC-60617 which is worldwide adopted with perhaps the exception of the USA. It extends and modifies when needed, the TikZ-library circuits.ee.IEC. A few non-standard symbols are also included mainly to be used in presentations, particularly with the beamer package. ------------------------------------------------------------ -If you are interest in generating the documentation departing from tikz-relay-doc.tex you are going to need pgfmanual-en-macros available at ctan:/graphics/pgf/base/doc/macros/pgfmanual-en-macros.tex -http://mirrors.ctan.org/tex-archive/graphics/pgf/base/doc/macros/pgfmanual-en-macros.tex +If you are interested in generating the documentation departing from tikz-relay-doc.tex you are going to need pgfmanual-en-macros available at ctan:/graphics/pgf/contrib/tikz-dependency/pgfmanual-en-macros.tex +https://ctan.org/tex-archive/graphics/pgf/contrib/tikz-dependency/pgfmanual-en-macros.tex ------------------------------------------------------------
\ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-relay/doc/BeamerAnimation.pdf b/graphics/pgf/contrib/tikz-relay/doc/BeamerAnimation.pdf Binary files differindex 091c8ef9aa..cd09b0c128 100644 --- a/graphics/pgf/contrib/tikz-relay/doc/BeamerAnimation.pdf +++ b/graphics/pgf/contrib/tikz-relay/doc/BeamerAnimation.pdf diff --git a/graphics/pgf/contrib/tikz-relay/doc/BeamerAnimation.tex b/graphics/pgf/contrib/tikz-relay/doc/BeamerAnimation.tex index ebf5cf47f7..93ade7c711 100644 --- a/graphics/pgf/contrib/tikz-relay/doc/BeamerAnimation.tex +++ b/graphics/pgf/contrib/tikz-relay/doc/BeamerAnimation.tex @@ -1,8 +1,8 @@ %% This is file `BeamerAnimation.tex' -%% Version: 1.0.1 -%% Version date: 2018-02-19 +%% Version: 1.0.2 +%% Version date: 2022-08-07 %% -%% Copyright (C) 2018 by Luis Paulo Laus, laus@utfpr.edu.br +%% Copyright (C) 2018-2022 by Luis Paulo Laus, laus@utfpr.edu.br %% %% This package can be redistributed and/or modified under the terms %% of the LaTeX Project Public License distributed from CTAN @@ -140,7 +140,7 @@ \end{pgfonlayer} \end{tikzpicture}} \par\bigskip -Copyright (C) 2018 by Luis Paulo Laus, laus@utfpr.edu.br +Copyright (C) 2018-2022 by Luis Paulo Laus, laus@utfpr.edu.br \end{center} \end{frame} \end{document}
\ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-relay/doc/tikz-relay-doc.pdf b/graphics/pgf/contrib/tikz-relay/doc/tikz-relay-doc.pdf Binary files differindex 5e5474edaa..3923204837 100644 --- a/graphics/pgf/contrib/tikz-relay/doc/tikz-relay-doc.pdf +++ b/graphics/pgf/contrib/tikz-relay/doc/tikz-relay-doc.pdf diff --git a/graphics/pgf/contrib/tikz-relay/doc/tikz-relay-doc.tex b/graphics/pgf/contrib/tikz-relay/doc/tikz-relay-doc.tex index acf93711c8..0069fa09fc 100644 --- a/graphics/pgf/contrib/tikz-relay/doc/tikz-relay-doc.tex +++ b/graphics/pgf/contrib/tikz-relay/doc/tikz-relay-doc.tex @@ -1,8 +1,8 @@ %% This is file `tikz-relay-doc.tex' -%% Version: 1.2 -%% Version date: 2018-06-13 +%% Version: 1.3 +%% Version date: 2022-08-07 %% -%% Copyright (C) 2018 by Luis Paulo Laus, laus@utfpr.edu.br +%% Copyright (C) 2018-2022 by Luis Paulo Laus, laus@utfpr.edu.br %% %% This package can be redistributed and/or modified under the terms %% of the LaTeX Project Public License distributed from CTAN @@ -41,9 +41,9 @@ pagecolor=blue,%red, urlcolor=blue,%cyan, citecolor=blue, - %frenchlinks=false, % small caps instead of colors + %frenchlinks=false, % small caps instead of colours pdfborder=0 0 0, % PDF link-darstellung, falls colorlinks=false. 0 0 0: nix. 0 0 1: default. - %plainpages=false, % Das ist notwendig, wenn die Seitenzahlen z.T. in Arabischen und z.T. in römischen Ziffern gemacht werden. + %plainpages=false, %pdfsubject=, } @@ -78,7 +78,7 @@ % the index of PGF contains % ---- % This index only contains automatically generated entries. A good index should -% also contain carefully selected keywords. This index is not a good index. +% also contains carefully selected keywords. This index is not good. % --- % use this line to reset that entry: \def\index@prologue{\section*{Index}\addcontentsline{toc}{section}{Index} @@ -86,10 +86,10 @@ \makeatother -% this here allows automatic cross referencing: +% this here allows automatic cross-referencing: \RequirePackage{pgfmanual} -% this here configures automatic cross referencing. +% this here configures automatic cross-referencing. % It works for ANY package that uses pgfkeys and is independent on tikz/pgf. \pgfkeys{ % whenever an unqualified key is found, the following key prefix @@ -161,34 +161,34 @@ \title{Typesetting Electrical Wiring Diagrams for \emph{Relay} Control Systems with \LaTeX{} and \tikzname{}} \author{Luis Paulo Laus\\e-mail: \texttt{laus@utfpr.edu.br}} -\date{Version: 1.2, Version date: 2018-06-13} +\date{Version: 1.3, Version date: 2022-08-07} \maketitle \section{Abstract} -This package contains a collection of symbols for typesetting electrical wiring diagrams for relay control systems. The symbols are meant to be in agreement with international standard IEC~60\,617 which is worldwide adopted with perhaps the exception of USA. It extends and modify, when needed, the \tikzname-libray |circuits.ee.IEC|. A few non-standard symbols are also included mainly to be used in presentations, particularly with |beamer| package. +This package contains a collection of symbols for typesetting electrical wiring diagrams for relay control systems. The symbols are meant to agree with international standard IEC~60\,617 \cite{60617-2,60617-4,60617-7,60617-8} which is worldwide adopted with perhaps the exception of the USA. It extends and modifies when needed, the \tikzname-libray |circuits.ee.IEC|. A few non-standard symbols are also included mainly to be used in presentations, particularly with the |beamer| package. \section{Introduction} -Relay control system has been gradually replaced by PLC (Programable Controllers) software. However, small automation systems are usually implemented using relay control systems and the descriptions of PLC connection to external components are done using the same symbols as in relay control systems. Relay control systems are traditionally introduced in the very begin of industrial automation disciplines. This package provides symbols to represent those systems accordingly to IEC~60\,617. +The relay control system has been gradually replaced by PLC (Programmable Controllers) software. However, small automation systems are usually implemented using relay control systems and the descriptions of PLC connection to external components are done using the same symbols as in relay control systems. Relay control systems are traditionally introduced at the very beginning of industrial automation disciplines. This package provides symbols to represent those systems accordingly to IEC~60\,617 \cite{60617-2,60617-4,60617-7,60617-8}. Very unfortunately, the author has no access to the current version of that standard. The standards consulted during the elaboration of this package are: \begin{itemize} -\item IEC~60\,617-2/1996 Graphical symbols for diagrams -- Part 2: Symbol elements, qualifying symbols and other symbols having general application; -\item IEC~60\,617-4/1996 Graphical symbols for diagrams -- Part 4: Passive components; -\item IEC~60\,617-8/1996 Graphical symbols for diagrams -- Part 8: Measuring instruments, lamps and signalling devices; -\item IEC~60\,617-7/1996 Graphical symbols for diagrams -- Part 7: Switchgear, controlgear and protective devices. +\item IEC~60\,617-2/1996 Graphical symbols for diagrams -- Part 2: Symbol elements, qualifying symbols and other symbols having general application \cite{60617-2}; +\item IEC~60\,617-4/1996 Graphical symbols for diagrams -- Part 4: Passive components \cite{60617-4}; +\item IEC~60\,617-7/1996 Graphical symbols for diagrams -- Part 7: Switchgear, controlgear and protective devices \cite{60617-7}; +\item IEC~60\,617-8/1996 Graphical symbols for diagrams -- Part 8: Measuring instruments, lamps and signalling devices \cite{60617-8}. \end{itemize} -All of the aforementioned standards have been withdrawn and correspond to edition~2 of IEC~60\,617. The up-to-date edition, at the moment this document was written, is IEC~60\,617:2012~DB. The author trust that the symbols in this package have not been modified between versions, but without access to the new edition it is impossible to say for sure. One indication that improves confidence in the up-to-dateness of this package is the fact that the current editions is based in editions~2 and 3 and the blunt fact that symbols, once adopted, tend to remain unchanged over time. There are also other libraries with free access\footnote{See, for instance, \url{https://symbols.radicasoftware.com/stencil/IEC.html} and \url{https://www.tracepartsonline.net/} and search for ``CEI IEC''.} that show symbols with the same form they appear herein. Please, report any inaccuracy and out-to-date symbols. +All of the aforementioned standards have been withdrawn and correspond to edition~2 of IEC~60\,617 \cite{60617-2,60617-4,60617-7,60617-8}. The up-to-date edition in now on-line \cite{60617}. The author trust that the symbols in this package have not been modified between versions, but without access to the new edition, it is impossible to say for sure. One indication that improves confidence in the up-to-dateness of this package is the fact that the current edition is based on editions~2 and 3 and the blunt fact that symbols, once adopted, tend to remain unchanged over time. There are also other libraries with free access\footnote{See, for instance, \url{https://symbols.radicasoftware.com/stencil/IEC.html} and \url{https://www.tracepartsonline.net/} and search for ``CEI IEC''.} that show symbols with the same form they appear herein. Please, report any inaccuracy and out-to-date symbols. -You can also help if you have access to the current standard and can verify and report the accuracy of the information presented herein. Particularly regarding the dimensions employed in the graphs. Some of them were devised using soundings geometrical rules, but many (like circle diameters) were estimated using poor resolution graphics. +You can also help if you have access to the current standard and can verify and report the accuracy of the information presented herein. Particularly regarding the dimensions employed in the graphs. Some of them were devised using sounding geometrical rules, but many (like circle diameters) were estimated using poor resolution graphics. -The international standard IEC~60\,617 is worldwide adopted with perhaps the exception of USA which uses NEMA -- National Electrical Manufacturers Association. If you are interested in NEMA standard you should refer to |tikz-ladder| package. This package is meant to be used for PLC programming, but can also be used for relay control systems. +The international standard IEC~60\,617 is adopted worldwide, except the USA, which uses NEMA ICS~19-2002 -- National Electrical Manufacturers Association \cite{NEMA}. If you are interested in NEMA standards you should refer to the |tikz-ladder| package. This package is meant to be used for PLC programming, but can also be used for relay control systems. \section{Relay Library} \begin{pgflibrary}{circuits.ee.IEC.relay} -This library provides graphics for electrical wiring diagrams for relay control systems according to the international standard IEC~60\,617. The library was written to extend the \tikzname-library |circuit.ee.IEC|. The reader is urged to read the Section~``Circuit Libraries'' of \tikzname\ manual. +This library provides graphics for electrical wiring diagrams for relay control systems according to the international standard IEC~60\,617 \cite{60617-2,60617-4,60617-7,60617-8}. The library was written to extend the \tikzname-library |circuit.ee.IEC|. The reader is urged to read the Section~``Circuit Libraries'' of \tikzname\ manual \cite{Tantau}. This library defines the following key: \begin{key}{/tikz/circuit ee IEC relay} @@ -196,7 +196,7 @@ This key should be passed as an option to a picture or a scope that contains a d \end{key} \begin{key}{/tikz/activated} -Adding this key to a contact symbol will ``activate the contact'' so that a |make contact| will close, a |break contact| will open and a |change-over contact| will change. The ``activated'' symbols are not in accordance with IEC~60\,617 because contact shall be drawn in the deactivated position, but sometimes we need to illustrate how a circuit works and this comes in handy. The main purpose is for \beamer\ presentations, see Section~\ref{sec:beamer} for details and further examples. Compare deactivated (normal) and activated break contact: +Adding this key to a contact symbol will ``activate the contact'' so that a |make contact| will close, a |break contact| will open and a |change over contact| will change. The ``activated'' symbols are not in accordance with IEC~60\,617 because contact shall be drawn in the deactivated position, but it comes in handy we need to illustrate how a circuit works. The main purpose is for \beamer\ presentations, see Section~\ref{sec:beamer} for details and further examples. Compare deactivated (normal) and activated break contact: \begin{codeexample}[width=3cm] \tikz[circuit ee IEC relay] \draw (0,0) to[break contact] (0,1.5) @@ -205,40 +205,40 @@ Adding this key to a contact symbol will ``activate the contact'' so that a |mak \end{key} \begin{key}{/tikz/term=\opt{|[|\meta{options}|]|\meta{angle}|:|}\meta{text}} - This key is meant to place text information about the upper terminal of the component. It has nearly the same effect as the |label| key, only the placement position is change and following style is used additionally and automatically: + This key is meant to place text information about the upper terminal of the component. It has nearly the same effect as the |label| key, only the placement position is changed and the following style is used additionally and automatically: \begin{stylekey}{/tikz/every term (initially {font=\string\scriptsize})} Set this style to configure the styling of term labels. Since this key is \emph{not} used with normal labels, it provides an easy way of changing the way info labels look without changing other labels. \end{stylekey} - The \meta{options} and \meta{angle} are passed directly to the |label| command. For a detailed discussion of the |label| option refer to the \tikzname\ manual. + The \meta{options} and \meta{angle} are passed directly to the |label| command. For a detailed discussion of the |label| option refer to the \tikzname\ manual \cite{Tantau}. The use of this key is exemplified in Section~\ref{sec:labels}. \end{key} \begin{key}{/tikz/term'=\opt{|[|\meta{options}|]|\meta{angle}|:|}\meta{text}} - This key is similar to |term|, but it is meant to place text information about the lower terminal of the component. It has nearly the same effect as the |label| key, only the placement position is change and following style is used additionally and automatically: + This key is similar to |term|, but it is meant to place text information about the lower terminal of the component. It has nearly the same effect as the |label| key, only the placement position is changed and the following style is used additionally and automatically: \begin{stylekey}{/tikz/every term' (initially {font=\string\scriptsize})} Set this style to configure the styling of term' labels. Since this key is \emph{not} used with normal labels, it provides an easy way of changing the way info labels look without changing other labels. \end{stylekey} - The \meta{options} and \meta{angle} are passed directly to the |label| command. For a detailed discussion of the |label| option refer to the \tikzname\ manual. + The \meta{options} and \meta{angle} are passed directly to the |label| command. For a detailed discussion of the |label| option refer to the \tikzname\ manual \cite{Tantau}. The use of this key is exemplified in Section~\ref{sec:labels}. \end{key} \begin{key}{/tikz/term''=\opt{|[|\meta{options}|]|\meta{angle}|:|}\meta{text}} - This key is similar to |term|, but it is meant to place text information about the upper left terminal of the component mainly for |change over contact|. It has nearly the same effect as the |label| key, only the placement position is change and following style is used additionally and automatically: + This key is similar to |term|, but it is meant to place text information about the upper left terminal of the component mainly for |change over contact|. It has nearly the same effect as the |label| key, only the placement position is changed and the following style is used additionally and automatically: \begin{stylekey}{/tikz/every term'' (initially {font=\string\scriptsize})} Set this style to configure the styling of term'' labels. Since this key is \emph{not} used with normal labels, it provides an easy way of changing the way info labels look without changing other labels. \end{stylekey} - The \meta{options} and \meta{angle} are passed directly to the |label| command. For a detailed discussion of the |label| option refer to the \tikzname\ manual. + The \meta{options} and \meta{angle} are passed directly to the |label| command. For a detailed discussion of the |label| option refer to the \tikzname\ manual \cite{Tantau}. The use of this key is exemplified in Section~\ref{sec:labels}. \end{key} @@ -247,7 +247,7 @@ Adding this key to a contact symbol will ``activate the contact'' so that a |mak \section{Convention} -In this library, the |mid| anchor is used to place annotations, which are secondary symbols placed on top of another symbol, on contacts and the |north| or |south| anchor on |relay coil|. The key |info|, as described in Section~``Circuit Libraries'' of \tikzname\ manual, is used to place the component identification. Observe that the |info| has to be provide for the annotation, if any, or for the symbol itself if the annotation is placed at right side of the symbol. The keys |term|, |term'| and |term''| are used to place terminal numbers by the side of component terminals. See Section~\ref{sec:labels} for details and examples. +In this library, the |mid| anchor is used to place annotations, which are secondary symbols placed on top of another symbol, on contacts and the |north| or |south| anchor on |relay coil|. The key |info|, as described in Section~``Circuit Libraries'' of \tikzname\ manual \cite{Tantau}, is used to place the component identification. Observe that the |info| has to be provided for the annotation, if any, or for the symbol itself if the annotation is placed on the right side of the symbol. The keys |term|, |term'| and |term''| are used to place terminal numbers by the side of component terminals. See Section~\ref{sec:labels} for details and examples. \section{Symbols} \begin{minipage}{\linewidth} @@ -270,7 +270,13 @@ The symbols in this library are: |/tikz/make contact| & 07-02-01 & \tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-1.25,-0.25) grid[step=\tikzcircuitssizeunit] +(2.5,1.5); \draw (0,0) to[make contact] (0,1);}\\ |/tikz/break contact| & 07-02-03 & -\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-1.25,-0.25) grid[step=\tikzcircuitssizeunit] +(2.5,1.5); \draw (0,0) to[break contact] (0,1);}\\ +\tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-1.25,-0.25) grid[step=\tikzcircuitssizeunit] +(2.5,1.5); \draw (0,0) to[break contact] (0,1);} +\end{tabular} +\end{center} +\bigskip\end{minipage} +\begin{center} +\begin{tabular}{lcc} +\emph{key} & IEC~60\,617 \emph{number} & \emph{Appearance}\\ |/tikz/change over contact| & 07-02-04 & \tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-1.25,-0.25) grid[step=\tikzcircuitssizeunit] +(2.5,1.5); \draw (0,0) to[change over contact] (0,1);}\\ |/tikz/relay coil| & 07-15-01 & @@ -282,24 +288,20 @@ The symbols in this library are: |/tikz/horn| & 08-10-05 & \tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-0.75,-0.25) grid[step=\tikzcircuitssizeunit] +(2.5,1.5); \draw (0,0) to[horn] (0,1);}\\ |/tikz/var horn IEC relay graphic| & 08-10-05 & -\tikz[circuit ee IEC relay,set horn graphic = var horn IEC relay graphic,baseline=.5cm] {\draw[help lines] (-1.25,-0.25) grid[step=\tikzcircuitssizeunit] +(2.5,1.5); \draw (0,0) to[horn] (0,1);} -\end{tabular} -\end{center} -\bigskip\end{minipage} -\begin{center} -\begin{tabular}{lcc} -\emph{key} & IEC~60\,617 \emph{number} & \emph{Appearance}\\ +\tikz[circuit ee IEC relay,set horn graphic = var horn IEC relay graphic,baseline=.5cm] {\draw[help lines] (-1.25,-0.25) grid[step=\tikzcircuitssizeunit] +(2.5,1.5); \draw (0,0) to[horn] (0,1);}\\ |/tikz/buzzer| & NA & \tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-1.25,-0.25) grid[step=\tikzcircuitssizeunit] +(2.5,1.5); \draw (0,0) to[buzzer] (0,1);}\\ |/tikz/loud speaker| & NA & \tikz[circuit ee IEC relay,baseline=.5cm] {\draw[help lines] (-1.25,-0.75) grid[step=\tikzcircuitssizeunit] +(2.5,2.5); \draw (0,0) to[loud speaker] (0,1);} \end{tabular} \end{center} -Three symbols, |resistor|, |inductor| and |bulb| are already defined in \tikzname-library |circuits.ee.IEC|. They are redefined in this package because their proportion was not in agreement with IEC~60\,617. The symbols |inductor| is listed in Annex~A of IEC~60\,617 implying it is deleted and should appear in old diagrams or documentation explaining is it obsolete. To use this symbol set the option \verb|set inductor graphic = inductor IEC relay graphic| either globally with |tikzset| or locally as option of a picture or a scope. +Above, the IEC~60\,617 \emph{numbers} in the format of \emph{part-section-number} are as they appear in the standards \cite{60617-2,60617-4,60617-7,60617-8}. + +Three symbols, |resistor|, |inductor| and |bulb| are already defined in \tikzname-library |circuits.ee.IEC|. They are redefined in this package because their proportion was not in agreement with IEC~60\,617. The symbol |inductor| is listed in Annex~A of IEC~60\,617 \cite{60617-4} implying it is deleted and should appear in old diagrams or documentation explaining it is now obsolete. To use this symbol set the option \verb|set inductor graphic = inductor IEC relay graphic| either globally with |tikzset| or locally as the option of a picture or a scope. -``Change over contact'' is short for ``change-over break before make contact''. The symbols |make contact|, |break contact| and |change over contact| can be activated (the contact changes the position) and this feature is needed for creating presentations. See Section~\ref{sec:beamer} for details. +``Change over contact'' is described in Section~\ref{sec:changeover}. The symbols |make contact|, |break contact| and |change over contact| can be activated (the contact changes the position) and this feature is needed for creating presentations. See Section~\ref{sec:beamer} for details. -This list may look short, but several other symbols are possible combining these symbols with annotation. In fact, it is annotation that empowers this library. +This list may look short, but several other symbols are possible by combining these symbols with annotation. In fact, it is annotations that empower this library. \subsection{Annotation for relay coils} @@ -307,10 +309,10 @@ This list may look short, but several other symbols are possible combining these The |relay coil| can be used alone or combined with annotations to form: \begin{center} \hspace*{-3ex}\begin{tikzpicture}[circuit ee IEC relay,thick,x=16\tikzcircuitssizeunit,y=\tikzcircuitssizeunit] - \draw[help lines] (-0.5,-38) grid[step=\tikzcircuitssizeunit] +(4,45); + \draw[help lines] (-0.5,-5) grid[step=\tikzcircuitssizeunit] +(4,12); % -(11*n+1-7), 11*n+1 \global\xpos=0 \global\ypos=0 - \foreach \x in {, slow operating, slow releasing, slow operating and slow releasing, high speed, mechanically latched, alternating current, polarized, electronic, remanent, var remanent, thermal, unaffected by alternating current, mechanically resonant, solenoid valve, pulse counter} + \foreach \x in {, slow operating, slow releasing, slow operating and slow releasing} { \ifnum \xpos>3 \global\xpos=0 \global\advance\ypos by 11 \fi \node[below,align=center,text width=20\tikzcircuitssizeunit] at (\the\xpos,-\the\ypos) {\verb|\x|}; @@ -320,7 +322,21 @@ The |relay coil| can be used alone or combined with annotations to form: \end{tikzpicture} \end{center} \bigskip\end{minipage} -Note that symbol |relay coil| is used to produce the graphic for other devices which in fact are not relays at all. +\begin{center} +\hspace*{-3ex}\begin{tikzpicture}[circuit ee IEC relay,thick,x=16\tikzcircuitssizeunit,y=\tikzcircuitssizeunit] + \draw[help lines] (-0.5,-27) grid[step=\tikzcircuitssizeunit] +(4,34); + \global\xpos=0 + \global\ypos=0 + \foreach \x in {high speed, mechanically latched, alternating current, polarized, electronic, remanent, var remanent, thermal, unaffected by alternating current, mechanically resonant, solenoid valve, pulse counter} + { + \ifnum \xpos>3 \global\xpos=0 \global\advance\ypos by 11 \fi + \node[below,align=center,text width=20\tikzcircuitssizeunit] at (\the\xpos,-\the\ypos) {\verb|\x|}; + \draw (\the\xpos,-\the\ypos) to[relay coil={\x}] (\the\xpos,6-\the\ypos); + \global\advance\xpos by 1 + } +\end{tikzpicture} +\end{center} +Note that the symbol |relay coil| is used to produce the graphic for other devices which are not relays at all. \subsection{Annotation for contacts} @@ -328,10 +344,10 @@ Note that symbol |relay coil| is used to produce the graphic for other devices w The contacts can be used alone or combined with annotations to form: \begin{center} \begin{tikzpicture}[circuit ee IEC relay,thick,x=16\tikzcircuitssizeunit,y=\tikzcircuitssizeunit] - \draw[help lines] (-0.5,-82) grid[step=\tikzcircuitssizeunit] +(4,89); + \draw[help lines] (-0.5,-38) grid[step=\tikzcircuitssizeunit] +(4,45); % -(11*n+1-7), 11*n+1 \global\xpos=0 \global\ypos=0 - \foreach \x in {, manually operated, protected manually operated, var push button, push button, pull switch, turn switch, emergency switch, pedal operated, lever operated, crank operated, key operated, removable handle, proximity switch, touch switch, magnetic switch, position switch, roller, level switch, var level switch, thermal switch, delayed activation, delayed deactivation, delayed both, static switch, circuit breaker, counter switch, pressure switch, emergency pull switch, var emergency pull switch, emergency turn switch, var emergency turn switch} + \foreach \x in {, manually operated, protected manually operated, var push button, push button, pull switch, turn switch, emergency switch, pedal operated, lever operated, crank operated, key operated, removable handle, proximity switch, touch switch, magnetic switch} { \ifnum \xpos>3 \global\xpos=0 \global\advance\ypos by 11 \fi \node[below,align=center,text width=14\tikzcircuitssizeunit] at (\the\xpos,-\the\ypos) {\verb|\x|}; @@ -341,9 +357,23 @@ The contacts can be used alone or combined with annotations to form: \end{tikzpicture} \end{center} \bigskip\end{minipage} -Temperature sensitive switch is indicated by either the Greek capital letter $\Theta$ or by the operating temperature conditions written at the right side of the contact and it can be achieved using the |info'| key. It is also usual to indicate pressure sensitive switch with roman letter P or by the operating pressure conditions in the same way. +\begin{center} +\begin{tikzpicture}[circuit ee IEC relay,thick,x=16\tikzcircuitssizeunit,y=\tikzcircuitssizeunit] + \draw[help lines] (-0.5,-49) grid[step=\tikzcircuitssizeunit] +(4,56); + \global\xpos=0 + \global\ypos=0 + \foreach \x in {position switch, roller, level switch, var level switch, thermal switch, delayed activation, delayed deactivation, delayed both, static switch, circuit breaker, counter switch, pressure switch, closing momentarily, closing momentarily',early or late,early or late', emergency pull switch, var emergency pull switch, emergency turn switch, var emergency turn switch} + { + \ifnum \xpos>3 \global\xpos=0 \global\advance\ypos by 11 \fi + \node[below,align=center,text width=14\tikzcircuitssizeunit] at (\the\xpos,-\the\ypos) {\verb|\x|}; + \draw (\the\xpos,-\the\ypos) to[make contact={\x}] (\the\xpos,6-\the\ypos); + \global\advance\xpos by 1 + } +\end{tikzpicture} +\end{center} +Temperature sensitive switch is indicated by either the Greek capital letter $\Theta$ or by the operating temperature conditions written on the right side of the contact and it can be achieved using the |info'| key. It is also usual to indicate pressure-sensitive switches with the roman letter P or by the operating pressure conditions in the same way. -Some symbols can be obtained by combining in this library with symbol from the \tikzname-library |circuit.ee.IEC|, for instance, a static switch, passing current in one direction only (IEC symbol 07-25-03) can be drawn using a |make contact| and a |diode| as: +Some symbols can be obtained by combining symbols in this library with symbols from the \tikzname-library |circuit.ee.IEC|, for instance, a ``static switch, passing current in one direction only'' (IEC symbol 07-25-03) can be drawn using a |make contact| and a |diode| as: \begin{center} \begin{tikzpicture}[circuit ee IEC relay,thick, x=4\tikzcircuitssizeunit, @@ -362,7 +392,7 @@ In this case, the space or grid should be treated very carefully. \subsection{Annotation self-placement} \begin{minipage}{\linewidth} -For contacts, the |mid| anchor is used to place the annotation at correct position. For instance, a |push button| applied to all kinds of contacts produces: +The |mid| anchor is used for contacts to place the annotation at the correct position. For instance, a |push button| applied to all kinds of contacts produces: \begin{center} \begin{tikzpicture}[circuit ee IEC relay,thick,x=10\tikzcircuitssizeunit,y=3\tikzcircuitssizeunit] \draw[help lines] (-0.5,-0.3334) grid[step=\tikzcircuitssizeunit] +(5.7,3); @@ -378,7 +408,7 @@ For contacts, the |mid| anchor is used to place the annotation at correct positi \end{center} \bigskip\end{minipage} -In the case of a |position switch|, |delayed activation|, |delayed deactivation|, |delayed both| and |static switch|, the orientation is also adjusted with the help of |input| anchor: +In the case of a |position switch|, |delayed activation|, |delayed deactivation|, |delayed both| and |static switch|, the orientation is also adjusted with the help of the |input| anchor: \begin{center} \begin{tikzpicture}[circuit ee IEC relay,thick,x=10\tikzcircuitssizeunit,y=3\tikzcircuitssizeunit] \draw[help lines] (-0.5,-0.3334) grid[step=\tikzcircuitssizeunit] +(5.7,3); @@ -409,21 +439,58 @@ In the case of a |position switch|, |delayed activation|, |delayed deactivation| \end{tikzpicture} \end{center} -Annotations can be mirrored using the apostrophe ('), e.g., a position switch, mechanically operated in both directions with two separate circuits would be: +Annotations can be mirrored using the apostrophe ('), e.g., a ``make contact (of a multiple contact assembly) which is \emph{early} to close relative to the other make contacts of the assembly'' (IEC symbol 07-04-01) obtained from annotation \verb|early or late|. When mirrored, this annotation produces a ``make contact (of a multiple contact assembly) which is \emph{late} to close relative to the other make contacts of the assembly'' (IEC symbol 07-04-02): +\begin{codeexample}[width=1.7cm] +\begin{tikzpicture}[circuit ee IEC relay,thick] + \draw + (0,0) to[make contact={early or late}] ++(0,2) + (1,0) to[make contact={early or late'}] ++(0,2); +\end{tikzpicture} +\end{codeexample} + +In the case of a break contact, as in ``break contact (of a multiple contact assembly) which is \emph{late} to open relative to the other break contacts of the assembly'' (IEC symbol 07-04-03) and ``break contact (of a multiple contact assembly) which is \emph{early} to open relative to the other break contacts of the assembly'' (IEC symbol 07-04-04), the use apostrophe (') is reverted: +\begin{codeexample}[width=1.7cm] +\begin{tikzpicture}[circuit ee IEC relay,thick] + \draw + (0,0) to[break contact={early or late'}] ++(0,2) + (1,0) to[break contact={early or late}] ++(0,2); +\end{tikzpicture} +\end{codeexample} + +The ``passing make contact closing momentarily when its operating device is \emph{actuated}'' (IEC symbol 07-03-01) and ``Passing make contact closing momentarily when itsoperating device is \emph{released}'' (IEC symbol 07-03-02) are obtained from annotation \verb|closing momentarily| and its mirrored version, respectively. + +Sometimes it is necessary to use both annotation versions as in ``passing make contact closing momentarily when its operating device is actuated or released'' (IEC symbol 07-03-03) which is constructed as: +\begin{codeexample}[width=0.7cm] +\begin{tikzpicture}[circuit ee IEC relay,thick] + \draw + (0,0) to[make contact={closing momentarily, closing momentarily'}] ++(0,2); +\end{tikzpicture} +\end{codeexample} + +Another example of using both annotation versions is the ``position switch, mechanically operated in both directions with two separate circuits'' (IEC symbol 07-08-03) which would be: \begin{codeexample}[width=2.3cm] \begin{tikzpicture}[circuit ee IEC relay,thick] \draw - (0,0) to[break contact={name=sw1,position switch,position switch'}] ++(0,2) - (2,0) to[make contact={name=sw2,position switch,position switch'}] ++(0,2); + (0,0) to[break contact={name=sw1, position switch, position switch'}] ++(0,2) + (2,0) to[make contact={name=sw2, position switch, position switch'}] ++(0,2); \draw[dashed] (sw1.south) -- (sw2.north); \end{tikzpicture} \end{codeexample} -\subsection{Change over contact} -Change over contact, or more exactly, ``change-over break before make contact'' is the only contact in this library that has three terminals. The bottom and top right terminal are connected in the usual way, namely, using the command |to|. To allow the user access to the top left terminal, an anchor named\footnote{The same name convention adopted in \tikzname-library |circuits.ee.IEC| is used here: the symbol default orientations make the component appear as rotated $90^{\circ}$ clockwise. The terminals on the left (bottom in the normal orientation) are named inputs and anchors with names starting with |input| are automatically placed. The terminals on the right (top in the normal orientation) are the outputs and anchors with names starting with |output| are automatically placed.} |output 1| is automatically placed. To use this anchor, the contact has to be named. The reference is available in the same and subsequent paths. Therefore, +\subsection{Change over contact\label{sec:changeover}} +The ``change-over break before make contact'' (IEC symbol 07-02-04) and ``change-over make before break contact'' (IEC symbol 07-02-06) are both obtained from \verb|change over contact| although the latter would require both annotations \verb|early or late, early or late'| as in: +\begin{codeexample}[width=0.8cm] +\begin{tikzpicture}[circuit ee IEC relay,thick] + \draw + (0,0) to[change over contact={name=sw1,early or late,early or late'}] ++(0,2) coordinate(n1) + (sw1.output 1) -- (sw1.output 1 |- n1); +\end{tikzpicture} +\end{codeexample} -\begin{codeexample}[width=3cm] +The \verb|change over contact| is the only contact in this library that has three terminals. The bottom and top right terminal are connected in the usual way, namely, using the command |to|. To allow the user access to the top left terminal, an anchor named\footnote{The same name convention adopted in \tikzname-library |circuits.ee.IEC| is used here: the symbol default orientations make the component appear as rotated $90^{\circ}$ clockwise. The terminals on the left (bottom in the normal orientation) are named inputs and anchors with names starting with |input| are automatically placed. The terminals on the right (top in the normal orientation) are the outputs and anchors with names starting with |output| are automatically placed.} |output 1| is automatically placed. To use this anchor, the contact has to be named. The reference is available in the same and subsequent paths. Therefore, + +\begin{codeexample}[width=2.9cm] \begin{tikzpicture}[circuit ee IEC relay,thick] \draw (0,0) to[change over contact={name=sw1}] ++(0,2) coordinate(n1) (sw1.output 1) -- (sw1.output 1 |- n1); @@ -432,20 +499,21 @@ Change over contact, or more exactly, ``change-over break before make contact'' \end{tikzpicture} \end{codeexample} -\noindent{}where \verb|(n1)| is used to store the coordinates of the second point making it possible to draw a vertical line with the same vertical level\footnote{In this case, the second point coordinates are known to be \verb|(0,2)|, but in general it is a good idea to use the command |coordinate| to store the information for future use. This allows for the contact to be moved easily when needed.}. The second part of the |\draw| command just draws a line from |(sw1.output 1)| to \verb!(sw1.output 1 |- n1)!, a point with $x$ coordinate equal to |(sw1.output 1)|${}_{x}$ and $y$ coordinate equal to |(n1)|${}_{y}$. Refer to Section~``Coordinates at Intersections'' of \tikzname\ manual for details. This example also uses relative points; refer to Section~``Special Syntax for Specifying Points'' of \tikzname\ manual for details. The use of relative coordinates and anchor allows the easy repositioning of the elements. Keep in mind that: -\begin{codeexample}[width=3cm] +\noindent{}where \verb|(n1)| is used to store the coordinates of the second point making it possible to draw a vertical line with the same vertical level\footnote{In this case, the second point coordinates are known to be \verb|(0,2)|, but in general it is a good idea to use the command |coordinate| to store the information for future use. This allows for the contact to be moved easily when needed.}. The second part of the |\draw| command just draws a line from |(sw1.output 1)| to \verb!(sw1.output 1 |- n1)!, a point with $x$ coordinate equal to |(sw1.output 1)|${}_{x}$ and $y$ coordinate equal to |(n1)|${}_{y}$. Refer to Section~``Coordinates at Intersections'' of \tikzname\ manual \cite{Tantau} for details. This example also uses relative points; refer to Section~``Special Syntax for Specifying Points'' of \tikzname\ manual \cite{Tantau} for details. The use of relative coordinates and anchor allows for the easy repositioning of the elements. Keep in mind that: +\begin{codeexample}[width=3.4cm] \begin{tikzpicture}[thick] - \coordinate (n1) at (0,0); \coordinate(n2) at (1.3,1); - \draw node[red]{$\times$} + \coordinate (n1) at (0,0); + \coordinate (n2) at (1.3,1); + \draw node[red,label={below left:n1}]{$\times$} (n1) -- (n1 |- n2) node[draw=violet]{} node[above left] {\verb!|-!} -- (n2) (n1) -- (n1 -| n2) node[draw=orange]{} node[below right]{\verb!-|!} -- (n2) - node[blue]{$\times$}; + node[blue,label={above right:n2}]{$\times$}; \end{tikzpicture} \end{codeexample} \section{Labels\label{sec:labels}} -You can place information at the left side of a symbol using |info| and at the right side with |info'|. Note that, if the symbol has an annotation at is left side and you want to use |info|, you have to use |info| in the annotation. The same is valid for |info'| if the annotation is at the right side of the symbol. +You can place information on the left side of a symbol using |info| and on the right side with |info'|. Note that, if the symbol has an annotation on its left side and you want to use |info|, you have to use |info| in the annotation. The same is valid for |info'| if the annotation is on the right side of the symbol. For instance, a relay coil named K1 is labelled as: \begin{codeexample}[width=2.5cm] \tikz[circuit ee IEC relay,thick] @@ -456,20 +524,20 @@ For instance, a relay coil named K1 is labelled as: \tikz[circuit ee IEC relay,thick] \draw (0,0) to[relay coil={slow operating={info=K2}}] (0,1); \end{codeexample} -\noindent{}failing to do so produces incorrect labelling position as: +\noindent{}failing to do so produces an incorrect labelling position as: \begin{codeexample}[width=2.5cm] \tikz[circuit ee IEC relay,thick,red] \draw (0,0) to[relay coil={slow operating,info=K2}] (0,1); \end{codeexample} \noindent{}In the last case, the |info| is applied to |relay coil|, not to the annotation |slow operating|. -On the other hand, if the annotation is placed at right of the symbol, like a solenoid valve, the |info| is placed in the symbol itself (not in the annotation): +On the other hand, if the annotation is placed at the right of the symbol, like a solenoid valve, the |info| is placed in the symbol itself (not in the annotation): \begin{codeexample}[width=3cm] \tikz[circuit ee IEC relay,thick] \draw (0,0) to[relay coil={solenoid valve,info=Y2}] (0,1); \end{codeexample} -The same reasoning applies to the right side using |info'| key: if there is an annotation at the right side, use the |info'| inside the annotation key: +The same reasoning applies to the right side using the |info'| key: if there is an annotation on the right side, use the |info'| inside the annotation key: \begin{codeexample}[width=4.5cm] \tikz[circuit ee IEC relay,thick] \draw (0,0) @@ -482,12 +550,12 @@ The same reasoning applies to the right side using |info'| key: if there is an a to[relay coil={slow operating={info=K2},info'={[blue]START}}] (0,1); \end{codeexample} -It also possible to label the terminals for assembling reference. There are three specially designed keys for it: +It is also possible to label the terminals for assembling reference. There are three specially designed keys for it: \begin{description}[align=right,leftmargin=14mm,labelwidth=12mm,labelsep=2mm] -\item [{term}] places a label at the top right side of the symbol. It is meant to identify the top terminal. Because of \tikzname\ convention, an anchor named |output| is placed on this terminal; -\item [{term'}] places a label at the bottom right side of the symbol. It is meant to identify the bottom terminal. Because of \tikzname\ convention, an anchor named |input| is placed on this terminal; -\item [{term''}] places a label at the top left side of the symbol. It is meant to identify the top left terminal of a change over contact. Because of \tikzname\ convention, an anchor named |output 1| is placed on this terminal. Key term'' places the label such that a line to |output 1| can be drawn vertically or horizontally without crossing the label. +\item [{term}] places a label at the top right side of the symbol. It is meant to identify the top terminal. Because of the \tikzname\ convention, an anchor named |output| is placed on this terminal; +\item [{term'}] places a label at the bottom right side of the symbol. It is meant to identify the bottom terminal. Because of the \tikzname\ convention, an anchor named |input| is placed on this terminal; +\item [{term''}] places a label at the top left side of the symbol. It is meant to identify the top left terminal of a change over contact. Because of the \tikzname\ convention, an anchor named |output 1| is placed on this terminal. The key term'' places the label such that a line to |output 1| can be drawn vertically or horizontally without crossing the label. \end{description} Each one of these three keys can be individually styled using the style, e.g., |every term'/.style|. @@ -507,7 +575,7 @@ A change over contact of the same relay: \section{Design Guidance\label{sec:guidance}} This section brings some recommendations that reflect the way I produce diagrams for relay control systems. It may or may not work for you. Feel free to e-mail me if you have better ideas. -The first thing to consider is that, as the manual says, ``\tikzname\ \emph{ist kein Zeichenprogramm}'' which translates to ``\tikzname\ \emph{is not a drawing program}''. You shall start with a draft of you diagram and then codify it using \tikzname. Generally, a handmade pencil sketch will do. In this draft, you shall use node names for future reference. For instance, the |contact| named |N1| below is used as a connection point for the latching contact of relay $K_1$; contacts |N0L| and |N24L| are used for power rails (left side). +The first thing to consider is that, as the manual says, ``\tikzname\ \emph{ist kein Zeichenprogramm}'' which translates to ``\tikzname\ \emph{is not a drawing program}'' \cite[p.~27]{Tantau}. You shall start with a draft of your diagram and then codify it using \tikzname. Generally, a handmade pencil sketch will do. In this draft, you shall use node names for future reference. For instance, the |contact| named |N1| below is used as a connection point for the latching contact of relay $K_1$; contacts |N0L| and |N24L| are used for power rails (left side). \begin{codeexample}[width=2.5cm] \begin{tikzpicture}[circuit ee IEC relay,thick] @@ -525,10 +593,10 @@ The first thing to consider is that, as the manual says, ``\tikzname\ \emph{ist \end{tikzpicture} \end{codeexample} -The second thing to consider is that |tikz-relay| uses the |\tikzcircuitssizeunit| to keep all figures proportional. Therefore, when you consider any dimension related to symbol size it is good idea to set that dimension in respect to |\tikzcircuitssizeunit|, i.e., using |\tikzcircuitssizeunit| as the unit of length. The default value of |\tikzcircuitssizeunit| is 7\,pt or approximately 2.46\,mm and it can be set by the |circuit symbol unit| key among several other keys. You can think of |\tikzcircuitssizeunit| as the module size $M$ in IEC~60\,617. -Most symbols presented in the IEC~60\,617 are draw using $M=\unit[2.5]{mm}$. This can be achieved placing the command \verb|\tikzset{circuit symbol unit=2.5mm}| in the document preamble which changes |\tikzcircuitssizeunit| to \the\tikzcircuitssizeunit\ document wide (not too different from the default value though). You can establish your own length unit and set $x$ and $y$ to that length unit. In this way you will be working on a grid; if it is too big or too small you will have to change a single declaration. +The second thing to consider is that |tikz-relay| uses the |\tikzcircuitssizeunit| to keep all figures proportional. Therefore, when you consider any dimension related to symbol size it is a good idea to set that dimension with respect to |\tikzcircuitssizeunit|, i.e., using |\tikzcircuitssizeunit| as the unit of length. The default value of |\tikzcircuitssizeunit| is 7\,pt or approximately 2.46\,mm and it can be set by the |circuit symbol unit| key among several other keys. You can think of |\tikzcircuitssizeunit| as the module size $M$ in IEC~60\,617 \cite{60617-7}. +Most symbols presented in the IEC~60\,617 are draw using $M=\unit[2.5]{mm}$. This can be achieved by placing the command \verb|\tikzset{circuit symbol unit=2.5mm}| in the document preamble which changes |\tikzcircuitssizeunit| to \the\tikzcircuitssizeunit\ document wide (not too different from the default value though). You can establish your own length unit and set $x$ and $y$ to that length unit. In this way you will be working on a grid; if it is too big or too small you will have to change a single declaration. -Finishing up the previous example, the |x| grid is set to five |\tikzcircuitssizeunit| to allow horizontal space for labels and |y| grid is set to four |\tikzcircuitssizeunit| because the symbols used in control circuit schematics are two |\tikzcircuitssizeunit| tall, so there will be one |\tikzcircuitssizeunit| above and below the symbol. Starting at |N1|, the latching contact of $K_1$ is placed one horizontal length unit aside $b_1$. +Finishing up the previous example, the |x| grid is set to five |\tikzcircuitssizeunit| to allow horizontal space for labels and the |y| grid is set to four |\tikzcircuitssizeunit| because the symbols used in the control circuit schematics are two |\tikzcircuitssizeunit| tall, so there will be one |\tikzcircuitssizeunit| above and below the symbol. Starting at |N1|, the latching contact of $K_1$ is placed one horizontal length unit aside $b_1$. \begin{codeexample}[width=4.1cm] \begin{tikzpicture}[circuit ee IEC relay,thick, @@ -549,7 +617,7 @@ Finishing up the previous example, the |x| grid is set to five |\tikzcircuitssiz (N0L) ++(-0.8,0) node[left]{$\unit[0]{V}$} -- (N0L -| N24R) -- ++(0.3,0); \end{tikzpicture} \end{codeexample} -\noindent{}Power rails are placed using named nodes. This is not really necessary since the beginning and end of the power rails lines can be determined easily because we are working on a grid. +\noindent{}Power rails are placed using named nodes. This is not really necessary since the beginning and end of the power rail lines can be determined easily because we are working on a grid. Because of the direction chosen when the symbols were first defined in \tikzname, we start from the bottom moving to the top of the diagram. This is not mandatory, although changing the direction requires that all symbols and annotations be negatively scaled (locally rotated by $180^{\circ}$), for instance, the last example would be: @@ -577,15 +645,15 @@ Because of the direction chosen when the symbols were first defined in \tikzname \noindent{}where \verb|every circuit symbol/.style={scale=-1}| and \verb|every circuit annotation/.style={scale=-1}| were used to scale the symbols and annotations, respectively. This example produces the very same diagram, but we start at the top and work down to the bottom. \subsection{Some tricks} -Power circuits schematics use a more diverse variety of symbol height than control circuit schematics. Thus, it is better to set the grid to a smaller value. This allows for a higher control over the symbols distance. For each symbol, consider its height and allow some extra space between symbols. +Power circuit schematics use a more diverse variety of symbol heights than control circuit schematics. Thus, it is better to set the grid to a smaller value. This allows for higher control over the symbol's distance. For each symbol, consider its height and allow some extra space between symbols. -Some symbols like relay coils for power circuits schematics are not available, thus we can draw a square by the side of the relay contacts connecting it to the right most contact using a dashed line. The |mid| anchor is perfect for that. Actually, we shall start at the |mid| anchor of the right most contact and draw a dashed line to the left using relative coordinates, at the end of the dashed line we place a square node with no text inside, but with a label above (or left) identifying the relay coil. +Some symbols like relay coils for power circuits schematics are not available, thus we can draw a square by the side of the relay contacts and connect it to the rightmost contact using a dashed line. The |mid| anchor is perfect for that. We shall start at the |mid| anchor of the rightmost contact and draw a dashed line to the left using relative coordinates, at the end of the dashed line we place a square node with no text inside, but with a label above (or left) identifying the relay coil. The inductors look a bit odd: the semicircles end in very sharp corners. It is better to change the |line joint| to |bevel|. You can use different styles for |info| and |info'|, and also for |term|, |term'| and |term''|, but it is usually a bad idea. It is normally best to set a style for one of these keys and copy it to the others. -For example, a star-delta motor starter has power circuit schematic like: +For example, a star-delta motor starter has a power circuit schematic like: % Power Circuit Schematic @@ -648,11 +716,11 @@ For example, a star-delta motor starter has power circuit schematic like: Control circuit schematics can use a much bigger grid space because the symbol heights are the same, i.e. always two units of length. When setting the |x| unit of length, you need to consider the space occupied by labels and annotations. -Sometimes we need to place a symbol upside-down. This is the case of the star-delta motor starter control circuit schematic in which a change-over contact is used to change from $K_2$ to $K_3$. To achieved the correct orientation, a negative |y| scaling is set by |yscale=-1|. This contact is named |t1| for future reference, in this case, to access the |output 1| and connect it to $K_2$. If you think it is against IEC~60\,617 rules to drawn the change-over contact upset-down you will end up with a terrible layout because of the position of the common terminal. +Sometimes we need to place a symbol upside-down. This is the case of the star-delta motor starter control circuit schematic in which a change over contact is used to change from $K_2$ to $K_3$. To achieve the correct orientation, a negative |y| scaling is set by |yscale=-1|. This contact is named |t1| for future reference, in this case, to access the |output 1| and connect it to $K_2$. If you think it is against IEC~60\,617 rules to draw the change over contact upset-down you will end up with a terrible layout because of the position of the common terminal. -The relay coil $K_3$ is also placed using top-down direction and, consequently, it has to be negatively scaled (mirrored). In this case, we need to mirror the symbol in both |x| and |y| direction so the terminal and symbol identification will be correctly located. So, |scale=-1| is used. +The relay coil $K_3$ is also placed using a top-down direction and, consequently, it has to be negatively scaled (mirrored). In this case, we need to mirror the symbol in both |x| and |y| direction so the terminal and symbol identification will be correctly located. So, |scale=-1| is used. -The power rails are drawn using grid coordinates. A fuse is place in the top power rail. +The power rails are drawn using grid coordinates. A fuse is placed on the top power rail. % Control Circuit Schematic @@ -694,7 +762,7 @@ The power rails are drawn using grid coordinates. A fuse is place in the top pow \subsection{Beamer presentation with overlay\label{sec:beamer}} -Perhaps the most important feature of \beamer\ is its capacity of creating a series of slides based in one slide for, e.g., showing one concept step by step. It is called \emph{overlay}. Unfortunately, \beamer\ overlay and \tikzname\ present some compatibility issues when overlay macros are typed in the options list of a \tikzname\ command. This can be solved setting two \tikzname\ keys that takes advantage of the fact that |\pgfkeysalso| doesn't change the path. +Perhaps the most important feature of \beamer\ is its capacity of creating a series of slides based on one slide, e.g., showing one concept step by step. It is called \emph{overlay}. Unfortunately, \beamer\ overlay and \tikzname\ present some compatibility issues when overlay macros are typed in the options list of a \tikzname\ command. This can be solved by setting two \tikzname\ keys that take advantage of the fact that |\pgfkeysalso| doesn't change the path. \begin{codeexample}[code only] \tikzset{ % alt and visible (overlay) @@ -742,7 +810,7 @@ Once these keys are in place, they can be used instead of |\visible| and |\alt| node[right]{12V}; \end{tikzpicture} \end{codeexample} -\noindent{}During the presentation you can say that ``pressing B1 the lamp~L1 turns off, releasing it turns L1 on again''. One cool trick is to move forward and backward between slides~2 and 3. +\noindent{}During the presentation you can say that ``pressing B1 the lamp~L1 turns off, releasing it turns L1 on again''. One cool trick is to move forward and backwards between slides~2 and 3. To draw this example, we start with the schematics and once it is ready the animation part is done by placing keys |visible| and |alt| in suitable locations. The filling of L2 is visible only in slide~1 and 3. B1 appears differently depending on the slide. For slides~1 and 3, B1 is a normal break contact (closed), but in slide~2 it is an ``activated'' break contact which is open. Note that key |bulb| receives or not the key |fill|. Similarly, the key |break contact| receives or not the key |activated| (the key |visible| could be used instead of |alt|). @@ -754,7 +822,7 @@ When developing ``animations'', you may need to know the overlay number. It can \makeatother \end{codeexample} -If you need to generate a handout, the |visible| argument will be drawn as well as the \emph{first} argument of |alt| no matter what is the overlay specification (the thing between |<| and |>| signs). Therefore, the above example would appear like: +If you need to generate a handout, the |visible| argument will be drawn as well as the \emph{first} argument of |alt| no matter what is the overlay specification (the thing between |<| and |>| signs). Therefore, the above example would appear like this: \begin{codeexample}[width=2.5cm] \begin{tikzpicture}[circuit ee IEC relay,thick, y=3\tikzcircuitssizeunit] @@ -784,39 +852,40 @@ The ``correct'' diagram that works both in |beamer| and |handout| modes is: node[right]{12V}; \end{tikzpicture} \end{codeexample} -\noindent{}The handout will show a lighted lamp in series with a disactivated break contact. If you do not want that the lamp appears lighted, use \verb|alt={<2>{}{fill=yellow}}| instead of |visible|. So, the lamp will not the lighted in slide~2 (implying it will in slides~1 and 3) and it will not be lighted in the handout as well. +\noindent{}The handout will show a lighted lamp in series with a deactivated break contact. If you do not want that the lamp appears lighted, use \verb|alt={<2>{}{fill=yellow}}| instead of |visible|. So, the lamp will not the lighted on slide~2 (implying it will be in slides~1 and 3) and it will not be lighted in the handout as well. -A complete, though minimalistic, example is provided in a separated file\footnote{This file should be in the same folder you have found this document, if not try \url{http://repositorios.cpai.unb.br/ctan/graphics/pgf/contrib/tikz-relay/doc/BeamerAnimation.tex}.}: ``BeamerAnimation.tex'', which is listed in Appendix~A for your convenience. In this example, a four-step sequencer is animated. A total of twenty slides are generated based in a single schematic. The frame title includes the macro |\overlaynumber| which generates the slide number and shall be removed once the presentation is ready. So, all slides would look like the same slide, but with animation on it. +A complete, though minimalistic, example is provided in a separated file\footnote{This file should be in the same folder you have found this document, if not try \url{http://repositorios.cpai.unb.br/ctan/graphics/pgf/contrib/tikz-relay/doc/BeamerAnimation.tex}.}: ``BeamerAnimation.tex'', which is listed in Appendix~A for your convenience. In this example, a four-step sequencer is animated. A total of twenty slides are generated based on a single schematic. The frame title includes the macro |\overlaynumber| which generates the slide number and shall be removed once the presentation is ready. So, all slides would look like the same slide, but with animation on it. \subsection{Adjusting the diagram size} -The diagram size can be adjusted setting |x| and |y| units. Mainly, you change those to control the space between symbols, not the diagram size in total\footnote{The total size will change, but it is more like a collateral damage than intentional deed.}. If your diagram is too big, consider to use a landscape page. +The diagram size can be adjusted by setting |x| and |y| units. Mainly, you change those to control the space between symbols, not the diagram size in total\footnote{The total size will change, but it is more like collateral damage than intentional deed.}. If your diagram is too big, consider using a landscape page. -For presentations, adjustments can be done using |resizebox|. Note that you should only use |resizebox| if your diagram is slightly bigger than the presentation area. If it is too much bigger, the use of |resizebox| will render small symbols leading to readability problems. In this case, on option is to divide the diagram in smaller pieces. Also, you should reconsider way you need such a big diagram in a presentation. Usually, small examples are better to clarify your point. +For presentations, adjustments can be done using |resizebox|. Note that you should only use |resizebox| if your diagram is slightly bigger than the presentation area. If it is too much bigger, the use of |resizebox| will render small symbols leading to readability problems. In this case, one option is to divide the diagram into smaller pieces. Also, you should reconsider why you need such a big diagram in a presentation. Usually, small examples are better to clarify your point. -It is not a good idea to change the diagram size setting |\tikzcircuitssizeunit| using |circuit symbol unit|. |\tikzcircuitssizeunit| shall be set document wise in the document preamble and kept unchanged. +It is not a good idea to change the diagram size setting |\tikzcircuitssizeunit| using |circuit symbol unit|. |\tikzcircuitssizeunit| shall be set document-wise in the document preamble and kept unchanged. \section{Shapes} -This is rather technical material, but it is here anyway and you may use it to modify or extend the library. It that case, if you need help, please do not hesitate in contacting the author. +This is rather technical material, but it is here anyway and you may use it to modify or extend the library. In that case, if you need help, please do not hesitate in contacting the author. -Several anchors are defined for each symbol (or, more exactly, shapes). The mechanism \tikzname\ uses to place anchors and define borders is sophisticated. It takes into account the line width (or an optional additional space defined by |outer sep|\footnote{See Section~``Common Options: Separations, Margins, Padding and Border Rotation'' of \tikzname\ manual.}) to place the anchors just on the line border of the symbol. Something called ``anchor border'' is also defined in the same manner. Anchor border is use to place labels around the symbol and interrupt the line directed to the symbol. Remember that a symbol is usually placed by command |to| which interrupts the path line the symbol is placed on. It makes perfect sense for symbols that encloses some area, like |proximity sensor coil| and |relay coil| and even for symbols that, although they do not enclose an area, defines some intuitive border, like |magnetic sensor| and |thermic sensor|. But it makes little sense for contacts. +Several anchors are defined for each symbol (or, more exactly, shapes). The mechanism \tikzname\ uses to place anchors and define borders is sophisticated. It takes into account the line width (or an optional additional space defined by |outer sep|\footnote{See Section~``Common Options: Separations, Margins, Padding and Border Rotation'' of \tikzname\ manual \cite{Tantau}.}) to place the anchors just on the line border of the symbol. Something called ``anchor border'' is also defined in the same manner. An Anchor border is used to place labels around the symbol and interrupt the line directed to the symbol. Remember that a symbol is usually placed by command |to| which interrupts the path line the symbol is placed on. It makes perfect sense for symbols that enclose some area, like |proximity sensor coil| and |relay coil| and even for symbols that, although they do not enclose an area, define some intuitive border, like |magnetic sensor| and |thermic sensor|. But it makes little sense for contacts. -Contacts can be considered an especial case of symbols. They have no defined border, no intuitive notion of inside and outside. The \tikzname-library |circuits| places them in a category called ``wires''. The normal anchors (north, south, south west, etc.) have no practical use. Even so, they need a |center| anchor, used to place the symbol, and a |mid| anchor, used to place annotations. They also need an anchor border in order to interrupt the line during placement (and also for label positioning). The anchor border controls the gap that appears on the line. Thus, it is defined as the symbol size. In other words, the symbol size is an invisible border a bit smaller than the actual symbol because the inclined line which represents the movable contact have an addendum that protrudes beyond the symbol border. +Contacts can be considered a special case of symbols. They have no defined border and no intuitive notion of inside and outside. The \tikzname-library |circuits| places them in a category called ``wires''. The normal anchors (north, south, south west, etc.) have no practical use. Even so, they need a |center| anchor, used to place the symbol, and a |mid| anchor used to place annotations. They also need an anchor border to interrupt the line during placement (and also for label positioning). The anchor border controls the gap that appears on the line. Thus, it is defined as the symbol size. In other words, the symbol size is an invisible border a bit smaller than the actual symbol because the inclined line which represents the movable contact has an addendum that protrudes beyond the symbol border. Outer separation is also undesired when placing contact. If the normal treatment were dispensed for contacts, setting the outer separation to any positive number would disrupt the line connected to the symbol. Instead of setting the outer separation to zero, the shape code that produces contacts simply disregards the outer separation when drawing the component. -All symbols below but the |mechanical interlock| look rotated $90^{ \circ}$ because \tikzname\ uses this orientation to place the symbol in a line. +All symbols below but the |mechanical interlock| look rotated $90^{ \circ}$ because \tikzname\ uses this orientation to place the symbol in a line. \begin{codeexample}[] \begin{tikzpicture}[circuit ee IEC relay] \node[name=s, shape=make contact IEC relay, shape example, inner xsep=1cm, inner ysep=1cm, minimum width=6cm, minimum height=3cm]{}; - \foreach \anchor/\placement in {center/above, 30/above right, 358/below right, + \foreach \anchor/\placement in {center/above, 30/above right, 70/above, 358/below right, north/above, north east/above, north west/above, south/below, south east/below, south west/below, - east/left, west/right, mid/above, input/left,output/right} + east/left, west/right, mid/above, input/left,output/right, + tip/right} \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} node[\placement] {\scriptsize\texttt{(s.\anchor)}}; \end{tikzpicture} \end{codeexample} @@ -825,10 +894,11 @@ All symbols below but the |mechanical interlock| look rotated $90^{ \circ}$ bec \begin{codeexample}[] \begin{tikzpicture}[circuit ee IEC relay] \node[name=s, activated, shape=make contact IEC relay, shape example, inner xsep=1cm, inner ysep=1cm, minimum width=6cm, minimum height=3cm]{}; - \foreach \anchor/\placement in {center/above, 30/above right, 358/below right, + \foreach \anchor/\placement in {center/above left, 30/above right, 70/above, 358/below right, north/above, north east/above, north west/above, south/below, south east/below, south west/below, - east/left, west/right, mid/above, input/left,output/right} + east/left, west/right, mid/above right, input/left,output/right, + tip/above} \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} node[\placement] {\scriptsize\texttt{(s.\anchor)}}; \end{tikzpicture} \end{codeexample} @@ -837,10 +907,11 @@ All symbols below but the |mechanical interlock| look rotated $90^{ \circ}$ bec \begin{codeexample}[] \begin{tikzpicture}[circuit ee IEC relay] \node[name=s, shape=break contact IEC relay, shape example, inner xsep=1cm, inner ysep=1cm, minimum width=6cm, minimum height=3cm]{}; - \foreach \anchor/\placement in {center/above, 30/above right, 358/below right, - north/above, north east/above, north west/above, + \foreach \anchor/\placement in {center/above left, 30/above right, 280/below, 358/below right, + north/above right, north east/above, north west/above, south/below, south east/below, south west/below, - east/left, west/right, mid/above, input/left,output/right} + east/left, west/right, mid/above, input/left,output/right, + tip/right} \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} node[\placement] {\scriptsize\texttt{(s.\anchor)}}; \end{tikzpicture} \end{codeexample} @@ -849,10 +920,11 @@ All symbols below but the |mechanical interlock| look rotated $90^{ \circ}$ bec \begin{codeexample}[] \begin{tikzpicture}[circuit ee IEC relay] \node[name=s, activated, shape=break contact IEC relay, shape example, inner xsep=1cm, inner ysep=1cm, minimum width=6cm, minimum height=3cm]{}; - \foreach \anchor/\placement in {center/above, 30/above right, 358/below right, - north/above, north east/above, north west/above, + \foreach \anchor/\placement in {center/above left, 30/above right, 280/below, 358/below right, + north/above right, north east/above, north west/above, south/below, south east/below, south west/below, - east/left, west/right, mid/above, input/left,output/right} + east/left, west/right, mid/above, input/left,output/right, + tip/right} \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} node[\placement] {\scriptsize\texttt{(s.\anchor)}}; \end{tikzpicture} \end{codeexample} @@ -864,7 +936,8 @@ All symbols below but the |mechanical interlock| look rotated $90^{ \circ}$ bec \foreach \anchor/\placement in {center/above, 30/above right, 358/below right, north/above, north east/above, north west/above, south/below, south east/below, south west/below, - east/left, west/right, mid/above, input/left,output/right, output 1/below right, output 2/above right} + east/left, west/right, mid/above, input/left,output/right, output 1/below right, output 2/above right, + tip/right} \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} node[\placement] {\scriptsize\texttt{(s.\anchor)}}; \end{tikzpicture} \end{codeexample} @@ -873,10 +946,11 @@ All symbols below but the |mechanical interlock| look rotated $90^{ \circ}$ bec \begin{codeexample}[] \begin{tikzpicture}[circuit ee IEC relay] \node[name=s, activated, shape=change over contact IEC relay, shape example, inner xsep=1cm, inner ysep=1cm, minimum width=6cm, minimum height=6cm]{}; - \foreach \anchor/\placement in {center/above, 30/above right, 358/below right, + \foreach \anchor/\placement in {center/above left, 30/above right, 358/below right, north/above, north east/above, north west/above, south/below, south east/below, south west/below, - east/left, west/right, mid/above, input/left,output/right, output 1/below right, output 2/above right} + east/left, west/right, mid/above right, input/left,output/right, output 1/below right, output 2/above right, + tip/above} \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} node[\placement] {\scriptsize\texttt{(s.\anchor)}}; \end{tikzpicture} \end{codeexample} @@ -885,7 +959,7 @@ All symbols below but the |mechanical interlock| look rotated $90^{ \circ}$ bec \begin{codeexample}[] \begin{tikzpicture}[circuit ee IEC relay] \node[name=s, shape=magnetic sensor IEC relay, shape example, inner xsep=1cm, inner ysep=1cm, minimum width=6cm, minimum height=6cm]{}; - \foreach \anchor/\placement in {center/above, 15/above right, 330/below right, + \foreach \anchor/\placement in {center/below, 15/above right, 330/below right, north/above, north east/above, north west/above, south/below, south east/below, south west/below, east/left, west/right, mid/above, input/left,output/right} @@ -896,7 +970,7 @@ All symbols below but the |mechanical interlock| look rotated $90^{ \circ}$ bec \begin{codeexample}[] \begin{tikzpicture}[circuit ee IEC relay] \node[name=s, shape=thermic sensor IEC relay, shape example, inner xsep=1cm, inner ysep=1cm, minimum width=6cm, minimum height=6cm]{}; - \foreach \anchor/\placement in {center/above, 15/above right, 330/below right, + \foreach \anchor/\placement in {center/below, 15/above right, 330/below right, north/above, north east/above, north west/above, south/below, south east/below, south west/below, east/left, west/right, mid/above, input/left,output/right} @@ -929,28 +1003,59 @@ All symbols below but the |mechanical interlock| look rotated $90^{ \circ}$ bec \section{Known Issues} -This library is base in withdrawn standards and the current standardized symbols might be different. It is also rather incomplete; so many symbols are missing, though in my best knowledge the missing symbols are rarely used. Let me know if you need a symbol, I will do my best to implement it. -If you want the report a bug or have any suggestion, please feel free to send me an e-mail. Contact details are in the first page. Every feedback is important. +The use of a single plus sign in relative coordinates specification, like |+(0,1)|, can lead to very strange results. See, for instance, the red symbol below: + +\begin{codeexample}[width=4.2cm] +\begin{tikzpicture}[circuit ee IEC relay,thick, +error/.style={red, +circuit symbol wires/.style={red}, +circuit symbol lines/.style={red}}] +\draw (0,0) +to [make contact={push button={info=$b_1$}}] ++(0,1); +\draw[error] (2.5,0) +to [make contact={push button={info=$b_1$}}] +(0,1); +\end{tikzpicture} +\end{codeexample} + +Though it is not clear exactly why it happens, and consequently no permanent solution is available at the moment, one walkaround is to use the double plus sign instead, |++(0,1)|. Note, however, that it will be necessary to reconsider the coordinates of the following points on the path if there are any. Command |coordinate| might help to keep track of previous points. + +This library is based on withdrawn standards and the current standardized symbols might be different. It is also rather incomplete; so many symbols are missing, though to my best knowledge the missing symbols are rarely used. Let me know if you need a symbol, I will do my best to implement it. + +If you want the report a bug or have any suggestions, please feel free to send me an e-mail. Contact details are on the first page. Every feedback is important. \section{Final Remarks} This package has been tested and used for more than three years, so I do believe it is mature by now and I decided to share it. On the other hand, I was the only person who used it, therefore idiosyncrasies were not detected. -Any comments, suggestions, request for a missing symbols and feedback are welcomed. I will do my best to answer as soon as possible. My contact e-mail is in the first page. +Any comments, suggestions, requests for missing symbols and feedback are welcomed. I will do my best to answer as soon as possible. My contact e-mail is on the first page. + +It should be great if someone with experience in writing \tikzname\ libraries could have a look at the code and point out errors or improvements to be made. + + + +\begin{thebibliography}{1} + +\bibitem{60617-2}\textbf{International Electrotechnical Commission}. \textit{IEC 60\,617-2/1996 Graphical symbols for diagrams -- Part 2: Symbol elements, qualifying symbols and other symbols having general application}. Geneva, 1996. +\bibitem{60617-4}\textbf{International Electrotechnical Commission}. \textit{IEC 60\,617-4/1996 Graphical symbols for diagrams -- Part 4: Passive components}. Geneva, 1996. +\bibitem{60617-7}\textbf{International Electrotechnical Commission}. \textit{IEC 60\,617-7/1996 Graphical symbols for diagrams -- Part 7: Switchgear, controlgear and protective devices}. Geneva, 1996. +\bibitem{60617-8}\textbf{International Electrotechnical Commission}. \textit{IEC 60\,617-8/1996 Graphical symbols for diagrams -- Part 8: Measuring instruments, lamps and signalling devices}. Geneva, 1996. +\bibitem{60617}\textbf{International Electrotechnical Commission}. \textit{IEC 60\,617 - Graphical Symbols for Diagrams}, \url{https://std.iec.ch/iec60617}. Geneva, accessed on 31st July 2022. +\bibitem{NAME}\textbf{National Electrical Manufacturers Association}. \textit{NEMA Standards Publication ICS 19-2002 (R2007, R2011, R2016, R2022) : Diagrams, Device Designations, and Symbols for Industrial Control and Systems}. Rosslyn, 2022. +\bibitem{Tantau}\textbf{Tantau}, Till. \textit{The TikZ and PGF Packages} : Manual for version 3.1.9a-34-ga0d9cada, \url{https://github.com/pgf-tikz/pgf}, 2021. -It should be great if someone with experience in writing \tikzname\ libraries could have a look in the code and point out error or improvements to be made. +\end{thebibliography} \appendix \newgeometry{left=1cm,right=1cm,top=1.5cm,bottom=1.5cm,nohead} \section*{Appendix A -- Beamer Example of a Four Step Sequencer} -In this example, the animations is done in two layers: the schematics is drawn on foreground with contact and filling animation; on the background, circles (actually, ellipses since |x| and |y| scales are different) are drawn in light blue to highlight with contact or coil that has been activated because several of them changes from one slide to the next. In order to place the ellipses in the precise position, every contact and coil is named. +In this example, the animations are done in two layers: the schematics are drawn in the foreground with contact and filling animation; in the background, circles (actually, ellipses since |x| and |y| scales are different) are drawn in light blue to highlight with contact or coil that has been activated because several of them change from one slide to the next. To place the ellipses in the precise position, every contact and coil is named. -At first, only one coil and the contacts respective to one step are drawn, then they are copy three times and the information is changed as needed. Finally, the $b_s$ is added. When the schematics is done, the animation part is made adding the |alt| key in the foreground and the |\visible| macro in the background. +At first, only one coil and the contacts respective to one step are drawn, then they are copied three times and the information is changed as needed. Finally, the $b_s$ is added. When the schematics are done, the animation part is made adding the |alt| key in the foreground and the |\visible| macro in the background. -After the \LaTeX\ code, the slides were included for reference. They shall be found as a separated PDF file in the same folder you have found this document. +After the \LaTeX\ code, the slides were included for reference. They shall be found as a separated PDF file in the same folder you have found in this document. \lstinputlisting[language={[LaTeX]TeX},basicstyle={\small},breakautoindent=true]{BeamerAnimation.tex} \clearpage diff --git a/graphics/pgf/contrib/tikz-relay/tex/tikzlibrarycircuits.ee.IEC.relay.code.tex b/graphics/pgf/contrib/tikz-relay/tex/tikzlibrarycircuits.ee.IEC.relay.code.tex index 4f78fb77ac..48cc227f27 100644 --- a/graphics/pgf/contrib/tikz-relay/tex/tikzlibrarycircuits.ee.IEC.relay.code.tex +++ b/graphics/pgf/contrib/tikz-relay/tex/tikzlibrarycircuits.ee.IEC.relay.code.tex @@ -1,8 +1,8 @@ %% This is file `tikzlibrarycircuits.ee.IEC.relay.code.tex' -%% Version: 1.2 -%% Version date: 2018-06-13 +%% Version: 1.3 +%% Version date: 2022-08-07 %% -%% Copyright (C) 2018 by Luis Paulo Laus, laus@utfpr.edu.br +%% Copyright (C) 2018-2022 by Luis Paulo Laus, laus@utfpr.edu.br %% %% This package can be redistributed and/or modified under the terms %% of the LaTeX Project Public License distributed from CTAN @@ -44,6 +44,10 @@ %% turn switch, var remanent, thermal, %% unaffected by alternating current, %% mechanically resonant +%% 1.3: 07 August 2022: new anchor for contacts (tip); +%% new annotations: closing momentarily, +%% early or late +%% %% \usetikzlibrary{circuits.ee.IEC} \usepgflibrary{shapes.geometric} @@ -104,7 +108,7 @@ }% \pgf@marshal% \else% - % tricky... simpilfy to the origin... + % tricky... simplify to the origin... \pgf@xc=\pgf@x% \pgf@yc=\pgf@y% \pgf@process{\northeast}% @@ -180,7 +184,7 @@ \pgf@ya=-\pgf@y% \pgf@process{\pgfpointborderrectangle{\pgfqpoint{\pgf@xc}{\the\pgf@yc}}{\pgfqpoint{\pgf@xa}{\pgf@ya}}}% \else% - % tricky... simpilfy to the origin... + % tricky... simplify to the origin... \pgf@xc=\pgf@x% \pgf@yc=\pgf@y% \pgf@process{\northeast}% @@ -225,9 +229,19 @@ \pgf@y=0.5773503\pgf@ya% \fi } + \savedanchor\tippoint{% + \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}% + \ifcontact@activated + \pgf@x=0.8164663\pgf@xa \pgf@y=0pt + \else + \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}% + \pgf@x=0.6443375\pgf@xa \pgf@y=1.321367\pgf@ya + \fi + } \anchor{center}{\pgfpointorigin} \anchor{mid}{\centerpoint} + \anchor{tip}{\tippoint} \inheritanchor[from=rectangle ee]{north} \inheritanchor[from=rectangle ee]{south} \inheritanchor[from=rectangle ee]{east} @@ -246,7 +260,7 @@ \anchorborder{% \ifdim\pgf@y<0pt% - % tricky... simpilfy to the origin... + % tricky... simplify to the origin... \pgf@xc=\pgf@x% \pgf@yc=\pgf@y% \pgf@process{\southwest}% @@ -305,9 +319,19 @@ \pgf@y=-0.333333\pgf@ya% \fi } + \savedanchor\tippoint{% + \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}% + \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}% + \ifcontact@activated + \pgf@x=0.515733\pgf@xa \pgf@y=-1.354311\pgf@ya + \else + \pgf@x=0.658114\pgf@xa \pgf@y=-0.772076\pgf@ya + \fi + } \anchor{center}{\pgfpointorigin} \anchor{mid}{\centerpoint} + \anchor{tip}{\tippoint} \inheritanchor[from=rectangle ee]{north} \inheritanchor[from=rectangle ee]{south} \inheritanchor[from=rectangle ee]{east} @@ -333,7 +357,7 @@ \pgf@ya=1.354311\pgf@y% maximum distance used to prevent jump \pgf@process{\pgfpointborderrectangle{\pgfqpoint{\pgf@xc}{\the\pgf@yc}}{\pgfqpoint{-\pgf@xa}{-\pgf@ya}}}% \else% - % tricky... simpilfy to the origin... + % tricky... simplify to the origin... \pgf@xc=\pgf@x% \pgf@yc=\pgf@y% \pgf@process{\southwest}% @@ -385,9 +409,19 @@ \pgf@y=0.333333\pgf@ya% \fi } + \savedanchor\tippoint{% + \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}% + \ifcontact@activated + \pgf@x=0.868517\pgf@xa \pgf@y=0pt + \else + \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}% + \pgf@x=0.638675\pgf@xa \pgf@y=0.759117\pgf@ya + \fi + } \anchor{center}{\pgfpointorigin} \anchor{mid}{\centerpoint} + \anchor{tip}{\tippoint} \inheritanchor[from=rectangle ee]{north} \inheritanchor[from=rectangle ee]{south} \inheritanchor[from=rectangle ee]{east} @@ -409,11 +443,11 @@ \pgf@process{\southwest}% \pgf@x=\pgf@xa% } - \anchor{output 1}{\northeast}% the thrird, normaly closed, terminal + \anchor{output 1}{\northeast}% the third, normally closed, terminal \anchorborder{% \ifdim\pgf@y<0pt% - % tricky... simpilfy to the origin... + % tricky... simplify to the origin... \pgf@xc=\pgf@x% \pgf@yc=\pgf@y% \pgf@process{\southwest}% @@ -637,7 +671,7 @@ circuit declare annotation={thermal switch}{2.6559833\tikzcircuitssizeunit} { [transform shape] - [annotation arrow,-] + [-] (\tikzlastnode.mid) edge[circuit symbol lines/.try,to path={--++(0,1.4\tikzcircuitssizeunit)--++(\tikzcircuitssizeunit,0)--++(0,\tikzcircuitssizeunit)--++(-\tikzcircuitssizeunit,0)--++(0,\tikzcircuitssizeunit)}] () }, % 0.5773503+2.6+0.4-1.321367 @@ -736,11 +770,23 @@ [-] edge[circuit symbol wires/.try,to path={let \p1=(\tikzlastnode.mid), \p2=($(\tikzlastnode.mid) - (\tikzlastnode.input)$), \n2 = {veclen(\x2,\y2)}, \p2= ($0.5*\tikzcircuitssizeunit/\n2*(\p2)$) in ($(\p1)+(\p2)$) -- ++(-\y2,\x2) -- ($(\p1)-(\p2)$)}] () }, + circuit declare annotation={early or late}{0pt} + { + [transform shape] + [-] + edge[cap=round,circuit symbol wires/.try,to path={let \p1=(\tikzlastnode.tip), \p2=($(\tikzlastnode.tip) - (\tikzlastnode.input)$), \n2 = {veclen(\x2,\y2)}, \p2= ($0.5\tikzcircuitssizeunit/\n2*(\p2)$) in (\p1) -- ++(\y2,-\x2)}] () + }, + circuit declare annotation={closing momentarily}{0pt} + { + [transform shape] + [-] + (\tikzlastnode.output) edge[cap=round,circuit symbol lines/.try,to path={-- ++(0.5\tikzcircuitssizeunit,0.3333333\tikzcircuitssizeunit)}] () + }, circuit declare annotation={circuit breaker}{0pt} { [transform shape] [-] - (\tikzlastnode.south west) edge[circuit symbol lines/.try,to path={++(2.4\tikzcircuitssizeunit,0.4\tikzcircuitssizeunit) -- ++(-0.8\tikzcircuitssizeunit,-0.8\tikzcircuitssizeunit) ++(0.8\tikzcircuitssizeunit,0) -- ++(-0.8\tikzcircuitssizeunit,0.8\tikzcircuitssizeunit)}] () + (\tikzlastnode.output) edge[circuit symbol lines/.try,to path={++(0.4\tikzcircuitssizeunit,0.4\tikzcircuitssizeunit) -- ++(-0.8\tikzcircuitssizeunit,-0.8\tikzcircuitssizeunit) ++(0.8\tikzcircuitssizeunit,0) -- ++(-0.8\tikzcircuitssizeunit,0.8\tikzcircuitssizeunit)}] () }, circuit declare annotation={static switch}{0pt} { @@ -863,7 +909,7 @@ (\tikzlastnode.south) edge[circuit symbol lines/.try,every relay coil/.try,to path={++(0,.5\pgflinewidth) --++(0,-.6\tikzcircuitssizeunit) ++(0,-.4\tikzcircuitssizeunit) --++(0,-\tikzcircuitssizeunit) ++(0,-.4\tikzcircuitssizeunit) --++(0,-\tikzcircuitssizeunit) (\tikzlastnode.south) ++(0,-1.5\tikzcircuitssizeunit+.5\pgflinewidth) arc [start angle=200, end angle=340, radius=0.5\tikzcircuitssizeunit] (\tikzlastnode.south) ++(0,-1.5\tikzcircuitssizeunit+.5\pgflinewidth) arc [start angle=20, end angle=160, radius=0.5\tikzcircuitssizeunit]}] () - }, + } } \tikzset{ @@ -1017,7 +1063,7 @@ % modifications set resistor graphic = resistor IEC relay graphic, set bulb graphic = bulb IEC relay graphic, - % aditions + % additions set fuse graphic = fuse IEC relay graphic, set horn graphic = horn IEC relay graphic, set buzzer graphic = buzzer IEC relay graphic, |