[jira] [Created] (PLC4X-310) plc4x for go language install error

2021-08-12 Thread lihs (Jira)
lihs created PLC4X-310:
--

 Summary: plc4x for go language install error
 Key: PLC4X-310
 URL: https://issues.apache.org/jira/browse/PLC4X-310
 Project: Apache PLC4X
  Issue Type: Bug
Reporter: lihs


when install go plc4x package ,

go mod tidy 

```

github.com/apache/plc4x/plc4go: module github.com/apache/plc4x/plc4go@latest 
found (v0.0.0-20210812075016-3b51e81d65f1), but does not contain package 
github.com/apache/plc4x/plc4go

```



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


Re: AW: ModBus set slaveId...

2021-08-12 Thread Łukasz Dywicki
Is there other story about how many bells the man hit before he got old
and respected to ask for 1011 Livres? ;-)

Cheers!

On 12.08.2021 19:10, Niclas Hedhman wrote:
> On 2021-08-12 17:56, Christofer Dutz wrote:
>> Those tasks are always my favorites :-)
>>
>> Helping people without having to do anything ;-)
> 
> A long time ago, a church bell in a French village was out of tune and
> they sent for a bell master to come and fix it. And sure enough an old
> man came, they let him hear the awful bell sound. He borrowed a ladder,
> picked a big hammer out of his luggage and climbed the bell tower. Once
> up there, he whacked the bell once, then climbed down and told them to
> ring the bell again. It now had the perfect sound as it was intended.
> He handed them the bill of 1011 Livres, a small fortune even for this
> relatively prosperous village. "How come so much? Only took you 10
> minutes and no material.". The bell master explained, "1 Livre for wear
> on the hammer, 10 Livres for the long travel and 1000 Livres for knowing
> where to hit."
> 
> 
> Cheers
> Niclas


Re: ModBus set slaveId...

2021-08-12 Thread Andreas Vogler
I hope I don‘t have to pay now 1011 livers :-)

Von meinem iPad gesendet

> Am 12.08.2021 um 19:10 schrieb Niclas Hedhman :
> 
> On 2021-08-12 17:56, Christofer Dutz wrote:
>> Those tasks are always my favorites :-)
>> Helping people without having to do anything ;-)
> 
> A long time ago, a church bell in a French village was out of tune and they 
> sent for a bell master to come and fix it. And sure enough an old man came, 
> they let him hear the awful bell sound. He borrowed a ladder, picked a big 
> hammer out of his luggage and climbed the bell tower. Once up there, he 
> whacked the bell once, then climbed down and told them to ring the bell 
> again. It now had the perfect sound as it was intended.
> He handed them the bill of 1011 Livres, a small fortune even for this 
> relatively prosperous village. "How come so much? Only took you 10 minutes 
> and no material.". The bell master explained, "1 Livre for wear on the 
> hammer, 10 Livres for the long travel and 1000 Livres for knowing where to 
> hit."
> 
> 
> Cheers
> Niclas


Re: AW: ModBus set slaveId...

2021-08-12 Thread Ben Hutcheson
Hi,

Niclas, good story :)

The unit id does get used a fair bit with Modbus TCP. Especially on Modbus
RTU to Modbus TCP gateways where you access each Modbus RTU slave on the
TCP side using the unit ID. I've also seen some VSDs that will also use a
couple of different IDs for different data tables.

Ben

On Fri, Aug 13, 2021 at 3:10 AM Niclas Hedhman  wrote:

> On 2021-08-12 17:56, Christofer Dutz wrote:
> > Those tasks are always my favorites :-)
> >
> > Helping people without having to do anything ;-)
>
> A long time ago, a church bell in a French village was out of tune and
> they sent for a bell master to come and fix it. And sure enough an old
> man came, they let him hear the awful bell sound. He borrowed a ladder,
> picked a big hammer out of his luggage and climbed the bell tower. Once
> up there, he whacked the bell once, then climbed down and told them to
> ring the bell again. It now had the perfect sound as it was intended.
> He handed them the bill of 1011 Livres, a small fortune even for this
> relatively prosperous village. "How come so much? Only took you 10
> minutes and no material.". The bell master explained, "1 Livre for wear
> on the hammer, 10 Livres for the long travel and 1000 Livres for knowing
> where to hit."
>
>
> Cheers
> Niclas
>


