machine_setup 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/.document CHANGED
@@ -1,5 +1,5 @@
1
- README.rdoc
2
- lib/**/*.rb
3
- bin/*
4
- features/**/*.feature
5
- MIT-LICENSE
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ MIT-LICENSE
data/MIT-LICENSE CHANGED
@@ -1,20 +1,20 @@
1
- Copyright (c) 2009 robi-wan
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright (c) 2009-2011 robi-wan
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc CHANGED
@@ -14,8 +14,6 @@ You can install the gem with
14
14
 
15
15
  gem install machine_setup
16
16
 
17
- This gem depends on 'i18n'.
18
-
19
17
  == Usage
20
18
 
21
19
  Describe your setup configuration for a machine (including translations for supported languages) and set the main
data/Rakefile CHANGED
@@ -12,9 +12,10 @@ begin
12
12
  gem.email = "robi-wan@suyu.de"
13
13
  gem.homepage = "http://github.com/robi-wan/machine_setup"
14
14
  gem.authors = ["robi-wan"]
15
- gem.add_runtime_dependency "i18n", ">= 0.3.3"
16
- gem.add_runtime_dependency "ini", ">= 0.1.1"
17
- gem.add_runtime_dependency "erubis", ">= 2.6.5"
15
+ gem.add_runtime_dependency "i18n", "~> 0.5"
16
+ gem.add_runtime_dependency "inifile", "~> 0.3"
17
+ gem.add_runtime_dependency "erubis", "~> 2.6"
18
+ gem.add_development_dependency "shoulda"
18
19
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
19
20
  end
20
21
  Jeweler::GemcutterTasks.new
data/TODO CHANGED
@@ -4,6 +4,20 @@
4
4
 
5
5
  - check erb templates with mri ruby and jruby (erb.rb)
6
6
 
7
- - check erubis
8
-
9
7
  - rubygems usage: http://gist.github.com/54177
8
+
9
+ - use categories from setupconfiguration in legacy part
10
+ (it is the same class)
11
+
12
+ - replace class abc::df end through
13
+ module abc
14
+ class df end
15
+ end
16
+
17
+ - param_ref
18
+ - error handling with undefined param key?
19
+
20
+ - param_ref support/usage in legacy part
21
+
22
+ - add options --trace for stack trace (in case of error)
23
+ - done: setup_config_gen
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
data/bin/setup_config_gen CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  begin
4
+ trace = ARGV.delete("--trace")
4
5
  param_def=ARGV[0]
5
6
 
6
7
  raise RuntimeError.new("Missing argument: file with parameter definition") if param_def.nil?
@@ -33,9 +34,8 @@ begin
33
34
 
34
35
  puts("#{File.basename(__FILE__)} completed.")
35
36
  rescue Exception => e
36
- #puts("Error, program will exit => #{e}!")
37
37
  puts(e.message)
38
- #puts(e.backtrace().join("\n"))
38
+ puts(e.backtrace().join("\n")) if trace
39
39
  exit(1)
40
40
 
41
41
  end
