绘制功能块

绘制功能块

我正在尝试重新创建这样的事情:

我想重现什么

但是,作为 LaTeX 新手,我无法理解如何将文本放在里面并将箭头放在底部。

这是我目前取得的进展:

\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}

我已经走了多远

任何帮助将不胜感激!

答案1

类似这样的方法可以奏效。框内的对角线和文本已使用命令添加,但也可以使用其他命令path picture添加。我已经放置了主节点,以及它周围的所有其他节点。drawnodechain

\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}

在此处输入图片描述

相关内容