Hello Luiz, I already have the Odot gateway working with the Plc4x-S7 driver.
I will be running tests throughout the day to verify that the small change needed does not affect anything else. Basically it is a number. Kind regards, El lun, 15 jul 2024 a las 8:53, Luiz doleron (<dole...@gmail.com>) escribió: > Hi Cesar, > > thank you for the follow-up & confirmation. > > Let me know if there is something I can help with. > > Best regards, > Luiz > > > > Em seg., 15 de jul. de 2024 às 01:36, Cesar Garcia < > cesar.gar...@ceos.com.ve> > escreveu: > > > Hi Luiz, > > > > I tested the Odot modules and indeed with our version of the Plc4x-S7 > > driver it fails. > > > > I performed the tests with S7-300 and S7-400 and on both behave the same > > way. > > > > The Odot equipment does not respond to the first "Setup communication" > > message; comparing the frames you can see the difference with respect to > > the use of an HMI or the KepWare driver. I modify the parameters via URL > > but it still does not respond. > > > > It's time to investigate, > > > > El sáb, 13 jul 2024 a las 14:29, Luiz doleron (<dole...@gmail.com>) > > escribió: > > > > > Hey Cesar, > > > > > > I modified my code to use CachedPlcConnectionManager but the problem > > > persists: the program gets stuck on the getConnection call. > > > > > > This is my code now: > > > > > > public static void main(String[] args) { > > > > > > // System.setProperty(SimpleLogger.DEFAULT_LOG_LEVEL_KEY, "Error"); > > > > > > Logger logger = LoggerFactory.getLogger(TestConnection.class); > > > > > > String connectionString = "s7://10.10.26.88?controller-type:S7_300"; > > > > > > PlcConnection plcConnection = null; > > > > > > try { > > > > > > CachedPlcConnectionManager connectionManager = > > CachedPlcConnectionManager. > > > getBuilder(new DefaultPlcDriverManager()).build(); > > > > > > plcConnection = connectionManager.getConnection(connectionString); > > > > > > if (!plcConnection.getMetadata().isReadSupported()) { > > > > > > logger.error("This connection doesn't support reading."); > > > > > > return; > > > > > > } > > > > > > System.out.println("Success"); > > > > > > } catch (Exception e) { > > > > > > e.printStackTrace(); > > > > > > } finally { > > > > > > if (plcConnection != null) { > > > > > > try { > > > > > > plcConnection.close(); > > > > > > } catch (Exception e) { > > > > > > e.printStackTrace(); > > > > > > } > > > > > > } > > > > > > } > > > > > > > > > } > > > > > > > > > The exception trace is: > > > > > > [main] INFO org.apache.plc4x.java.DefaultPlcDriverManager - > Instantiating > > > new PLC Driver Manager with class loader > > > jdk.internal.loader.ClassLoaders$AppClassLoader@2cdf8d8a > > > > > > [main] INFO org.apache.plc4x.java.DefaultPlcDriverManager - Registering > > > available drivers... > > > > > > [main] INFO org.apache.plc4x.java.DefaultPlcDriverManager - Registering > > > driver for Protocol s7 (Siemens S7 (Basic)) > > > > > > [main] INFO org.apache.plc4x.java.transport.tcp.TcpChannelFactory - > > > Configuring Bootstrap with > > > > > > > > > org.apache.plc4x.java.s7.readwrite.configuration.S7TcpTransportConfiguration@345965f2 > > > > > > [main] INFO > org.apache.plc4x.java.s7.readwrite.protocol.S7ProtocolLogic - > > > S7 Driver running in ACTIVE mode. > > > > > > [main] INFO org.apache.plc4x.java.s7.readwrite.protocol.S7HMuxImpl - > > > 15:11:46.130938260 userEventTriggered: Multiplexor Event: > > > org.apache.plc4x.java.spi.events.ConnectEvent@139982de > > > > > > [nioEventLoopGroup-2-1] WARN io.netty.channel.embedded.EmbeddedChannel > - > > > More than one exception was raised. Will report only the first one and > > log > > > others. > > > > > > io.netty.handler.codec.DecoderException: > > > io.netty.handler.codec.EncoderException: MessageToMessageCodec$1 must > > > produce at least one message. > > > > > > at io.netty.handler.codec.MessageToMessageDecoder.channelRead( > > > MessageToMessageDecoder.java:98) > > > > > > at io.netty.handler.codec.MessageToMessageCodec.channelRead( > > > MessageToMessageCodec.java:111) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead( > > > AbstractChannelHandlerContext.java:442) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead( > > > AbstractChannelHandlerContext.java:420) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead( > > > AbstractChannelHandlerContext.java:412) > > > > > > at io.netty.handler.codec.MessageToMessageDecoder.channelRead( > > > MessageToMessageDecoder.java:103) > > > > > > at io.netty.handler.codec.MessageToMessageCodec.channelRead( > > > MessageToMessageCodec.java:111) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead( > > > AbstractChannelHandlerContext.java:442) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead( > > > AbstractChannelHandlerContext.java:420) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead( > > > AbstractChannelHandlerContext.java:412) > > > > > > at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead( > > > ByteToMessageDecoder.java:346) > > > > > > at io.netty.handler.codec.ByteToMessageDecoder.channelRead( > > > ByteToMessageDecoder.java:318) > > > > > > at io.netty.handler.codec.ByteToMessageCodec.channelRead( > > > ByteToMessageCodec.java:103) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead( > > > AbstractChannelHandlerContext.java:442) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead( > > > AbstractChannelHandlerContext.java:420) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead( > > > AbstractChannelHandlerContext.java:412) > > > > > > at io.netty.handler.logging.LoggingHandler.channelRead( > > > LoggingHandler.java:280) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead( > > > AbstractChannelHandlerContext.java:442) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead( > > > AbstractChannelHandlerContext.java:420) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead( > > > AbstractChannelHandlerContext.java:412) > > > > > > at org.apache.plc4x.java.s7.readwrite.protocol.S7HMuxImpl.decode( > > > S7HMuxImpl.java:145) > > > > > > at org.apache.plc4x.java.s7.readwrite.protocol.S7HMuxImpl.decode( > > > S7HMuxImpl.java:1) > > > > > > at io.netty.handler.codec.MessageToMessageCodec$2.decode( > > > MessageToMessageCodec.java:81) > > > > > > at io.netty.handler.codec.MessageToMessageDecoder.channelRead( > > > MessageToMessageDecoder.java:88) > > > > > > at io.netty.handler.codec.MessageToMessageCodec.channelRead( > > > MessageToMessageCodec.java:111) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead( > > > AbstractChannelHandlerContext.java:442) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead( > > > AbstractChannelHandlerContext.java:420) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead( > > > AbstractChannelHandlerContext.java:412) > > > > > > at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead( > > > DefaultChannelPipeline.java:1410) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead( > > > AbstractChannelHandlerContext.java:440) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead( > > > AbstractChannelHandlerContext.java:420) > > > > > > at io.netty.channel.DefaultChannelPipeline.fireChannelRead( > > > DefaultChannelPipeline.java:919) > > > > > > at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read( > > > AbstractNioByteChannel.java:166) > > > > > > at io.netty.channel.nio.NioEventLoop.processSelectedKey( > > > NioEventLoop.java:788) > > > > > > at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized( > > > NioEventLoop.java:724) > > > > > > at io.netty.channel.nio.NioEventLoop.processSelectedKeys( > > > NioEventLoop.java:650) > > > > > > at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) > > > > > > at io.netty.util.concurrent.SingleThreadEventExecutor$4.run( > > > SingleThreadEventExecutor.java:997) > > > > > > at > > > > io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) > > > > > > at io.netty.util.concurrent.FastThreadLocalRunnable.run( > > > FastThreadLocalRunnable.java:30) > > > > > > at java.base/java.lang.Thread.run(Thread.java:840) > > > > > > Caused by: io.netty.handler.codec.EncoderException: > > MessageToMessageCodec$1 > > > must produce at least one message. > > > > > > at io.netty.handler.codec.MessageToMessageEncoder.write( > > > MessageToMessageEncoder.java:99) > > > > > > at io.netty.handler.codec.MessageToMessageCodec.write( > > > MessageToMessageCodec.java:116) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0( > > > AbstractChannelHandlerContext.java:891) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.invokeWrite( > > > AbstractChannelHandlerContext.java:875) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.write( > > > AbstractChannelHandlerContext.java:984) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.write( > > > AbstractChannelHandlerContext.java:868) > > > > > > at > io.netty.handler.logging.LoggingHandler.write(LoggingHandler.java:288) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0( > > > AbstractChannelHandlerContext.java:891) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.invokeWrite( > > > AbstractChannelHandlerContext.java:875) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.write( > > > AbstractChannelHandlerContext.java:984) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.write( > > > AbstractChannelHandlerContext.java:868) > > > > > > at io.netty.handler.codec.MessageToByteEncoder.write( > > > MessageToByteEncoder.java:113) > > > > > > at io.netty.handler.codec.ByteToMessageCodec.write( > > > ByteToMessageCodec.java:108) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0( > > > AbstractChannelHandlerContext.java:891) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.invokeWrite( > > > AbstractChannelHandlerContext.java:875) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.write( > > > AbstractChannelHandlerContext.java:984) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.write( > > > AbstractChannelHandlerContext.java:868) > > > > > > at io.netty.handler.codec.MessageToMessageEncoder.write( > > > MessageToMessageEncoder.java:113) > > > > > > at io.netty.handler.codec.MessageToMessageCodec.write( > > > MessageToMessageCodec.java:116) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0( > > > AbstractChannelHandlerContext.java:891) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.invokeWrite( > > > AbstractChannelHandlerContext.java:875) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.write( > > > AbstractChannelHandlerContext.java:984) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.write( > > > AbstractChannelHandlerContext.java:868) > > > > > > at io.netty.handler.codec.MessageToMessageEncoder.write( > > > MessageToMessageEncoder.java:113) > > > > > > at io.netty.handler.codec.MessageToMessageCodec.write( > > > MessageToMessageCodec.java:116) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0( > > > AbstractChannelHandlerContext.java:891) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush( > > > AbstractChannelHandlerContext.java:956) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.write( > > > AbstractChannelHandlerContext.java:982) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush( > > > AbstractChannelHandlerContext.java:950) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush( > > > AbstractChannelHandlerContext.java:1000) > > > > > > at io.netty.channel.DefaultChannelPipeline.writeAndFlush( > > > DefaultChannelPipeline.java:1025) > > > > > > at > > io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:306) > > > > > > at > > > > org.apache.plc4x.java.spi.internal.DefaultConversationContext.sendToWire( > > > DefaultConversationContext.java:70) > > > > > > at org.apache.plc4x.java.spi.internal.DefaultSendRequestContext.handle( > > > DefaultSendRequestContext.java:107) > > > > > > at org.apache.plc4x.java.spi.internal.DefaultSendRequestContext.handle( > > > DefaultSendRequestContext.java:1) > > > > > > at > org.apache.plc4x.java.s7.readwrite.protocol.S7ProtocolLogic.lambda$3( > > > S7ProtocolLogic.java:194) > > > > > > at > > java.base/java.util.function.Consumer.lambda$andThen$0(Consumer.java:65) > > > > > > at org.apache.plc4x.java.spi.Plc4xNettyWrapper.decode( > > > Plc4xNettyWrapper.java:183) > > > > > > at io.netty.handler.codec.MessageToMessageCodec$2.decode( > > > MessageToMessageCodec.java:81) > > > > > > at io.netty.handler.codec.MessageToMessageDecoder.channelRead( > > > MessageToMessageDecoder.java:88) > > > > > > ... 40 more > > > > > > [pool-6-thread-1] WARN > > > org.apache.plc4x.java.s7.readwrite.protocol.S7ProtocolLogic - Timeout > > > during Connection establishing, closing channel... > > > > > > [pool-6-thread-1] INFO > > > org.apache.plc4x.java.s7.readwrite.protocol.S7HMuxImpl - Unregistered > of > > > channel: PRIMARY > > > > > > [pool-6-thread-1] WARN io.netty.channel.AbstractChannelHandlerContext - > > > Failed to mark a promise as failure because it has succeeded already: > > > DefaultChannelPromise@53d1d4d1(success) > > > > > > java.lang.IllegalStateException: HashedWheelTimer.stop() cannot be > called > > > from TimerTask > > > > > > at io.netty.util.HashedWheelTimer.stop(HashedWheelTimer.java:393) > > > > > > at org.apache.plc4x.java.spi.netty.NettyHashTimerTimeoutManager.stop( > > > NettyHashTimerTimeoutManager.java:63) > > > > > > at org.apache.plc4x.java.spi.Plc4xNettyWrapper.close( > > > Plc4xNettyWrapper.java:130) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.invokeClose( > > > AbstractChannelHandlerContext.java:757) > > > > > > at io.netty.channel.AbstractChannelHandlerContext.close( > > > AbstractChannelHandlerContext.java:733) > > > > > > at io.netty.channel.DefaultChannelPipeline.close( > > > DefaultChannelPipeline.java:994) > > > > > > at io.netty.channel.AbstractChannel.close(AbstractChannel.java:280) > > > > > > at > > > > io.netty.channel.embedded.EmbeddedChannel.close(EmbeddedChannel.java:569) > > > > > > at > > > > io.netty.channel.embedded.EmbeddedChannel.close(EmbeddedChannel.java:556) > > > > > > at > org.apache.plc4x.java.s7.readwrite.protocol.S7ProtocolLogic.lambda$4( > > > S7ProtocolLogic.java:185) > > > > > > at org.apache.plc4x.java.spi.Plc4xNettyWrapper.lambda$8( > > > Plc4xNettyWrapper.java:253) > > > > > > at > org.apache.plc4x.java.spi.netty.NettyHashTimerTimeoutManager.lambda$0( > > > NettyHashTimerTimeoutManager.java:55) > > > > > > at io.netty.util.HashedWheelTimer$HashedWheelTimeout.run( > > > HashedWheelTimer.java:715) > > > > > > at io.netty.util.concurrent.ImmediateExecutor.execute( > > > ImmediateExecutor.java:34) > > > > > > at io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire( > > > HashedWheelTimer.java:703) > > > > > > at io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts( > > > HashedWheelTimer.java:790) > > > > > > at io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:503) > > > > > > at java.base/java.lang.Thread.run(Thread.java:840) > > > > > > [nioEventLoopGroup-2-1] INFO > > > org.apache.plc4x.java.s7.readwrite.protocol.S7HMuxImpl - Unregistered > of > > > channel: PRIMARY > > > > > > [nioEventLoopGroup-2-1] INFO > > > org.apache.plc4x.java.s7.readwrite.protocol.S7HMuxImpl - > > > io.netty.channel.embedded.EmbeddedEventLoop@476a35e8 > > > > > > [plc4x-s7ha-thread-1] INFO > > > org.apache.plc4x.java.s7.readwrite.protocol.S7HPlcConnection - Creating > > > prymary connection. > > > > > > [plc4x-s7ha-thread-1] INFO > > > org.apache.plc4x.java.transport.tcp.TcpChannelFactory - Configuring > > > Bootstrap with > > > > > > > > > org.apache.plc4x.java.s7.readwrite.configuration.S7TcpTransportConfiguration@345965f2 > > > > > > [plc4x-s7ha-thread-1] INFO > > > org.apache.plc4x.java.s7.readwrite.protocol.S7HPlcConnection - > > Reconnecting > > > primary channel. > > > > > > [nioEventLoopGroup-3-1] INFO > > > org.apache.plc4x.java.s7.readwrite.protocol.S7HMuxImpl - Unregistered > of > > > channel: PRIMARY > > > > > > [nioEventLoopGroup-3-1] INFO > > > org.apache.plc4x.java.s7.readwrite.protocol.S7HMuxImpl - > > > io.netty.channel.embedded.EmbeddedEventLoop@476a35e8 > > > > > > [plc4x-s7ha-thread-1] INFO > > > org.apache.plc4x.java.s7.readwrite.protocol.S7HPlcConnection - Creating > > > prymary connection. > > > > > > [plc4x-s7ha-thread-1] INFO > > > org.apache.plc4x.java.transport.tcp.TcpChannelFactory - Configuring > > > Bootstrap with > > > > > > > > > org.apache.plc4x.java.s7.readwrite.configuration.S7TcpTransportConfiguration@345965f2 > > > > > > [plc4x-s7ha-thread-1] INFO > > > org.apache.plc4x.java.s7.readwrite.protocol.S7HPlcConnection - > > Reconnecting > > > primary channel. > > > > > > [nioEventLoopGroup-4-1] INFO > > > org.apache.plc4x.java.s7.readwrite.protocol.S7HMuxImpl - Unregistered > of > > > channel: PRIMARY > > > > > > ... > > > > > > > > > -- > > *CEOS Automatización, C.A.* > > *GALPON SERVICIO INDUSTRIALES Y NAVALES FA, C.A.,* > > *PISO 1, OFICINA 2, AV. RAUL LEONI, SECTOR GUAMACHITO,* > > > > *FRENTE A LA ASOCIACION DE GANADEROS,BARCELONA,EDO. ANZOATEGUI* > > *Ing. César García* > > > > *Cel: +58 414-760.98.95* > > > > *Hotline Técnica SIEMENS: 0800 1005080* > > > > *Email: support.aan.automat...@siemens.com > > <support.aan.automat...@siemens.com>* > > > > > -- > Luiz Carlos d´Oleron > -- *CEOS Automatización, C.A.* *GALPON SERVICIO INDUSTRIALES Y NAVALES FA, C.A.,* *PISO 1, OFICINA 2, AV. RAUL LEONI, SECTOR GUAMACHITO,* *FRENTE A LA ASOCIACION DE GANADEROS,BARCELONA,EDO. ANZOATEGUI* *Ing. César García* *Cel: +58 414-760.98.95* *Hotline Técnica SIEMENS: 0800 1005080* *Email: support.aan.automat...@siemens.com <support.aan.automat...@siemens.com>*