Example: Schemabloc

Published 2007-10-30 | Author: Robert Papanicola

Demonstration of schemabloc, a set of convenient macros for drawing block diagrams. Documentation is only available in French, but the code examples are easy to follow.

Download schemabloc

Author:Robert Papanicola
Source:Schéma-blocs avec PGF/TIKZ sous LaTeX

Download as: [PDF] [TEX]  •  [Open in writeLaTeX]

Schemabloc

Do you have a question regarding this example, TikZ or LaTeX in general? Just ask in the LaTeX Forum.
Oder frag auf Deutsch auf TeXwelt.de.

% Author: Robert Papanicola
% Source: http://www.sciences-indus-cpge.apinc.org/Schema-blocs-avec-PGF-TIKZ-sous
\documentclass{article}

\usepackage{schemabloc}

\usetikzlibrary{circuits}
\begin{document}

\begin{tikzpicture}
    \sbEntree{E}
    \sbComp{a}{E}
    \sbBloc{b}{$H_1$}{a}
            \sbRelier[$E_1$]{E}{a}
    \sbBlocL{c}{$H_2$}{b}
            \sbRelier[$\epsilon$]{a}{b}
    \sbComph{d}{c}
            \sbRelier[u]{c}{d}
    \sbBlocL{e}{$H_3$}{d}
    \sbBlocL{f}{$H_4$}{e}
    \sbSortie[5]{S1}{f}
            \sbRelier{f}{S1}
            \sbNomLien[0.8]{S1}{$S_1$}
    \sbDecaleNoeudy[-4]{f}{u}
    \sbDecaleNoeudy{e}{v}
    \sbBlocr{r1}{$R_1$}{u}
    \sbBlocr{r2}{$R_2$}{v}
    \sbBlocrL{r3}{$R_3$}{r2}
    \sbRelieryx{f-S1}{r1}
    \sbRelierxy[n1]{r1}{d}
    \sbRelieryx{e-f}{r2}
    \sbRelierxy[n2]{r3}{a}
\end{tikzpicture}

\end{document}

Comments

  • #1 wolfgang, February 3, 2009 at 11:53 a.m.

    It's a great marco, but for chains,I can't run the example properly,it get the following log:

    Runaway argument?
    tially E)] in {A/$A_1(p)$,B/Fonction(p),C/$C(p)$,D/$D_1(p)$} {\sbBlocL \ETC.
    ! Paragraph ended before \pgffor@next was complete.
    

    and I read the .sty file find the following codes

    \newcommand{\sbChaine}[3][4]{
    \foreach \x/\y [remember=\x as \lastx (initially #2)] in {#3}
    {\sbBlocL[#1]{\x}{\y}{\lastx}
    }
    }
    

    I did not find any optional augments(such as:[remember=\x as \lastx (initially #2)]) for the command \foreach in tikz mannual. I can understand the meaning of these codes,but my stupid computer can't.

    Can Anybody give me some hints? thanks in advance.

  • #2 wolfgang, February 3, 2009 at 11:58 a.m.

    sorry for forgetting upload the example codes in the mannual:

    see following

    Trois commandes permettent de dessiner des schémas blocs bouclés unitaire ou non. Boucle unitaire : deux commandes, une pour dessiner une boucle à retour unitaire à insérer dans un schéma, l’autre pour dessiner complètement la boucle.

    \sbBoucle[pas]{noeud depart}{liste de blocs chaine directe} ou
    
    
        \begin{tikzpicture}
        \sbEntree{E}
        \sbBoucle[3]{E}{A/$A_1(p)$,B/Fonction(p),C/$C(p)$,D/$D_1(p)$}
        \end{tikzpicture}
    
  • #3 wolfgang, February 3, 2009 at 12:01 p.m.

    sorry for putting the wrong codes,it should be like the following

    Chaînes deux commandes, une qui pour trace des chaines directe ( de la gauche vers la droite), l’autre les chaînes de retour (de la droite vers la gauche). Chaîne directe : \sbChaine[pas]{Noeud depart}{liste blocs Nom/Fonction}

      \begin{tikzpicture}
      \sbEntree{E}
      \sbChaine[3]{E}{A/$A_1(p)$,B/Fonction(p),C/$C(p)$,D/$D_1(p)$}
      \end{tikzpicture}
    

    it's for chain

  • #4 Kjell Magne Fauske, February 3, 2009 at 3:03 p.m.

    From the error message it seems that schemabloc uses the CVS version of PGF. You could try downloading and installing a recent CVS build of PGF from: texample.net/tikz/builds/

  • #5 Josef, August 20, 2009 at 11:36 p.m.

    Is \usetikzlibrary{circuits} necessary to use schemabloc?

    I keep getting an error because that library is missing. It compiles fine without the circuits library. If it is not required, it should be removed from the example code.

  • #6 Swiftarrow, September 3, 2009 at 12:56 p.m.

    For some reason, if I copy and paste this code, it compiles, but all I get is a few gibberish characters... I would love to use this, but it's not working... I'm compiling using latex, from texlive 2008

  • #7 Gigi, September 21, 2009 at 2:45 p.m.

    Hi! I'd like to give my feedback, too. I'm using schemabloc package with a full installation of texlive 2008 and it works fine, without loading circuits library. On the source's website, I've read about some issues trying to connect two block one above the other one - I propose my solution: using tikz standard commands (\draw and \node).

  • #8 pooz, December 7, 2009 at 9:24 p.m.

    Hello,

    is there a way to have simple, normal "plus" symbol? Like the multiply symbol, but without thoses little plus and minus inside them?

    Thanks for your help!!

  • #9 WG, June 2, 2013 at 11:43 p.m.

    Nice package, however the adder needs to be improved can you not change it to a normal circle and do the + and - sign's on the outside, like in Matlab?

  • #10 andrei, June 12, 2013 at 7:29 a.m.

    Sorry, but the code

    \begin{tikzpicture} \sbEntree{E} \sbChaine[3]{E}{A/$A_1(p)$,B/Fonction(p),C/$C(p)$,D/$D_1(p)$} \end{tikzpicture}

    not work in current debian (wheezy) :(( The blocks are imposed on each other

Adding comments is currently not enabled.