Debian Codegraph @

texmf-dist/doc/latex/tikz-relay/BeamerAnimation.tex

raw
1 %% This is file `BeamerAnimation.tex'
2 %% Version: 1.0.2
3 %% Version date: 2022-08-07
4 %%
5 %% Copyright (C) 2018-2022 by Luis Paulo Laus, [email protected]
6 %%
7 %% This package can be redistributed and/or modified under the terms
8 %% of the LaTeX Project Public License distributed from CTAN
9 %% archives in directory macros/latex/base/lppl.txt; either
10 %% version 1 of the License, or (at your option) any later version,
11 %% with `The Package' referring to the software `tikzlibrarysfc.code.tex' and its
12 %% accompanying documentation and `The Copyright Holder' referring to the
13 %% person Luis Paulo Laus.
14 %%
15 %%
16 %% IMPORTANT NOTICE:
17 %%
18 %% For error reports, comments or suggestions in case of UNCHANGED
19 %% versions send mail to:
20 %% [email protected]
21 %%
22 %%
23
24 \documentclass{beamer}
25 \usepackage{tikz,units}
26 \usetikzlibrary{backgrounds, circuits.ee.IEC.relay}
27
28 \makeatletter
29 \newcommand*{\overlaynumber}{\number\beamer@slideinframe}
30 \makeatother
31
32 \tikzset{ % alt and visible (overlay)
33 alt/.code args={<#1>#2#3}{%
34 \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}
35 },
36 visible/.code args={<#1>#2}{%
37 \alt<#1>{\pgfkeysalso{#2}}{}
38 }
39 }
40
41 \colorlet{LBlue}{blue!20}
42 \colorlet{LRed}{red!20}
43
44 \begin{document}
45
46 \begin{frame}{Four-Step Sequencer \overlaynumber{}}
47 \noindent \begin{center}
48 \hspace*{-0.05\textwidth}\resizebox{1.1\textwidth}{!}{
49 \begin{tikzpicture}[circuit ee IEC relay,thick,x=6\tikzcircuitssizeunit,y=5\tikzcircuitssizeunit]
50
51 \draw(-1.5,0) node[left]{$\unit[0]{V}$} --+(9,0)
52 (-1.5,4) node[left]{$\unit[+24]{V}$} --+(9,0);
53
54 \draw (0,0)
55 node[contact]{}
56 to [relay coil={info=$K_1$,name=k11,alt={<1,2,7-17>{}{fill=LRed}}}] ++(0,1)
57 to [break contact={info=$K_2$,name=k24,alt={<1-5,11-20>{}{activated}}}] ++(0,1)
58 node[contact,name=N1]{}
59 to [make contact={info=$K_4$,name=k43,alt={<1-13,19-20>{}{activated}}}] ++(0,1)
60 to [make contact={push button={info=$b_1$},name=b1,alt={<1-16,20>{}{activated}}}] ++(0,1)
61 node[contact]{};
62 \draw (N1) -- ++(1,0)
63 to [make contact={info=$K_1$,name=k12,alt={<1,2,7-17>{}{activated}}}] ++(0,1) -- ++(0,1)
64 node[contact]{};
65 \draw (N1) -- ++(-1,0)
66 to [make contact={push button={info=$b_S$},name=bs,alt={<1,4-20>{}{activated}}}] ++(0,2)
67 node[contact]{};
68 \draw (2,0)
69 node[contact]{}
70 to [relay coil={info=$K_2$,name=k21,alt={<1-5,11-20>{}{fill=LRed}}}] ++(0,1)
71 to [break contact={info=$K_3$,name=k34,alt={<1-9,15-20>{}{activated}}}] ++(0,1)
72 node[contact,name=N1]{}
73 to [make contact={info=$K_1$,name=k13,alt={<1,2,7-17>{}{activated}}}] ++(0,1)
74 to [make contact={push button={info=$b_2$},name=b2,alt={<1-4,8-20>{}{activated}}}] ++(0,1)
75 node[contact]{};
76 \draw (N1) -- ++(1,0)
77 to [make contact={info=$K_2$,name=k22,alt={<1-5,11-20>{}{activated}}}] ++(0,1) -- ++(0,1)
78 node[contact]{};
79 \draw (4,0)
80 node[contact]{}
81 to [relay coil={info=$K_3$,name=k31,alt={<1-9,15-20>{}{fill=LRed}}}] ++(0,1)
82 to [break contact={info=$K_4$,name=k44,alt={<1-13,19-20>{}{activated}}}] ++(0,1)
83 node[contact,name=N1]{}
84 to [make contact={info=$K_2$,name=k23,alt={<1-5,11-20>{}{activated}}}] ++(0,1)
85 to [make contact={push button={info=$b_3$},name=b3,alt={<1-8,12-20>{}{activated}}}] ++(0,1)
86 node[contact]{};
87 \draw (N1) -- ++(1,0)
88 to [make contact={info=$K_3$,name=k32,alt={<1-9,15-20>{}{activated}}}] ++(0,1) -- ++(0,1)
89 node[contact]{};
90 \draw (6,0) node[contact]{}
91 to [relay coil={info=$K_4$,name=k41,alt={<1-13,19-20>{}{fill=LRed}}}] ++(0,1)
92 to [break contact={info=$K_1$,name=k14,alt={<1,2,7-17>{}{activated}}}] ++(0,1)
93 node[contact,name=N1]{}
94 to [make contact={info=$K_3$,name=k33,alt={<1-9,15-20>{}{activated}}}] ++(0,1)
95 to [make contact={push button={info=$b_4$},name=b4,alt={<1-12,16-20>{}{activated}}}] ++(0,1)
96 node[contact]{};
97 \draw (N1) -- ++(1,0)
98 to [make contact={info=$K_4$,name=k42,alt={<1-13,19-20>{}{activated}}}] ++(0,1) -- ++(0,1)
99 node[contact]{};
100 \begin{pgfonlayer}{background}
101 \visible<2-3>{
102 \draw[fill=LBlue,LBlue](bs) circle (0.4);
103 }
104 \visible<3-6,18-20>{
105 \draw[fill=LBlue,LBlue](k11) circle (0.4);
106 \draw[fill=LBlue,LBlue](k12) circle (0.4);
107 \draw[fill=LBlue,LBlue](k13) circle (0.4);
108 \draw[fill=LBlue,LBlue](k14) circle (0.4);
109 }
110 \visible<5-7>{
111 \draw[fill=LBlue,LBlue](b2) circle (0.4);
112 }
113 \visible<6-10>{
114 \draw[fill=LBlue,LBlue](k21) circle (0.4);
115 \draw[fill=LBlue,LBlue](k22) circle (0.4);
116 \draw[fill=LBlue,LBlue](k23) circle (0.4);
117 \draw[fill=LBlue,LBlue](k24) circle (0.4);
118 }
119 \visible<9-11>{
120 \draw[fill=LBlue,LBlue](b3) circle (0.4);
121 }
122 \visible<10-14>{
123 \draw[fill=LBlue,LBlue](k31) circle (0.4);
124 \draw[fill=LBlue,LBlue](k32) circle (0.4);
125 \draw[fill=LBlue,LBlue](k33) circle (0.4);
126 \draw[fill=LBlue,LBlue](k34) circle (0.4);
127 }
128 \visible<13-15>{
129 \draw[fill=LBlue,LBlue](b4) circle (0.4);
130 }
131 \visible<14-18>{
132 \draw[fill=LBlue,LBlue](k41) circle (0.4);
133 \draw[fill=LBlue,LBlue](k42) circle (0.4);
134 \draw[fill=LBlue,LBlue](k43) circle (0.4);
135 \draw[fill=LBlue,LBlue](k44) circle (0.4);
136 }
137 \visible<17-19>{
138 \draw[fill=LBlue,LBlue](b1) circle (0.4);
139 }
140 \end{pgfonlayer}
141 \end{tikzpicture}}
142 \par\bigskip
143 Copyright (C) 2018-2022 by Luis Paulo Laus, [email protected]
144 \end{center}
145 \end{frame}
146 \end{document}