Debian Codegraph @

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

raw
1 %% This is file `BeamerAnimation.tex'
2 %% Version: 1.0.1
3 %% Version date: 2018-15-12
4 %%
5 %% Copyright (C) 2018 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 `tikzlibrarycircuits.plc.sfc.code.tex'
12 %% and its accompanying documentation and `The Copyright Holder' referring to
13 %% the person Luis Paulo Laus.
14 %%
15 %% IMPORTANT NOTICE:
16 %%
17 %% For error reports, comments or suggestions in case of UNCHANGED
18 %% versions send mail to:
19 %% [email protected]
20 %%
21 %%
22
23 \documentclass{beamer}
24 \usepackage{tikz,units}
25 \usetikzlibrary{backgrounds, circuits.plc.sfc}
26
27 \makeatletter
28 \newcommand*{\overlaynumber}{\number\beamer@slideinframe}
29 \makeatother
30
31 \tikzset{ % alt and visible (overlay)
32 alt/.code args={<#1>#2#3}{%
33 \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}
34 },
35 visible/.code args={<#1>#2}{%
36 \alt<#1>{\pgfkeysalso{#2}}{}
37 }
38 }
39
40 \colorlet{LBlue}{blue!20}
41 \colorlet{LRed}{red!30}
42
43 \begin{document}
44
45 \begin{frame}{Delta-star motor starter with dead time in SFC: \overlaynumber{}}
46 \begin{columns}[c]
47
48 \column{0.4\textwidth}
49
50 \noindent \begin{center}
51 \begin{tikzpicture}[circuit plc sfc,thick,x=2.6\tikzcircuitssizeunit,
52 y=1.3\tikzcircuitssizeunit,sfcaqw=9\tikzcircuitssizeunit]
53 \draw (0,0)
54 to [flow direction={pos=0.95}] ++(0,-1)
55 to [sfcstepi={info=O,visible={<1,2,7>{fill=LBlue}}}] ++(0,-4)
56 node [sfctransition={info=b1 AND NOT b0},name=t1,visible={<2>{red}}] {}
57 to [sfcstep={info=I,visible={<3-6>{fill=LBlue}},
58 sfcaction={info=K1,qualifier=N,visible={<3-6>{fill=LBlue}}},
59 sfcaction={info=K2,qualifier=L,time=T\#3s,visible={<3>{fill=LBlue}}},
60 sfcaction={info=K3,qualifier=D,time=T\#3s400ms,visible={<5-6>{fill=LBlue}}}}] ++(0,-4)
61 node [sfctransition={info=b0},name=t2,visible={<6>{red}}]{}
62 |- ++(-1,-1) |- (0,0);
63 \begin{pgfonlayer}{background}
64 \visible<2>{
65 \draw[fill=LRed,LRed](t1) circle (0.4);
66 }
67 \visible<6>{
68 \draw[fill=LRed,LRed](t2) circle (0.4);
69 }
70 \end{pgfonlayer}
71 \end{tikzpicture}
72 \par\end{center}
73 \column{0.6\textwidth}
74 Delta-star with dead time:
75 \begin{itemize}[<+->]
76 \item initially, the motor is off
77 \item b1 is pressed
78 \item K1 and K2 are activated -- star
79 \item after $\unit[3]{s}$, K2 is deactivated -- dead time
80 \item after $\unit[0.4]{s}$, K3 is activated -- delta
81 \item b0 is pressed
82 \item motor is off
83 \end{itemize}
84 \end{columns}
85 \noindent \begin{center}
86 \par\bigskip
87 Copyright (C) 2018 by Luis Paulo Laus, [email protected]
88 \end{center}
89 \end{frame}
90 \end{document}