OPC Communication

2010-10-12
2016-03-27
  • mvkchowdaryfru - 2010-10-12

    Hai all..
    I am not getting any variables, when I tried to browse the OPC.
    I opened the log file, the contents are as follows.

    (12.10.2010, 15:20:06.987) 41. Reconnect to <plc1>
    (12.10.2010, 15:20:06.987) [PLC1]: ::ConnectGateway(): m_ulGatewayChannels=1
    (12.10.2010, 15:20:07.003) * ERROR: Login failed to PLC <plc1>.
    (12.10.2010, 15:20:07.003) </plc1>
    ERROR: Open communication to <plc1> failed
    (12.10.2010, 15:20:07.972) [PLC1]: ::DisconnectGateway(m_ulGateway=0): m_ulGatewayChannels=0
    (12.10.2010, 15:20:23.425) 42. Reconnect to <plc1>
    (12.10.2010, 15:20:23.425) [PLC1]: ::ConnectGateway(): m_ulGatewayChannels=1
    (12.10.2010, 15:20:23.643) * ERROR: Login failed to PLC <plc1>.
    (12.10.2010, 15:20:23.643) </plc1>
    </plc1></plc1>
    ERROR: Open communication to <plc1> failed
    (12.10.2010, 15:20:24.268) [PLC1]: ::DisconnectGateway(m_ulGateway=0): m_ulGatewayChannels=0
    (12.10.2010, 15:20:39.862) 43. Reconnect to <plc1>
    (12.10.2010, 15:20:39.862) [PLC1]: ::ConnectGateway(): m_ulGatewayChannels=1
    (12.10.2010, 15:20:40.112) * ERROR: Login failed to PLC <plc1>.
    (12.10.2010, 15:20:40.112) </plc1>
    ERROR: Open communication to <plc1> failed
    (12.10.2010, 15:20:40.472) [PLC1]: ::DisconnectGateway(m_ulGateway=0): m_ulGatewayChannels=0
    (12.10.2010, 15:20:56.315) 44. Reconnect to <plc1>
    (12.10.2010, 15:20:56.315) [PLC1]: ::ConnectGateway(): m_ulGatewayChannels=1
    (12.10.2010, 15:20:56.518) * ERROR: Login failed to PLC <plc1>.
    (12.10.2010, 15:20:56.518) </plc1>
    </plc1></plc1>
    ERROR: Open communication to <plc1> failed
    (12.10.2010, 15:20:57.456) [PLC1]: ::DisconnectGateway(m_ulGateway=0): m_ulGatewayChannels=0</plc1></plc1></plc1></plc1>

    But I done the symbolfile configuration and downloaded to the PLC.
    I had cross checeked my opc configuration also.
    Can any one help our please.. I am badly struck up in commissioning stage.

    If any body have any document for diagnosis the opc connection problems, please send me..

    Thanks to all for your king attention and support..

    Regards
    Vijay

     
  • Rolf-Geisler - 2010-10-12

    Hi Vilay,
    let me try to help, even if not knowing your actual configuration.

    1. The error log shows a sequence of login trials, ending up in a login / open error and a subsequent disconnect. Seems, the OPC server does not have connection parameters resp. they are wrong - or you do not have a physical connection (wire break or so). Check the cables and the OPC server configuration.
      The communication parameters should be the same as in the PLC project (case, the CoDeSys IDE is running at the same machine as the OPC server). If not, I would install the CoDeSys IDE at the same machine as the OPC server temporarily, to find the communication parameters (which is pretty easy in programming IDE).

    2. The PLC does not need the OPC symbol configuration. This has to be published to the OPC server (whereever this is running). Normally the 3S OPC server configuration expects path and filename of the PLC project, to use the belonging *.sym file.

    Hope these few hints help to solve the problem.
    Good luck
    Rolf

     
  • mvkchowdaryfru - 2010-10-13

    Hai Geisler

    Thank you very much for you brief explination.

    Yes as you said in the first point, It was settings problem.
    Yesterday night I am browsing to findout the problem in Google. I found the OPC configuration documet from ABB. There I saw the settings in "REGEDIT". Then I copied the settings of the working computer(My colegue's PC) to my PC. Then it started working. I am using my PC for the same from one year. I dont know how these settings were changed..!!

    For my understanding can you please elobarate the second point you had mention? Or please let me know were I can read this information, i.e., path and project name in the OPC configuration..
    Also please send me the link/document for understanding the opc log file.

    Thank you once again for you response..

    Regards
    Vijay

     
  • Armin Hornung - 2010-10-13

    Hello Vijay,

    I will send you the standard documentation of the CoDeSys OPC-Server V2. Most of the log entries in the OPCServer.log are quite clear.
    In your case, the controller PLC1 could not be connected:
    "ERROR: open communication to <plc1> failed"
    As Rolf mentioned, this could be a OPC configuration problem or a physical connection problem.</plc1>

    To copy an OPC-Configuration from one PC to another, you should not edit it directly in the registry with regedit.
    Please use the OPCConfig.exe tool, that is installed with the OPC-Server. Here you can read in the configuration from the working PC and export it to an ini-file. On the other PC, you can import this configuration. This is the standard way.

    Regards,
    Armin

     
  • efra-mx - 2011-05-05

    I am getting the same error, and i am sure both configuration match; nevertheless, in the gateway inspector the client is tries to connect to another branch instance of the sever (i see 2 branches) and I am sure i just have one in the 'online configuration'.

    CPX-CEC (Active)
    |------Channel 1
    CPX-CEC
    |------Channel 3

    (05.05.2011, 15:34:17.097) [PLC1]: ::ConnectGateway(): m_ulGatewayChannels=1
    (05.05.2011, 15:34:21.072) [PLC1]: ::DisconnectGateway(m_ulGateway=0): m_ulGatewayChannels=0
    (05.05.2011, 15:34:21.073) * ERROR: Open communication to <plc1> failed
    (05.05.2011, 15:34:22.188) 1394. Reconnect to <plc1>
    (05.05.2011, 15:34:22.193) [PLC1]: ::ConnectGateway(): m_ulGatewayChannels=1
    (05.05.2011, 15:34:26.572) [PLC1]: ::DisconnectGateway(m_ulGateway=0): m_ulGatewayChannels=0
    (05.05.2011, 15:34:26.572) </plc1></plc1>
    ERROR: Open communication to <plc1> failed
    (05.05.2011, 15:34:28.197) 1395. Reconnect to <plc1>
    (05.05.2011, 15:34:28.202) [PLC1]: ::ConnectGateway(): m_ulGatewayChannels=1
    (05.05.2011, 15:34:49.574) [PLC1]: ::DisconnectGateway(m_ulGateway=0): m_ulGatewayChannels=0
    (05.05.2011, 15:34:49.574) </plc1></plc1>
    *** ERROR: Open communication to <plc1> failed
    (05.05.2011, 15:34:51.195) 1396. Reconnect to <plc1>
    (05.05.2011, 15:34:51.203) [PLC1]: ::ConnectGateway(): m_ulGatewayChannels=1</plc1></plc1>

    In the Codesys OPC Configurator the name of the PLC is PLC1, why do i get that PLC1??

    Thanks in advance??

     
  • efra-mx - 2011-05-06

    I also notice that i dont have the following keys in the register:

    [HKEY_LOKAL_MACHINE\SOFTWARE\3S-Smart Software Solutions GmbH\CoDeSys
    OPC\Config]

    [HKEY_LOCAL_MACHINE\SOFTWARE\3S-Smart Software Solutions GmbH\CoDeSys
    OPC\PLCDefaults]

    i will reinstall it to see what happens, probably something went wrong during th installation.

     
  • Rolf-Geisler - 2011-05-08

    Hi efra,
    the OPC login problems you have probably are caused by wrong gateway settings, or are a hardware issue.
    Your PC tries to connect to a device named "PLC1", but the OPC server does not find it.
    On doing the OPC configuration by the 3S tool, for any PLC which you want to access via this server, you will find a connection settings work sheet. When you select the communication member out of this list, the server surely will find it. But, if the list is empty, the server does not find any PLC, a wire break maybe or wrong gateway settings.

    The name "PLC1" is a logical name, under which the data of a PLC can be accessed. You can rename it in the OPC configurator as well - simply right click to it to open a pull down menu.

    There's no need to set registry keys manually. Normally, this should happen automatically on installing the OPC server. However, do not forget to register it (for details see the 3S OPC manual).

    Hope this little explanation helps
    Rolf

     
  • Bereggergo - 2016-03-27

    Hello everybody!

    I have a general question about OPC-UA, therefore I haven't found a topic for that.

    So I just getting know, with OPC-UA. I see the plc as a server, and in the sysmbol config I can put the required variables to the address space then with a cliens in the PC I can reach these variables.

    My question is that, two PLC can communicate with each other without any PC?

    Thanks,
    Gergo

     

Log in to post a comment.