Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout setting? #19

Closed
AlexanderMatveev opened this issue Sep 14, 2019 · 2 comments
Closed

Timeout setting? #19

AlexanderMatveev opened this issue Sep 14, 2019 · 2 comments

Comments

@AlexanderMatveev
Copy link

I'm connecting to remote OPC and looks like something is closing connection by timeout after 40 seconds:

OPC 2019/09/14 23:42:27 Could not load OPC Automation object with wrapper OPC.Automation.1
OPC 2019/09/14 23:42:28 Loaded OPC Automation object with wrapper Graybox.OPC.DAWrapper.1
OPC 2019/09/14 23:42:28 Connecting to XXXXXXXX.FSGateway.1 on node 1xx.xxx.xxx.xxx
OPC 2019/09/14 23:43:10 Connection failed.
panic: TryConnect was not successful: Connection failed

OPC by itself is fine, I successfully connecting to it using OPC Expert tool.

So give me an advice please, is it possible somehow to manipulate timeout?

@konimarti
Copy link
Owner

As explained in the README, this package uses OPC Automation Wrappers to access OPC servers (automation wrappers contain the actual code for connecting to an OPC server and reading and writing data, see here). Your OPC Expert tool doesn't use the automation wrapper.

You need to make sure that the correct OPC automation wrapper is installed on the machine where you run the code and that it is compatible with your OPC server.

The standard OPC DA automation wrapper is usually installed when you install your OPC server (make sure to select the OPC Core Components when you have a choice). I can see from your debug output that the standard OPC wrapper (OPC.Automation.1) is not installed and you are using the Graybox wrapper.

So my recommendation would be to install the OPC server also on the machine where you run the code and get the OPC DA automation wrapper (OPCDAAuto.dll). I hope this makes sense. If you have further questions regarding the automation wrappers, please look into the link above.

konimarti added a commit that referenced this issue Sep 14, 2019
Issues that are related to connection problems are mostly because of a faulty installation of your OPC automation wrapper or some peculiarties of your specific setup and OPC installation. Since we cannot debug your specific situation, these issues will be directly closed.

Fix #8 #12 #19
@konimarti
Copy link
Owner

Closes 01ef7ad

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants