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".
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?
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?
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").
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.
Log in to post a comment.