Re: AW: ModBus set slaveId...

2021-08-12 Thread Niclas Hedhman

On 2021-08-12 17:56, Christofer Dutz wrote:

Those tasks are always my favorites :-)

Helping people without having to do anything ;-)


A long time ago, a church bell in a French village was out of tune and 
they sent for a bell master to come and fix it. And sure enough an old 
man came, they let him hear the awful bell sound. He borrowed a ladder, 
picked a big hammer out of his luggage and climbed the bell tower. Once 
up there, he whacked the bell once, then climbed down and told them to 
ring the bell again. It now had the perfect sound as it was intended.
He handed them the bill of 1011 Livres, a small fortune even for this 
relatively prosperous village. "How come so much? Only took you 10 
minutes and no material.". The bell master explained, "1 Livre for wear 
on the hammer, 10 Livres for the long travel and 1000 Livres for knowing 
where to hit."



Cheers
Niclas


AW: ModBus set slaveId...

2021-08-12 Thread Christofer Dutz
Those tasks are always my favorites :-)

Helping people without having to do anything ;-)

Chris

-Ursprüngliche Nachricht-
Von: Andreas Vogler  
Gesendet: Donnerstag, 12. August 2021 16:28
An: dev@plc4x.apache.org
Betreff: Re: ModBus set slaveId...

Hi Chris,

Great! That’s it!

Thank you!
Andreas

> On 12.08.2021, at 15:53, Christofer Dutz  wrote:
> 
> Hi Andreas,
> 
> could you please use the connection parameter "unit-identifier" as described 
> here:
> http://plc4x.apache.org/users/protocols/modbus.html
> 
> Chris
> 
> -Ursprüngliche Nachricht-
> Von: Andreas Vogler  
> Gesendet: Donnerstag, 12. August 2021 13:49
> An: dev@plc4x.apache.org
> Betreff: Re: ModBus set slaveId...
> 
> Hi Chris,
> 
> I don’t know exactly - first time using ModBus :-)… I have used the Java 
> ModBus Server (ModbusPal) for testing and there I can create multiple slaves 
> listening on the same port. And also for example in WinCC Unified I can also 
> set a slaveId when I setup a ModBus TCP connection to a modbus device… so, I 
> thought “this is missing in PLC4X”...
> 
> Regards,
> Andreas
> 
>> On 12.08.2021, at 12:10, Christofer Dutz  wrote:
>> 
>> Hi Andreas,
>> 
>> I think the main reason is (as far as I understood it) that the slave id is 
>> particularly needed for modbus RTU over RS485 as here multiple devices are 
>> listening to the same connection. For this you identify the desired host 
>> with the slave id. In TCP it's always a one-to-one connection, so the slave 
>> id is pretty much ignored (As I said ... as far as I know)
>> 
>> Chris
>> 
>> -Ursprüngliche Nachricht-
>> Von: Andreas Vogler  
>> Gesendet: Donnerstag, 12. August 2021 11:18
>> An: dev@plc4x.apache.org
>> Betreff: ModBus set slaveId...
>> 
>> Hi again,
>> I found a thread regarding how to set the slaveId here: dev@plc4x.apache.org 
>>  But when I try to use it 
>> (modbus://localhost:502?slaveId=2 ) it 
>> does not make any difference. It always uses slave 1… Best regards, Andreas
>> 
> 



Re: ModBus set slaveId...

2021-08-12 Thread Andreas Vogler
Hi Chris,

Great! That’s it!

Thank you!
Andreas

> On 12.08.2021, at 15:53, Christofer Dutz  wrote:
> 
> Hi Andreas,
> 
> could you please use the connection parameter "unit-identifier" as described 
> here:
> http://plc4x.apache.org/users/protocols/modbus.html
> 
> Chris
> 
> -Ursprüngliche Nachricht-
> Von: Andreas Vogler  
> Gesendet: Donnerstag, 12. August 2021 13:49
> An: dev@plc4x.apache.org
> Betreff: Re: ModBus set slaveId...
> 
> Hi Chris,
> 
> I don’t know exactly - first time using ModBus :-)… I have used the Java 
> ModBus Server (ModbusPal) for testing and there I can create multiple slaves 
> listening on the same port. And also for example in WinCC Unified I can also 
> set a slaveId when I setup a ModBus TCP connection to a modbus device… so, I 
> thought “this is missing in PLC4X”...
> 
> Regards,
> Andreas
> 
>> On 12.08.2021, at 12:10, Christofer Dutz  wrote:
>> 
>> Hi Andreas,
>> 
>> I think the main reason is (as far as I understood it) that the slave id is 
>> particularly needed for modbus RTU over RS485 as here multiple devices are 
>> listening to the same connection. For this you identify the desired host 
>> with the slave id. In TCP it's always a one-to-one connection, so the slave 
>> id is pretty much ignored (As I said ... as far as I know)
>> 
>> Chris
>> 
>> -Ursprüngliche Nachricht-
>> Von: Andreas Vogler  
>> Gesendet: Donnerstag, 12. August 2021 11:18
>> An: dev@plc4x.apache.org
>> Betreff: ModBus set slaveId...
>> 
>> Hi again,
>> I found a thread regarding how to set the slaveId here: dev@plc4x.apache.org 
>>  But when I try to use it 
>> (modbus://localhost:502?slaveId=2 ) it 
>> does not make any difference. It always uses slave 1… Best regards, Andreas
>> 
> 



AW: ModBus set slaveId...

2021-08-12 Thread Christofer Dutz
Hi Andreas,

could you please use the connection parameter "unit-identifier" as described 
here:
http://plc4x.apache.org/users/protocols/modbus.html

Chris

-Ursprüngliche Nachricht-
Von: Andreas Vogler  
Gesendet: Donnerstag, 12. August 2021 13:49
An: dev@plc4x.apache.org
Betreff: Re: ModBus set slaveId...

Hi Chris,

I don’t know exactly - first time using ModBus :-)… I have used the Java ModBus 
Server (ModbusPal) for testing and there I can create multiple slaves listening 
on the same port. And also for example in WinCC Unified I can also set a 
slaveId when I setup a ModBus TCP connection to a modbus device… so, I thought 
“this is missing in PLC4X”...

