-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.tex
96 lines (82 loc) · 2.22 KB
/
example.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
\documentclass[multi=tikzpicture,margin=0.25cm]{standalone}
% use this to get special charaters (german "Umlaute") working
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% import the package
% remember that it is not deliverd with LaTeX installations currently
% you need to download it manually!
\usepackage{grafcet2}
\begin{document}
\begin{tikzpicture}[
x=2.6\tikzcircuitssizeunit,
y=1.3\tikzcircuitssizeunit,
circuit plc grafcet,
]
\draw (0,0)
to [flow direction] ++(0,-2)
to [initstep={info=0,action={info=display}}] ++(0,-4)
node [transition,info=b1 \& b0] (a) {}
-- ++(0,-1)
to [step={info={[red]1},info'={[blue]comment},
action={
info={[blue]hello},
falling
},
action={
info=G1\{init\},
force
},
action={
info=Ein sehr langer Text,
condition=A \& \not{Button},
falling
},
newrow,
action={
info={Test\_Text{=}1},
condition={A{=}1 | Ä\_on}
}
}
] ++(0,-4)
-- ++(0,-4)
to [macrostep={info=M0,info'=$\bullet$}] ++(0,-4)
node [transition,info=b0] {}
to [enclosingstep={info=S0}] ++(0,-4)
node [transition,info=b0] {}
to [step={info=2,
action={info=bye,rising},
action={info=bye,falling}
}
] ++(0,-4)
node [transition={info=b1}] {}
-- ++(0,-1) coordinate(split)
(split) ++(-2,0) coordinate(n11)
to [step={info=3.1}] ++(0,-4)
node[transition]{}
to [step={info=4.1}] ++(0,-4)
node[transition]{}
--++(0,-1)
coordinate(n12)
(split) ++(2,0) coordinate(n21)
to [step={info=3.2}] ++(0,-4)
node[transition]{}
-- (n21 |- n12)
coordinate(n22)
(split) ++(6,0) coordinate(n31)
to [step={info=33.3}] ++(0,-4)
node[transition]{}
to [step={info={\footnotesize 104.3}}] ++(0,-4)
node[transition]{}
-- (n31 |- n12)
coordinate(n32)
(n12) ++(2,0)
|- ++(-8,-2) |- (0,0)
(n12) ++(2,-2)
to [flow direction={info=to G2,pos=1}] ++(0,-2) % pos=1 puts the arrow-head at the end of the line
%node[below]{to G2} % use this alternativly if you prefer the text under the arrow
;
% this creaters the double-lines for the parallel junctions:
\draw[thick,double] (n11) ++(-0.5,0) -- (n31) --++(0.5,0) ;
\draw[thick,double] (n12) ++(-0.5,0) -- (n32) --++(0.5,0) ;
\end{tikzpicture}
\end{document}