fanuc-ekg 0.0.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 +9 -0
- data/README.txt +54 -0
- data/Rakefile +20 -0
- data/bin/ekg +7 -0
- data/lib/fanuc-ekg.rb +218 -0
- data/spec/fanuc-ekg_spec.rb +80 -0
- data/spec/fixtures/R14_2010_09_24.csv +36 -0
- data/spec/spec_helper.rb +15 -0
- data/test/test_ekg.rb +0 -0
- data/version.txt +1 -0
- metadata +93 -0
data/History.txt
ADDED
data/README.txt
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
== fanuc-ekg
|
2
|
+
* by Jay Strybis
|
3
|
+
* http://strybis.com
|
4
|
+
|
5
|
+
== DESCRIPTION:
|
6
|
+
|
7
|
+
fanuc-ekg is a library for accessing the data exported from the FANUC Robotics
|
8
|
+
MotionPRO Robot EKG analysis tool.
|
9
|
+
|
10
|
+
== FEATURES/PROBLEMS:
|
11
|
+
|
12
|
+
* None yet
|
13
|
+
|
14
|
+
== SYNOPSIS:
|
15
|
+
|
16
|
+
@ekg_data = FANUC::Ekg.parse("path_to_some_ekg_file.csv")
|
17
|
+
@ekg_data.bins[:v2t1] # array of collisions by axis in BinV2T1
|
18
|
+
@ekg_data.bins[:v2t1].total # total collisions in BinV2T1
|
19
|
+
@ekg_data.bins[:v1t1][3] # number of collisions in BinV1T1 for axis 3
|
20
|
+
@ekg_data.alarms[:recent] # array of recent alarm data
|
21
|
+
@ekg_data.alarms[:worst] # array of worst alarm data
|
22
|
+
|
23
|
+
== REQUIREMENTS:
|
24
|
+
|
25
|
+
* A CSV file exported from DiagnosticsPRO
|
26
|
+
|
27
|
+
== INSTALL:
|
28
|
+
|
29
|
+
* sudo gem install fanuc-ekg
|
30
|
+
|
31
|
+
== LICENSE:
|
32
|
+
|
33
|
+
(The MIT License)
|
34
|
+
|
35
|
+
Copyright (c) 2010 Jay Strybis
|
36
|
+
|
37
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
38
|
+
a copy of this software and associated documentation files (the
|
39
|
+
'Software'), to deal in the Software without restriction, including
|
40
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
41
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
42
|
+
permit persons to whom the Software is furnished to do so, subject to
|
43
|
+
the following conditions:
|
44
|
+
|
45
|
+
The above copyright notice and this permission notice shall be
|
46
|
+
included in all copies or substantial portions of the Software.
|
47
|
+
|
48
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
49
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
50
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
51
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
52
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
53
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
54
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
begin
|
3
|
+
require 'bones'
|
4
|
+
rescue LoadError
|
5
|
+
abort '### Please install the "bones" gem ###'
|
6
|
+
end
|
7
|
+
|
8
|
+
task :default => 'test:run'
|
9
|
+
task 'gem:release' => 'test:run'
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
Bones {
|
14
|
+
name 'fanuc-ekg'
|
15
|
+
authors 'Jay Strybis'
|
16
|
+
email 'jay.strybis@gmail.com'
|
17
|
+
url 'http://github.com/unreal/fanuc-ekg'
|
18
|
+
depend_on 'fastercsv', '1.5.3' if RUBY_VERSION.to_f < 1.9
|
19
|
+
}
|
20
|
+
|
data/bin/ekg
ADDED
data/lib/fanuc-ekg.rb
ADDED
@@ -0,0 +1,218 @@
|
|
1
|
+
module FANUC
|
2
|
+
module Ekg
|
3
|
+
|
4
|
+
# :stopdoc:
|
5
|
+
LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
|
6
|
+
PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
|
7
|
+
# :startdoc:
|
8
|
+
|
9
|
+
# Returns the version string for the library.
|
10
|
+
#
|
11
|
+
def self.version
|
12
|
+
@version ||= File.read(path('version.txt')).strip
|
13
|
+
end
|
14
|
+
|
15
|
+
# Returns the library path for the module. If any arguments are given,
|
16
|
+
# they will be joined to the end of the libray path using
|
17
|
+
# <tt>File.join</tt>.
|
18
|
+
#
|
19
|
+
def self.libpath( *args, &block )
|
20
|
+
rv = args.empty? ? LIBPATH : ::File.join(LIBPATH, args.flatten)
|
21
|
+
if block
|
22
|
+
begin
|
23
|
+
$LOAD_PATH.unshift LIBPATH
|
24
|
+
rv = block.call
|
25
|
+
ensure
|
26
|
+
$LOAD_PATH.shift
|
27
|
+
end
|
28
|
+
end
|
29
|
+
return rv
|
30
|
+
end
|
31
|
+
|
32
|
+
# Returns the lpath for the module. If any arguments are given,
|
33
|
+
# they will be joined to the end of the path using
|
34
|
+
# <tt>File.join</tt>.
|
35
|
+
#
|
36
|
+
def self.path( *args, &block )
|
37
|
+
rv = args.empty? ? PATH : ::File.join(PATH, args.flatten)
|
38
|
+
if block
|
39
|
+
begin
|
40
|
+
$LOAD_PATH.unshift PATH
|
41
|
+
rv = block.call
|
42
|
+
ensure
|
43
|
+
$LOAD_PATH.shift
|
44
|
+
end
|
45
|
+
end
|
46
|
+
return rv
|
47
|
+
end
|
48
|
+
|
49
|
+
# Utility method used to require all files ending in .rb that lie in the
|
50
|
+
# directory below this file that has the same name as the filename passed
|
51
|
+
# in. Optionally, a specific _directory_ name can be passed in such that
|
52
|
+
# the _filename_ does not have to be equivalent to the directory.
|
53
|
+
#
|
54
|
+
def self.require_all_libs_relative_to( fname, dir = nil )
|
55
|
+
dir ||= ::File.basename(fname, '.*')
|
56
|
+
search_me = ::File.expand_path(
|
57
|
+
::File.join(::File.dirname(fname), dir, '**', '*.rb'))
|
58
|
+
|
59
|
+
Dir.glob(search_me).sort.each {|rb| require rb}
|
60
|
+
end
|
61
|
+
|
62
|
+
# what parser should we use
|
63
|
+
if RUBY_VERSION.to_f >= 1.9
|
64
|
+
require 'csv'
|
65
|
+
PARSER = CSV
|
66
|
+
else
|
67
|
+
require 'faster_csv'
|
68
|
+
PARSER = FasterCSV
|
69
|
+
end
|
70
|
+
|
71
|
+
class Bin
|
72
|
+
attr_accessor :collision_counts
|
73
|
+
def initialize
|
74
|
+
@collision_counts = []
|
75
|
+
end
|
76
|
+
|
77
|
+
def total
|
78
|
+
@collision_counts.inject {|sum,x| sum+x}
|
79
|
+
end
|
80
|
+
|
81
|
+
def [](id)
|
82
|
+
@collision_counts[id-1]
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
class Alarm
|
87
|
+
attr_reader :occured_at, :error_text, :safety_io, :velocity, :torque, :angle, :disturbance_torque
|
88
|
+
def initialize(options={})
|
89
|
+
@occured_at = options["DateTime"]
|
90
|
+
@error_text = options["ErrorText"]
|
91
|
+
@safety_io = options["Safety I/O"]
|
92
|
+
|
93
|
+
@velocity = {
|
94
|
+
:j1 => options["Vel J1[%]"],
|
95
|
+
:j2 => options["Vel J2[%]"],
|
96
|
+
:j3 => options["Vel J3[%]"],
|
97
|
+
:j4 => options["Vel J4[%]"],
|
98
|
+
:j5 => options["Vel J5[%]"]
|
99
|
+
}
|
100
|
+
|
101
|
+
@torque = {
|
102
|
+
:j1 => options["Torq J1[%]"],
|
103
|
+
:j2 => options["Torq J2[%]"],
|
104
|
+
:j3 => options["Torq J3[%]"],
|
105
|
+
:j4 => options["Torq J4[%]"],
|
106
|
+
:j5 => options["Torq J5[%]"]
|
107
|
+
}
|
108
|
+
|
109
|
+
@angle = {
|
110
|
+
:j1 => options["Angle J1[rad]"],
|
111
|
+
:j2 => options["Angle J2[rad]"],
|
112
|
+
:j3 => options["Angle J3[rad]"],
|
113
|
+
:j4 => options["Angle J4[rad]"],
|
114
|
+
:j5 => options["Angle J5[rad]"],
|
115
|
+
}
|
116
|
+
|
117
|
+
@disturbance_torque = {
|
118
|
+
:j1 => options["DistTorq J1[%]"],
|
119
|
+
:j2 => options["DistTorq J2[%]"],
|
120
|
+
:j3 => options["DistTorq J3[%]"],
|
121
|
+
:j4 => options["DistTorq J4[%]"],
|
122
|
+
:j5 => options["DistTorq J5[%]"]
|
123
|
+
}
|
124
|
+
end
|
125
|
+
|
126
|
+
end
|
127
|
+
|
128
|
+
class EkgData
|
129
|
+
attr_accessor :bins, :alarms
|
130
|
+
def initialize
|
131
|
+
@bins = {
|
132
|
+
:zero => Bin.new,
|
133
|
+
:v1t1 => Bin.new,
|
134
|
+
:v2t1 => Bin.new,
|
135
|
+
:v1t2 => Bin.new,
|
136
|
+
:v2t2 => Bin.new
|
137
|
+
}
|
138
|
+
@alarms = {
|
139
|
+
:recent => [],
|
140
|
+
:worst => []
|
141
|
+
}
|
142
|
+
end
|
143
|
+
|
144
|
+
def axis(id)
|
145
|
+
@sum = 0
|
146
|
+
@bins.each do |key,bin|
|
147
|
+
@sum += bin[id]
|
148
|
+
end
|
149
|
+
# should i remove bin 0?
|
150
|
+
@sum
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
class << self
|
157
|
+
def open(file_path)
|
158
|
+
File.open(file_path)
|
159
|
+
end
|
160
|
+
|
161
|
+
def split(file)
|
162
|
+
@output = {}
|
163
|
+
@str = ""
|
164
|
+
file.each do |line|
|
165
|
+
next if line == "Severity\n"
|
166
|
+
next if line == "Group,Bin0,BinV1T1,BinV2T1,BinV1T2,BinV2T2\n"
|
167
|
+
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[%]\n"
|
168
|
+
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[%]\n"
|
169
|
+
if line == "Most Recent Alarms(MRA) for Group 1\n"
|
170
|
+
@output[:bins] = @str
|
171
|
+
@str = ""
|
172
|
+
next
|
173
|
+
end
|
174
|
+
if line == "Worst Disturbance Alarms for Group 1\n"
|
175
|
+
@output[:recent] = @str
|
176
|
+
@str = ""
|
177
|
+
next
|
178
|
+
end
|
179
|
+
@str += line
|
180
|
+
end
|
181
|
+
@output[:worst] = @str
|
182
|
+
return @output
|
183
|
+
end
|
184
|
+
|
185
|
+
|
186
|
+
def parse(file_path)
|
187
|
+
@ekg_data = FANUC::Ekg::EkgData.new
|
188
|
+
|
189
|
+
f = open(file_path)
|
190
|
+
output = split(f) # split the output into 3 usable CSV sections
|
191
|
+
|
192
|
+
# parse bins
|
193
|
+
PARSER.parse(output[:bins],:headers=>"Group,Bin0,BinV1T1,BinV2T1,BinV1T2,BinV2T2") do |line|
|
194
|
+
@ekg_data.bins[:zero].collision_counts << line['Bin0'].to_i
|
195
|
+
@ekg_data.bins[:v1t1].collision_counts << line['BinV1T1'].to_i
|
196
|
+
@ekg_data.bins[:v2t1].collision_counts << line['BinV2T1'].to_i
|
197
|
+
@ekg_data.bins[:v1t2].collision_counts << line['BinV1T2'].to_i
|
198
|
+
@ekg_data.bins[:v2t2].collision_counts << line['BinV2T2'].to_i
|
199
|
+
end
|
200
|
+
|
201
|
+
# parse recent alarms
|
202
|
+
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|
|
203
|
+
@ekg_data.alarms[:recent] << Ekg::Alarm.new(line.to_hash)
|
204
|
+
end
|
205
|
+
|
206
|
+
# parse worst disturbances
|
207
|
+
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|
|
208
|
+
@ekg_data.alarms[:worst] << Ekg::Alarm.new(line.to_hash)
|
209
|
+
end
|
210
|
+
|
211
|
+
@ekg_data
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
end # module Ekg
|
216
|
+
end # module FANUC
|
217
|
+
FANUC::Ekg.require_all_libs_relative_to(__FILE__)
|
218
|
+
|
@@ -0,0 +1,80 @@
|
|
1
|
+
|
2
|
+
require File.join(File.dirname(__FILE__), %w[spec_helper])
|
3
|
+
|
4
|
+
describe FANUC::Ekg do
|
5
|
+
|
6
|
+
it "should be able to open a file" do
|
7
|
+
f = FANUC::Ekg.open(File.join(File.dirname(__FILE__), %w[fixtures R14_2010_09_24.csv]))
|
8
|
+
f.should be_a_kind_of(File)
|
9
|
+
end
|
10
|
+
|
11
|
+
describe "with file" do
|
12
|
+
before(:each) do
|
13
|
+
@f = FANUC::Ekg.open(File.join(File.dirname(__FILE__), %w[fixtures R14_2010_09_24.csv]))
|
14
|
+
end
|
15
|
+
|
16
|
+
it "should split into a hash" do
|
17
|
+
@s = FANUC::Ekg.split(@f).should be_a_kind_of(Hash)
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should have the right keys" do
|
21
|
+
FANUC::Ekg.split(@f).keys.should eql([:bins,:recent,:worst])
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
describe FANUC::Ekg::EkgData do
|
26
|
+
it "should return an FANUC::Ekg::EkgData object" do
|
27
|
+
FANUC::Ekg.parse(File.join(File.dirname(__FILE__), %w[fixtures R14_2010_09_24.csv])).should be_a_kind_of(FANUC::Ekg::EkgData)
|
28
|
+
end
|
29
|
+
before(:each) do
|
30
|
+
@ekg_data = FANUC::Ekg.parse(File.join(File.dirname(__FILE__), %w[fixtures R14_2010_09_24.csv]))
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should respond to bins" do
|
34
|
+
@ekg_data.respond_to?(:bins).should be_true
|
35
|
+
end
|
36
|
+
|
37
|
+
it "should have 5 bins" do
|
38
|
+
@ekg_data.bins.length.should eql(5)
|
39
|
+
end
|
40
|
+
|
41
|
+
it "should have 10 axes in each bin" do
|
42
|
+
@ekg_data.bins.each do |key,bin|
|
43
|
+
bin.collision_counts.length.should eql(10)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe "bins" do
|
48
|
+
it "zero should have a total of 5886" do
|
49
|
+
@ekg_data.bins[:zero].total.should eql(5886)
|
50
|
+
end
|
51
|
+
|
52
|
+
it "zero, axis 1, should have a total of 543" do
|
53
|
+
@ekg_data.bins[:zero][1].should eql(543)
|
54
|
+
end
|
55
|
+
|
56
|
+
it "v1t1, axis 3, should have a total of 299" do
|
57
|
+
@ekg_data.bins[:v1t1][3].should eql(299)
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
|
62
|
+
it "should be able to total collisions for each axis" do
|
63
|
+
@ekg_data.respond_to?(:axis).should be_true
|
64
|
+
end
|
65
|
+
|
66
|
+
it "should have the right total for axis 1, 1202" do
|
67
|
+
@ekg_data.axis(1).should eql(1202)
|
68
|
+
end
|
69
|
+
|
70
|
+
it "should have 10 recent alarms" do
|
71
|
+
@ekg_data.alarms[:recent].length.should eql(10)
|
72
|
+
end
|
73
|
+
|
74
|
+
it "should have 10 worst alarms" do
|
75
|
+
@ekg_data.alarms[:worst].length.should eql(10)
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
Severity
|
2
|
+
Group,Bin0,BinV1T1,BinV2T1,BinV1T2,BinV2T2
|
3
|
+
1,543,463,179,0,17
|
4
|
+
1,437,321,367,18,59
|
5
|
+
1,440,299,435,10,18
|
6
|
+
1,434,431,161,142,34
|
7
|
+
1,426,624,132,13,7
|
8
|
+
1,1202,0,0,0,0
|
9
|
+
1,1202,0,0,0,0
|
10
|
+
1,1202,0,0,0,0
|
11
|
+
|
12
|
+
|
13
|
+
Most Recent Alarms(MRA) for Group 1
|
14
|
+
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[%]
|
15
|
+
1,9/15/2010 12:27:00,Limit error (G:%d^2 A:%x^3 Hex),,2.43,25.84,19.09,7.06,7.96,0,0,0,0,1.46,0.77,0.21,0.04,0,0,0,0.72,-0.59,1.75,-1.75,3.82,0,0,0,22.4256292906178,49.9375780274657,3.51648351648352,5.55386023802258,6.18131868131868,0,0,0
|
16
|
+
2,9/16/2010 10:12:36,Limit error (G:%d^2 A:%x^3 Hex),,1.44,11.21,8.04,2.64,2.6,0,0,0,0,0.26,0.03,0.3,0.04,0,0,0,0.47,-0.66,1.72,-1.72,3.55,0,0,0,17.162471395881,51.4357053682896,1.64835164835165,7.2627403112603,9.27197802197802,0,0,0
|
17
|
+
3,9/16/2010 10:40:22,Limit error (G:%d^2 A:%x^3 Hex),,0.12,5.42,3.74,1.8,1.29,0,0,0,0,0.01,0.13,0,0,0,0,0,0.57,-0.6,1.75,-1.75,3.61,0,0,0,13.1578947368421,71.0362047440699,8.46153846153846,8.3613060726274,5.97527472527473,0,0,0
|
18
|
+
4,9/16/2010 22:40:40,IMSTP input (Group:%d),Fence open\IMSTP,0.02,12.96,20.35,22.59,5.32,0,0,0,0,0.54,0,0.42,0.04,0,0,0,0.13,1.64,1.72,-1.69,-0.1,0,0,0,0,0,0,0,0,0,0,0
|
19
|
+
5,9/20/2010 08:21:44,Collision Detect alarm (G:%d A:%d),,6.44,3.46,21.19,15.94,2.37,0,0,0,0,0.03,0.19,0.64,0.02,0,0,0,1.27,0.69,1.6,-1.6,0.28,0,0,0,29.6338672768879,7.49063670411985,25.7142857142857,150.259383582545,59.9587912087912,0,0,0
|
20
|
+
6,9/20/2010 09:11:52,Collision Detect alarm (G:%d A:%d),,1.93,12.63,11.74,0.72,6.93,0,0,0,0,0.84,0,0.09,0.13,0,0,0,0.93,0.09,1.83,-1.83,-1.22,0,0,0,13.6155606407323,13.7328339575531,10.6593406593407,100.640830027464,23.1456043956044,0,0,0
|
21
|
+
7,9/20/2010 10:48:18,Collision Detect alarm (G:%d A:%d),,11.3,11.29,13.59,2.07,34.08,0,0,0,0,0.45,0,0.04,0.36,0,0,0,0.95,0.21,1.85,-1.85,-0.97,0,0,0,0.91533180778032,33.3333333333333,30.3296703296703,101.312175770522,1.16758241758242,0,0,0
|
22
|
+
8,9/21/2010 00:50:26,IMSTP input (Group:%d),Fence open\IMSTP,0.03,12.96,20.38,22.63,5.32,0,0,0,0,0.58,0,0.45,0.03,0,0,0,0.13,1.64,1.72,-1.69,-0.1,0,0,0,0,0,0,0,0,0,0,0
|
23
|
+
9,9/22/2010 00:29:46,IMSTP input (Group:%d),Fence open\IMSTP,0.03,12.96,20.37,22.62,5.33,0,0,0,0,0.54,0,0.4,0.03,0,0,0,0.13,1.64,1.72,-1.69,-0.1,0,0,0,0,0,0,0,0,0,0,0
|
24
|
+
10,9/23/2010 07:22:44,Collision Detect alarm (G:%d A:%d),,21.32,12.91,10.74,2.73,30.55,0,0,0,0,0.05,0.01,0.39,0.5,0,0,0,0.39,-0.3,1.83,-1.83,3.66,0,0,0,26.6590389016018,103.245942571785,123.736263736264,8.39182178822093,142.032967032967,0,0,0
|
25
|
+
Worst Disturbance Alarms for Group 1
|
26
|
+
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[%]
|
27
|
+
1,3/16/2010 07:04:36,Door open or E.Stop,,0.44,1.63,9.49,6.5,1.29,0,0,0,0.61,0.03,0.04,0.01,0.04,0,0,0,1.03,-0.25,1.7,-1.7,1.91,0,0,0,8.12356979405034,8.48938826466916,21.4285714285714,157.949343912115,6.11263736263736,0,0,0
|
28
|
+
2,3/16/2010 07:04:36,Collision Detect alarm (G:%d A:%d),,0.44,1.63,9.49,6.5,1.29,0,0,0,0.61,0.03,0.04,0.01,0.04,0,0,0,1.03,-0.25,1.7,-1.7,1.91,0,0,0,8.12356979405034,8.48938826466916,21.4285714285714,157.949343912115,6.11263736263736,0,0,0
|
29
|
+
3,4/22/2010 07:41:52,Door open or E.Stop,,2.72,0.42,7.29,6.36,0.88,0,0,0,0.29,0.48,0.01,2.05,0.21,0,0,0,1.04,-0.29,1.69,-1.69,2,0,0,0,5.49199084668192,9.86267166042447,24.7252747252747,157.094903875496,7.89835164835165,0,0,0
|
30
|
+
4,4/22/2010 07:41:52,Collision Detect alarm (G:%d A:%d),,2.72,0.42,7.29,6.36,0.88,0,0,0,0.29,0.48,0.01,2.05,0.21,0,0,0,1.04,-0.29,1.69,-1.69,2,0,0,0,5.49199084668192,9.86267166042447,24.7252747252747,157.094903875496,7.89835164835165,0,0,0
|
31
|
+
5,1/19/2010 15:11:40,Door open or E.Stop,,39.64,82.73,103.21,16.87,17.25,0,0,0,0.48,0.37,0.68,0.27,0.11,0,0,0,1.27,0.53,1.65,-1.65,0.15,0,0,0,25.4004576659039,14.856429463171,21.7582417582418,156.484589563625,140.865384615385,0,0,0
|
32
|
+
6,1/19/2010 15:11:40,Collision Detect alarm (G:%d A:%d),,39.64,82.73,103.21,16.87,17.25,0,0,0,0.48,0.37,0.68,0.27,0.11,0,0,0,1.27,0.53,1.65,-1.65,0.15,0,0,0,25.4004576659039,14.856429463171,21.7582417582418,156.484589563625,140.865384615385,0,0,0
|
33
|
+
7,7/13/2010 07:50:58,Door open or E.Stop,,9.12,6.52,1.49,3.47,5.63,0,0,0,0.44,0.01,0.01,0.1,0.06,0,0,0,0.62,-0.46,1.77,-1.77,-1,0,0,0,4.34782608695652,82.521847690387,70.3296703296703,156.393042416845,102.197802197802,0,0,0
|
34
|
+
8,7/13/2010 07:50:58,Collision Detect alarm (G:%d A:%d),,9.12,6.52,1.49,3.47,5.63,0,0,0,0.44,0.01,0.01,0.1,0.06,0,0,0,0.62,-0.46,1.77,-1.77,-1,0,0,0,4.34782608695652,82.521847690387,70.3296703296703,156.393042416845,102.197802197802,0,0,0
|
35
|
+
9,2/10/2010 15:29:06,Collision Detect alarm (G:%d A:%d),,0.84,7.92,13.7,5.33,2.73,0,0,0,0.18,0.15,0.12,0.14,0.05,0,0,0,-1.11,0.52,1.65,-1.65,-0.41,0,0,0,51.487414187643,109.36329588015,53.5164835164835,155.202929508697,0.343406593406593,0,0,0
|
36
|
+
10,3/1/2010 12:48:02,Collision Detect alarm (G:%d A:%d),,82.89,97.29,88.82,9.1,5.72,0,0,0,0.41,8.41,1.96,0.15,0.05,0,0,0,1.13,0.06,1.75,-1.75,0,0,0,0,16.4759725400458,18.7265917602996,18.5714285714286,154.287458040891,12.5686813186813,0,0,0
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
|
2
|
+
require File.expand_path(
|
3
|
+
File.join(File.dirname(__FILE__), %w[.. lib fanuc-ekg]))
|
4
|
+
|
5
|
+
#Spec::Runner.configure do |config|
|
6
|
+
# == Mock Framework
|
7
|
+
#
|
8
|
+
# RSpec uses it's own mocking framework by default. If you prefer to
|
9
|
+
# use mocha, flexmock or RR, uncomment the appropriate line:
|
10
|
+
#
|
11
|
+
# config.mock_with :mocha
|
12
|
+
# config.mock_with :flexmock
|
13
|
+
# config.mock_with :rr
|
14
|
+
#end
|
15
|
+
|
data/test/test_ekg.rb
ADDED
File without changes
|
data/version.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.2
|
metadata
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fanuc-ekg
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 2
|
9
|
+
version: 0.0.2
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Jay Strybis
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-10-14 00:00:00 -05:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: bones
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 3
|
30
|
+
- 4
|
31
|
+
- 7
|
32
|
+
version: 3.4.7
|
33
|
+
type: :development
|
34
|
+
version_requirements: *id001
|
35
|
+
description: |-
|
36
|
+
fanuc-ekg is a library for accessing the data exported from the FANUC Robotics
|
37
|
+
MotionPRO Robot EKG analysis tool.
|
38
|
+
email: jay.strybis@gmail.com
|
39
|
+
executables:
|
40
|
+
- ekg
|
41
|
+
extensions: []
|
42
|
+
|
43
|
+
extra_rdoc_files:
|
44
|
+
- History.txt
|
45
|
+
- README.txt
|
46
|
+
- bin/ekg
|
47
|
+
- version.txt
|
48
|
+
files:
|
49
|
+
- History.txt
|
50
|
+
- README.txt
|
51
|
+
- Rakefile
|
52
|
+
- bin/ekg
|
53
|
+
- lib/fanuc-ekg.rb
|
54
|
+
- spec/fanuc-ekg_spec.rb
|
55
|
+
- spec/fixtures/R14_2010_09_24.csv
|
56
|
+
- spec/spec_helper.rb
|
57
|
+
- test/test_ekg.rb
|
58
|
+
- version.txt
|
59
|
+
has_rdoc: true
|
60
|
+
homepage: http://github.com/unreal/fanuc-ekg
|
61
|
+
licenses: []
|
62
|
+
|
63
|
+
post_install_message:
|
64
|
+
rdoc_options:
|
65
|
+
- --main
|
66
|
+
- README.txt
|
67
|
+
require_paths:
|
68
|
+
- lib
|
69
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
segments:
|
75
|
+
- 0
|
76
|
+
version: "0"
|
77
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
|
+
none: false
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
segments:
|
83
|
+
- 0
|
84
|
+
version: "0"
|
85
|
+
requirements: []
|
86
|
+
|
87
|
+
rubyforge_project: fanuc-ekg
|
88
|
+
rubygems_version: 1.3.7
|
89
|
+
signing_key:
|
90
|
+
specification_version: 3
|
91
|
+
summary: fanuc-ekg is a library for accessing the data exported from the FANUC Robotics MotionPRO Robot EKG analysis tool
|
92
|
+
test_files:
|
93
|
+
- test/test_ekg.rb
|