Could not connect to controller

Hi, i am building an application based on ThreadExample, this was all working until I added some setsockopt’s, now I notice i cant connect to the plcnext from PLCNext Engineer anymore. I am able to connect using SSH though. Some info, the application starts a socketlistener client in the delegateThreadBody and has a while(!xStopThread) The Output.log stops after ERROR - add_membership setsockopt The problem is that now I can’t upload a new project. Is there a way to remove the current project (perhaps via ssh) ? Is it possible that creating a multicast listener app can generate problems because plcnext is using some multicast features ? And that for this reason I cant discover the plcnext using the scanner etc… If so, any guidelines on how to get it working? Best regards, Thomas 07.10.19 15:48:34.066 Arp.Services.OpcUAServer.Internal.Security.SessionManager INFO - Applying configuration for client authentication to 1 endpoints: trustAll=true, checkCRLs=false, checkIssuerCRLs=false, ignoreValidity=false

07.10.19 15:48:34.071 root INFO - MyMCastListener - workerThreadInstance start
07.10.19 15:48:34.072 root INFO - MyMCastListener - workerThreadInstance is running, iCountervalue=1
07.10.19 15:48:34.072 root INFO - MyMCastListener - workerThreadInstance started
07.10.19 15:48:34.072 root INFO - MyMCastListener - delegateThreadInstance start
07.10.19 15:48:34.073 root INFO - MyMCastListener - delegateThreadInstance started
07.10.19 15:48:34.073 root INFO - MyMCastListener - staticThreadInstance start
07.10.19 15:48:34.074 root INFO - MyMCastListener - staticThreadInstance started
07.10.19 15:48:34.074 root INFO - MyMCastListener - ThreadExampleComponent::staticThreadBody is running pParameter=0
07.10.19 15:48:34.074 root ERROR - add_membership setsockopt
07.10.19 15:48:34.075 Arp.Io.Axioline.AxiolineComponent INFO - Axioline: Start.
07.10.19 15:48:34.076 Arp.Io.EthernetIP.EthernetIPComponent INFO - 2973758144 Enter Start
07.10.19 15:48:34.077 Arp.Io.EthernetIP.EthernetIPComponent INFO - 2973758144 Enter StartPlc. startKind=Warm
07.10.19 15:48:34.077 Arp.Io.EthernetIP.EthernetIPComponent INFO - 2973758144 OnPlcStarted
07.10.19 15:48:34.077 Arp.Io.EthernetIP.EthernetIPComponent INFO - 2973758144 ESDK 0xffff, SetRunMode, run=1
07.10.19 15:48:34.077 Arp.Io.EthernetIP.EthernetIPComponent INFO - 2973758144 LogStatistics cycle=25/26, active=0/1, esdk=0/1, gds=0/1
07.10.19 15:48:34.077 Arp.Io.EthernetIP.EthernetIPComponent INFO - 2973758144 Exit StartPlc. Elapsed=1
07.10.19 15:48:34.077 Arp.Io.EthernetIP.EthernetIPComponent INFO - 2973758144 Exit Start. Elapsed=1] some previous WARN messages in the logging: 07.10.19 15:50:36.457 Arp.Io.Axioline.Internal.System INFO - Axioline: Initialize/configure bus.
07.10.19 15:50:36.612 Arp.Io.Axioline.Internal.AxioMxi WARN - Axioline: Bus confirmation with negative result (command 0x8711, errCode 0xc14, addInfo 0x1). Continue download.
07.10.19 15:50:36.616 Arp.Io.Axioline.Internal.AxioMxi WARN - Axioline: Bus confirmation with negative result (command 0x8728, errCode 0xa02, addInfo 0x4). Continue download.
07.10.19 15:50:36.620 Arp.Io.Axioline.Internal.AxioMxi WARN - Axioline: PDI confirmation with negative result (Command 0x8042, slot 0x1, index 0x14, errCode 0xf11, addInfo 0x0). Continue download.
07.10.19 15:50:36.624 Arp.Io.Axioline.Internal.AxioMxi WARN - Axioline: PDI confirmation with negative result (Command 0x8042, slot 0x1, index 0x15, errCode 0xf11, addInfo 0x0). Continue download.
07.10.19 15:50:36.628 Arp.Io.Axioline.Internal.AxioMxi WARN - Axioline: PDI confirmation with negative result (Command 0x8042, slot 0x1, index 0xff8d, errCode 0xf11, addInfo 0x0). Continue download.
07.10.19 15:50:36.633 Arp.Io.Axioline.Internal.AxioMxi WARN - Axioline: PDI confirmation with negative result (Command 0x8042, slot 0x1, index 0xff8f, errCode 0xf11, addInfo 0x0). Continue download.
07.10.19 15:50:36.637 Arp.Io.Axioline.Internal.AxioMxi WARN - Axioline: PDI confirmation with negative result (Command 0x8042, slot 0x2, index 0x14, errCode 0xf11, addInfo 0x0). Continue download.
07.10.19 15:50:36.639 Arp.Io.Axioline.Internal.AxioMxi WARN - Axioline: PDI confirmation with negative result (Command 0x8042, slot 0x2, index 0x15, errCode 0xf11, addInfo 0x0). Continue download.
07.10.19 15:50:36.643 Arp.Io.Axioline.Internal.AxioMxi WARN - Axioline: PDI confirmation with negative result (Command 0x8042, slot 0x2, index 0x80, errCode 0xf11, addInfo 0x0). Continue download.
07.10.19 15:50:36.648 Arp.Io.Axioline.Internal.AxioMxi WARN - Axioline: Bus confirmation with negative result (command 0x8714, errCode 0xa02, addInfo 0x4). Continue download.
07.10.19 15:50:36.652 Arp.Io.Axioline.Internal.AxioMxi WARN - Axioline: Bus confirmation with negative result (command 0x8701, errCode 0xa02, addInfo 0x4). Continue download.
07.10.19 15:50:36.653 Arp.Io.Axioline.Internal.System INFO - Axioline: Connect to shared FbIo System.
07.10.19 15:50:36.654 Arp.Io.Axioline.Internal.System INFO - sleep mode with interval 100000us
07.10.19 15:50:36.658 Arp.Io.EthernetIP.EthernetIPComponent INFO - LoadConfig
07.10.19 15:50:36.659 Arp.Io.EthernetIP.EthernetIPComponent INFO - 2973758144 Enter LoadPlc. isChanging=false
07.10.19 15:50:36.669 root WARN - Cannot resolve /opt/plcnext/projects/current/Io/Arp.Io.EthernetIP/*.EthernetIP.config: Directory does not exist.
07.10.19 15:50:36.670 Arp.Io.EthernetIP.EthernetIPComponent INFO - 2973758144 Exit LoadPlc. Elapsed=12


Hi Thomas, It looks like the C++ program is causing the PLCnext runtime to stop, which would explain why you cannot discover the PLC or connect using PLCnext Engineer. I guess that you are creating an instance of your C++ program in PLCnext Engineer. So - how to get PLCnext Engineer running again: If it is the C++ program that is causing the problem, then you can prevent the C++ program from starting up by editing this file: /opt/plcnext/projects/PCWE/Plc/Esm/PCWE.esm.config This file contains the ESM configuration for the PLCnext Engineer project. You will see entries for each program that is instantiated, including your C++ program. If you simply delete the two lines related to your C++ program - one Program and one TaskProgramRelation, then restart the plc, it should start OK, and you should be able to connect PLCnext Engineer again. In addition - if you have connected any GDS ports from your C++ program, then you may get errors when the PLC starts up, and it may not start properly (I’m not sure). If you still cannot connect using PLCnext Engineer, then please also edit the following file: /opt/plcnext/projects/PCWE/Plc/Gds/PCWE.gds.config … and remove any entries related to ports on your C++ program, then restart the PLC. Hope this helps. Martin.

Hi Martin, thanks, this was what i was looking for!! Greetings,