Regards,
Andreas

> On 12.08.2021, at 12:10, Christofer Dutz  wrote:
> 
> Hi Andreas,
> 
> I think the main reason is (as far as I understood it) that the slave id is 
> particularly needed for modbus RTU over RS485 as here multiple devices are 
> listening to the same connection. For this you identify the desired host with 
> the slave id. In TCP it's always a one-to-one connection, so the slave id is 
> pretty much ignored (As I said ... as far as I know)
> 
> Chris
> 
> -Ursprüngliche Nachricht-
> Von: Andreas Vogler  
> Gesendet: Donnerstag, 12. August 2021 11:18
> An: dev@plc4x.apache.org
> Betreff: ModBus set slaveId...
> 
> Hi again,
> I found a thread regarding how to set the slaveId here: dev@plc4x.apache.org 
>  But when I try to use it 
> (modbus://localhost:502?slaveId=2 ) it does 
> not make any difference. It always uses slave 1… Best regards, Andreas
> 



Re: ModBus set slaveId...

2021-08-12 Thread Andreas Vogler
Hi Chris,

I don’t know exactly - first time using ModBus :-)… I have used the Java ModBus 
Server (ModbusPal) for testing and there I can create multiple slaves listening 
on the same port. And also for example in WinCC Unified I can also set a 
slaveId when I setup a ModBus TCP connection to a modbus device… so, I thought 
“this is missing in PLC4X”...

Regards,
Andreas

