machine_setup 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +2 -3
- data/VERSION +1 -1
- data/bin/setup_config_gen +11 -5
- data/bin/setup_init_dsl +10 -4
- data/examples/ssm/ssm.setup.param +12 -36
- data/examples/ssm/ssm.setup.param.de.yml +69 -27
- data/examples/ssm/ssm.setup.param.en.yml +64 -13
- data/examples/underleaver/underleaver.setup.param +5 -4
- data/examples/underleaver/underleaver.setup.param.de.yml +8 -8
- data/lib/setup_configuration/generator_module.rb +84 -0
- data/lib/setup_configuration/legacy/importer.rb +3 -3
- data/lib/setup_configuration/mps_template_binding.rb +58 -0
- data/lib/setup_configuration/parameter_template_binding.rb +71 -0
- data/lib/setup_configuration/setup_code_binding.rb +40 -0
- data/lib/setup_configuration/setup_code_generator.rb +24 -0
- data/lib/setup_configuration/setup_config.rb +37 -4
- data/lib/setup_configuration/suite_generator.rb +29 -311
- data/lib/setup_configuration/template_binding.rb +28 -0
- data/lib/setup_configuration/templates/english.lng.erb +2 -2
- data/lib/setup_configuration/translation.rb +40 -27
- data/lib/setup_configuration.rb +6 -3
- data/test/setup_configuration/parameter_factory_test.rb +27 -0
- metadata +13 -7
data/Rakefile
CHANGED
@@ -6,15 +6,14 @@ begin
|
|
6
6
|
Jeweler::Tasks.new do |gem|
|
7
7
|
gem.name = "machine_setup"
|
8
8
|
gem.executables = %W{setup_config_gen setup_init_dsl setup_analyze_dat}
|
9
|
-
gem.default_executable = gem.executables.first
|
10
9
|
gem.summary = %Q{Generating configuration for machine setup parameters.}
|
11
10
|
gem.description = %Q{Helps generating configuration files for machine setup parameters.}
|
12
11
|
gem.email = "robi-wan@suyu.de"
|
13
12
|
gem.homepage = "http://github.com/robi-wan/machine_setup"
|
14
13
|
gem.authors = ["robi-wan"]
|
15
14
|
gem.add_runtime_dependency "i18n", "~> 0.5"
|
16
|
-
gem.add_runtime_dependency "inifile", "~> 0.
|
17
|
-
gem.add_runtime_dependency "erubis", "~> 2.
|
15
|
+
gem.add_runtime_dependency "inifile", "~> 0.4"
|
16
|
+
gem.add_runtime_dependency "erubis", "~> 2.7"
|
18
17
|
gem.add_development_dependency "shoulda"
|
19
18
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
20
19
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.0
|
data/bin/setup_config_gen
CHANGED
@@ -26,16 +26,22 @@ begin
|
|
26
26
|
if File.file?(trans_file)
|
27
27
|
SetupConfiguration::Translation::Translator.i18n_load_path(trans_file)
|
28
28
|
else
|
29
|
-
puts "WARNING: expected file with translations '#{trans_file}' not found."
|
29
|
+
$stderr.puts "WARNING: expected file with translations '#{trans_file}' not found."
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
33
|
generator.generate()
|
34
34
|
|
35
35
|
puts("#{File.basename(__FILE__)} completed.")
|
36
|
-
rescue Exception =>
|
37
|
-
puts(
|
38
|
-
puts(
|
36
|
+
rescue Exception => ex
|
37
|
+
$stderr.puts("#{File.basename(__FILE__)} aborted!")
|
38
|
+
$stderr.puts(ex.message)
|
39
|
+
if trace
|
40
|
+
$stderr.puts(ex.backtrace().join("\n"))
|
41
|
+
else
|
42
|
+
$stderr.puts "(See full trace by running with --trace)"
|
43
|
+
end
|
44
|
+
|
39
45
|
exit(1)
|
40
46
|
|
41
|
-
end
|
47
|
+
end
|
data/bin/setup_init_dsl
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
begin
|
4
|
+
trace = ARGV.delete("--trace")
|
4
5
|
legacy_data_folder=ARGV[0]
|
5
6
|
machine_name=ARGV[1]
|
6
7
|
machine_abbreviation=ARGV[2]
|
@@ -18,10 +19,15 @@ begin
|
|
18
19
|
importer.output
|
19
20
|
|
20
21
|
puts("#{File.basename(__FILE__)} completed.")
|
21
|
-
rescue Exception =>
|
22
|
-
|
23
|
-
puts(
|
24
|
-
|
22
|
+
rescue Exception => ex
|
23
|
+
$stderr.puts("#{File.basename(__FILE__)} aborted!")
|
24
|
+
$stderr.puts(ex.message)
|
25
|
+
if trace
|
26
|
+
$stderr.puts(ex.backtrace().join("\n"))
|
27
|
+
else
|
28
|
+
$stderr.puts "(See full trace by running with --trace)"
|
29
|
+
end
|
30
|
+
|
25
31
|
exit(1)
|
26
32
|
|
27
33
|
end
|
@@ -1,6 +1,6 @@
|
|
1
|
-
# install
|
2
|
-
#
|
3
|
-
# call
|
1
|
+
# install ruby (1.8.x) http://rubyinstaller.org/
|
2
|
+
# or jruby http://jruby.org/
|
3
|
+
# call (j)ruby -S gem install machine_setup
|
4
4
|
# call setup_config_gen <this file>
|
5
5
|
|
6
6
|
SetupConfiguration :ssm, :ssm do
|
@@ -22,6 +22,9 @@ SetupConfiguration :ssm, :ssm do
|
|
22
22
|
param :sensor_height, 4
|
23
23
|
param :sensor_x_distance_to_grinding_point, 5
|
24
24
|
param :grinding_point_height, 6
|
25
|
+
param :reference_angle_grinding_drive, 7
|
26
|
+
param :grinding_angle_drive_home_mode, 8
|
27
|
+
param :tooth_area, 9
|
25
28
|
end
|
26
29
|
|
27
30
|
category :drives do
|
@@ -43,39 +46,12 @@ SetupConfiguration :ssm, :ssm do
|
|
43
46
|
depends_on :blade_drive_selection
|
44
47
|
end
|
45
48
|
|
46
|
-
|
47
|
-
param :linear_axis_drive_distance_revolution, 321 do
|
48
|
-
depends_on :linear_axis_drive_selection
|
49
|
-
end
|
50
|
-
param :linear_axis_drive_gear_in, 322 do
|
51
|
-
depends_on :linear_axis_drive_selection
|
52
|
-
end
|
53
|
-
param :linear_axis_drive_gear_out, 323 do
|
54
|
-
depends_on :linear_axis_drive_selection
|
55
|
-
end
|
56
|
-
param :linear_axis_drive_length, 324 do
|
57
|
-
depends_on :linear_axis_drive_selection
|
58
|
-
end
|
59
|
-
param :linear_axis_drive_motortype, 325 do
|
60
|
-
depends_on :linear_axis_drive_selection
|
61
|
-
end
|
49
|
+
drive :linear_axis, 320
|
62
50
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
param :grinding_angle_drive_gear_in, 332 do
|
68
|
-
depends_on :grinding_angle_drive_selection
|
69
|
-
end
|
70
|
-
param :grinding_angle_drive_gear_out, 333 do
|
71
|
-
depends_on :grinding_angle_drive_selection
|
72
|
-
end
|
73
|
-
param :grinding_angle_drive_length, 334 do
|
74
|
-
depends_on :grinding_angle_drive_selection
|
75
|
-
end
|
76
|
-
param :grinding_angle_drive_motortype, 335 do
|
77
|
-
depends_on :grinding_angle_drive_selection
|
78
|
-
end
|
51
|
+
drive :grinding_angle, 330
|
52
|
+
|
53
|
+
param :grinding_disc_drive_motortype, 345
|
54
|
+
param :sharpening_disc_drive_motortype, 355
|
79
55
|
end
|
80
56
|
|
81
|
-
end
|
57
|
+
end
|
@@ -13,7 +13,7 @@ de:
|
|
13
13
|
xxx0: Steuerung mit realen Achsen und Schutzhauben
|
14
14
|
xxx1: Steuerung simuliert alle nicht angew�hlten Achsen und Schutzhauben
|
15
15
|
xxx2: Touch baut keine Verbindung zur Steuerung auf
|
16
|
-
|
16
|
+
|
17
17
|
|
18
18
|
Zehnerstelle:
|
19
19
|
xx0x: CanBus einschalten
|
@@ -31,46 +31,79 @@ de:
|
|
31
31
|
grinding_point_height:
|
32
32
|
name: "H�he des Schleifpunktes [mm]"
|
33
33
|
comment: |
|
34
|
-
|
35
|
-
|
34
|
+
H�he der Schleifscheibe �ber der 'Nullinie' - horitontale Linie durch den Messerdrehpunkt.
|
35
|
+
Angabe erfolgt in Zehntelmillimeter.
|
36
|
+
|
37
|
+
|
38
|
+
Bsp: Die Angabe 400 wird als 40 Millimeter interpretiert.
|
39
|
+
|
40
|
+
reference_angle_grinding_drive:
|
41
|
+
name: "Referenzwinkel Schleifwinkelmotor [�]"
|
42
|
+
comment: |
|
43
|
+
Der Winkel, bei dem der Schleifwinkelmotor seine Referenz erh�lt. Der Schleifwinkelmotor kann durch eine Fahrt auf Block referenzieren. Da es hierbei Fertigungstoleranzen geben kann, muss der dabei
|
44
|
+
angefahrene Winkel hier eingestellt werden.
|
45
|
+
Bei Referenzierung muss dieser Parameter auf den Winkel des Referenzk�rpers eingestellt werden.
|
46
|
+
Angabe erfolgt in Zehntelgrad.
|
36
47
|
|
37
48
|
|
38
|
-
|
49
|
+
Bsp: Die Angabe 100 wird als 10 Grad interpretiert.
|
39
50
|
|
40
51
|
drive_blade_reference_point:
|
41
52
|
name: "Messer Referenzpunkt [�]"
|
42
|
-
comment:
|
53
|
+
comment: |
|
54
|
+
Einstellung des Referenz-Initiators f�r die Messerachse.
|
55
|
+
Mit Hilfe des Parameters k�nnen unterschiedliche Referenz-Initiator-Positionen ausgeglichen werden.
|
56
|
+
Ziel ist es, einen Wert einzustellen, der daf�r sorgt, dass nach der Referenzfahrt der 'Halbmond' auf der rechten Seite ist und die Messeraufnahmeschrauben horizontal ausgerichtet sind.
|
43
57
|
|
44
58
|
drive_linear_axis_reference_point:
|
45
59
|
name: "Linearachse Referenzpunkt [mm]"
|
46
60
|
comment: |
|
47
|
-
|
48
|
-
|
49
|
-
SSM 100 : 590mm (Stand 1.Juli 2010)
|
50
|
-
|
51
|
-
SSM 101 : 629mm (Stand 03.08.2010)
|
61
|
+
Maximalabstand des Schleifpunktes vom Nullpunkt (Mittelpunkt des Messers), wenn Schlitten auf den entferntesten Anschlag gefahren ist.
|
52
62
|
|
53
63
|
sensor_height:
|
54
64
|
name: "Sensor-H�he [mm]"
|
55
|
-
comment:
|
65
|
+
comment: |
|
66
|
+
H�he des Messerabtastsensors.
|
67
|
+
In welcher H�he ist der Sensor montiert (gemessen wird von der horizontalen Mittellinie).
|
68
|
+
|
69
|
+
|
70
|
+
Angabe erfolgt in Zehntelmillimeter.
|
71
|
+
Bsp: Die Angabe 1900 wird als 190 Millimeter interpretiert.
|
56
72
|
|
57
73
|
sensor_x_distance_to_grinding_point:
|
58
74
|
name: "Sensor-Linksposition [mm]"
|
59
75
|
comment: |
|
60
|
-
|
61
|
-
|
76
|
+
Positon des Messerabtastsensors relativ zur Nullposition (Schleifpunkt) nach links in ausgefahrenem Zustand.
|
77
|
+
|
78
|
+
|
79
|
+
Angabe erfolgt in Zehntelmillimeter.
|
80
|
+
Bsp: Die Angabe 1550 wird als 155 Millimeter interpretiert.
|
81
|
+
|
82
|
+
grinding_angle_drive_home_mode:
|
83
|
+
name: "Referenzmodus des Schleifwinkelmotors"
|
84
|
+
comment: |
|
85
|
+
Konfiguriert die Art der Referenzierung f�r den Schleifwinkelmotor.
|
86
|
+
|
62
87
|
|
63
|
-
|
88
|
+
0: Der Motor referenziert durch Fahrt auf Anschlag.
|
89
|
+
1: Der Motor erh�lt seine Position durch Teachen (nur wirksam bei MultiTurn)
|
90
|
+
|
91
|
+
|
92
|
+
Achtung: Bei Wechsel des Referenzmodus auch den Parameter 'Referenzwinkel Schleifwinkelmotor' anpassen.
|
93
|
+
|
94
|
+
tooth_area:
|
95
|
+
name: "Schleifwinkelbereich mit Z�hnen"
|
96
|
+
comment: "Auswahl des Schleifwinkelbereiches, der Z�hne enth�lt. Schleifscheibe wird abgehoben."
|
64
97
|
|
65
98
|
blade_drive_selection:
|
66
99
|
name: "Messerantrieb abgew�hlt=0/Servo=1/FU=2"
|
67
100
|
comment: &COMMON_DRIVE_CONFIG |
|
68
|
-
|
101
|
+
An-/Abwahl der Achse
|
69
102
|
|
70
103
|
|
71
|
-
|
72
|
-
|
73
|
-
|
104
|
+
0: Achse im System nicht vorhanden, wird vom System simuliert.
|
105
|
+
1: Achse ist im Antriebssystem als Servoantrieb vorhanden.
|
106
|
+
2: Achse ist im Antriebssystem als Frequenzumrichterantrieb vorhanden.
|
74
107
|
|
75
108
|
blade_drive_distance_revolution:
|
76
109
|
name: "Messerantrieb Weg/U [mm]"
|
@@ -91,17 +124,17 @@ de:
|
|
91
124
|
blade_drive_motortype:
|
92
125
|
name: "Messerantrieb Motortyp"
|
93
126
|
comment: &COMMON_DRIVE_MOTORTYPE |
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
127
|
+
Einerstelle:
|
128
|
+
x0: Getriebemotor Nord, 0,37kW
|
129
|
+
x1: Getriebemotor Nord, 0,75kW
|
130
|
+
x2: Getriebemotor Lenze 063C32
|
131
|
+
x3: Getriebemotor Lenze 047C22
|
132
|
+
x4: Getriebemotor Lenze 063C22
|
100
133
|
|
101
134
|
|
102
|
-
|
103
|
-
|
104
|
-
|
135
|
+
Zehnerstelle:
|
136
|
+
0x: PTC inaktiv
|
137
|
+
1x: PTC aktiv
|
105
138
|
|
106
139
|
linear_axis_drive_selection:
|
107
140
|
name: "Linearachse abgew�hlt=0/Servo=1/FU=2"
|
@@ -151,3 +184,12 @@ de:
|
|
151
184
|
name: "Schleifwinkelachse Motortyp"
|
152
185
|
comment: *COMMON_DRIVE_MOTORTYPE
|
153
186
|
|
187
|
+
grinding_disc_drive_motortype:
|
188
|
+
name: "Schleifscheibe Motortyp"
|
189
|
+
comment: &DISC_DRIVE_MOTORTYPE |
|
190
|
+
0: Dunker
|
191
|
+
1: Papst
|
192
|
+
|
193
|
+
sharpening_disc_drive_motortype:
|
194
|
+
name: "Abziehscheibe Motortyp"
|
195
|
+
comment: *DISC_DRIVE_MOTORTYPE
|
@@ -9,18 +9,18 @@ en:
|
|
9
9
|
machine_config:
|
10
10
|
name: "Machine virtual=1 / real=0"
|
11
11
|
comment: |
|
12
|
-
Unit
|
12
|
+
Unit's Place:
|
13
13
|
xx0: Controller with real drives and covers
|
14
14
|
xx1: Controller simulates all selected drives and covers
|
15
15
|
xx2: Webertouch does not connect to Controller
|
16
16
|
|
17
17
|
|
18
|
-
Ten
|
18
|
+
Ten's Place:
|
19
19
|
x0x: CanBus on
|
20
20
|
x1x: CanBus off
|
21
21
|
|
22
22
|
|
23
|
-
Hundred
|
23
|
+
Hundred's Place:
|
24
24
|
1xx: The controller simulates all drives.
|
25
25
|
|
26
26
|
|
@@ -30,23 +30,59 @@ en:
|
|
30
30
|
|
31
31
|
grinding_point_height:
|
32
32
|
name: "Height of Grinding Point [mm]"
|
33
|
-
comment: "Height of Grinding Point
|
33
|
+
comment: "Height of Grinding Point above horizontal central point (pivot point of blade drive) line [mm]"
|
34
34
|
|
35
35
|
drive_blade_reference_point:
|
36
36
|
name: "Blade Drive Reference Point [�]"
|
37
|
-
comment:
|
37
|
+
comment: |
|
38
|
+
Setting for reference initiator of blade drive.
|
39
|
+
This setting is for compensating different reference initiator positions.
|
40
|
+
You have to adjust this setting until the correct position of blade drive is reached.
|
41
|
+
Correct position means: half-moon is on the right hand side and blade holding fixture screws are horizontally alined.
|
38
42
|
|
39
43
|
drive_linear_axis_reference_point:
|
40
44
|
name: "Linear Axis Reference Point [mm]"
|
41
|
-
comment: "
|
45
|
+
comment: "Maximum distance of Grinding Point to central point (pivot point of blade drive) when Linear Axis is as far away as possible from central point."
|
42
46
|
|
43
47
|
sensor_height:
|
44
48
|
name: "Sensorheight [mm]"
|
45
|
-
comment:
|
49
|
+
comment: |
|
50
|
+
Height of Sensor [mm]
|
51
|
+
Height of Sensor above horizontal central point (pivot point of blade drive) line.
|
46
52
|
|
47
53
|
sensor_x_distance_to_grinding_point:
|
48
54
|
name: "Sensor Distance to Grinding Point [mm]"
|
49
|
-
comment:
|
55
|
+
comment: |
|
56
|
+
Positon of Blade Scanning Sensor relative to Grinding Point in extended state.
|
57
|
+
|
58
|
+
|
59
|
+
Value is given in tenth of millimeter
|
60
|
+
Example: Value 1550 will be used as 155 millimeters.
|
61
|
+
|
62
|
+
reference_angle_grinding_drive:
|
63
|
+
name: "Reference Angle Grinding Angle Drive [�]"
|
64
|
+
comment: |
|
65
|
+
Value is given in tenth of degree.
|
66
|
+
|
67
|
+
|
68
|
+
Example: Value 100 will be used as 10 degree.
|
69
|
+
|
70
|
+
grinding_angle_drive_home_mode:
|
71
|
+
name: "Reference mode of Grinding Angle Drive"
|
72
|
+
comment: |
|
73
|
+
Configure the used mode for referencing the angle grinding drive.
|
74
|
+
This is especially useful if this drive has a MultiTurn-Encoder.
|
75
|
+
|
76
|
+
|
77
|
+
0: Move drive until torque reached
|
78
|
+
1: Teach drive position (only effective with multiturn drive)
|
79
|
+
|
80
|
+
|
81
|
+
Attention: When changing reference mode do not forget to adjust parameter 'Reference Angle Grinding Angle Drive'.
|
82
|
+
|
83
|
+
tooth_area:
|
84
|
+
name: "Grinding Angle Area with Teeth"
|
85
|
+
comment: "Grinding disc will lift off from blade at configured grinding area."
|
50
86
|
|
51
87
|
blade_drive_selection:
|
52
88
|
name: "Blade Drive - Select/Deselect"
|
@@ -74,12 +110,15 @@ en:
|
|
74
110
|
|
75
111
|
blade_drive_length:
|
76
112
|
name: "Blade Drive - Length [mm]"
|
77
|
-
comment: "
|
113
|
+
comment: &COMMON_DRIVE_LENGTH "Length or Traversing Range of Drive [in mm]."
|
78
114
|
|
79
115
|
blade_drive_motortype:
|
80
116
|
name: "Blade Drive - Motortype"
|
81
117
|
comment: &COMMON_DRIVE_MOTORTYPE |
|
82
|
-
|
118
|
+
Select type of Drive
|
119
|
+
|
120
|
+
|
121
|
+
Unit's Place:
|
83
122
|
x0: Nord, 0,37kW
|
84
123
|
x1: Nord, 0,75kW
|
85
124
|
x2: Lenze 063C32
|
@@ -87,7 +126,7 @@ en:
|
|
87
126
|
x4: Lenze 063C22
|
88
127
|
|
89
128
|
|
90
|
-
Ten
|
129
|
+
Ten's Place:
|
91
130
|
0x: without PTC
|
92
131
|
1x: with PTC
|
93
132
|
|
@@ -109,7 +148,7 @@ en:
|
|
109
148
|
|
110
149
|
linear_axis_drive_length:
|
111
150
|
name: "Linear Axis - Length [mm]"
|
112
|
-
comment:
|
151
|
+
comment: *COMMON_DRIVE_LENGTH
|
113
152
|
|
114
153
|
linear_axis_drive_motortype:
|
115
154
|
name: "Linear Axis - Motortype"
|
@@ -133,9 +172,21 @@ en:
|
|
133
172
|
|
134
173
|
grinding_angle_drive_length:
|
135
174
|
name: "Grinding Angle Axis - Length [mm]"
|
136
|
-
comment:
|
175
|
+
comment: *COMMON_DRIVE_LENGTH
|
137
176
|
|
138
177
|
grinding_angle_drive_motortype:
|
139
178
|
name: "Grinding Angle Axis - Motortype"
|
140
179
|
comment: *COMMON_DRIVE_MOTORTYPE
|
141
180
|
|
181
|
+
grinding_disc_drive_motortype:
|
182
|
+
name: "Grinding Disc - Motortype"
|
183
|
+
comment: &DISC_DRIVE_MOTORTYPE |
|
184
|
+
Select type of Drive
|
185
|
+
|
186
|
+
|
187
|
+
0: Dunker
|
188
|
+
1: Papst
|
189
|
+
|
190
|
+
sharpening_disc_drive_motortype:
|
191
|
+
name: "Sharpening Disc - Motortype"
|
192
|
+
comment: *DISC_DRIVE_MOTORTYPE
|
@@ -1,7 +1,8 @@
|
|
1
|
-
# install
|
2
|
-
#
|
3
|
-
# call
|
1
|
+
# install ruby (1.8.x) http://rubyinstaller.org/
|
2
|
+
# or jruby http://jruby.org/
|
3
|
+
# call (j)ruby -S gem install machine_setup
|
4
4
|
# call setup_config_gen <this file>
|
5
|
+
|
5
6
|
SetupConfiguration :underleaver, :ul do
|
6
7
|
|
7
8
|
setting do
|
@@ -142,4 +143,4 @@ SetupConfiguration :underleaver, :ul do
|
|
142
143
|
end
|
143
144
|
end
|
144
145
|
|
145
|
-
end
|
146
|
+
end
|
@@ -36,15 +36,15 @@ de:
|
|
36
36
|
|
37
37
|
distance_blade_to_sheet_drive:
|
38
38
|
name: "Weg Schneide bis Blattantrieb [mm]"
|
39
|
-
comment: ""
|
39
|
+
comment: "Konfiguriert den Abstand [mm] des Messers vom Blattantrieb."
|
40
40
|
|
41
41
|
distance_sheet_drive_to_sheet_exit:
|
42
42
|
name: "Weg Blattantrieb bis Blattaustritt [mm]"
|
43
|
-
comment: ""
|
43
|
+
comment: "Konfiguriert den Abstand [mm] des Blattantriebes vom Blattaustritt."
|
44
44
|
|
45
45
|
time_for_cutting_unit:
|
46
46
|
name: "Zeit in der die Schneideeinrichtung oben sein muss [ms]"
|
47
|
-
comment: ""
|
47
|
+
comment: "Konfiguriert die Zeit [ms], in der die Schneideinrichtung bei automatischen Hebevorg�ngen an der oberen Endposition angekommen sein mu�."
|
48
48
|
|
49
49
|
paper_jam_detection_active:
|
50
50
|
name: "Papierstau�berwachung"
|
@@ -349,7 +349,7 @@ de:
|
|
349
349
|
|
350
350
|
paper_roll_drive_distance_revolution:
|
351
351
|
name: "Bahnantrieb Weg/Umdrehung [mm]"
|
352
|
-
comment:
|
352
|
+
comment: &COMMON_DISTANCE_REVOLUTION "L�nge des zur�ckgelegten Weges w�hrend einer Umdrehung [mm]"
|
353
353
|
|
354
354
|
paper_roll_drive_gear_in:
|
355
355
|
name: "Bahnantrieb Getriebefaktor Z�hler"
|
@@ -365,7 +365,7 @@ de:
|
|
365
365
|
|
366
366
|
blade_drive_diameter:
|
367
367
|
name: "Messerwelle Durchmesser [mm]"
|
368
|
-
comment: ""
|
368
|
+
comment: "Durchmesser der Messerwelle [mm]"
|
369
369
|
|
370
370
|
blade_drive_gear_in:
|
371
371
|
name: "Messerwelle Getriebefaktor Z�hler"
|
@@ -381,7 +381,7 @@ de:
|
|
381
381
|
|
382
382
|
paper_feed_drive_distance_revolution:
|
383
383
|
name: "Blattantrieb Weg/Umdrehung [mm]"
|
384
|
-
comment:
|
384
|
+
comment: *COMMON_DISTANCE_REVOLUTION
|
385
385
|
|
386
386
|
paper_feed_drive_gear_in:
|
387
387
|
name: "Blattantrieb Getriebefaktor Z�hler"
|
@@ -397,7 +397,7 @@ de:
|
|
397
397
|
|
398
398
|
transport_drive_distance_revolution:
|
399
399
|
name: "Portionsauflageband Weg/Umdrehung [mm]"
|
400
|
-
comment:
|
400
|
+
comment: *COMMON_DISTANCE_REVOLUTION
|
401
401
|
|
402
402
|
transport_drive_gear_in:
|
403
403
|
name: "Portionsauflageband Getriebefaktor Z�hler"
|
@@ -417,7 +417,7 @@ de:
|
|
417
417
|
|
418
418
|
infeed_drive_distance_revolution:
|
419
419
|
name: "Einlegeband Weg/Umdrehung [mm]"
|
420
|
-
comment:
|
420
|
+
comment: *COMMON_DISTANCE_REVOLUTION
|
421
421
|
|
422
422
|
infeed_drive_gear_in:
|
423
423
|
name: "Einlegeband Getriebefaktor Z�hler"
|
@@ -0,0 +1,84 @@
|
|
1
|
+
module SetupConfiguration
|
2
|
+
|
3
|
+
module Generator
|
4
|
+
@output_path=""
|
5
|
+
|
6
|
+
def output_path
|
7
|
+
@output_path
|
8
|
+
end
|
9
|
+
|
10
|
+
def output_path=(out)
|
11
|
+
@output_path=out
|
12
|
+
end
|
13
|
+
|
14
|
+
def output(bind, template)
|
15
|
+
if template then
|
16
|
+
rhtml = Erubis::Eruby.new(template)
|
17
|
+
|
18
|
+
File.open(File.join(output_path, bind.output), "w") do |f|
|
19
|
+
f << rhtml.result(bind.get_binding)
|
20
|
+
end
|
21
|
+
else
|
22
|
+
$stderr.puts "WARNING: No template found. Generation of #{bind.output} aborted."
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
# [:de, "deutsch", (0..199), "deutsch1.lng"],
|
27
|
+
# [:de, "deutsch", (200..599), "deutsch2.lng"],
|
28
|
+
# [:de, "deutsch", (600..1299), "deutsch3.lng"],
|
29
|
+
# [:en, "english", (0..199), "english1.lng"],
|
30
|
+
# [:en, "english", (200..599), "english2.lng"],
|
31
|
+
# [:en, "english", (600..1299), "english3.lng"],
|
32
|
+
def description_bindings()
|
33
|
+
Translation.languages().collect() do |lang|
|
34
|
+
SetupConfiguration.description_ranges().collect() do |range|
|
35
|
+
# constructs the output file names
|
36
|
+
out= "#{Translation.language_name(lang)}#{SetupConfiguration.description_ranges().index(range)+1}.lng"
|
37
|
+
ParameterTemplateBinding.new(lang, range, out)
|
38
|
+
end
|
39
|
+
end.flatten()
|
40
|
+
end
|
41
|
+
|
42
|
+
def description_template
|
43
|
+
%q{
|
44
|
+
[<%= lang_name.upcase %>]
|
45
|
+
<% parameter_range.each do |number| %>
|
46
|
+
HILFEPARAM<%= number %>=<%= description(number) %>
|
47
|
+
<% end %>
|
48
|
+
}.gsub(/^\s*/, '')
|
49
|
+
end
|
50
|
+
|
51
|
+
def parameter_bindings()
|
52
|
+
Translation.languages().collect() do |lang|
|
53
|
+
# constructs the output file names
|
54
|
+
out= "#{Translation.language_name(lang)}.lng"
|
55
|
+
ParameterTemplateBinding.new(lang, SetupConfiguration.parameter_range(), out)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
def parameter_template(lang)
|
60
|
+
find_template("#{lang.to_s}.lng.erb")
|
61
|
+
end
|
62
|
+
|
63
|
+
def mps_template()
|
64
|
+
find_template("mps3.ini.erb")
|
65
|
+
end
|
66
|
+
|
67
|
+
def mps_binding()
|
68
|
+
MPSTemplateBinding.new do |mps|
|
69
|
+
mps.output="mps3.ini"
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
def find_template(name)
|
74
|
+
template=File.join(File.dirname(__FILE__), "templates", name)
|
75
|
+
if File.file?(template)
|
76
|
+
File.read(template)
|
77
|
+
else
|
78
|
+
$stderr.puts "WARNING: Template file #{template} expected but not found"
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
end #module Generator
|
83
|
+
|
84
|
+
end#module SetupConfiguration
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# encoding:
|
1
|
+
# encoding: windows-1252
|
2
2
|
module SetupConfiguration
|
3
3
|
|
4
4
|
module Legacy
|
@@ -45,7 +45,7 @@ module SetupConfiguration
|
|
45
45
|
input = File.read(template)
|
46
46
|
eruby = Erubis::Eruby.new(input)
|
47
47
|
|
48
|
-
File.open(File.join(output_path, "#{@name}.#{
|
48
|
+
File.open(File.join(output_path, "#{@name}.#{Translation::FILE_EXTENSION}" ), "w") do |f|
|
49
49
|
f << eruby.result(binding())
|
50
50
|
end
|
51
51
|
|
@@ -130,7 +130,7 @@ module SetupConfiguration
|
|
130
130
|
#check for multiple defined parameters (in different categories)
|
131
131
|
#warn and skip
|
132
132
|
if param_by_number(param_number) then
|
133
|
-
puts("WARNING: parameter '#{ param_key(param_number)}' with number '#{param_number}' multiple defined. Duplicate found in category '#{category_name(cat_number)}' will be skipped.")
|
133
|
+
$stderr.puts("WARNING: parameter '#{ param_key(param_number)}' with number '#{param_number}' multiple defined. Duplicate found in category '#{category_name(cat_number)}' will be skipped.")
|
134
134
|
else
|
135
135
|
parameter = Parameter.new(param_number)
|
136
136
|
parameter.depends_on(deps[index])
|