Funktionsblock zeichnen
Aug 21 2020
Ich versuche so etwas nachzubilden:
Als LaTeX n00b kann ich mich jedoch nicht darum kümmern, den Text und die Pfeile unten zu platzieren.
So weit bin ich gekommen:
\begin{tikzpicture}[
start chain=going right,
every join/.style={thick},
node distance=5mm
]
\node [on chain] {Inngang};
\node [on chain,draw,join,xshift=5mm,minimum width=5cm,minimum height=3cm,label=above:Måleomformer] (omformer) {
\tikz\draw (0,0) -- (5cm,3cm);
};
\node [on chain,join,xshift=5mm]{4-20 mA utgang};
\end{tikzpicture}
Jede Hilfe wäre sehr dankbar!
Antworten
1 Ignasi Aug 21 2020 at 10:02
So etwas könnte funktionieren. Die Diagonale und der Text in der Box wurden mit einem path pictureBefehl hinzugefügt , sie können jedoch auch mit zusätzlichen Befehlen drawund nodeBefehlen hinzugefügt werden. Stattdessen chainhabe ich den Hauptknoten und alle anderen um ihn herum platziert.
\documentclass[tikz, border=2mm]{standalone}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}[
node distance=5mm
]
\node [draw, minimum width=5cm, minimum height=3cm,
label=Måleomformer,
path picture={%
\draw (path picture bounding box.south west)--(path picture bounding box.north east);
\path (path picture bounding box.north west)--node[pos=.25] {Trykk} node[pos=.75] {Strom} (path picture bounding box.south east) ;
}] (omformer) {};
\node[left=of omformer] (inngang) {Inngang};
\node[right=of omformer] (out) {4-20 mA utgang};
\node[below right=of omformer.south west, align=center] (zero) {Nedre\\ malegrense\\ (Zero)};
\node[below left=of omformer.south east, align=center] (span) {Ovre\\ malegrense\\ (Span)};
\draw[->] (inngang)--(omformer);
\draw[->] (zero)--(zero|-omformer.south);
\draw[->] (span)--(span|-omformer.south);
\draw[<-] (out)--(omformer);
\end{tikzpicture}
\end{document}