> On 12.08.2021, at 12:10, Christofer Dutz  wrote:
> 
> Hi Andreas,
> 
> I think the main reason is (as far as I understood it) that the slave id is 
> particularly needed for modbus RTU over RS485 as here multiple devices are 
> listening to the same connection. For this you identify the desired host with 
> the slave id. In TCP it's always a one-to-one connection, so the slave id is 
> pretty much ignored (As I said ... as far as I know)
> 
> Chris
> 
> -Ursprüngliche Nachricht-
> Von: Andreas Vogler  
> Gesendet: Donnerstag, 12. August 2021 11:18
> An: dev@plc4x.apache.org
> Betreff: ModBus set slaveId...
> 
> Hi again,
> I found a thread regarding how to set the slaveId here: dev@plc4x.apache.org 
>  But when I try to use it 
> (modbus://localhost:502?slaveId=2 ) it does 
> not make any difference. It always uses slave 1… Best regards, Andreas
> 



AW: ModBus set slaveId...

2021-08-12 Thread Christofer Dutz
Hi Andreas,

I think the main reason is (as far as I understood it) that the slave id is 
particularly needed for modbus RTU over RS485 as here multiple devices are 
listening to the same connection. For this you identify the desired host with 
the slave id. In TCP it's always a one-to-one connection, so the slave id is 
pretty much ignored (As I said ... as far as I know)

Chris

-Ursprüngliche Nachricht-
Von: Andreas Vogler  
Gesendet: Donnerstag, 12. August 2021 11:18
An: dev@plc4x.apache.org
Betreff: ModBus set slaveId...

Hi again,
I found a thread regarding how to set the slaveId here: dev@plc4x.apache.org 
 But when I try to use it 
(modbus://localhost:502?slaveId=2 ) it does 
not make any difference. It always uses slave 1… Best regards, Andreas



AW: ModBus observe connection state...

2021-08-12 Thread Christofer Dutz
Hi Andreas,

well I just had a look ... this just checks if the channel is active ... while 
this should be better than nothing for TCP connections, for UDP it probably 
won't be much use. But we should probably help Lukasz get his PR ready as I 
think this is an important extension.

Chris

-Ursprüngliche Nachricht-
Von: Andreas Vogler  
Gesendet: Donnerstag, 12. August 2021 11:16
An: dev@plc4x.apache.org
Betreff: Re: ModBus observe connection state...

Thx Chris, it’s ok for me to check the isConnected flag.

> On 12.08.2021, at 09:37, Christofer Dutz  wrote:
> 
> Hi Andreas,
> 
> We introduced a "ping" method into the API of the PlcConnection ... however I 
> think we never implemented that in any of the protocols. 
> 
> However I think we really should come up with dummy operations for each 
> protocol which we can use to test the connection ... I mean ... even asking 
> for a resource that doesn't exist and the PLC politely tells us so, it a good 
> check.
> 
> Chris
> 
> -Ursprüngliche Nachricht-
> Von: Andreas Vogler  
> Gesendet: Donnerstag, 12. August 2021 09:31
> An: dev@plc4x.apache.org
> Betreff: Re: ModBus observe connection state...
> 
> Never mind, seems that I can periodically check the isConnected flag… 
> 
>> On 12.08.2021, at 08:21, Andreas Vogler  
>> wrote:
>> 
>> Hi,
>> 
>> How can I check the state of a connection? Especially if it is lost.
>> 
>> I have a ModBus connection and when I turn off the ModBus server I do not 
>> get any error. 
>> 
>> I have found the orTimeout option at the response object… 
>> 
>> But I want somehow detect if a connection is lost, so that I can do a 
>> reconnect…
>> 
>> Hope someone can give me an advice how this is typically done with Plc4x.
>> 
>> Regard,
>> Andreas
> 



ModBus set slaveId...

2021-08-12 Thread Andreas Vogler
Hi again,
I found a thread regarding how to set the slaveId here: dev@plc4x.apache.org 

But when I try to use it (modbus://localhost:502?slaveId=2 
) it does not make any difference. It always 
uses slave 1…
Best regards,
Andreas



Re: ModBus observe connection state...

2021-08-12 Thread Łukasz Dywicki
Indeed the connection state tracking is not available in present version.
I began working on that as part of feature branch which should be merged
soon:
https://github.com/apache/plc4x/pull/241

There are few new things:
1) EventListener (connection, message)
2) EventPlcConnection

With these it will be possible to receive connection shutdown on client
side. With this it will be possible to detect disconnection through
wrapping netty apis.
This is intended to get merged into 0.9.

Best,
Łukasz