@@ -0,0 +1,81 @@
1
+ # install java http://java.sun.com/javase/downloads/index.jsp
2
+ # install jruby http://jruby.org/download
3
+ # call jruby -S gem install machine_setup
4
+ # call setup_config_gen <this file>
5
+
6
+ SetupConfiguration :ssm, :ssm do
7
+
8
+ setting do
9
+ min 0..0
10
+ max 0..0
11
+ balance_min 700..729
12
+ balance_max 730..759
13
+ machine_type :all_machines, 0, 0..999
14
+ machine_type :ssm_one, 1, 1000..1999
15
+ machine_type :ssm_two, 2, 2000..2999
16
+ end
17
+
18
+ category :common do
19
+ param :machine_config, 1
20
+ param :drive_blade_reference_point, 2
21
+ param :drive_linear_axis_reference_point, 3
22
+ param :sensor_height, 4
23
+ param :sensor_x_distance_to_grinding_point, 5
24
+ param :grinding_point_height, 6
25
+ end
26
+
27
+ category :drives do
28
+
29
+ param :blade_drive_selection, 310
30
+ param :blade_drive_distance_revolution, 311 do
31
+ depends_on :blade_drive_selection
32
+ end
33
+ param :blade_drive_gear_in, 312 do
34
+ depends_on :blade_drive_selection
35
+ end
36
+ param :blade_drive_gear_out, 313 do
37
+ depends_on :blade_drive_selection
38
+ end
39
+ # param :blade_drive_length, 314 do
40
+ # depends_on :blade_drive_selection
41
+ # end
42
+ param :blade_drive_motortype, 315 do
43
+ depends_on :blade_drive_selection
44
+ end
45
+
46
+ param :linear_axis_drive_selection, 320
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
62
+
63
+ param :grinding_angle_drive_selection, 330
64
+ param :grinding_angle_drive_distance_revolution, 331 do
65
+ depends_on :grinding_angle_drive_selection
66
+ end
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
79
+ end
80
+
81
+ end
@@ -0,0 +1,153 @@
1
+ de:
2
+
3
+ common:
4
+ name: "Allgemeines"
5
+
6
+ drives:
7
+ name: "Antriebe SSM"
8
+
9
+ machine_config:
10
+ name: "Maschine virtuell=1 / real=0"
11
+ comment: |
12
+ Einerstelle:
13
+ xxx0: Steuerung mit realen Achsen und Schutzhauben
14
+ xxx1: Steuerung simuliert alle nicht angew�hlten Achsen und Schutzhauben
15
+ xxx2: Touch baut keine Verbindung zur Steuerung auf
16
+
17
+
18
+ Zehnerstelle:
19
+ xx0x: CanBus einschalten
20
+ xx1x: CanBus ausschalten
21
+
22
+
23
+ Hunderterstelle:
24
+ x1xx: Steuerung simuliert alle Antriebe (auch bei Anwahl)
25
+
26
+
27
+ Tausenderstelle:
28
+ 0xxx: realer Sicherheitskreis
29
+ 1xxx: virtueller Sicherheitskreis
30
+
31
+ grinding_point_height:
32
+ name: "H�he des Schleifpunktes [mm]"
33
+ comment: |
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
+ drive_blade_reference_point:
41
+ name: "Messer Referenzpunkt [�]"
42
+ comment: "Einstellung des Referenz-Initiators f�r die Messerachse"
43
+
44
+ drive_linear_axis_reference_point:
45
+ name: "Linearachse Referenzpunkt [mm]"
46
+ comment: |
47
+ Abstand des Schleifpunktes vom Nullpunkt (Mittelpunkt des Messers)
48
+
49
+ SSM 100 : 590mm (Stand 1.Juli 2010)
50
+
51
+ SSM 101 : 629mm (Stand 03.08.2010)
52
+
53
+ sensor_height:
54
+ name: "Sensor-H�he [mm]"
55
+ comment: "H�he des Kontur-Sensors.��In welcher H�he ist der Sensor montiert (gemessen wird von der horizontalen Mittellinie)����Angabe erfolgt in Zehntelmillimeter.����Bsp: Die Angabe 1900 wird als 190 Millimeter interpretiert."
56
+
57
+ sensor_x_distance_to_grinding_point:
58
+ name: "Sensor-Linksposition [mm]"
59
+ comment: |
60
+ Relative Sensorpositon von Nullposition (Schleifpunkt) nach links in ausgefahrenem Zustand.
61
+ Angabe erfolgt in Zehntelmillimeter.
62
+
63
+ Bsp: Die Angabe 1550 wird als 155 Millimeter interpretiert.
64
+
65
+ blade_drive_selection:
66
+ name: "Messerantrieb abgew�hlt=0/Servo=1/FU=2"
67
+ comment: &COMMON_DRIVE_CONFIG |
68
+ An-/Abwahl der Achse
69
+
70
+
71
+ 0: Achse im System nicht vorhanden, wird vom System simuliert.
72
+ 1: Achse ist im Antriebssystem als Servoantrieb vorhanden.
73
+ 2: Achse ist im Antriebssystem als Frequenzumrichterantrieb vorhanden.
74
+
75
+ blade_drive_distance_revolution:
76
+ name: "Messerantrieb Weg/U [mm]"
77
+ comment: &COMMON_DRIVE_DISTANCE_REVOLUTION "Weg pro Wellenumdrehung in Millimeter"
78
+
79
+ blade_drive_gear_in:
80
+ name: "Messerantrieb Getriebefaktor Z�hler"
81
+ comment: &COMMON_GEAR_IN "Anzahl der Getriebez�hne auf Motorseite; angebaute Getriebe ber�cksichtigen."
82
+
83
+ blade_drive_gear_out:
84
+ name: "Messerantrieb Getriebefaktor Nenner"
85
+ comment: &COMMON_GEAR_OUT "Anzahl der Getriebez�hne auf Antriebswellenseite; angebaute Getriebe ber�cksichtigen."
86
+
87
+ blade_drive_length:
88
+ name: "Messerantrieb L�nge [mm]"
89
+ comment: &COMMON_DRIVE_LENGTH "Gesamtl�nge oder Verfahrbereich des Antriebs in Millimeter."
90
+
91
+ blade_drive_motortype:
92
+ name: "Messerantrieb Motortyp"
93
+ comment: &COMMON_DRIVE_MOTORTYPE |
94
+ Einerstelle:
95
+ x0: Getriebemotor Nord, 0,37kW
96
+ x1: Getriebemotor Nord, 0,75kW
97
+ x2: Getriebemotor Lenze 063C32
98
+ x3: Getriebemotor Lenze 047C22
99
+ x4: Getriebemotor Lenze 063C22
100
+
101
+
102
+ Zehnerstelle:
103
+ 0x: PTC inaktiv
104
+ 1x: PTC aktiv
105
+
106
+ linear_axis_drive_selection:
107
+ name: "Linearachse abgew�hlt=0/Servo=1/FU=2"
108
+ comment: *COMMON_DRIVE_CONFIG
109
+
110
+ linear_axis_drive_distance_revolution:
111
+ name: "Linearachse Weg/U [mm]"
112
+ comment: *COMMON_DRIVE_DISTANCE_REVOLUTION
113
+
114
+ linear_axis_drive_gear_in:
115
+ name: "Linearachse Getriebefaktor Z�hler"
116
+ comment: *COMMON_GEAR_IN
117
+
118
+ linear_axis_drive_gear_out:
119
+ name: "Linearachse Getriebefaktor Nenner"
120
+ comment: *COMMON_GEAR_OUT
121
+
122
+ linear_axis_drive_length:
123
+ name: "Linearachse L�nge [mm]"
124
+ comment: *COMMON_DRIVE_LENGTH
125
+
126
+ linear_axis_drive_motortype:
127
+ name: "Linearachse Motortyp"
128
+ comment: *COMMON_DRIVE_MOTORTYPE
129
+
130
+ grinding_angle_drive_selection:
131
+ name: "Schleifwinkelachse abgew�hlt=0/Servo=1/FU=2"
132
+ comment: *COMMON_DRIVE_CONFIG
133
+
134
+ grinding_angle_drive_distance_revolution:
135
+ name: "Schleifwinkelachse Weg/U [mm]"
136
+ comment: *COMMON_DRIVE_DISTANCE_REVOLUTION
137
+
138
+ grinding_angle_drive_gear_in:
139
+ name: "Schleifwinkelachse Getriebefaktor Z�hler"
140
+ comment: *COMMON_GEAR_IN
141
+
142
+ grinding_angle_drive_gear_out:
143
+ name: "Schleifwinkelachse Getriebefaktor Nenner"
144
+ comment: *COMMON_GEAR_OUT
145
+
146
+ grinding_angle_drive_length:
147
+ name: "Schleifwinkelachse L�nge [mm]"
148
+ comment: *COMMON_DRIVE_LENGTH
149
+
150
+ grinding_angle_drive_motortype:
151
+ name: "Schleifwinkelachse Motortyp"
152
+ comment: *COMMON_DRIVE_MOTORTYPE
153
+
@@ -0,0 +1,141 @@
1
+ en:
2
+
3
+ common:
4
+ name: "Common"
5
+
6
+ drives:
7
+ name: "Drives"
8
+
9
+ machine_config:
10
+ name: "Machine virtual=1 / real=0"
11
+ comment: |
12
+ Unit�s Place:
13
+ xx0: Controller with real drives and covers
14
+ xx1: Controller simulates all selected drives and covers
15
+ xx2: Webertouch does not connect to Controller
16
+
17
+
18
+ Ten�s Place:
19
+ x0x: CanBus on
20
+ x1x: CanBus off
21
+
22
+
23
+ Hundred�s Place:
24
+ 1xx: The controller simulates all drives.
25
+
26
+
27
+ Thousand's Place:
28
+ 0xxx: real Safety Circuit
29
+ 1xxx: virtual Safety Circuit
30
+
31
+ grinding_point_height:
32
+ name: "Height of Grinding Point [mm]"
33
+ comment: "Height of Grinding Point gemessen von der horizontalen Mittelpunkt-Linie [mm]"
34
+
35
+ drive_blade_reference_point:
36
+ name: "Blade Drive Reference Point [�]"
37
+ comment: "Einstellung des Referenz-Initiators f�r die Messerachse����"
38
+
39
+ drive_linear_axis_reference_point:
40
+ name: "Linear Axis Reference Point [mm]"
41
+ comment: "vom Mittelpunkt des Messers nach rechts gemessen��SSM 100 : 590mm (Stand 1.Juli 2010)��SSM 101 :"
42
+
43
+ sensor_height:
44
+ name: "Sensorheight [mm]"
45
+ comment: "Height des Kontur-Sensors [mm]��In welcher Height ist der Sensor montiert (gemessen wird von der horizontalen Mittellinie)"
46
+
47
+ sensor_x_distance_to_grinding_point:
48
+ name: "Sensor Distance to Grinding Point [mm]"
49
+ comment: "relative Sensorpositon von Nullposition nach links in ausgefahrenem Zustand [mm]����"
50
+
51
+ blade_drive_selection:
52
+ name: "Blade Drive - Select/Deselect"
53
+ comment: &COMMON_DRIVE_CONFIG |
54
+ Select/Deselect drive
55
+
56
+
57
+ 0: Drive doesn't exist.
58
+ 1: Drive exists as a servo.
59
+ 2: Drive exists as a frequency converter.
60
+
61
+
62
+ blade_drive_distance_revolution:
63
+ name: "Blade Drive - Distance per revolution [mm]"
64
+ comment: &COMMON_DRIVE_DISTANCE_REVOLUTION "X= Distance X per revolution [in mm]"
65
+
66
+ blade_drive_gear_in:
67
+ name: "Blade Drive - Gear IN"
68
+ comment: &COMMON_GEAR_IN "Number of teeth motor sided."
69
+
70
+
71
+ blade_drive_gear_out:
72
+ name: "Blade Drive - Gear OUT"
73
+ comment: &COMMON_GEAR_OUT "Number of teeth - drive shaft sided."
74
+
75
+ blade_drive_length:
76
+ name: "Blade Drive - Length [mm]"
77
+ comment: "Gesamtl�nge oder Verfahrbereich des Antriebs in mm."
78
+
79
+ blade_drive_motortype:
80
+ name: "Blade Drive - Motortype"
81
+ comment: &COMMON_DRIVE_MOTORTYPE |
82
+ Unit�s Place:
83
+ x0: Nord, 0,37kW
84
+ x1: Nord, 0,75kW
85
+ x2: Lenze 063C32
86
+ x3: Lenze 047C22
87
+ x4: Lenze 063C22
88
+
89
+
90
+ Ten�s Place:
91
+ 0x: without PTC
92
+ 1x: with PTC
93
+
94
+ linear_axis_drive_selection:
95
+ name: "Linear Axis - Select/Deselect"
96
+ comment: *COMMON_DRIVE_CONFIG
97
+
98
+ linear_axis_drive_distance_revolution:
99
+ name: "Linear Axis - Distance per revolution [mm]"
100
+ comment: *COMMON_DRIVE_DISTANCE_REVOLUTION
101
+
102
+ linear_axis_drive_gear_in:
103
+ name: "Linear Axis - Gear IN"
104
+ comment: *COMMON_GEAR_IN
105
+
106
+ linear_axis_drive_gear_out:
107
+ name: "Linear Axis - Gear OUT"
108
+ comment: *COMMON_GEAR_OUT
109
+
110
+ linear_axis_drive_length:
111
+ name: "Linear Axis - Length [mm]"
112
+ comment: &COMMON_DRIVE_LENGTH "Length or Traversing Range of Drive in Millimeter."
113
+
114
+ linear_axis_drive_motortype:
115
+ name: "Linear Axis - Motortype"
116
+ comment: *COMMON_DRIVE_MOTORTYPE
117
+
118
+ grinding_angle_drive_selection:
119
+ name: "Grinding Angle Axis - Select/Deselect"
120
+ comment: *COMMON_DRIVE_CONFIG
121
+
122
+ grinding_angle_drive_distance_revolution:
123
+ name: "Grinding Angle Axis - Distance per revolution [mm]"
124
+ comment: *COMMON_DRIVE_DISTANCE_REVOLUTION
125
+
126
+ grinding_angle_drive_gear_in:
127
+ name: "Grinding Angle Axis - Gear IN"
128
+ comment: *COMMON_GEAR_IN
129
+
130
+ grinding_angle_drive_gear_out:
131
+ name: "Grinding Angle Axis - Gear OUT"
132
+ comment: *COMMON_GEAR_OUT
133
+
134
+ grinding_angle_drive_length:
135
+ name: "Grinding Angle Axis - Length [mm]"
136
+ comment: "Gesamtl�nge oder Verfahrbereich des Antriebs in mm."
137
+
138
+ grinding_angle_drive_motortype:
139
+ name: "Grinding Angle Axis - Motortype"
140
+ comment: *COMMON_DRIVE_MOTORTYPE
141
+
@@ -1,3 +1,7 @@
1
+ # install java http://java.sun.com/javase/downloads/index.jsp
2
+ # install jruby http://jruby.org/download
3
+ # call jruby -S gem install machine_setup
4
+ # call setup_config_gen <this file>
1
5
  SetupConfiguration :underleaver, :ul do
