Home » Eclipse Projects » Kura » Kura Modbus(Modbus in kura)
Kura Modbus [message #1778838] |
Fri, 22 December 2017 06:26  |
Eclipse User |
|
|
|
Good morning.
Is the first time that I use something as modbus. I need a app to desploy after in kura wich read and write in the registers of a plc, the comunication between app in kura and the plc in by ethernet.
I have read a lot of post about modbus but i haven´t a clear idea about how I should implement the app. I have read oficial docs of Kura (https://eclipse.github.io/kura/dev/kura-modbus-protocol.html), I have add configuration in the .xml file:
<reference bind="setModbusProtocolDeviceService" cardinality="1..1"
interface="com.eurotech.framework.protocol.modbus.ModbusProtocolDeviceService"
name="ModbusProtocolDeviceService"
policy="static"
unbind="unsetModbusProtocolDeviceService" />
But eclipse shows me warnings and some errors.
If someone could explain my step a step how should I do it.
Thank you.
|
|
| |
Re: Kura Modbus [message #1779013 is a reply to message #1778867] |
Thu, 28 December 2017 08:15   |
Eclipse User |
|
|
|
Matteo Maiero wrote on Fri, 22 December 2017 15:03Hello,
if you need only to read/write data from your modbus device, have you tried using Kura Wires?
Maybe you can get the same result without writing lines of code.
If, otherwise, you need to develop a more specific application, I would suggest first to start with the first examples. In this way you can understand how declarative services work and what you need to do to define dependencies between services.
Related to the errors you are having, could you please report them, in order to be able to provide support?
Thanks.
Best regards,
Matteo
Hi Matteo, reference Kura Wires, thank you for your suggest, I have been able to read a register, show it with log and send it a mqtt server but I couldn´t write. I use esf modbus driver.
Some idea why I can´t write a register?
[Updated on: Thu, 28 December 2017 08:16] by Moderator
|
|
|
Re: Kura Modbus [message #1779014 is a reply to message #1779013] |
Thu, 28 December 2017 08:49   |
Eclipse User |
|
|
|
Hi,
I believe you have two options if you are using Kura 3.1.0:
- if you only need to change a single time a value in an asset, go to the "Drivers and Assets" section, select your asset, then the "Data" tab and from there perform the write of the specific value you want to change;
- use the graph for that: you need to setup a graph, maybe using the subscriber component, the database and database filter that will determine a graph that is able to produce a value that matches, with its name and type, one of the channels of the Asset. This message is then received, using the data flow model, by the Asset that will write to the specific Modbus register.
Best regards,
Matteo
|
|
|
Re: Kura Modbus [message #1779085 is a reply to message #1779014] |
Tue, 02 January 2018 07:08   |
Eclipse User |
|
|
|
Matteo Maiero wrote on Thu, 28 December 2017 13:49Hi,
I believe you have two options if you are using Kura 3.1.0:
- if you only need to change a single time a value in an asset, go to the "Drivers and Assets" section, select your asset, then the "Data" tab and from there perform the write of the specific value you want to change;
- use the graph for that: you need to setup a graph, maybe using the subscriber component, the database and database filter that will determine a graph that is able to produce a value that matches, with its name and type, one of the channels of the Asset. This message is then received, using the data flow model, by the Asset that will write to the specific Modbus register.
Best regards,
Matteo
Hi Matteo, happy new year.
I tried as you said it and all OK, now I can write to, but with this way, the write is very slow and for reduced number of changes.
I need something more complex, so, I have to develop an application in java to deploy it after in kura, here I have two problems:
- The eclipse project "org.eclipse.kura.protocol.modbus" show me an error reference pom.xml (Project build error: Non-resolvable parent POM for org.eclipse.kura:org.eclipse.kura.protocol.modbus:2.0.200-SNAPSHOT: Could not find artifact org.eclipse.kura:kura:pom:3.2.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM).
- Test project "org.eclipse.kura.protocol.modbus.test" isn´t a eclipse project, it is a maven project and when I try to clean, install etc allways I have some error.
|
|
| | | | | |
Re: Kura Modbus [message #1779977 is a reply to message #1779257] |
Tue, 16 January 2018 04:47  |
Eclipse User |
|
|
|
At the end. I used eclipse installer following the steps in kura github page instead of mvn and all ok (0 errors).
Thank you Matteo for all.
|
|
|
Goto Forum:
Current Time: Thu Jun 12 12:46:38 EDT 2025
Powered by FUDForum. Page generated in 0.09160 seconds
|