escalator 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/escalator/protocol/emulator/emu_protocol.rb +5 -0
- data/lib/escalator/protocol/keyence/kv_protocol.rb +32 -6
- data/lib/escalator/version.rb +1 -1
- data/lib/plc/keyence/kv-5000/kv-5000/DocumentWindowInfo.xml +48 -0
- data/lib/plc/keyence/kv-5000/kv-5000/Escalator.mod +0 -0
- data/lib/plc/keyence/kv-5000/kv-5000/KvsMon.ini +0 -0
- data/lib/plc/keyence/kv-5000/kv-5000/LbkMdm.ini +0 -0
- data/lib/plc/keyence/kv-5000/kv-5000/Main.mod +0 -0
- data/lib/plc/keyence/kv-5000/kv-5000/MonEnv.kmu +1 -0
- data/lib/plc/keyence/kv-5000/kv-5000/PlcSended.dky +0 -0
- data/lib/plc/keyence/kv-5000/kv-5000/SensorMonitorInfo.xml +4 -0
- data/lib/plc/keyence/kv-5000/kv-5000/TransInfo.tif +0 -0
- data/lib/plc/keyence/kv-5000/kv-5000/UnitSet.ue2 +0 -0
- data/lib/plc/keyence/kv-5000/kv-5000/UnitSet.ue2.old +0 -0
- data/lib/plc/keyence/kv-5000/kv-5000/WsTreeEnv.xml +28 -0
- data/lib/plc/keyence/kv-5000/kv-5000/kv-5000.cm1 +0 -0
- data/lib/plc/keyence/kv-5000/kv-5000/kv-5000.cm2 +0 -0
- data/lib/plc/keyence/kv-5000/kv-5000/kv-5000.ftc +0 -0
- data/lib/plc/keyence/kv-5000/kv-5000/kv-5000.kpr +0 -0
- data/lib/plc/keyence/kv-5000/kv-5000/kv-5000.lbl +0 -0
- data/lib/plc/keyence/kv-5000/kv-5000/kv-5000.mil +0 -0
- data/lib/plc/keyence/kv-5000/kv-5000/kv-5000.spl +0 -0
- data/lib/plc/keyence/kv-5000/kv-5000/operand-history.txt +16 -0
- data/lib/plc/keyence/kv-5000/kv-5000/sample.al2 +2 -0
- data/lib/plc/mitsubishi/iq-r/r08/r08.gx3 +0 -0
- data/template/escalator/config/plc.yml +10 -6
- metadata +23 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b2afd20d0ae308c9860d8f624da6b01527813d8
|
4
|
+
data.tar.gz: 85d0a57ddb918e4cb100d10330634142b18b003d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6c7c73fcbe4ccfe40e139d62bdeab9f5b0e4d7351dbfc3458c1f9622980f1f26f8ac42822e02902d20b5bc88f8a07115aa5996f04ec6cd2ea70780c2b5e96e8
|
7
|
+
data.tar.gz: 9fa0bd2d21ca5c5e31739dbddfdd38eae24a18a0f369777d51e5e7c3efc3f57d27cc190c39ac045ffea85306ead13608f14496c63cdb4cf579b24f6833c4f0f8
|
@@ -31,6 +31,7 @@ module Keyence
|
|
31
31
|
super
|
32
32
|
@host = options[:host] || "192.168.0.10"
|
33
33
|
@port = options[:port] || 8501
|
34
|
+
prepare_device_map
|
34
35
|
end
|
35
36
|
|
36
37
|
def open
|
@@ -91,7 +92,7 @@ module Keyence
|
|
91
92
|
end
|
92
93
|
|
93
94
|
def get_words_from_device(count, device)
|
94
|
-
device =
|
95
|
+
device = local_device device
|
95
96
|
packet = "RDS #{device.name} #{count}\r"
|
96
97
|
@logger.debug("> #{dump_packet packet}")
|
97
98
|
open
|
@@ -145,15 +146,40 @@ module Keyence
|
|
145
146
|
|
146
147
|
private
|
147
148
|
|
148
|
-
def local_device device
|
149
|
-
# TODO:
|
150
|
-
device
|
151
|
-
end
|
152
|
-
|
153
149
|
def device_class
|
154
150
|
KvDevice
|
155
151
|
end
|
156
152
|
|
153
|
+
def prepare_device_map
|
154
|
+
@conv_dev_dict ||= begin
|
155
|
+
h = {}
|
156
|
+
[
|
157
|
+
["X", "R0", 1024],
|
158
|
+
["Y", "R0", 1024],
|
159
|
+
["M", "MR0", 1024],
|
160
|
+
["C", "C0", 256],
|
161
|
+
["T", "T0", 256],
|
162
|
+
["L", "L0", 1024],
|
163
|
+
["SC", "MR1024", 1024],
|
164
|
+
["D", "DM0", 1024],
|
165
|
+
["H", "DM1024", 1024],
|
166
|
+
["SD", "DM2048", 1024],
|
167
|
+
["PRG", "DM3072", 1024] # ..D4095
|
168
|
+
].each do |s,d,c|
|
169
|
+
h[s] = [KvDevice.new(d), c]
|
170
|
+
end
|
171
|
+
h
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
def local_device device
|
176
|
+
return device if device.is_a? KvDevice
|
177
|
+
d, c = @conv_dev_dict[device.suffix]
|
178
|
+
return nil unless device.number < c
|
179
|
+
ld = KvDevice.new(d.suffix, d.number + device.number)
|
180
|
+
device_by_name ld.name
|
181
|
+
end
|
182
|
+
|
157
183
|
end
|
158
184
|
|
159
185
|
end
|
data/lib/escalator/version.rb
CHANGED
@@ -0,0 +1,48 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<DocumentWindowInfoForTab xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
3
|
+
<All>
|
4
|
+
<DocumentWindowInfoForTabElement>
|
5
|
+
<Name>Escalator</Name>
|
6
|
+
<SaveKey>[Ladder]Escalator</SaveKey>
|
7
|
+
<DockingBarState>
|
8
|
+
<Key>Document@Ladder-346816872</Key>
|
9
|
+
<Usable>true</Usable>
|
10
|
+
<IsFloating>false</IsFloating>
|
11
|
+
<DockingInfo>
|
12
|
+
<IsCenter>true</IsCenter>
|
13
|
+
<DockingSide>Left</DockingSide>
|
14
|
+
<IsAutoHide>false</IsAutoHide>
|
15
|
+
<Size>
|
16
|
+
<Width>1074</Width>
|
17
|
+
<Height>790</Height>
|
18
|
+
</Size>
|
19
|
+
<LeftIndex>-1</LeftIndex>
|
20
|
+
<TopIndex>-1</TopIndex>
|
21
|
+
<RightIndex>-1</RightIndex>
|
22
|
+
<BottomIndex>-1</BottomIndex>
|
23
|
+
<MergeInfo>
|
24
|
+
<TabIndex>-1</TabIndex>
|
25
|
+
<IsTabSelected>true</IsTabSelected>
|
26
|
+
<TilePosition />
|
27
|
+
</MergeInfo>
|
28
|
+
</DockingInfo>
|
29
|
+
<FloatingInfo>
|
30
|
+
<DockingKey>0</DockingKey>
|
31
|
+
<Location>
|
32
|
+
<X>0</X>
|
33
|
+
<Y>0</Y>
|
34
|
+
</Location>
|
35
|
+
<Size>
|
36
|
+
<Width>624</Width>
|
37
|
+
<Height>326</Height>
|
38
|
+
</Size>
|
39
|
+
<MergeInfo>
|
40
|
+
<TabIndex>-1</TabIndex>
|
41
|
+
<IsTabSelected>false</IsTabSelected>
|
42
|
+
<TilePosition />
|
43
|
+
</MergeInfo>
|
44
|
+
</FloatingInfo>
|
45
|
+
</DockingBarState>
|
46
|
+
</DocumentWindowInfoForTabElement>
|
47
|
+
</All>
|
48
|
+
</DocumentWindowInfoForTab>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
��
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Root>
|
3
|
+
<Expanded>0</Expanded>
|
4
|
+
<Child>
|
5
|
+
<value.first>ユニット構成</value.first>
|
6
|
+
<value.second>
|
7
|
+
<Expanded>1</Expanded>
|
8
|
+
<Child>
|
9
|
+
<value.first>[0] KV-5000 R000/R500</value.first>
|
10
|
+
<value.second>
|
11
|
+
<Expanded>0</Expanded>
|
12
|
+
<Child>
|
13
|
+
<value.first>Ethernet R30000 DM10000</value.first>
|
14
|
+
<value.second>
|
15
|
+
<Expanded>0</Expanded>
|
16
|
+
</value.second>
|
17
|
+
</Child>
|
18
|
+
</value.second>
|
19
|
+
</Child>
|
20
|
+
<Child>
|
21
|
+
<value.first>ユニット構成切替</value.first>
|
22
|
+
<value.second>
|
23
|
+
<Expanded>0</Expanded>
|
24
|
+
</value.second>
|
25
|
+
</Child>
|
26
|
+
</value.second>
|
27
|
+
</Child>
|
28
|
+
</Root>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -3,18 +3,22 @@
|
|
3
3
|
|
4
4
|
# plc section
|
5
5
|
plc:
|
6
|
+
# MITSUBISHI iQ-R
|
6
7
|
iq-r: # It's a target name
|
7
8
|
cpu: iq-r # It's just a comment.
|
8
9
|
protocol: mc_protocol # It's a protocol to communicate with PLC.
|
9
10
|
host: 192.168.0.10 # It's PLC's IP address or dns name.
|
10
|
-
port: 5007 # It's PLC's port no.
|
11
|
+
# port: 5007 # It's PLC's port no. If it's not descript here, use default port.
|
11
12
|
|
12
13
|
# You can describe targets multiply.
|
13
|
-
|
14
|
-
#
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
|
15
|
+
# Keyence KV-5000
|
16
|
+
kv5000:
|
17
|
+
cpu: kv-5000
|
18
|
+
protocol: kv_protocol
|
19
|
+
host: 192.168.0.11
|
20
|
+
# port: 8501
|
21
|
+
|
18
22
|
|
19
23
|
# default section
|
20
24
|
default:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: escalator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katsuyoshi Ito
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -112,6 +112,27 @@ files:
|
|
112
112
|
- lib/plc/emulator/emu_plc.rb
|
113
113
|
- lib/plc/emulator/emu_plc_server.rb
|
114
114
|
- lib/plc/emulator/emulator.rb
|
115
|
+
- lib/plc/keyence/kv-5000/kv-5000/DocumentWindowInfo.xml
|
116
|
+
- lib/plc/keyence/kv-5000/kv-5000/Escalator.mod
|
117
|
+
- lib/plc/keyence/kv-5000/kv-5000/KvsMon.ini
|
118
|
+
- lib/plc/keyence/kv-5000/kv-5000/LbkMdm.ini
|
119
|
+
- lib/plc/keyence/kv-5000/kv-5000/Main.mod
|
120
|
+
- lib/plc/keyence/kv-5000/kv-5000/MonEnv.kmu
|
121
|
+
- lib/plc/keyence/kv-5000/kv-5000/PlcSended.dky
|
122
|
+
- lib/plc/keyence/kv-5000/kv-5000/SensorMonitorInfo.xml
|
123
|
+
- lib/plc/keyence/kv-5000/kv-5000/TransInfo.tif
|
124
|
+
- lib/plc/keyence/kv-5000/kv-5000/UnitSet.ue2
|
125
|
+
- lib/plc/keyence/kv-5000/kv-5000/UnitSet.ue2.old
|
126
|
+
- lib/plc/keyence/kv-5000/kv-5000/WsTreeEnv.xml
|
127
|
+
- lib/plc/keyence/kv-5000/kv-5000/kv-5000.cm1
|
128
|
+
- lib/plc/keyence/kv-5000/kv-5000/kv-5000.cm2
|
129
|
+
- lib/plc/keyence/kv-5000/kv-5000/kv-5000.ftc
|
130
|
+
- lib/plc/keyence/kv-5000/kv-5000/kv-5000.kpr
|
131
|
+
- lib/plc/keyence/kv-5000/kv-5000/kv-5000.lbl
|
132
|
+
- lib/plc/keyence/kv-5000/kv-5000/kv-5000.mil
|
133
|
+
- lib/plc/keyence/kv-5000/kv-5000/kv-5000.spl
|
134
|
+
- lib/plc/keyence/kv-5000/kv-5000/operand-history.txt
|
135
|
+
- lib/plc/keyence/kv-5000/kv-5000/sample.al2
|
115
136
|
- lib/plc/mitsubishi/iq-r/r08/LICENSE
|
116
137
|
- lib/plc/mitsubishi/iq-r/r08/r08.gx3
|
117
138
|
- lib/plc/plc.rb
|