summaryrefslogtreecommitdiffstats
path: root/tests/tc999_projects/binaeruntersetzer.awl
blob: 26eb3daa0581d9bf9e9ebcf4687bbe9f8d2102f5 (plain)
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
97
98
99
100
101
102
103
104
105
FUNCTION "Binäruntersetzer FC" : VOID
TITLE =Binaeruntersetzer
VERSION : 0.1

BEGIN
NETWORK
TITLE =Merker 1

      U     "b1"; 
      FP    "b1_fm"; 
      =     "b1_imp"; 
NETWORK
TITLE =Merker rueckwaerts

      U     "A0"; 
      U     "A1"; 
      U     "A2"; 
      S     "MRUECK"; 
      UN    "A0"; 
      UN    "A1"; 
      UN    "A2"; 
      R     "MRUECK"; 
      NOP   0; 
NETWORK
TITLE =Merker Ausgang 0

      UN    "MRUECK"; 
      U     "b1_imp"; 
      UN    "A0"; 
      UN    "A1"; 
      UN    "A2"; 
      S     "temp_A0"; 
      U     "MRUECK"; 
      U     "b1_imp"; 
      U     "A0"; 
      UN    "A1"; 
      UN    "A2"; 
      R     "temp_A0"; 
      NOP   0; 
NETWORK
TITLE =Merker Ausgang 1

      UN    "MRUECK"; 
      U     "b1_imp"; 
      U     "A0"; 
      UN    "A1"; 
      UN    "A2"; 
      S     "temp_A1"; 
      U     "MRUECK"; 
      U     "b1_imp"; 
      U     "A0"; 
      U     "A1"; 
      UN    "A2"; 
      R     "temp_A1"; 
      NOP   0; 
NETWORK
TITLE =Merker Ausgang 2

      UN    "MRUECK"; 
      U     "b1_imp"; 
      U     "A0"; 
      U     "A1"; 
      UN    "A2"; 
      S     "temp_A2"; 
      U     "MRUECK"; 
      U     "b1_imp"; 
      U     "A0"; 
      U     "A1"; 
      U     "A2"; 
      R     "temp_A2"; 
      NOP   0; 
NETWORK
TITLE =Ausgang 0

      U     "temp_A0"; 
      =     "A0"; 
NETWORK
TITLE =Ausgang 1

      U     "temp_A1"; 
      =     "A1"; 
NETWORK
TITLE =Ausgang 2

      U     "temp_A2"; 
      =     "A2"; 
END_FUNCTION


ORGANIZATION_BLOCK "CYCLE"
BEGIN
	// Eingangssignal simulieren
	UN	M 16.0
	L	S5T#1S
	SE	T 1
	U	T 1
	=	M 16.0
	X	M 16.0
	X	M 16.1
	=	M 16.1
	=	"b1"

	// Binaeruntersetzer aufrufen
	CALL	FC 4
END_ORGANIZATION_BLOCK
bues.ch cgit interface