Problem building simple EtherNet/IP project - library problem?

brady
2021-01-10
2021-01-12
  • brady

    brady - 2021-01-10

    I am having trouble upgrading a project from Codesys 3.5 SP12 Patch 4 to Codesys 3.5 SP16 Patch 3. I have both versions of the development environment installed on my PC.

    I can reproduce the problem with a simple example project created as follows:

    1. Create a new "standard project", device = CODESYS Control for Raspberry Pi SL, structured text
    2. Right-click the Device node, click Add Device, select Fieldbuses->Ethernet Adapter->Ethernet
    3. Build: No errors
    4. Right-click Ethernet node, click Add Device, select Fieldbuses->EtherNet/IP->EtherNet/IP Scanner->EtherNet/IP Scanner
    5. Build: 100 errors
    ------ Build started: Application: Device.Application -------
                    Typify code...
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): TCPIP_Interface: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): TCPIP_Interface: C0032:  Cannot convert type 'Unknown type: '_strSockAdapterInfo.IpAddr'' to type 'INADDR'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): TCPIP_Interface: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): TCPIP_Interface: C0201:  Type 'SOCK_ADAPTER_INFORMATION2' is not equal to type 'SOCK_ADAPTER_INFORMATION2' of VAR_IN_OUT 'adapterInfo'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): TCPIP_Interface: C0032:  Cannot convert type 'Unknown type: '_strSockAdapterInfo.IpAddr'' to type 'INADDR'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): TCPIP_Interface: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): TCPIP_Interface: C0032:  Cannot convert type 'Unknown type: '_strSockAdapterInfo.PrimaryNameServer'' to type 'INADDR'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): TCPIP_Interface: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): TCPIP_Interface: C0032:  Cannot convert type 'Unknown type: '_strSockAdapterInfo.SecondaryNameServer'' to type 'INADDR'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): TCPIP_Interface: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): TCPIP_Interface: C0032:  Cannot convert type 'Unknown type: '_strSockAdapterInfo.NetMask'' to type 'INADDR'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): TCPIP_Interface: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): TCPIP_Interface: C0032:  Cannot convert type 'Unknown type: '_strSockAdapterInfo.DefaultGateway'' to type 'INADDR'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): TCPIP_Interface: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): TCPIP_Interface: C0032:  Cannot convert type 'Unknown type: '_strSockAdapterInfo.wsDNSSuffix'' to type 'ANY'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): TCPIP_Interface: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): TCPIP_Interface: C0032:  Cannot convert type 'Unknown type: '_strSockAdapterInfo.wsDNSSuffix'' to type 'ANY'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): TCPIP_Interface: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): CheckGatewayConfigured [IPConfig]: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): CheckGatewayConfigured [IPConfig]: C0032:  Cannot convert type 'Unknown type: 'SIZEOF(SOCK_ADAPTER_INFORMATION2)'' to type 'UDINT'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): CheckGatewayConfigured [IPConfig]: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): CheckGatewayConfigured [IPConfig]: C0046:  Identifier 'SOCK_ADAPTER_INFORMATION2' not defined
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): CheckGatewayConfigured [IPConfig]: C0201:  Type 'SOCK_ADAPTER_INFORMATION2' is not equal to type 'SOCK_ADAPTER_INFORMATION2' of VAR_IN_OUT 'adapterInfo'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0032:  Cannot convert type 'Unknown type: 'adapterInfo.IpAddr.S_un_b.s_b1'' to type 'BYTE'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.IpAddr.S_un_b' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.IpAddr' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0032:  Cannot convert type 'Unknown type: 'adapterInfo.IpAddr.S_un_b.s_b2'' to type 'BYTE'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.IpAddr.S_un_b' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.IpAddr' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0032:  Cannot convert type 'Unknown type: 'adapterInfo.IpAddr.S_un_b.s_b3'' to type 'BYTE'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.IpAddr.S_un_b' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.IpAddr' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0032:  Cannot convert type 'Unknown type: 'adapterInfo.IpAddr.S_un_b.s_b4'' to type 'BYTE'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.IpAddr.S_un_b' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.IpAddr' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0032:  Cannot convert type 'Unknown type: 'adapterInfo.NetMask.S_un_b.s_b1'' to type 'BYTE'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.NetMask.S_un_b' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.NetMask' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0032:  Cannot convert type 'Unknown type: 'adapterInfo.NetMask.S_un_b.s_b2'' to type 'BYTE'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.NetMask.S_un_b' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.NetMask' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0032:  Cannot convert type 'Unknown type: 'adapterInfo.NetMask.S_un_b.s_b3'' to type 'BYTE'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.NetMask.S_un_b' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.NetMask' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0032:  Cannot convert type 'Unknown type: 'adapterInfo.NetMask.S_un_b.s_b4'' to type 'BYTE'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.NetMask.S_un_b' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.NetMask' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0032:  Cannot convert type 'Unknown type: 'adapterInfo.DefaultGateway.S_un_b.s_b1'' to type 'BYTE'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.DefaultGateway.S_un_b' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.DefaultGateway' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0032:  Cannot convert type 'Unknown type: 'adapterInfo.DefaultGateway.S_un_b.s_b2'' to type 'BYTE'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.DefaultGateway.S_un_b' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.DefaultGateway' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0032:  Cannot convert type 'Unknown type: 'adapterInfo.DefaultGateway.S_un_b.s_b3'' to type 'BYTE'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.DefaultGateway.S_un_b' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.DefaultGateway' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0032:  Cannot convert type 'Unknown type: 'adapterInfo.DefaultGateway.S_un_b.s_b4'' to type 'BYTE'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.DefaultGateway.S_un_b' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0062:  'adapterInfo.DefaultGateway' is no structured variable
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0032:  Cannot convert type 'Unknown type: '((adapterInfo.dwFlags AND SOCK_AIF_INACTIVE) = SOCK_AIF_INACTIVE)'' to type 'BIT'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: '(adapterInfo.dwFlags AND SOCK_AIF_INACTIVE)'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'adapterInfo.dwFlags'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0032:  Cannot convert type 'Unknown type: '((adapterInfo.dwFlags AND SOCK_AIF_ALIAS_IP) = SOCK_AIF_ALIAS_IP)'' to type 'BIT'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: '(adapterInfo.dwFlags AND SOCK_AIF_ALIAS_IP)'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'adapterInfo.dwFlags'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0032:  Cannot convert type 'Unknown type: '((adapterInfo.dwFlags AND SOCK_AIF_DYNAMIC_IP) = SOCK_AIF_DYNAMIC_IP)'' to type 'BIT'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: '(adapterInfo.dwFlags AND SOCK_AIF_DYNAMIC_IP)'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'adapterInfo.dwFlags'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0032:  Cannot convert type 'Unknown type: '((adapterInfo.dwFlags AND SOCK_AIF_FIX_IP) = SOCK_AIF_FIX_IP)'' to type 'BIT'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: '(adapterInfo.dwFlags AND SOCK_AIF_FIX_IP)'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'adapterInfo.dwFlags'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0032:  Cannot convert type 'Unknown type: '((adapterInfo.dwFlags AND SOCK_AIF_IP_CHANGE_ALLOWED) = SOCK_AIF_IP_CHANGE_ALLOWED)'' to type 'BIT'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: '(adapterInfo.dwFlags AND SOCK_AIF_IP_CHANGE_ALLOWED)'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'adapterInfo.dwFlags'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0032:  Cannot convert type 'Unknown type: '((adapterInfo.dwFlags AND SOCK_AIF_GATEWAY_INFO_VALID) = SOCK_AIF_GATEWAY_INFO_VALID)'' to type 'BIT'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: '(adapterInfo.dwFlags AND SOCK_AIF_GATEWAY_INFO_VALID)'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'adapterInfo.dwFlags'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0032:  Cannot convert type 'Unknown type: '((adapterInfo.dwFlags AND SOCK_AIF_INFO_VALID) = SOCK_AIF_INFO_VALID)'' to type 'BIT'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: '(adapterInfo.dwFlags AND SOCK_AIF_INFO_VALID)'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'adapterInfo.dwFlags'
    [ERROR]         cip object, 3.5.16.30 (3s - smart software solutions gmbh): GetIPParams [IPConfig]: C0077:  Unknown type: 'SOCK_ADAPTER_INFORMATION2'
                    Compile complete -- 100 errors, 14 warnings
    

    When I open Library Manager and expand IoDrvEtherNetIP->CIP Object->Element Collections, I see that the CmpEventMgr Implementation is not resolved (see attachement). I don't know if this is relevant or not.

    I have tried adding various libraries to my project, but none have made a difference.

    Any suggestions would be greatly appreciated!

     
  • brady

    brady - 2021-01-12

    We resolved this by installing the "CODESYS Control for Raspberry Pi" version 4.0.0 package, then updating the device in the project to that version.

     

Log in to post a comment.