CodeSys OPC UA client Unable to Connect To OPC UA sever through Username and password

6 days ago
5 days ago
  • kiranbsiddaiah - 6 days ago

    Hi,

    I'm using codesys v3.5 sp21 software. I have downloaded the sample opc ua client project from https://content.helpme-codesys.com/en/CODESYS%20Examples/_ex_uacapi_example.html and i tested connecting to "prosys opc ua simulation server".

    Through Anonymous connection it is connecting to server and can read data.

    Later tried to connect using username and password.
    First got a SECURITY_CHECKS_FAILED error, trusted the client certificate in the server and this issue resolved.
    Next got an INVALID_CERTIFICATE error, trusted the server certificate in the client and this issue resolved.
    After these two error it is not establishing the connection and not giving any error messages.


    UAAsyncProp: UA.AsyncProperty := (tnTaskName:='UAClientTask', usiTaskPrio:=20, udiTaskInterval:=10000);
    UAPolicy: UA.SecurityPolicy := (sPolicy:=UA.OpcUa_SecurityPolicy.OpcUa_SecurityPolicy_Aes128Sha256RsaOaep, eSecurity:=UA.SECURITY_MODE.SIGN_AND_ENCRYPT);
    //UAPolicy: UA.SecurityPolicy := (sPolicy:=UA.OpcUa_SecurityPolicy.OpcUa_SecurityPolicy_None, eSecurity:=UA.SECURITY_MODE.NONE);
    UAAuth: UA.UserNameAuth := (sUserName:=UAVars.sUser, sPassword:=UAVars.sPass);
    UAClient: UA.Client := (
    itfAsyncProperty:= UAAsyncProp,
    //sClientName:= 'MyOPC UA client name', //default: β€˜CODESYS OPC UA Client’
    sURL:= UAVars.sURL,
    sSession:= UAVars.sSession,
    itfPolicy:= UAPolicy,
    itfAuth:=UAAuth,
    udiTimeout:= 100000
    //,itfNamespaceArray:= UAVars.itfNamespaceArray //optional use
    );
    -----------------------------------------------------------------------------------------------------------------------

    Please let me know if any additional information required.

    Thank you...

     
  • kiranbsiddaiah - 5 days ago

    And also we do not have any opc ua related license . Do we need to have a opc ua license to communicate with OPC UA server with username and password?

     

    Last edit: kiranbsiddaiah 5 days ago

Log in to post a comment.