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

Why I can not find the server in the localhost? #12

Closed
cngobd opened this issue Jul 15, 2019 · 6 comments
Closed

Why I can not find the server in the localhost? #12

cngobd opened this issue Jul 15, 2019 · 6 comments

Comments

@cngobd
Copy link

cngobd commented Jul 15, 2019

I have start the IntellutionGateWayOPCServer, and my IntellutionGateWayOPCClient can find this OPCDAServer. But I can not find this server by running the follow code:
opc.Debug()
servers_found := opc.NewAutomationObject().GetOPCServers("localhost")
fmt.Printf("Found %d server(s) on '%s':\n", len(servers_found), "localhost")

the result is:
API server listening at: 127.0.0.1:54240
2019/07/15 11:08:50 Could not load OPC Automation object with wrapper OPC.Automation.1
2019/07/15 11:08:50 Loaded OPC Automation object with wrapper Graybox.OPC.DAWrapper.1
Found 0 server(s) on 'localhost':
2019/07/15 11:08:50 GetOPCServers call failed.

How to deal with it?
thank you !

@konimarti
Copy link
Owner

I have never tested the code with IntellutionGateWayOPCServer but it works with most others OPC DA servers. The most common problem is to compile Golang in 64bit when the server is actually 32bit. See also here. Did you try to compile the code with GOARCH=386 (in Powershell: $ENV:GOARCH=386)? Hope this helps.

@cngobd
Copy link
Author

cngobd commented Jul 16, 2019

@konimarti
Thank you for your help
I tried this method,I find that if I list the server with command"localhost",it can not find any server, but if I use my computer name "DESKTOP-UDUBS4F", it can find one server: GrayBoxSimulator, and it still can not find my IntellutionGateWayOPCServer.
My IntellutionGateWayOPCClient can find both GrayBoxSimulationServer and IntellutionGateWayOPCServer.

@cngobd
Copy link
Author

cngobd commented Jul 16, 2019

@konimarti the returned error : Could not load OPC Automation object with wrapper OPC.Automation.1

@konimarti
Copy link
Owner

@769139671 The OPC automation wrapper is needed in the Windows COM model to communicate with the server. If you have a standard OPC DA server installation with all the OPC components installed, you usually also get the OPC.Automation wrapper. As an alternative, Graybox provides a free automation wrapper. So, if at least one loads, you should be fine.

It also seems that your OPC server is known for not working well with other clients link.

However, you could add your server's OPC automation wrapper to this package if they provide one. Maybe you should reach out to them.

Regarding your computer name, did you also try '127.0.0.1' instead of localhost?

@cngobd
Copy link
Author

cngobd commented Jul 17, 2019

@konimarti I can find the GrayBoxSimulationServer using cmd command of "list DESKTOP-UDUBS4F",but I can not connect to this server.
If I use "127.0.0.1" instead of "DESKTOP-UDUBS4F", none of server can be found

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

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