diff options
author | Karl Berry <karl@freefriends.org> | 2018-02-07 00:03:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-02-07 00:03:14 +0000 |
commit | 1b382028776021ed562581fafe3bb956bf30e0d1 (patch) | |
tree | 940bea48a23d4ef6c5217b462781afbe998f3fa9 /Master/texmf-dist/doc/latex/tikz-relay/tex | |
parent | 33ae20b26cfa6ba6ecaf5138f6783de144de396f (diff) |
tikz-relay (6feb18)
git-svn-id: svn://tug.org/texlive/trunk@46556 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/tikz-relay/tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/tikz-relay/tex/tikzlibrarycircuits.ee.IEC.relay.code.tex | 709 |
1 files changed, 709 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/tikz-relay/tex/tikzlibrarycircuits.ee.IEC.relay.code.tex b/Master/texmf-dist/doc/latex/tikz-relay/tex/tikzlibrarycircuits.ee.IEC.relay.code.tex new file mode 100644 index 00000000000..8a4f290a63f --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-relay/tex/tikzlibrarycircuits.ee.IEC.relay.code.tex @@ -0,0 +1,709 @@ +%% This is file `tikzlibrarycircuits.ee.IEC.relay.code.tex' +%% Version: 1.0 +%% Version date: 2018-02-05 +%% +%% Copyright (C) 2018 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 +%% archives in directory macros/latex/base/lppl.txt; either +%% version 1 of the License, or (at your option) any later version, +%% with `The Package' referring to the software +%% `tikzlibrarycircuits.ee.IEC.relay.code.tex' +%% and its accompanying documentation and `The Copyright Holder' +%% referring to the person Luis Paulo Laus. +%% +%% +%% IMPORTANT NOTICE: +%% +%% For error reports, comments or suggestions in case of UNCHANGED +%% versions send mail to: +%% laus@utfpr.edu.br +%% +%% +%% Change History: +%% 1.0: 05 February 2018: Original Version +%% +\usetikzlibrary{circuits.ee.IEC} + +\makeatletter + +%% if contacts are activated or not, default is not +\newif\ifcontact@activated +\contact@activatedfalse + +\def\tikz@lib@relay@lar@plain[#1]#2\pgf@stop{\tikzset{label={[label position=357,every term/.try,#1]#2}}} +\def\tikz@lib@relay@lbr@plain[#1]#2\pgf@stop{\tikzset{label={[label position=183,every term'/.try,#1]#2}}} +\def\tikz@lib@relay@lal@plain[#1]#2\pgf@stop{\tikzset{label={[label position=63,every term''/.try,#1]#2}}} + +\pgfdeclareshape{magnetic sensor IEC relay} +{ + \savedanchor\northeast{% + \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}% + \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}% + \pgf@x=\pgf@xa% + \advance\pgf@x by .5\pgf@xb% + \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}% + \pgf@y=\pgf@ya% + } + \savedanchor\southwest{% + \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}% + \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}% + \pgf@x=-\pgf@xa% + \advance\pgf@x by -.5\pgf@xb% + \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}% + \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/minimum height}}% + \pgf@y=-\pgf@ya% + \advance\pgf@y by-\pgf@yb% + } + + \inheritsavedanchors[from=circle ee] + \inheritanchor[from=circle ee]{center} + \inheritanchor[from=circle ee]{south} + \inheritanchor[from=circle ee]{east} + \inheritanchor[from=circle ee]{west} + \inheritanchor[from=circle ee]{south east} + \inheritanchor[from=circle ee]{south west} + \inheritanchor[from=circle ee]{input} + \inheritanchor[from=circle ee]{output} + \inheritanchor[from=rectangle ee]{north} + \inheritanchor[from=rectangle ee]{north east} + \inheritanchor[from=rectangle ee]{north west} + \anchor{mid}{\centerpoint\advance\pgf@y by-\radius} + + \anchorborder{% + \ifdim\pgf@y<0pt% + \pgf@xa=\pgf@x% + \pgf@ya=\pgf@y% + \edef\pgf@marshal{% + \noexpand\pgfpointborderellipse + {\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}} + {\noexpand\pgfqpoint{\radius}{\radius}}% + }% + \pgf@marshal% + \else% + % tricky... simpilfy to the origin... + \pgf@xc=\pgf@x% + \pgf@yc=\pgf@y% + \pgf@process{\northeast}% + \advance\pgf@y by0.5pt% + \pgf@xa=\pgf@x% + \pgf@ya=\pgf@y% + \pgf@process{\pgfpointborderrectangle{\pgfqpoint{\pgf@xc}{\the\pgf@yc}}{\pgfqpoint{\pgf@xa}{\pgf@ya}}}% + \fi% + } + + \backgroundpath{ + \pgf@process{\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}} + \pgf@xa=\pgf@x + \pgfpathmoveto{\pgfqpoint{\pgf@xa}{0pt}} + \pgfpatharc{0}{180}{\pgf@xa} + \pgfusepathqstroke + } +} + +\pgfdeclareshape{thermic sensor IEC relay} +{ + \savedanchor\northeast{% + \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}% + \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}% + \pgf@x=\pgf@xa% + \advance\pgf@x by .5\pgf@xb% + \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}% + \pgf@y=\pgf@ya% + } + \savedanchor\southwest{% + \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}% + \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}% + \pgf@x=-\pgf@xa% + \advance\pgf@x by -.5\pgf@xb% + \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}% + \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/minimum height}}% + \pgf@y=-\pgf@ya% + \advance\pgf@y by-\pgf@yb% + } + \savedanchor\centerpoint{% + \pgf@x=0pt% + \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}% + \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/minimum height}}% + \pgf@y=-\pgf@ya% + \advance\pgf@y by-\pgf@yb% + } + + \anchor{center}{\pgfpointorigin} + \anchor{mid}{\centerpoint} + \inheritanchor[from=rectangle ee]{north} + \inheritanchor[from=rectangle ee]{south} + \inheritanchor[from=rectangle ee]{east} + \inheritanchor[from=rectangle ee]{west} + \inheritanchor[from=rectangle ee]{north east} + \inheritanchor[from=rectangle ee]{north west} + \inheritanchor[from=rectangle ee]{south east} + \inheritanchor[from=rectangle ee]{south west} + \anchor{input}{% + \pgf@process{\southwest}% + \pgf@y=0pt% + } + \anchor{output}{% + \pgf@process{\northeast}% + \pgf@y=0pt% + } + + \anchorborder{% + \ifdim\pgf@y<0pt% + \pgf@xc=\pgf@x% + \pgf@yc=\pgf@y% + \pgf@process{\southwest}% + \pgf@xa=-\pgf@x% + \pgf@ya=-\pgf@y% + \pgf@process{\pgfpointborderrectangle{\pgfqpoint{\pgf@xc}{\the\pgf@yc}}{\pgfqpoint{\pgf@xa}{\pgf@ya}}}% + \else% + % tricky... simpilfy to the origin... + \pgf@xc=\pgf@x% + \pgf@yc=\pgf@y% + \pgf@process{\northeast}% + \advance\pgf@y by0.5pt% + \pgf@xa=\pgf@x% + \pgf@ya=\pgf@y% + \pgf@process{\pgfpointborderrectangle{\pgfqpoint{\pgf@xc}{\the\pgf@yc}}{\pgfqpoint{\pgf@xa}{\pgf@ya}}}% + \fi% + } + + \backgroundpath{ + \pgf@process{\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}} + \pgf@xa=\pgf@x + \pgf@xb=-\pgf@x \pgf@yb=\pgf@y + \pgfpathmoveto{\pgfqpoint{\pgf@xa}{0pt}} + \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@yb}} + \pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@yb}} + \pgfpathlineto{\pgfqpoint{\pgf@xb}{0pt}} + \pgfusepathqstroke + } +} + +% af:=30*PI/180; a:=1/3; l:=a+2/cos(af); x:=l*cos(af)-1; y:=l*sin(af);c:=tan(af); float([x,y,c, l]); +\pgfdeclareshape{make contact IEC relay} +{ + \savedanchor\northeast{% + \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}% + \pgf@x=.5\pgf@xa% + \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/minimum height}}% + } + \savedanchor\southwest{% + \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}% + \pgf@x=-.5\pgf@xa% + \pgf@y=0pt% + } + \savedanchor\centerpoint{% + \pgf@x=0pt + \ifcontact@activated + \pgf@y=0pt% + \else + \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}% + \pgf@y=0.5773503\pgf@ya% + \fi + } + + \anchor{center}{\pgfpointorigin} + \anchor{mid}{\centerpoint} + \inheritanchor[from=rectangle ee]{north} + \inheritanchor[from=rectangle ee]{south} + \inheritanchor[from=rectangle ee]{east} + \inheritanchor[from=rectangle ee]{west} + \inheritanchor[from=rectangle ee]{north east} + \inheritanchor[from=rectangle ee]{north west} + \inheritanchor[from=rectangle ee]{south east} + \inheritanchor[from=rectangle ee]{south west} + \anchor{input}{\southwest} + \anchor{output}{% + \pgf@process{\northeast}% + \pgf@xa=\pgf@x% + \pgf@process{\southwest}% + \pgf@x=\pgf@xa% + } + + \anchorborder{% + \ifdim\pgf@y<0pt% + % tricky... simpilfy to the origin... + \pgf@xc=\pgf@x% + \pgf@yc=\pgf@y% + \pgf@process{\southwest}% + \advance\pgf@y by-0.5pt% + \pgf@xa=\pgf@x% + \pgf@ya=\pgf@y% + \pgf@process{\pgfpointborderrectangle{\pgfqpoint{\pgf@xc}{\the\pgf@yc}}{\pgfqpoint{-\pgf@xa}{-\pgf@ya}}}% + \else% + \pgf@xc=\pgf@x% + \pgf@yc=\pgf@y% + \pgf@process{\pgfpointborderrectangle{\pgfqpoint{\pgf@xc}{\the\pgf@yc}}{\northeast}}% + \fi% + } + + \backgroundpath{ + \pgf@process{\northeast} + \pgf@xa=-\pgf@x + \ifcontact@activated + \pgf@xb=\pgf@x \pgf@yb=0pt + \else + \pgf@xb=1.288675\pgf@x \pgf@yb=1.321367\pgf@y + \fi + % Fixed point + \pgfpathmoveto{\pgfqpoint{\pgf@xa}{0pt}} + % Moving point + \pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@yb}} + \pgfusepathqstroke + } +} + + +% af:=arctan(1/3); a:=1-2*tan(af); l:=a+2/cos(af); x:=l*cos(af)-1; y:=-l*sin(af); c:=-tan(af); float([x,y,c]); +% af:=arctan(1/3); a:=1-2*tan(af); l:=a+2/cos(af); af:=arctan(2/3); x:=l*cos(af)-1; y:=l*sin(af); c:=-tan(af); float([x,y,c]); +\pgfdeclareshape{break contact IEC relay} +{ + \savedanchor\northeast{% + \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}% + \pgf@x=.5\pgf@xa% + \pgf@y=0pt% + } + \savedanchor\southwest{% + \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}% + \pgf@x=-.5\pgf@xa% + \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}% + \pgf@y=-\pgf@ya% + } + \savedanchor\centerpoint{% + \pgf@x=0pt + \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}% + \ifcontact@activated + \pgf@y=-0.666667\pgf@ya% + \else + \pgf@y=-0.333333\pgf@ya% + \fi + } + + \anchor{center}{\pgfpointorigin} + \anchor{mid}{\centerpoint} + \inheritanchor[from=rectangle ee]{north} + \inheritanchor[from=rectangle ee]{south} + \inheritanchor[from=rectangle ee]{east} + \inheritanchor[from=rectangle ee]{west} + \inheritanchor[from=rectangle ee]{north east} + \inheritanchor[from=rectangle ee]{north west} + \inheritanchor[from=rectangle ee]{south east} + \inheritanchor[from=rectangle ee]{south west} + \anchor{input}{% + \pgf@process{\southwest}% + \pgf@xa=\pgf@x% + \pgf@process{\northeast}% + \pgf@x=\pgf@xa% + } + \anchor{output}{\northeast} + + \anchorborder{% + \ifdim\pgf@y<0pt% + \pgf@xc=\pgf@x% + \pgf@yc=\pgf@y% + \pgf@process{\southwest}% + \pgf@xa=\pgf@x% + \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... + \pgf@xc=\pgf@x% + \pgf@yc=\pgf@y% + \pgf@process{\northeast}% + \advance\pgf@y by 0.5pt% + \pgf@xa=\pgf@x% + \pgf@ya=\pgf@y% + \pgf@process{\pgfpointborderrectangle{\pgfqpoint{\pgf@xc}{\the\pgf@yc}}{\pgfqpoint{\pgf@xa}{\pgf@ya}}}% + \fi% + } + + \backgroundpath{ + \pgf@process{\southwest} + \pgf@xa=-\pgf@x \pgf@ya=\pgf@y + \ifcontact@activated + \pgf@xb=-1.031466\pgf@x \pgf@yb=1.354311\pgf@y + \else + \pgf@xb=-1.316228\pgf@x \pgf@yb=0.772076\pgf@y + \fi + % Fixed + \pgfpathmoveto{\pgfqpoint{\pgf@xa}{\pgf@ya}} + \pgfpathlineto{\pgfqpoint{\pgf@xa}{0pt}} + \pgfusepathqstroke + % Moving + \pgfpathmoveto{\pgfqpoint{-\pgf@xa}{0pt}} + \pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@yb}} + \pgfusepathqstroke + } +} + + +% af:=arctan(2/3); a:=2*tan(af)-1; l:=a+2/cos(af); x:=l*cos(af)-1; y:=l*sin(af); c:=tan(af); float([x,y/2,c/2]); +\pgfdeclareshape{change over contact IEC relay} +{ + \savedanchor\northeast{% + \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}% + \pgf@x=.5\pgf@xa% + \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/minimum height}}% + } + \savedanchor\southwest{% + \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}% + \pgf@x=-.5\pgf@xa% + \pgf@y=0pt% + } + \savedanchor\centerpoint{% + \pgf@x=0pt + \ifcontact@activated + \pgf@y=0pt + \else + \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}% + \pgf@y=0.333333\pgf@ya% + \fi + } + + \anchor{center}{\pgfpointorigin} + \anchor{mid}{\centerpoint} + \inheritanchor[from=rectangle ee]{north} + \inheritanchor[from=rectangle ee]{south} + \inheritanchor[from=rectangle ee]{east} + \inheritanchor[from=rectangle ee]{west} + \inheritanchor[from=rectangle ee]{north east} + \inheritanchor[from=rectangle ee]{north west} + \inheritanchor[from=rectangle ee]{south east} + \inheritanchor[from=rectangle ee]{south west} + \anchor{input}{\southwest} + \anchor{output}{% + \pgf@process{\northeast}% + \pgf@xa=\pgf@x% + \pgf@process{\southwest}% + \pgf@x=\pgf@xa% + } + \anchor{output 2}{% alias for output + \pgf@process{\northeast}% + \pgf@xa=\pgf@x% + \pgf@process{\southwest}% + \pgf@x=\pgf@xa% + } + \anchor{output 1}{\northeast}% the thrird, normaly closed, terminal + + \anchorborder{% + \ifdim\pgf@y<0pt% + % tricky... simpilfy to the origin... + \pgf@xc=\pgf@x% + \pgf@yc=\pgf@y% + \pgf@process{\southwest}% + \advance\pgf@y by-0.5pt% + \pgf@xa=\pgf@x% + \pgf@ya=\pgf@y% + \pgf@process{\pgfpointborderrectangle{\pgfqpoint{\pgf@xc}{\the\pgf@yc}}{\pgfqpoint{-\pgf@xa}{-\pgf@ya}}}% + \else% + \pgf@xc=\pgf@x% + \pgf@yc=\pgf@y% + \pgf@process{\pgfpointborderrectangle{\pgfqpoint{\pgf@xc}{\the\pgf@yc}}{\northeast}}% + \fi% + } + + \backgroundpath{ + \pgf@process{\northeast} + \pgf@xa=\pgf@x \pgf@ya=\pgf@y + \ifcontact@activated + \pgf@xb=\pgf@x \pgf@yb=0pt + \else + \pgf@xb=1.27735\pgf@x \pgf@yb=0.759117\pgf@y + \fi + % Fixed + \pgfpathmoveto{\pgfqpoint{\pgf@xa}{\pgf@ya}} + \pgfpathlineto{\pgfqpoint{\pgf@xa}{.5\pgf@ya}} + \pgfusepathqstroke + % Moving + \pgfpathmoveto{\pgfqpoint{-\pgf@xa}{0pt}} + \pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@yb}} + \pgfusepathqstroke + } +} + + +\pgfdeclareshape{proximity sensor coil IEC relay} +{ + \inheritsavedanchors[from=rectangle ee] + \inheritanchor[from=rectangle ee]{center} + \inheritanchor[from=rectangle ee]{north} + \inheritanchor[from=rectangle ee]{south} + \inheritanchor[from=rectangle ee]{east} + \inheritanchor[from=rectangle ee]{west} + \inheritanchor[from=rectangle ee]{north east} + \inheritanchor[from=rectangle ee]{north west} + \inheritanchor[from=rectangle ee]{south east} + \inheritanchor[from=rectangle ee]{south west} + \inheritanchor[from=rectangle ee]{input} + \inheritanchor[from=rectangle ee]{output} + \inheritanchorborder[from=rectangle ee] + \backgroundpath{ + \pgf@process{\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}} + \pgf@xa=-\pgf@x \pgf@ya=-\pgf@y + \pgf@xb=\pgf@x \pgf@yb=\pgf@y + \pgfpathmoveto{\pgfqpoint{\pgf@xa}{0pt}} + \pgfpathlineto{\pgfqpoint{0pt}{\pgf@ya}} + \pgfpathlineto{\pgfqpoint{\pgf@xb}{0pt}} + \pgfpathlineto{\pgfqpoint{0pt}{\pgf@yb}} + \pgfpathclose + \pgfpathmoveto{\pgfqpoint{0.75\pgf@xa}{0.25\pgf@ya}} + \pgfpathlineto{\pgfqpoint{0.75\pgf@xb}{0.25\pgf@ya}} + \pgfpathmoveto{\pgfqpoint{0.75\pgf@xa}{0.25\pgf@yb}} + \pgfpathlineto{\pgfqpoint{0.75\pgf@xb}{0.25\pgf@yb}} + \pgfusepathqstroke + } +} + +\makeatother + +\tikzset{ + circuit declare symbol=fuse, + circuit declare symbol=magnetic sensor, + circuit declare symbol=thermic sensor, + circuit declare symbol=change over contact, + circuit declare symbol=relay coil, + circuit declare symbol=proximity sensor coil, + % annotations for contact + circuit declare annotation={manually operated}{2.4\tikzcircuitssizeunit} + { + [transform shape] + [-] + (\tikzlastnode.mid) edge[circuit symbol lines/.try,to path={-- ++(0,0.8\tikzcircuitssizeunit) ++(0,0.3\tikzcircuitssizeunit) -- ++(0,0.8\tikzcircuitssizeunit) ++(0,0.3\tikzcircuitssizeunit) -- ++(0,0.8\tikzcircuitssizeunit) ++(0.6\tikzcircuitssizeunit,0) -- ++(-1.2\tikzcircuitssizeunit,0)}] () + }, + circuit declare annotation={pull switch}{2.9\tikzcircuitssizeunit} + { + [transform shape] + [-] + (\tikzlastnode.mid) edge[circuit symbol lines/.try,to path={-- ++(0,0.8\tikzcircuitssizeunit) ++(0,0.3\tikzcircuitssizeunit) -- ++(0,0.8\tikzcircuitssizeunit) ++(0,0.3\tikzcircuitssizeunit) -- ++(0,0.8\tikzcircuitssizeunit) ++(0.6\tikzcircuitssizeunit,0.5\tikzcircuitssizeunit) -- ++(0,-0.5\tikzcircuitssizeunit) -- ++(-1.2\tikzcircuitssizeunit,0) -- ++(0,0.5\tikzcircuitssizeunit)}] () + }, + circuit declare annotation={turn switch}{2.9\tikzcircuitssizeunit} + { + [transform shape] + [-] + (\tikzlastnode.mid) edge[circuit symbol lines/.try,to path={-- ++(0,0.8\tikzcircuitssizeunit) ++(0,0.3\tikzcircuitssizeunit) -- ++(0,0.8\tikzcircuitssizeunit) ++(0,0.3\tikzcircuitssizeunit) -- ++(0,0.8\tikzcircuitssizeunit) ++(0.6\tikzcircuitssizeunit,-0.5\tikzcircuitssizeunit) -- ++(0,0.5\tikzcircuitssizeunit) -- ++(-1.2\tikzcircuitssizeunit,0) -- ++(0,0.5\tikzcircuitssizeunit)}] () + }, + circuit declare annotation={push button}{2.4\tikzcircuitssizeunit} + { + [transform shape] + [-] + (\tikzlastnode.mid) edge[circuit symbol lines/.try,to path={-- ++(0,0.8\tikzcircuitssizeunit) ++(0,0.3\tikzcircuitssizeunit) -- ++(0,0.8\tikzcircuitssizeunit) ++(0,0.3\tikzcircuitssizeunit) -- ++(0,0.8\tikzcircuitssizeunit) ++(0.6\tikzcircuitssizeunit,-0.5\tikzcircuitssizeunit) -- ++(0,0.5\tikzcircuitssizeunit) -- ++(-1.2\tikzcircuitssizeunit,0) -- ++(0,-0.5\tikzcircuitssizeunit)}] () + }, + circuit declare annotation={var push button}{\tikzcircuitssizeunit} + { + [transform shape] + [-] + (\tikzlastnode.mid) edge[circuit symbol lines/.try,line to,->] ++(0,1.25\tikzcircuitssizeunit) + ++(-0.7\tikzcircuitssizeunit,1.25\tikzcircuitssizeunit+1.5*\pgflinewidth) edge[circuit symbol lines/.try,line to,line width=1.5*\pgflinewidth] ++(1.4\tikzcircuitssizeunit,0) + }, + circuit declare annotation={emergency switch}{3.7\tikzcircuitssizeunit} + { + [transform shape] + [-] + (\tikzlastnode.mid) edge[circuit symbol lines/.try,line join=bevel,to path={-- ++(0,0.6\tikzcircuitssizeunit) ++(0,0.4\tikzcircuitssizeunit) -- ++(0,0.6\tikzcircuitssizeunit) -- ++(-0.75\tikzcircuitssizeunit,0.45\tikzcircuitssizeunit) -- ++(0.75\tikzcircuitssizeunit,0.45\tikzcircuitssizeunit) -- ++(0,0.6\tikzcircuitssizeunit)}] () edge[circuit symbol open/.try,to path={++(0.8\tikzcircuitssizeunit,3.1\tikzcircuitssizeunit) arc[start angle=27, delta angle=126, radius=0.9\tikzcircuitssizeunit] --cycle}] () + }, + circuit declare annotation={thermal switch}{2.7\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)}] () + }, + circuit declare annotation={roller}{2.2\tikzcircuitssizeunit} + { + [transform shape] + [-] + (\tikzlastnode.mid) edge[circuit symbol lines/.try,to path={-- ++(0,0.9\tikzcircuitssizeunit) ++(0,0.3\tikzcircuitssizeunit) -- ++(0,0.8\tikzcircuitssizeunit)}] () edge[circuit symbol open/.try,to path={++(0,2.5\tikzcircuitssizeunit) circle(0.5\tikzcircuitssizeunit) circle(0.05\tikzcircuitssizeunit)}] () + }, + circuit declare annotation={proximity switch}{2.2\tikzcircuitssizeunit} + { + [transform shape] + [-] + (\tikzlastnode.mid) edge[circuit symbol open/.try,to path={-- ++(0,0.5\tikzcircuitssizeunit) ++(0,0.3\tikzcircuitssizeunit) -- ++(0,0.5\tikzcircuitssizeunit) -- ++(-0.85\tikzcircuitssizeunit,0.85\tikzcircuitssizeunit)-- ++(0.85\tikzcircuitssizeunit,0.85\tikzcircuitssizeunit)-- ++(0.85\tikzcircuitssizeunit,-0.85\tikzcircuitssizeunit)-- ++(-0.85\tikzcircuitssizeunit,-0.85\tikzcircuitssizeunit) +(-0.65\tikzcircuitssizeunit,0.65\tikzcircuitssizeunit) --+(0.65\tikzcircuitssizeunit,0.65\tikzcircuitssizeunit) ++(-0.65\tikzcircuitssizeunit,1.05\tikzcircuitssizeunit) --+(1.3\tikzcircuitssizeunit,0)}] () + }, + circuit declare annotation={level switch}{3.2\tikzcircuitssizeunit} + { + [transform shape] + [-] + (\tikzlastnode.mid) edge[circuit symbol lines/.try,to path={-- ++(0,0.9\tikzcircuitssizeunit) ++(0,0.3\tikzcircuitssizeunit) -- +(0,0.8\tikzcircuitssizeunit)}] () edge[circuit symbol open/.try,to path={++(0,3\tikzcircuitssizeunit) ellipse({0.5\tikzcircuitssizeunit} and {\tikzcircuitssizeunit}) ++(0.5\tikzcircuitssizeunit,0) -- ++(0.5\tikzcircuitssizeunit,0)}] () + }, + circuit declare annotation={position switch}{0pt} + { + [transform shape] + [-] + 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={circuit breaker}{2.4\tikzcircuitssizeunit} + { + [transform shape] + [-] + (\tikzlastnode.south west) edge[circuit symbol lines/.try,to path={++(2.2\tikzcircuitssizeunit,0.2\tikzcircuitssizeunit) -- ++(-0.4\tikzcircuitssizeunit,-0.4\tikzcircuitssizeunit) ++(0.4\tikzcircuitssizeunit,0) -- ++(-0.4\tikzcircuitssizeunit,0.4\tikzcircuitssizeunit)}] () + }, + % annotations for relay coil + circuit declare annotation={solenoid valve}{2.5\tikzcircuitssizeunit} + { + [transform shape] + [-] + (\tikzlastnode.south) edge[circuit symbol open/.try,every relay coil/.try,to path={-- ++(0,-.5\tikzcircuitssizeunit) ++(0,-.3\tikzcircuitssizeunit) -- ++(0,-.5\tikzcircuitssizeunit) ++(0,-.3\tikzcircuitssizeunit) -- ++(0,-.4\tikzcircuitssizeunit) --++(\tikzcircuitssizeunit,-0.5\tikzcircuitssizeunit) --++(0,\tikzcircuitssizeunit) --++(-2\tikzcircuitssizeunit,-\tikzcircuitssizeunit) --++(0,\tikzcircuitssizeunit) --++(\tikzcircuitssizeunit,-0.5\tikzcircuitssizeunit)}] () + }, + circuit declare annotation={slow operating}{1\tikzcircuitssizeunit} + { + [transform shape] + [-] + (\tikzlastnode.north) edge[circuit symbol open/.try,every relay coil/.try,to path={++(\tikzcircuitssizeunit,-.5\pgflinewidth) --++(0,\tikzcircuitssizeunit) -- ++(-2\tikzcircuitssizeunit,0) --++(0,-\tikzcircuitssizeunit) --cycle}] () edge[circuit symbol open/.try,every relay coil/.try,to path={++(\tikzcircuitssizeunit,-.5\pgflinewidth) --++(-2\tikzcircuitssizeunit,\tikzcircuitssizeunit) ++(0,-\tikzcircuitssizeunit) -- ++(2\tikzcircuitssizeunit,\tikzcircuitssizeunit)}] () + }, + circuit declare annotation={slow releasing}{1\tikzcircuitssizeunit} + { + [transform shape] + [-] + (\tikzlastnode.north) edge[every relay coil/.try,circuit symbol filled/.try,to path={++(\tikzcircuitssizeunit,-.5\pgflinewidth) +--++(0,\tikzcircuitssizeunit) -- ++(-2\tikzcircuitssizeunit,0) --++(0,-\tikzcircuitssizeunit) --cycle}] () + }, + circuit declare annotation={slow operating and slow releasing}{2\tikzcircuitssizeunit} + { + [transform shape] + [-] + (\tikzlastnode.north) edge[circuit symbol open/.try,every relay coil/.try,to path={++(\tikzcircuitssizeunit,-.5\pgflinewidth) --++(0,\tikzcircuitssizeunit) -- ++(-2\tikzcircuitssizeunit,0) --++(0,-\tikzcircuitssizeunit) --cycle}] () edge[circuit symbol open/.try,every relay coil/.try,to path={++(\tikzcircuitssizeunit,-.5\pgflinewidth) --++(-2\tikzcircuitssizeunit,\tikzcircuitssizeunit) ++(0,-\tikzcircuitssizeunit) -- ++(2\tikzcircuitssizeunit,\tikzcircuitssizeunit)}] () edge[every relay coil/.try,circuit symbol filled,to path={++(\tikzcircuitssizeunit,\tikzcircuitssizeunit-.5\pgflinewidth) --++(0,\tikzcircuitssizeunit) -- ++(-2\tikzcircuitssizeunit,0) --++(0,-\tikzcircuitssizeunit) --cycle}] () + }, + circuit declare annotation={high speed}{1\tikzcircuitssizeunit} + { + [transform shape] + [-] + (\tikzlastnode.north) edge[circuit symbol open/.try,every relay coil/.try,to path={++(0,-.5\pgflinewidth) --++(0,\tikzcircuitssizeunit) --++(\tikzcircuitssizeunit,0) -- ++(0,-\tikzcircuitssizeunit) --++(-2\tikzcircuitssizeunit,0) --++(0,\tikzcircuitssizeunit) --++(\tikzcircuitssizeunit,0)}] () + }, + circuit declare annotation={mechanically latched}{1.73\tikzcircuitssizeunit} + { + [transform shape] + [-] + (\tikzlastnode.north) edge[circuit symbol open/.try,every relay coil/.try,to path={++(\tikzcircuitssizeunit,-.5\pgflinewidth) --++(0,1.73\tikzcircuitssizeunit) -- ++(-2\tikzcircuitssizeunit,0) --++(0,-1.73\tikzcircuitssizeunit) --cycle}] () edge[circuit symbol open/.try,every relay coil/.try,line join=bevel,to path={++(\tikzcircuitssizeunit,-.5\pgflinewidth) --++(-\tikzcircuitssizeunit,1.73\tikzcircuitssizeunit) --++(-\tikzcircuitssizeunit,-1.73\tikzcircuitssizeunit) --cycle}] () + }, + circuit declare annotation={alternating current}{2\tikzcircuitssizeunit} + { + [transform shape] + [-] + (\tikzlastnode.north) edge[circuit symbol open/.try,every relay coil/.try,to path={++(\tikzcircuitssizeunit,-.5\pgflinewidth) -- ++(0,2\tikzcircuitssizeunit) --++(-2\tikzcircuitssizeunit,0) --++(0,-2\tikzcircuitssizeunit) --++(2\tikzcircuitssizeunit,0) + (\tikzlastnode.north) ++(0,\tikzcircuitssizeunit-.5\pgflinewidth) arc [start angle=135, end angle=225, radius=0.5\tikzcircuitssizeunit] + (\tikzlastnode.north) ++(0,\tikzcircuitssizeunit-.5\pgflinewidth) arc [start angle=-45, end angle=45, radius=0.5\tikzcircuitssizeunit]}] () + }, +} + +\tikzset{ + magnetic sensor IEC relay graphic/.style={ + circuit symbol wires, + circuit symbol size=width 1 height 1, + transform shape, + shape=magnetic sensor IEC relay, + outer sep=0pt, + cap=round}, + thermic sensor IEC relay graphic/.style={ + circuit symbol wires, + circuit symbol size=width 1 height 1, + transform shape, + shape=thermic sensor IEC relay, + outer sep=0pt, + cap=round}, + make contact IEC relay graphic/.style={ + circuit symbol wires, + circuit symbol size=width 2 height 1, + transform shape, + shape=make contact IEC relay, + outer sep=0pt, + cap=round}, + break contact IEC relay graphic/.style={ + circuit symbol wires, + circuit symbol size=width 2 height 1, + transform shape, + shape=break contact IEC relay, + outer sep=0pt, + cap=round}, + change over contact IEC relay graphic/.style={ + circuit symbol wires, + circuit symbol size=width 2 height 2, + transform shape, + shape=change over contact IEC relay, + outer sep=0pt, + cap=round}, + relay coil IEC relay graphic/.style={ + circuit symbol open, + circuit symbol size=width 2 height 4, + shape=rectangle ee, + transform shape}, + proximity sensor coil IEC relay graphic/.style={ + circuit symbol open, + circuit symbol size=width 1.6 height 1.6, + shape=proximity sensor coil IEC relay, + transform shape}, + % modifications + resistor IEC relay graphic/.style={ + circuit symbol open, + circuit symbol size=width 3 height 1, + shape=rectangle ee, + transform shape + }, + inductor IEC relay graphic/.style={ + circuit symbol filled, + circuit symbol size=width 3 height 1, + transform shape, + shape=rectangle ee + }, + bulb IEC relay graphic/.style={ + circuit symbol lines, + circuit symbol size=width 2 height 2, + shape=generic circle IEC, + /pgf/generic circle IEC/before background={ + \pgfpathmoveto{\pgfpointpolar{-135}{1pt}} + \pgfpathlineto{\pgfpointpolar{45}{1pt}} + \pgfpathmoveto{\pgfpointpolar{-45}{1pt}} + \pgfpathlineto{\pgfpointpolar{135}{1pt}} + \pgfusepathqstroke + }, + transform shape + }, + fuse IEC relay graphic/.style={ + circuit symbol open, + circuit symbol size=width 3 height 1, + shape=rectangle ee, + append after command={% + \bgroup + edge[circuit symbol wires, to path={% + (\tikzlastnode.input) -- (\tikzlastnode.output) + }] () + \egroup% + }, + transform shape + } +} + + +\makeatletter +\tikzset{ + circuit ee IEC relay/.style= + { + circuit ee IEC, + % modifications + set resistor graphic = resistor IEC relay graphic, + set bulb graphic = bulb IEC relay graphic, + % aditions + set fuse graphic = fuse IEC relay graphic, + set magnetic sensor graphic = magnetic sensor IEC relay graphic, + set thermic sensor graphic = thermic sensor IEC relay graphic, + set make contact graphic = make contact IEC relay graphic, + set break contact graphic = break contact IEC relay graphic, + % change-over break before make contact + set change over contact graphic = change over contact IEC relay graphic, + set relay coil graphic = relay coil IEC relay graphic, + set proximity sensor coil graphic = proximity sensor coil IEC relay graphic, + % terminal info + term/.code={\pgfutil@ifnextchar[\tikz@lib@relay@lar@plain{\tikz@lib@relay@lar@plain[]}##1\pgf@stop}, + term'/.code={\pgfutil@ifnextchar[\tikz@lib@relay@lbr@plain{\tikz@lib@relay@lbr@plain[]}##1\pgf@stop}, + term''/.code={\pgfutil@ifnextchar[\tikz@lib@relay@lal@plain{\tikz@lib@relay@lal@plain[]}##1\pgf@stop}, + every term/.style={font=\scriptsize}, + every term'/.style={font=\scriptsize}, + every term''/.style={font=\scriptsize}, + activated/.is if=contact@activated, + every circuit ee IEC relay/.try + } +} +\makeatother + +\endinput
\ No newline at end of file |