Skip to content

Commit c6ca760

Browse files
Implement Siemens LOGO! as network relay board (#2350)
1 parent 8d40965 commit c6ca760

File tree

13 files changed

+715
-0
lines changed

13 files changed

+715
-0
lines changed

io.openems.edge.application/EdgeApp.bndrun

+2
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@
142142
bnd.identity;id='io.openems.edge.io.offgridswitch',\
143143
bnd.identity;id='io.openems.edge.io.revpi',\
144144
bnd.identity;id='io.openems.edge.io.shelly',\
145+
bnd.identity;id='io.openems.edge.io.siemenslogo',\
145146
bnd.identity;id='io.openems.edge.io.wago',\
146147
bnd.identity;id='io.openems.edge.io.weidmueller',\
147148
bnd.identity;id='io.openems.edge.kaco.blueplanet.hybrid10',\
@@ -321,6 +322,7 @@
321322
io.openems.edge.io.offgridswitch;version=snapshot,\
322323
io.openems.edge.io.revpi;version=snapshot,\
323324
io.openems.edge.io.shelly;version=snapshot,\
325+
io.openems.edge.io.siemenslogo;version=snapshot,\
324326
io.openems.edge.io.wago;version=snapshot,\
325327
io.openems.edge.io.weidmueller;version=snapshot,\
326328
io.openems.edge.kaco.blueplanet.hybrid10;version=snapshot,\
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="con" path="aQute.bnd.classpath.container"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21"/>
5+
<classpathentry kind="src" output="bin" path="src"/>
6+
<classpathentry kind="src" output="bin_test" path="test">
7+
<attributes>
8+
<attribute name="test" value="true"/>
9+
</attributes>
10+
</classpathentry>
11+
<classpathentry kind="output" path="bin"/>
12+
</classpath>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/bin_test/
2+
/generated/
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>io.openems.edge.io.siemenslogo</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>bndtools.core.bndbuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.jdt.core.javanature</nature>
21+
<nature>bndtools.core.bndnature</nature>
22+
</natures>
23+
</projectDescription>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding/<project>=UTF-8
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Bundle-Name: OpenEMS Edge IO Siemens LOGO!
2+
Bundle-Description: Siemens LOGO! 8 as network relais. Connected via Modbus. Relays starting \
3+
at VM 101, Bit 0 on SPS.
4+
Bundle-Vendor: OpenEMS Association e.V.
5+
Bundle-License: https://opensource.org/licenses/EPL-2.0
6+
Bundle-Version: 1.0.0.${tstamp}
7+
8+
-buildpath: \
9+
${buildpath},\
10+
com.ghgande.j2mod,\
11+
io.openems.common,\
12+
io.openems.edge.bridge.modbus,\
13+
io.openems.edge.common,\
14+
io.openems.edge.io.api,\
15+
slf4j.api,\
16+
17+
-testpath: \
18+
${testpath}
19+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
= Siemens LOGO!
2+
3+
First you have to configure a modbus server in LogoSoft which either accepts all connection sources or you limit this to your EMS-system. Like all other modbus devices you have to configure a modbus-ID (255 is default in LogoSoft!) and a start address, e.g. 100 or use the default address 0.
4+
5+
If you don´t do any changes the addresses are configured as coils. In Logo! a virtual address (V) is written 0.0 which is the virtual address 0, Bit 0. For the connected device the coil-addresses start with 800 (first bit/coil), 801 is the second coil and so on
6+
7+
https://github.com/OpenEMS/openems/tree/develop/io.openems.edge.io.siemenslogo[Source Code icon:github[]]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package io.openems.edge.io.siemenslogo;
2+
3+
import org.osgi.service.metatype.annotations.AttributeDefinition;
4+
import org.osgi.service.metatype.annotations.ObjectClassDefinition;
5+
6+
@ObjectClassDefinition(//
7+
name = "Siemens LOGO!", //
8+
description = "Siemens LOGO! 8 digital Input/Output")
9+
@interface Config {
10+
11+
@AttributeDefinition(name = "Component-ID", description = "Unique ID of this Component")
12+
String id() default "io0";
13+
14+
@AttributeDefinition(name = "Alias", description = "Human-readable name of this Component; defaults to Component-ID")
15+
String alias() default "";
16+
17+
@AttributeDefinition(name = "Is enabled?", description = "Is this Component enabled?")
18+
boolean enabled() default true;
19+
20+
@AttributeDefinition(name = "Modbus-ID", description = "ID of Modbus bridge.")
21+
String modbus_id() default "modbus0";
22+
23+
@AttributeDefinition(name = "Modbus write address offset", description = "Address offset in LOGO! for writing outputs / relays. This is where the virtual addresses start, e.g. 808 for virtual address 101.0 in Logo!")
24+
int modbusOffsetWriteAddress() default 800;
25+
26+
@AttributeDefinition(name = "Modbus read address offset", description = "Address offset in LOGO! for reading inputs (DI1-4). This is where the virtual addresses start, e.g. 808 for virtual address 110.0 in Logo!")
27+
int modbusOffsetReadAddress() default 880;
28+
29+
@AttributeDefinition(name = "Modbus Unit-ID", description = "The Unit-ID of the Modbus device.")
30+
int modbusUnitId() default 1;
31+
32+
@AttributeDefinition(name = "Modbus target filter", description = "This is auto-generated by 'Modbus-ID'.")
33+
String Modbus_target() default "(enabled=true)";
34+
35+
String webconsole_configurationFactory_nameHint() default "Siemens LOGO! [{id}]";
36+
}

0 commit comments

Comments
 (0)