2
6
 
3
7
  setting do
@@ -12,7 +16,9 @@ SetupConfiguration :underleaver, :ul do
12
16
  end
13
17
 
14
18
  category :common do
19
+
15
20
  param :underleaver_config, 1
21
+ param :config_safety_circuit, 14
16
22
  param :distance_photo_sensor_from_start, 9
17
23
  param :distance_photo_sensor, 2
18
24
  param :distance_blade_to_sheet_drive, 3
@@ -46,6 +52,25 @@ SetupConfiguration :underleaver, :ul do
46
52
 
47
53
  param :decrease_simulated_portions, 24
48
54
  param :length_correction_first_sheet_after_insert_sheet, 25
55
+ param :dancer_pressure_algorithm, 26
56
+ param :blade_rotate_proof_installable, 27
57
+ param :blade_velocity_ratio, 28
58
+ param :sheet_retraction, 33
59
+ param :paper_feed_continuous_motion, 34
60
+ param :paper_feed_velocity_ratio, 35 do
61
+ depends_on :paper_feed_continuous_motion
62
+ end
63
+ end
64
+
65
+ category :role_configuration do
66
+
67
+ param :role_diameter_teached_maximum, 29
68
+ param :role_diameter_teached_minimum, 30
69
+ param :role_diameter_message_level, 31
70
+ param :role_diameter_limit, 32 do
71
+ depends_on :role_diameter_message_level
72
+ end
73
+
49
74
  end
50
75
 
51
76
  category :drives do