TransWikia.com

Drawing a function block

TeX - LaTeX Asked by Francis Rath on May 16, 2021

I am trying to recreate something like this:

what I'm trying to recreate

However, as a LaTeX n00b I can’t get my head around placing the text inside and the arrows on the bottom.

This is how far I have gotten:

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) {
  tikzdraw (0,0) -- (5cm,3cm);
};

node [on chain,join,xshift=5mm]{4-20 mA utgang};

end{tikzpicture}

how far I've gotten

Any help would be greatly appreciated!

One Answer

Something like this could work. The diagonal and text inside the box has bee added with a path picture command, but they could also be added with additional draw and node commands. Instead of chain I've placed the main node, and all other around it.

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}

enter image description here

Correct answer by Ignasi on May 16, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP