tallakt-plcutil 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +6 -0
- data/LICENSE +2 -0
- data/README.rdoc +2 -33
- data/Rakefile +0 -15
- data/lib/tallakt-plcutil/siemens/awl_pretty_print_runner.rb +7 -5
- data/lib/tallakt-plcutil/siemens/awlfile.rb +13 -14
- data/lib/tallakt-plcutil/version.rb +4 -0
- data/lib/tallakt-plcutil.rb +8 -1
- metadata +49 -86
- data/.gitignore +0 -2
- data/Manifest.txt +0 -42
- data/TODO +0 -1
- data/VERSION +0 -1
- data/script/console +0 -10
- data/script/console.cmd +0 -1
- data/script/destroy +0 -14
- data/script/destroy.cmd +0 -1
- data/script/generate +0 -14
- data/script/generate.cmd +0 -1
- data/tallakt-plcutil.gemspec +0 -79
- data/test/helper.rb +0 -10
- data/test/input_files/step7_v5.4/00000001.AWL +0 -139
- data/test/input_files/step7_v5.4/S7_pro2.zip +0 -0
- data/test/input_files/step7_v5.4/SYMLIST.DBF +0 -0
- data/test/test_tallakt-plcutil.rb +0 -7
data/History.txt
CHANGED
data/LICENSE
CHANGED
data/README.rdoc
CHANGED
@@ -6,7 +6,7 @@ http://github.com/tallakt/plcutil
|
|
6
6
|
|
7
7
|
A set of command line utilities and helper classes to convert between IO list files of different PLC types into different HMI types.
|
8
8
|
|
9
|
-
Currently Siemens and Wonderware are supported, Schneider and Wonderware IAS support planned in the near future.
|
9
|
+
Currently Siemens, Schneider and Wonderware are supported, Schneider and Wonderware IAS support planned in the near future.
|
10
10
|
|
11
11
|
This is still a quite rough version - pre alpha!!
|
12
12
|
|
@@ -30,38 +30,7 @@ Convert a PL7 text export file to intouch CSV import file
|
|
30
30
|
The commands support the --help parameter for a full list of parameters
|
31
31
|
|
32
32
|
|
33
|
-
== REQUIREMENTS:
|
34
|
-
|
35
|
-
* FIX (list of requirements)
|
36
|
-
|
37
33
|
== INSTALL:
|
38
34
|
|
39
|
-
|
40
|
-
sudo gem install tallakt-plcutil
|
41
|
-
|
42
|
-
|
43
|
-
== LICENSE:
|
44
|
-
|
45
|
-
(The MIT License)
|
46
|
-
|
47
|
-
Copyright (c) 2009 Tallak Tveide
|
48
|
-
|
49
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
50
|
-
a copy of this software and associated documentation files (the
|
51
|
-
'Software'), to deal in the Software without restriction, including
|
52
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
53
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
54
|
-
permit persons to whom the Software is furnished to do so, subject to
|
55
|
-
the following conditions:
|
56
|
-
|
57
|
-
The above copyright notice and this permission notice shall be
|
58
|
-
included in all copies or substantial portions of the Software.
|
59
|
-
|
60
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
61
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
62
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
63
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
64
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
65
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
66
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
35
|
+
gem install tallakt-plcutil
|
67
36
|
|
data/Rakefile
CHANGED
@@ -1,21 +1,6 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'rake'
|
3
3
|
|
4
|
-
begin
|
5
|
-
require 'jeweler'
|
6
|
-
Jeweler::Tasks.new do |gem|
|
7
|
-
gem.name = "tallakt-plcutil"
|
8
|
-
gem.summary = %Q{Ruby PLC file library}
|
9
|
-
gem.description = %Q{Ruby library for using Siemens and Intouch files}
|
10
|
-
gem.email = "tallak@tveide.net"
|
11
|
-
gem.homepage = "http://github.com/tallakt/plcutil"
|
12
|
-
gem.authors = ["Tallak Tveide"]
|
13
|
-
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
14
|
-
end
|
15
|
-
rescue LoadError
|
16
|
-
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
17
|
-
end
|
18
|
-
|
19
4
|
require 'rake/testtask'
|
20
5
|
Rake::TestTask.new(:test) do |test|
|
21
6
|
test.libs << 'lib' << 'test'
|
@@ -39,12 +39,14 @@ module PlcUtil
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def print_to_file(f)
|
42
|
-
@awl.each_tag do |name, data_block_name, addr, comment, struct_comment, type|
|
42
|
+
@awl.each_tag do |tag| #|name, data_block_name, addr, comment, struct_comment, type|
|
43
|
+
require 'rubygems'
|
44
|
+
require 'pp'
|
43
45
|
f.puts @format % [
|
44
|
-
addr,
|
45
|
-
fix_name(name),
|
46
|
-
type.to_s,
|
47
|
-
[comment, struct_comment].compact! ? '' : (@commentformat % [comment, struct_comment])
|
46
|
+
tag[:addr],
|
47
|
+
fix_name(tag[:name]),
|
48
|
+
tag[:type].to_s,
|
49
|
+
[tag[:comment], tag[:struct_comment]].compact! ? '' : (@commentformat % [tag[:comment], tag[:struct_comment]])
|
48
50
|
]
|
49
51
|
end
|
50
52
|
end
|
@@ -1,9 +1,7 @@
|
|
1
1
|
#!/usr/bin/ruby
|
2
2
|
|
3
|
-
require 'rubygems'
|
4
3
|
|
5
4
|
module PlcUtil
|
6
|
-
|
7
5
|
# Reads a Siemens Step 7 AWL file and creates single tags with addresses and comment
|
8
6
|
class AwlFile
|
9
7
|
attr_reader :symlist
|
@@ -15,11 +13,13 @@ module PlcUtil
|
|
15
13
|
@symlist = {}
|
16
14
|
|
17
15
|
if options[:symlist]
|
16
|
+
require 'rubygems'
|
18
17
|
require 'dbf' or raise 'Please install gem dbf to read symlist file'
|
19
18
|
|
20
19
|
raise 'Specified symlist file not found' unless File.exists? options[:symlist]
|
21
20
|
table = DBF::Table.new(options[:symlist])
|
22
|
-
table.
|
21
|
+
table.each do |rec|
|
22
|
+
next unless rec
|
23
23
|
@symlist[rec.attributes['_skz']] = rec.attributes['_opiec'] # or _ophist or _datatyp
|
24
24
|
end
|
25
25
|
end
|
@@ -87,10 +87,10 @@ module PlcUtil
|
|
87
87
|
|
88
88
|
def parse(file)
|
89
89
|
stack = []
|
90
|
-
in_array_decl = false
|
90
|
+
in_array_decl = false # array decalrations are sometimed split on two separate lines
|
91
91
|
in_datablock_decl = false
|
92
92
|
tagname = start = stop = type = comment = nil
|
93
|
-
db_to_fb = {}
|
93
|
+
db_to_fb = {} # a list connecting a DB to the FB where it was used
|
94
94
|
file.each_line do |l|
|
95
95
|
l.chomp!
|
96
96
|
if in_array_decl
|
@@ -100,27 +100,26 @@ module PlcUtil
|
|
100
100
|
end
|
101
101
|
in_array_decl = false
|
102
102
|
else
|
103
|
-
in_array_decl = false
|
104
103
|
case l
|
105
104
|
# TODO should also cater for 'DB 90' type addresses
|
106
105
|
when /^TYPE "(.+?)"/
|
107
|
-
stack = [StructType.new
|
108
|
-
add_type stack.
|
106
|
+
stack = [StructType.new($1, :datatype)]
|
107
|
+
add_type stack.first
|
109
108
|
when /^FUNCTION_BLOCK "(.+?)"/
|
110
|
-
stack = [StructType.new
|
111
|
-
add_type stack.
|
109
|
+
stack = [StructType.new($1, :functionblock)]
|
110
|
+
add_type stack.first
|
112
111
|
when /^DATA_BLOCK ("(.+?)"|DB\s+(\d+))/
|
113
112
|
in_datablock_decl = true
|
114
113
|
name = $2 || ('DB' + $3)
|
115
|
-
stack = [StructType.new
|
114
|
+
stack = [StructType.new(name, :datablock)]
|
116
115
|
@datablocks << Variable.new(name, stack.last)
|
117
116
|
when /^VAR_TEMP/
|
118
|
-
s = StructType.new
|
117
|
+
s = StructType.new('VAR_TEMP', :anonymous)
|
119
118
|
stack = [s]
|
120
119
|
when /^\s*(\S+) : STRUCT /
|
121
120
|
in_datablock_decl = false
|
122
|
-
s = StructType.new
|
123
|
-
stack.last.add Variable.new
|
121
|
+
s = StructType.new('STRUCT', :anonymous)
|
122
|
+
stack.last.add Variable.new($1, s)
|
124
123
|
stack << stack.last.children.last.type
|
125
124
|
when /^BEGIN$/
|
126
125
|
in_datablock_decl = false
|
data/lib/tallakt-plcutil.rb
CHANGED
@@ -1 +1,8 @@
|
|
1
|
-
|
1
|
+
|
2
|
+
$:.unshift(File.dirname(__FILE__)) unless
|
3
|
+
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
4
|
+
|
5
|
+
module PlcUtil
|
6
|
+
VERSION = '0.2.2'
|
7
|
+
end
|
8
|
+
|
metadata
CHANGED
@@ -1,118 +1,81 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: tallakt-plcutil
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 2
|
9
|
-
- 1
|
10
|
-
version: 0.2.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.2
|
5
|
+
prerelease:
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Tallak Tveide
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
name: thoughtbot-shoulda
|
23
|
-
prerelease: false
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
12
|
+
date: 2010-10-12 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: dbf
|
16
|
+
requirement: &82091340 !ruby/object:Gem::Requirement
|
25
17
|
none: false
|
26
|
-
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
version_requirements: *id001
|
35
|
-
description: Ruby library for using Siemens and Intouch files
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 1.6.6
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *82091340
|
25
|
+
description: Ruby library for using Siemens, Schneider and Intouch files
|
36
26
|
email: tallak@tveide.net
|
37
|
-
executables:
|
27
|
+
executables:
|
38
28
|
- awlpp
|
39
29
|
- intouchpp
|
40
30
|
- pl7tointouch
|
41
31
|
- s7tointouch
|
42
32
|
extensions: []
|
43
|
-
|
44
|
-
extra_rdoc_files:
|
33
|
+
extra_rdoc_files:
|
45
34
|
- LICENSE
|
46
35
|
- README.rdoc
|
47
|
-
|
48
|
-
files:
|
49
|
-
- .gitignore
|
50
|
-
- History.txt
|
51
|
-
- LICENSE
|
52
|
-
- Manifest.txt
|
53
|
-
- README.rdoc
|
54
|
-
- Rakefile
|
55
|
-
- TODO
|
56
|
-
- VERSION
|
57
|
-
- bin/awlpp
|
58
|
-
- bin/intouchpp
|
59
|
-
- bin/pl7tointouch
|
60
|
-
- bin/s7tointouch
|
61
|
-
- lib/tallakt-plcutil.rb
|
62
|
-
- lib/tallakt-plcutil/schneider/pl7_to_intouch_runner.rb
|
36
|
+
files:
|
63
37
|
- lib/tallakt-plcutil/siemens/awl_pretty_print_runner.rb
|
64
|
-
- lib/tallakt-plcutil/siemens/awlfile.rb
|
65
38
|
- lib/tallakt-plcutil/siemens/sdffile.rb
|
66
39
|
- lib/tallakt-plcutil/siemens/step7_to_intouch_runner.rb
|
67
|
-
- lib/tallakt-plcutil/
|
40
|
+
- lib/tallakt-plcutil/siemens/awlfile.rb
|
41
|
+
- lib/tallakt-plcutil/version.rb
|
42
|
+
- lib/tallakt-plcutil/schneider/pl7_to_intouch_runner.rb
|
68
43
|
- lib/tallakt-plcutil/wonderware/intouchfile.rb
|
44
|
+
- lib/tallakt-plcutil/wonderware/intouch_pretty_print_runner.rb
|
69
45
|
- lib/tallakt-plcutil/wonderware/standard_sections.yaml
|
70
|
-
-
|
71
|
-
-
|
72
|
-
-
|
73
|
-
-
|
74
|
-
-
|
75
|
-
-
|
76
|
-
-
|
77
|
-
-
|
78
|
-
-
|
79
|
-
- test/input_files/step7_v5.4/S7_pro2.zip
|
80
|
-
- test/input_files/step7_v5.4/SYMLIST.DBF
|
81
|
-
- test/test_tallakt-plcutil.rb
|
82
|
-
has_rdoc: true
|
46
|
+
- lib/tallakt-plcutil.rb
|
47
|
+
- bin/pl7tointouch
|
48
|
+
- bin/awlpp
|
49
|
+
- bin/intouchpp
|
50
|
+
- bin/s7tointouch
|
51
|
+
- History.txt
|
52
|
+
- LICENSE
|
53
|
+
- README.rdoc
|
54
|
+
- Rakefile
|
83
55
|
homepage: http://github.com/tallakt/plcutil
|
84
56
|
licenses: []
|
85
|
-
|
86
57
|
post_install_message:
|
87
|
-
rdoc_options:
|
58
|
+
rdoc_options:
|
88
59
|
- --charset=UTF-8
|
89
|
-
require_paths:
|
60
|
+
require_paths:
|
90
61
|
- lib
|
91
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
92
63
|
none: false
|
93
|
-
requirements:
|
94
|
-
- -
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
|
97
|
-
|
98
|
-
- 0
|
99
|
-
version: "0"
|
100
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ! '>='
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
69
|
none: false
|
102
|
-
requirements:
|
103
|
-
- -
|
104
|
-
- !ruby/object:Gem::Version
|
105
|
-
|
106
|
-
segments:
|
107
|
-
- 0
|
108
|
-
version: "0"
|
70
|
+
requirements:
|
71
|
+
- - ! '>='
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
109
74
|
requirements: []
|
110
|
-
|
111
75
|
rubyforge_project:
|
112
|
-
rubygems_version: 1.
|
76
|
+
rubygems_version: 1.8.10
|
113
77
|
signing_key:
|
114
78
|
specification_version: 3
|
115
79
|
summary: Ruby PLC file library
|
116
|
-
test_files:
|
117
|
-
|
118
|
-
- test/test_tallakt-plcutil.rb
|
80
|
+
test_files: []
|
81
|
+
has_rdoc:
|
data/.gitignore
DELETED
data/Manifest.txt
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
History.txt
|
2
|
-
LICENSE
|
3
|
-
Manifest.txt
|
4
|
-
README.rdoc
|
5
|
-
Rakefile
|
6
|
-
TODO
|
7
|
-
VERSION
|
8
|
-
bin
|
9
|
-
bin/awlpp
|
10
|
-
bin/intouchpp
|
11
|
-
bin/pl7tointouch
|
12
|
-
bin/s7tointouch
|
13
|
-
lib
|
14
|
-
lib/tallakt-plcutil
|
15
|
-
lib/tallakt-plcutil/schneider
|
16
|
-
lib/tallakt-plcutil/schneider/pl7_to_intouch_runner.rb
|
17
|
-
lib/tallakt-plcutil/siemens
|
18
|
-
lib/tallakt-plcutil/siemens/awlfile.rb
|
19
|
-
lib/tallakt-plcutil/siemens/awl_pretty_print_runner.rb
|
20
|
-
lib/tallakt-plcutil/siemens/sdffile.rb
|
21
|
-
lib/tallakt-plcutil/siemens/step7_to_intouch_runner.rb
|
22
|
-
lib/tallakt-plcutil/wonderware
|
23
|
-
lib/tallakt-plcutil/wonderware/intouchfile.rb
|
24
|
-
lib/tallakt-plcutil/wonderware/intouch_pretty_print_runner.rb
|
25
|
-
lib/tallakt-plcutil/wonderware/standard_sections.yaml
|
26
|
-
lib/tallakt-plcutil.rb
|
27
|
-
script
|
28
|
-
script/console
|
29
|
-
script/console.cmd
|
30
|
-
script/destroy
|
31
|
-
script/destroy.cmd
|
32
|
-
script/generate
|
33
|
-
script/generate.cmd
|
34
|
-
tallakt-plcutil.gemspec
|
35
|
-
test
|
36
|
-
test/helper.rb
|
37
|
-
test/input_files
|
38
|
-
test/input_files/step7_v5.4
|
39
|
-
test/input_files/step7_v5.4/00000001.AWL
|
40
|
-
test/input_files/step7_v5.4/S7_pro2.zip
|
41
|
-
test/input_files/step7_v5.4/SYMLIST.DBF
|
42
|
-
test/test_tallakt-plcutil.rb
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.2.1
|
data/script/console
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# File: script/console
|
3
|
-
irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
|
4
|
-
|
5
|
-
libs = " -r irb/completion"
|
6
|
-
# Perhaps use a console_lib to store any extra methods I may want available in the cosole
|
7
|
-
# libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
|
8
|
-
libs << " -r #{File.dirname(__FILE__) + '/../lib/plcutil.rb'}"
|
9
|
-
puts "Loading plcutil gem"
|
10
|
-
exec "#{irb} #{libs} --simple-prompt"
|
data/script/console.cmd
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
@ruby script/console %*
|
data/script/destroy
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
-
|
4
|
-
begin
|
5
|
-
require 'rubigen'
|
6
|
-
rescue LoadError
|
7
|
-
require 'rubygems'
|
8
|
-
require 'rubigen'
|
9
|
-
end
|
10
|
-
require 'rubigen/scripts/destroy'
|
11
|
-
|
12
|
-
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
-
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
-
RubiGen::Scripts::Destroy.new.run(ARGV)
|
data/script/destroy.cmd
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
@ruby script/destroy %*
|
data/script/generate
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
-
|
4
|
-
begin
|
5
|
-
require 'rubigen'
|
6
|
-
rescue LoadError
|
7
|
-
require 'rubygems'
|
8
|
-
require 'rubigen'
|
9
|
-
end
|
10
|
-
require 'rubigen/scripts/generate'
|
11
|
-
|
12
|
-
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
-
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
-
RubiGen::Scripts::Generate.new.run(ARGV)
|
data/script/generate.cmd
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
@ruby script/generate %*
|
data/tallakt-plcutil.gemspec
DELETED
@@ -1,79 +0,0 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
-
# -*- encoding: utf-8 -*-
|
5
|
-
|
6
|
-
Gem::Specification.new do |s|
|
7
|
-
s.name = %q{tallakt-plcutil}
|
8
|
-
s.version = "0.2.1"
|
9
|
-
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["Tallak Tveide"]
|
12
|
-
s.date = %q{2010-10-12}
|
13
|
-
s.description = %q{Ruby library for using Siemens and Intouch files}
|
14
|
-
s.email = %q{tallak@tveide.net}
|
15
|
-
s.executables = ["awlpp", "intouchpp", "pl7tointouch", "s7tointouch"]
|
16
|
-
s.extra_rdoc_files = [
|
17
|
-
"LICENSE",
|
18
|
-
"README.rdoc",
|
19
|
-
"TODO"
|
20
|
-
]
|
21
|
-
s.files = [
|
22
|
-
".gitignore",
|
23
|
-
"History.txt",
|
24
|
-
"LICENSE",
|
25
|
-
"Manifest.txt",
|
26
|
-
"README.rdoc",
|
27
|
-
"Rakefile",
|
28
|
-
"TODO",
|
29
|
-
"VERSION",
|
30
|
-
"bin/awlpp",
|
31
|
-
"bin/intouchpp",
|
32
|
-
"bin/pl7tointouch",
|
33
|
-
"bin/s7tointouch",
|
34
|
-
"lib/tallakt-plcutil.rb",
|
35
|
-
"lib/tallakt-plcutil/schneider/pl7_to_intouch_runner.rb",
|
36
|
-
"lib/tallakt-plcutil/siemens/awl_pretty_print_runner.rb",
|
37
|
-
"lib/tallakt-plcutil/siemens/awlfile.rb",
|
38
|
-
"lib/tallakt-plcutil/siemens/sdffile.rb",
|
39
|
-
"lib/tallakt-plcutil/siemens/step7_to_intouch_runner.rb",
|
40
|
-
"lib/tallakt-plcutil/wonderware/intouch_pretty_print_runner.rb",
|
41
|
-
"lib/tallakt-plcutil/wonderware/intouchfile.rb",
|
42
|
-
"lib/tallakt-plcutil/wonderware/standard_sections.yaml",
|
43
|
-
"script/console",
|
44
|
-
"script/console.cmd",
|
45
|
-
"script/destroy",
|
46
|
-
"script/destroy.cmd",
|
47
|
-
"script/generate",
|
48
|
-
"script/generate.cmd",
|
49
|
-
"tallakt-plcutil.gemspec",
|
50
|
-
"test/helper.rb",
|
51
|
-
"test/input_files/step7_v5.4/00000001.AWL",
|
52
|
-
"test/input_files/step7_v5.4/S7_pro2.zip",
|
53
|
-
"test/input_files/step7_v5.4/SYMLIST.DBF",
|
54
|
-
"test/test_tallakt-plcutil.rb"
|
55
|
-
]
|
56
|
-
s.homepage = %q{http://github.com/tallakt/plcutil}
|
57
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
58
|
-
s.require_paths = ["lib"]
|
59
|
-
s.rubygems_version = %q{1.3.6}
|
60
|
-
s.summary = %q{Ruby PLC file library}
|
61
|
-
s.test_files = [
|
62
|
-
"test/helper.rb",
|
63
|
-
"test/test_tallakt-plcutil.rb"
|
64
|
-
]
|
65
|
-
|
66
|
-
if s.respond_to? :specification_version then
|
67
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
68
|
-
s.specification_version = 3
|
69
|
-
|
70
|
-
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
71
|
-
s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
72
|
-
else
|
73
|
-
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
74
|
-
end
|
75
|
-
else
|
76
|
-
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
data/test/helper.rb
DELETED
@@ -1,139 +0,0 @@
|
|
1
|
-
TYPE "User defined DB"
|
2
|
-
VERSION : 0.1
|
3
|
-
|
4
|
-
|
5
|
-
STRUCT
|
6
|
-
int_at_0_0 : INT ; //First int
|
7
|
-
bool_at_2_0 : BOOL ; //First bool
|
8
|
-
bool_at_2_1 : BOOL ;
|
9
|
-
bool_at_2_2 : BOOL ;
|
10
|
-
word_at_4_0 : WORD ;
|
11
|
-
dword_at_6_0 : DWORD ;
|
12
|
-
byte_at_10_0 : BYTE ;
|
13
|
-
dint_at_12_0 : DINT ;
|
14
|
-
real_at_16_0 : REAL ;
|
15
|
-
s5time_at_20 : S5TIME ;
|
16
|
-
time_at_22_0 : TIME ;
|
17
|
-
date_at_26_0 : DATE ;
|
18
|
-
time_of_day_at_28_0 : TIME_OF_DAY ;
|
19
|
-
char_at_32_0 : CHAR := 't';
|
20
|
-
byte_at_33_0 : BYTE ;
|
21
|
-
byte_at_34_0 : BYTE ;
|
22
|
-
END_STRUCT ;
|
23
|
-
END_TYPE
|
24
|
-
|
25
|
-
DATA_BLOCK "Data block 1"
|
26
|
-
TITLE =
|
27
|
-
VERSION : 0.1
|
28
|
-
|
29
|
-
|
30
|
-
STRUCT
|
31
|
-
struct_at_0_0 : "User defined DB"; //Temporary placeholder variable
|
32
|
-
struct_at_36_0 : "User defined DB";
|
33
|
-
char_array_at_72_0 : ARRAY [0 .. 10 ] OF CHAR ;
|
34
|
-
anonomous_struct_at_84_0 : STRUCT
|
35
|
-
bool_at_84_0 : BOOL ;
|
36
|
-
bool_at_84_1 : BOOL ;
|
37
|
-
char_at_85_0 : CHAR := 'x';
|
38
|
-
char_at_86_0 : CHAR ;
|
39
|
-
word_at_88_0 : WORD ;
|
40
|
-
char_at_90_0 : CHAR ;
|
41
|
-
char_array_at_92_0 : ARRAY [0 .. 9 ] OF //array comment 1
|
42
|
-
CHAR ;
|
43
|
-
char_at_102_0 : CHAR ;
|
44
|
-
END_STRUCT ;
|
45
|
-
word_at_104_0 : WORD ;
|
46
|
-
char_at_106_0 : CHAR ;
|
47
|
-
bool_at_107_0 : BOOL ;
|
48
|
-
char_at_108_0 : CHAR ;
|
49
|
-
char_array_at_110_0 : ARRAY [0 .. 1 ] OF CHAR ;
|
50
|
-
END_STRUCT ;
|
51
|
-
BEGIN
|
52
|
-
struct_at_0_0.int_at_0_0 := 0;
|
53
|
-
struct_at_0_0.bool_at_2_0 := FALSE;
|
54
|
-
struct_at_0_0.bool_at_2_1 := FALSE;
|
55
|
-
struct_at_0_0.bool_at_2_2 := FALSE;
|
56
|
-
struct_at_0_0.word_at_4_0 := W#16#0;
|
57
|
-
struct_at_0_0.dword_at_6_0 := DW#16#0;
|
58
|
-
struct_at_0_0.byte_at_10_0 := B#16#0;
|
59
|
-
struct_at_0_0.dint_at_12_0 := L#0;
|
60
|
-
struct_at_0_0.real_at_16_0 := 0.000000e+000;
|
61
|
-
struct_at_0_0.s5time_at_20 := S5T#0MS;
|
62
|
-
struct_at_0_0.time_at_22_0 := T#0MS;
|
63
|
-
struct_at_0_0.date_at_26_0 := D#1990-1-1;
|
64
|
-
struct_at_0_0.time_of_day_at_28_0 := TOD#0:0:0.0;
|
65
|
-
struct_at_0_0.char_at_32_0 := 't';
|
66
|
-
struct_at_0_0.byte_at_33_0 := B#16#0;
|
67
|
-
struct_at_0_0.byte_at_34_0 := B#16#0;
|
68
|
-
struct_at_36_0.int_at_0_0 := 0;
|
69
|
-
struct_at_36_0.bool_at_2_0 := FALSE;
|
70
|
-
struct_at_36_0.bool_at_2_1 := FALSE;
|
71
|
-
struct_at_36_0.bool_at_2_2 := FALSE;
|
72
|
-
struct_at_36_0.word_at_4_0 := W#16#0;
|
73
|
-
struct_at_36_0.dword_at_6_0 := DW#16#0;
|
74
|
-
struct_at_36_0.byte_at_10_0 := B#16#0;
|
75
|
-
struct_at_36_0.dint_at_12_0 := L#0;
|
76
|
-
struct_at_36_0.real_at_16_0 := 0.000000e+000;
|
77
|
-
struct_at_36_0.s5time_at_20 := S5T#0MS;
|
78
|
-
struct_at_36_0.time_at_22_0 := T#0MS;
|
79
|
-
struct_at_36_0.date_at_26_0 := D#1990-1-1;
|
80
|
-
struct_at_36_0.time_of_day_at_28_0 := TOD#0:0:0.0;
|
81
|
-
struct_at_36_0.char_at_32_0 := 't';
|
82
|
-
struct_at_36_0.byte_at_33_0 := B#16#0;
|
83
|
-
struct_at_36_0.byte_at_34_0 := B#16#0;
|
84
|
-
char_array_at_72_0[0] := ' ';
|
85
|
-
char_array_at_72_0[1] := ' ';
|
86
|
-
char_array_at_72_0[2] := ' ';
|
87
|
-
char_array_at_72_0[3] := ' ';
|
88
|
-
char_array_at_72_0[4] := ' ';
|
89
|
-
char_array_at_72_0[5] := ' ';
|
90
|
-
char_array_at_72_0[6] := ' ';
|
91
|
-
char_array_at_72_0[7] := ' ';
|
92
|
-
char_array_at_72_0[8] := ' ';
|
93
|
-
char_array_at_72_0[9] := ' ';
|
94
|
-
char_array_at_72_0[10] := ' ';
|
95
|
-
anonomous_struct_at_84_0.bool_at_84_0 := FALSE;
|
96
|
-
anonomous_struct_at_84_0.bool_at_84_1 := FALSE;
|
97
|
-
anonomous_struct_at_84_0.char_at_85_0 := 'x';
|
98
|
-
anonomous_struct_at_84_0.char_at_86_0 := ' ';
|
99
|
-
anonomous_struct_at_84_0.word_at_88_0 := W#16#0;
|
100
|
-
anonomous_struct_at_84_0.char_at_90_0 := ' ';
|
101
|
-
anonomous_struct_at_84_0.char_array_at_92_0[0] := ' ';
|
102
|
-
anonomous_struct_at_84_0.char_array_at_92_0[1] := ' ';
|
103
|
-
anonomous_struct_at_84_0.char_array_at_92_0[2] := ' ';
|
104
|
-
anonomous_struct_at_84_0.char_array_at_92_0[3] := ' ';
|
105
|
-
anonomous_struct_at_84_0.char_array_at_92_0[4] := ' ';
|
106
|
-
anonomous_struct_at_84_0.char_array_at_92_0[5] := ' ';
|
107
|
-
anonomous_struct_at_84_0.char_array_at_92_0[6] := ' ';
|
108
|
-
anonomous_struct_at_84_0.char_array_at_92_0[7] := ' ';
|
109
|
-
anonomous_struct_at_84_0.char_array_at_92_0[8] := ' ';
|
110
|
-
anonomous_struct_at_84_0.char_array_at_92_0[9] := ' ';
|
111
|
-
anonomous_struct_at_84_0.char_at_102_0 := ' ';
|
112
|
-
word_at_104_0 := W#16#0;
|
113
|
-
char_at_106_0 := ' ';
|
114
|
-
bool_at_107_0 := FALSE;
|
115
|
-
char_at_108_0 := ' ';
|
116
|
-
char_array_at_110_0[0] := ' ';
|
117
|
-
char_array_at_110_0[1] := ' ';
|
118
|
-
END_DATA_BLOCK
|
119
|
-
|
120
|
-
ORGANIZATION_BLOCK "Cycle Execution"
|
121
|
-
TITLE = "Main Program Sweep (Cycle)"
|
122
|
-
VERSION : 0.1
|
123
|
-
|
124
|
-
|
125
|
-
VAR_TEMP
|
126
|
-
OB1_EV_CLASS : BYTE ; //Bits 0-3 = 1 (Coming event), Bits 4-7 = 1 (Event class 1)
|
127
|
-
OB1_SCAN_1 : BYTE ; //1 (Cold restart scan 1 of OB 1), 3 (Scan 2-n of OB 1)
|
128
|
-
OB1_PRIORITY : BYTE ; //Priority of OB Execution
|
129
|
-
OB1_OB_NUMBR : BYTE ; //1 (Organization block 1, OB1)
|
130
|
-
OB1_RESERVED_1 : BYTE ; //Reserved for system
|
131
|
-
OB1_RESERVED_2 : BYTE ; //Reserved for system
|
132
|
-
OB1_PREV_CYCLE : INT ; //Cycle time of previous OB1 scan (milliseconds)
|
133
|
-
OB1_MIN_CYCLE : INT ; //Minimum cycle time of OB1 (milliseconds)
|
134
|
-
OB1_MAX_CYCLE : INT ; //Maximum cycle time of OB1 (milliseconds)
|
135
|
-
OB1_DATE_TIME : DATE_AND_TIME ; //Date and time OB1 started
|
136
|
-
END_VAR
|
137
|
-
BEGIN
|
138
|
-
END_ORGANIZATION_BLOCK
|
139
|
-
|
Binary file
|
Binary file
|