fanuc-ekg 0.1.1 → 0.1.2
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/History.txt +3 -0
- data/lib/fanuc-ekg.rb +30 -30
- data/version.txt +1 -1
- metadata +2 -2
data/History.txt
CHANGED
data/lib/fanuc-ekg.rb
CHANGED
@@ -92,35 +92,35 @@ module Ekg
|
|
92
92
|
@safety_io = options["Safety I/O"]
|
93
93
|
|
94
94
|
@velocity = {
|
95
|
-
:j1 => options["Vel J1[
|
96
|
-
:j2 => options["Vel J2[
|
97
|
-
:j3 => options["Vel J3[
|
98
|
-
:j4 => options["Vel J4[
|
99
|
-
:j5 => options["Vel J5[
|
95
|
+
:j1 => options["Vel J1\[%\]"],
|
96
|
+
:j2 => options["Vel J2\[%\]"],
|
97
|
+
:j3 => options["Vel J3\[%\]"],
|
98
|
+
:j4 => options["Vel J4\[%\]"],
|
99
|
+
:j5 => options["Vel J5\[%\]"]
|
100
100
|
}
|
101
101
|
|
102
102
|
@torque = {
|
103
|
-
:j1 => options["Torq J1[
|
104
|
-
:j2 => options["Torq J2[
|
105
|
-
:j3 => options["Torq J3[
|
106
|
-
:j4 => options["Torq J4[
|
107
|
-
:j5 => options["Torq J5[
|
103
|
+
:j1 => options["Torq J1\[%\]"],
|
104
|
+
:j2 => options["Torq J2\[%\]"],
|
105
|
+
:j3 => options["Torq J3\[%\]"],
|
106
|
+
:j4 => options["Torq J4\[%\]"],
|
107
|
+
:j5 => options["Torq J5\[%\]"]
|
108
108
|
}
|
109
109
|
|
110
110
|
@angle = {
|
111
|
-
:j1 => options["Angle J1[rad]"],
|
112
|
-
:j2 => options["Angle J2[rad]"],
|
113
|
-
:j3 => options["Angle J3[rad]"],
|
114
|
-
:j4 => options["Angle J4[rad]"],
|
115
|
-
:j5 => options["Angle J5[rad]"],
|
111
|
+
:j1 => options["Angle J1\[rad\]"],
|
112
|
+
:j2 => options["Angle J2\[rad\]"],
|
113
|
+
:j3 => options["Angle J3\[rad\]"],
|
114
|
+
:j4 => options["Angle J4\[rad\]"],
|
115
|
+
:j5 => options["Angle J5\[rad\]"],
|
116
116
|
}
|
117
117
|
|
118
118
|
@disturbance_torque = {
|
119
|
-
:j1 => options["DistTorq J1[
|
120
|
-
:j2 => options["DistTorq J2[
|
121
|
-
:j3 => options["DistTorq J3[
|
122
|
-
:j4 => options["DistTorq J4[
|
123
|
-
:j5 => options["DistTorq J5[
|
119
|
+
:j1 => options["DistTorq J1\[%\]"],
|
120
|
+
:j2 => options["DistTorq J2\[%\]"],
|
121
|
+
:j3 => options["DistTorq J3\[%\]"],
|
122
|
+
:j4 => options["DistTorq J4\[%\]"],
|
123
|
+
:j5 => options["DistTorq J5\[%\]"]
|
124
124
|
}
|
125
125
|
end
|
126
126
|
|
@@ -156,20 +156,20 @@ module Ekg
|
|
156
156
|
|
157
157
|
class << self
|
158
158
|
|
159
|
-
def split(
|
159
|
+
def split(string)
|
160
160
|
@output = {}
|
161
161
|
@str = ""
|
162
|
-
|
163
|
-
next if line
|
164
|
-
next if line
|
165
|
-
next if line
|
166
|
-
next if line
|
167
|
-
if line
|
162
|
+
string.each_line do |line|
|
163
|
+
next if line =~ /Severity(\r)?\n/
|
164
|
+
next if line =~ /Group,Bin0,BinV1T1,BinV2T1,BinV1T2,BinV2T2(\r)?\n/
|
165
|
+
next if line =~ /MRA_Num,DateTime,ErrorText,Safety I\/O,Vel J1\[%\],Vel J2\[%\],Vel J3\[%\],Vel J4\[%\],Vel J5\[%\],Vel J6\[%\],Vel J7\[%\],Vel J8\[%\],Torq J1\[%\],Torq J2\[%\],Torq J3\[%\],Torq J4\[%\],Torq J5\[%\],Torq J6\[%\],Torq J7\[%\],Torq J8\[%\],Angle J1\[rad\],Angle J2\[rad\],Angle J3\[rad\],Angle J4\[rad\],Angle J5\[rad\],Angle J6\[rad\],Angle J7\[rad\],Angle J8\[rad\],DistTorq J1\[%\],DistTorq J2\[%\],DistTorq J3\[%\],DistTorq J4\[%\],DistTorq J5\[%\],DistTorq J6\[%\],DistTorq J7\[%\],DistTorq J8\[%\](\r)?\n/
|
166
|
+
next if line =~ /Num,DateTime,ErrorText,Safety I\/O,Vel J1\[%\],Vel J2\[%\],Vel J3\[%\],Vel J4\[%\],Vel J5\[%\],Vel J6\[%\],Vel J7\[%\],Vel J8\[%\],Torq J1\[%\],Torq J2\[%\],Torq J3\[%\],Torq J4\[%\],Torq J5\[%\],Torq J6\[%\],Torq J7\[%\],Torq J8\[%\],Angle J1\[rad\],Angle J2\[rad\],Angle J3\[rad\],Angle J4\[rad\],Angle J5\[rad\],Angle J6\[rad\],Angle J7\[rad\],Angle J8\[rad\],DistTorq J1\[%\],DistTorq J2\[%\],DistTorq J3\[%\],DistTorq J4\[%\],DistTorq J5\[%\],DistTorq J6\[%\],DistTorq J7\[%\],DistTorq J8\[%\](\r)?\n/
|
167
|
+
if line =~ /Most Recent Alarms\(MRA\) for Group 1(\r)?\n/
|
168
168
|
@output[:bins] = @str
|
169
169
|
@str = ""
|
170
170
|
next
|
171
171
|
end
|
172
|
-
if line
|
172
|
+
if line =~ /Worst Disturbance Alarms for Group 1(\r)?\n/
|
173
173
|
@output[:recent] = @str
|
174
174
|
@str = ""
|
175
175
|
next
|
@@ -197,12 +197,12 @@ module Ekg
|
|
197
197
|
end
|
198
198
|
|
199
199
|
# parse recent alarms
|
200
|
-
PARSER.parse(output[:recent],:headers => "MRA_Num,DateTime,ErrorText,Safety I/O,Vel J1[
|
200
|
+
PARSER.parse(output[:recent],:headers => "MRA_Num,DateTime,ErrorText,Safety I/O,Vel J1\[%\],Vel J2\[%\],Vel J3\[%\],Vel J4\[%\],Vel J5\[%\],Vel J6\[%\],Vel J7\[%\],Vel J8\[%\],Torq J1\[%\],Torq J2\[%\],Torq J3\[%\],Torq J4\[%\],Torq J5\[%\],Torq J6\[%\],Torq J7\[%\],Torq J8\[%\],Angle J1\[rad\],Angle J2\[rad\],Angle J3\[rad\],Angle J4\[rad\],Angle J5\[rad\],Angle J6\[rad\],Angle J7\[rad\],Angle J8\[rad\],DistTorq J1\[%\],DistTorq J2\[%\],DistTorq J3\[%\],DistTorq J4\[%\],DistTorq J5\[%\],DistTorq J6\[%\],DistTorq J7\[%\],DistTorq J8\[%\]") do |line|
|
201
201
|
@ekg_data.alarms[:recent] << Ekg::Alarm.new(line.to_hash)
|
202
202
|
end
|
203
203
|
|
204
204
|
# parse worst disturbances
|
205
|
-
PARSER.parse(output[:worst],:headers=>"Num,DateTime,ErrorText,Safety I/O,Vel J1[
|
205
|
+
PARSER.parse(output[:worst],:headers=>"Num,DateTime,ErrorText,Safety I/O,Vel J1\[%\],Vel J2\[%\],Vel J3\[%\],Vel J4\[%\],Vel J5\[%\],Vel J6\[%\],Vel J7\[%\],Vel J8\[%\],Torq J1\[%\],Torq J2\[%\],Torq J3\[%\],Torq J4\[%\],Torq J5\[%\],Torq J6\[%\],Torq J7\[%\],Torq J8\[%\],Angle J1\[rad\],Angle J2\[rad\],Angle J3\[rad\],Angle J4\[rad\],Angle J5\[rad\],Angle J6\[rad\],Angle J7\[rad\],Angle J8\[rad\],DistTorq J1\[%\],DistTorq J2\[%\],DistTorq J3\[%\],DistTorq J4\[%\],DistTorq J5\[%\],DistTorq J6\[%\],DistTorq J7\[%\],DistTorq J8\[%\]") do |line|
|
206
206
|
@ekg_data.alarms[:worst] << Ekg::Alarm.new(line.to_hash)
|
207
207
|
end
|
208
208
|
|
data/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|