Codesys Soft PLC OPC UA server

ofey
2023-09-14
2024-08-30
  • ofey - 2023-09-14

    Hi! I'm sorry if this has been asked before. I have tried looking up previous topics regaring this, but even though I'm following tutorials and other posts I cant seem to get this to work consistently.
    I actually got the connection established on a test project after some trial and error. I only got it to work with the "Anonymous login". But after i deleted the test project and tried to get the same thing to work on another project I cant get it to work anymore.

    What I'm trying to do:
    Set up and OPC UA Server using CODESYS with the free soft PLC. I then try to connect to the OPC UA Server with the program "UaExpert".

    What happens:
    I get the error Error "'BadUserAccessDenied' was returned during ActivateSession".

    What I have done in CODESYS:
    - Added the object "Symbol configuration" and checked some test variables
    - Checked "Support OPC UA features
    - In "Communication settings -> device -> Change runtime security policy" I have checked "Allow anonymous login"

    What I have done in UAExpert:
    - Found the OPC UA server under "local". (It is showing two servers though, I do not know why. It showed the same when it worked yesterday). Se attachment
    - Checked "Anonymous" under "Authentication settings in the OPC UA server.

    I'm new to CODESYS, so it could be something elementary wrong in my settings. Maybe something in the user settings in CODESYS regarding user rights or something?

     
  • snhatton - 2023-09-14

    You should also check the security settings as shown in the attachment. The reason there are two is because one resolves to the host name, and the other resolves to the host IP. Have you looked at the log? Are there any messages regarding the OPC-UA component?

     
    πŸ‘
    1
  • ofey - 2023-09-15

    Thank you for your reply! Greatly appreciated.

    I have tried to change a lot of settings to get it to work. I'm a bit afraid that I have changed the settings too fast without thinking. Maybe there is a way to "reset the device" to factory or something?

    Anyway. I changed the security settings in accordance with your attachment. This is what is in the log after running (regarding the "CmpOPCUAServer").

     
  • ofey - 2023-09-15

    I also get an error when I try to add a certificate for the OPC server (see attachment). I dont know if this is related to the bad connection.

     
    • mos89p - 2024-06-27

      Hi did you check the log of OPCUA expert Client?

       
    • elayaraj - 2024-08-30

      Hi,

      You may refer to this below video link to get some idea.. hopefully it works
      https://www.youtube.com/watch?v=RBMff-IlPA4

       
  • egau - 2024-06-26

    Hey @ofey, any luck with that issue?

     
  • egau - 2024-06-26

    Hey @ofey, any luck with that issue?

     
  • elayaraj - 2024-08-22

    Hi guys,
    I also facing the same issue on my project, trying to connect server (Codesys) to UA Expert but the connection keep failed(attached). Im running out of idea right now..please help!

     

Log in to post a comment.