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

> On 12.08.2021, at 09:37, Christofer Dutz <[email protected]> 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 <[email protected]> 
> Gesendet: Donnerstag, 12. August 2021 09:31
> An: [email protected]
> 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 <[email protected]> 
>> 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
> 

Reply via email to