Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

OPC server problem - all data bad

2012-04-25
2012-05-13
  • dejan.hrnjica - 2012-04-25

    Hi,
    I'm trying to establish communication between LTi Plc and Opc server running on a Windows XP system with CoDeSys (LTi version). When I connect to OPC server from MatrikonOPC client and validate variables, all variables are bad.
    In OPC server log I found following:

    (25.04.2012, 13:56:36.718) 129. Reconnect to <plc_single>
    (25.04.2012, 13:56:36.718) [PLC_SINGLE]: ::ConnectGateway(): m_ulGatewayChannels=1
    (25.04.2012, 13:56:36.984) <plc_single> Reconnect successful, ProjectName='Ysio_LTi.pro'
    (25.04.2012, 13:56:36.984) Timeout[ms]=10000, BufferSize[B]=0, Waitime[s]=10, Reconnecttime[s]=15
    (25.04.2012, 13:56:36.984) Motorola=0, NoLogin=1
    (25.04.2012, 13:56:37.000) **** ERROR: ProjectID mismatch of symbols and program on <plc_single>: PLC=983957760, SYM=108090</plc_single></plc_single></plc_single>

    This application was previously work on an another Windows system, but I moved it to another one. On the first system OPC server worked without problems. I just copied project.

    Thanks in advance for any idea!
    Dejan

     
  • TimvH

    TimvH - 2012-05-13

    The reason is as follows:
    - CoDeSys creates a symbol file when you go online and download/change the application.
    - You can choose to download the symbol file to the device: See target settings. By default this is most of the times not enabled.
    - CoDeSys automatically creates files in the gateway folder.
    - When the OPC server connects to the PLC, it first tries to find the symbol file in the PLC. If it doesn't find it there it will try to find it in the gateway folder.
    - When it finds it, it will check if the project ID matches the ID in the symbol file, to make sure the correct variables are read/written.

    In you case it seems there is a mismatch between the symbol file the OPC server finds and the project in the PLC.
    It is most easy to download again the application to the PLC, but make sure you go through the gateway which also the OPC client/server uses.

     

Log in to post a comment.