On 12.08.2021 08:21, Andreas Vogler wrote:
> Hi,
> 
> How can I check the state of a connection? Especially if it is lost.
> 
> I have a ModBus connection and when I turn off the ModBus server I do not get 
> any error. 
> 
> I have found the orTimeout option at the response object… 
> 
> But I want somehow detect if a connection is lost, so that I can do a 
> reconnect…
> 
> Hope someone can give me an advice how this is typically done with Plc4x.
> 
> Regard,
> Andreas
> 


Re: ModBus observe connection state...

2021-08-12 Thread Andreas Vogler
Thx Chris, it’s ok for me to check the isConnected flag.

> On 12.08.2021, at 09:37, Christofer Dutz  wrote:
> 
> Hi Andreas,
> 
> We introduced a "ping" method into the API of the PlcConnection ... however I 
> think we never implemented that in any of the protocols. 
> 
> However I think we really should come up with dummy operations for each 
> protocol which we can use to test the connection ... I mean ... even asking 
> for a resource that doesn't exist and the PLC politely tells us so, it a good 
> check.
> 
> Chris
> 
> -Ursprüngliche Nachricht-
> Von: Andreas Vogler  
> Gesendet: Donnerstag, 12. August 2021 09:31
> An: dev@plc4x.apache.org
> Betreff: Re: ModBus observe connection state...
> 
> Never mind, seems that I can periodically check the isConnected flag… 
> 
>> On 12.08.2021, at 08:21, Andreas Vogler  
>> wrote:
>> 
>> Hi,
>> 
>> How can I check the state of a connection? Especially if it is lost.
>> 
>> I have a ModBus connection and when I turn off the ModBus server I do not 
>> get any error. 
>> 
>> I have found the orTimeout option at the response object… 
>> 
>> But I want somehow detect if a connection is lost, so that I can do a 
>> reconnect…
>> 
>> Hope someone can give me an advice how this is typically done with Plc4x.
>> 
>> Regard,
>> Andreas
> 



AW: ModBus observe connection state...

2021-08-12 Thread Christofer Dutz
Hi Andreas,

We introduced a "ping" method into the API of the PlcConnection ... however I 
think we never implemented that in any of the protocols. 

However I think we really should come up with dummy operations for each 
protocol which we can use to test the connection ... I mean ... even asking for 
a resource that doesn't exist and the PLC politely tells us so, it a good check.

Chris

-Ursprüngliche Nachricht-
Von: Andreas Vogler  
Gesendet: Donnerstag, 12. August 2021 09:31
An: dev@plc4x.apache.org
Betreff: Re: ModBus observe connection state...

Never mind, seems that I can periodically check the isConnected flag… 

> On 12.08.2021, at 08:21, Andreas Vogler  wrote:
> 
> Hi,
> 
> How can I check the state of a connection? Especially if it is lost.
> 
> I have a ModBus connection and when I turn off the ModBus server I do not get 
> any error. 
> 
> I have found the orTimeout option at the response object… 
> 
> But I want somehow detect if a connection is lost, so that I can do a 
> reconnect…
> 
> Hope someone can give me an advice how this is typically done with Plc4x.
> 
> Regard,
> Andreas



Re: ModBus observe connection state...

2021-08-12 Thread Andreas Vogler
Never mind, seems that I can periodically check the isConnected flag… 

> On 12.08.2021, at 08:21, Andreas Vogler  wrote:
> 
> Hi,
> 
> How can I check the state of a connection? Especially if it is lost.
> 
> I have a ModBus connection and when I turn off the ModBus server I do not get 
> any error. 
> 
> I have found the orTimeout option at the response object… 
> 
> But I want somehow detect if a connection is lost, so that I can do a 
> reconnect…
> 
> Hope someone can give me an advice how this is typically done with Plc4x.
> 
> Regard,
> Andreas



ModBus observe connection state...

2021-08-12 Thread Andreas Vogler
Hi,

How can I check the state of a connection? Especially if it is lost.

I have a ModBus connection and when I turn off the ModBus server I do not get 
any error. 

I have found the orTimeout option at the response object… 

But I want somehow detect if a connection is lost, so that I can do a reconnect…

Hope someone can give me an advice how this is typically done with Plc4x.

Regard,
Andreas