CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Wed Oct 18, 2017 11:03 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
 Post subject: OPC Communication
PostPosted: Tue Oct 12, 2010 11:17 am 
Offline

Joined: Tue Mar 30, 2010 4:58 am
Posts: 6
Hai all..
I am not getting any variables, when I tried to browse the OPC.
I opened the log file, the contents are as follows.

(12.10.2010, 15:20:06.987) 41. Reconnect to <PLC1>
(12.10.2010, 15:20:06.987) [PLC1]: ::ConnectGateway(): m_ulGatewayChannels=1
(12.10.2010, 15:20:07.003) **** ERROR: Login failed to PLC <PLC1>.
(12.10.2010, 15:20:07.003) **** ERROR: Open communication to <PLC1> failed
(12.10.2010, 15:20:07.972) [PLC1]: ::DisconnectGateway(m_ulGateway=0): m_ulGatewayChannels=0
(12.10.2010, 15:20:23.425) 42. Reconnect to <PLC1>
(12.10.2010, 15:20:23.425) [PLC1]: ::ConnectGateway(): m_ulGatewayChannels=1
(12.10.2010, 15:20:23.643) **** ERROR: Login failed to PLC <PLC1>.
(12.10.2010, 15:20:23.643) **** ERROR: Open communication to <PLC1> failed
(12.10.2010, 15:20:24.268) [PLC1]: ::DisconnectGateway(m_ulGateway=0): m_ulGatewayChannels=0
(12.10.2010, 15:20:39.862) 43. Reconnect to <PLC1>
(12.10.2010, 15:20:39.862) [PLC1]: ::ConnectGateway(): m_ulGatewayChannels=1
(12.10.2010, 15:20:40.112) **** ERROR: Login failed to PLC <PLC1>.
(12.10.2010, 15:20:40.112) **** ERROR: Open communication to <PLC1> failed
(12.10.2010, 15:20:40.472) [PLC1]: ::DisconnectGateway(m_ulGateway=0): m_ulGatewayChannels=0
(12.10.2010, 15:20:56.315) 44. Reconnect to <PLC1>
(12.10.2010, 15:20:56.315) [PLC1]: ::ConnectGateway(): m_ulGatewayChannels=1
(12.10.2010, 15:20:56.518) **** ERROR: Login failed to PLC <PLC1>.
(12.10.2010, 15:20:56.518) **** ERROR: Open communication to <PLC1> failed
(12.10.2010, 15:20:57.456) [PLC1]: ::DisconnectGateway(m_ulGateway=0): m_ulGatewayChannels=0

But I done the symbolfile configuration and downloaded to the PLC.
I had cross checeked my opc configuration also.
Can any one help our please.. I am badly struck up in commissioning stage.

If any body have any document for diagnosis the opc connection problems, please send me..

Thanks to all for your king attention and support..

Regards
Vijay


Top
   
 Post subject: Re: OPC Communication
PostPosted: Tue Oct 12, 2010 5:53 pm 
Offline

Joined: Mon Apr 03, 2006 8:43 am
Posts: 71
Hi Vilay,
let me try to help, even if not knowing your actual configuration.

1. The error log shows a sequence of login trials, ending up in a login / open error and a subsequent disconnect. Seems, the OPC server does not have connection parameters resp. they are wrong - or you do not have a physical connection (wire break or so). Check the cables and the OPC server configuration.
The communication parameters should be the same as in the PLC project (case, the CoDeSys IDE is running at the same machine as the OPC server). If not, I would install the CoDeSys IDE at the same machine as the OPC server temporarily, to find the communication parameters (which is pretty easy in programming IDE).

2. The PLC does not need the OPC symbol configuration. This has to be published to the OPC server (whereever this is running). Normally the 3S OPC server configuration expects path and filename of the PLC project, to use the belonging *.sym file.

Hope these few hints help to solve the problem.
Good luck
Rolf


Top
   
 Post subject: Re: OPC Communication
PostPosted: Wed Oct 13, 2010 5:12 am 
Offline

Joined: Tue Mar 30, 2010 4:58 am
Posts: 6
Hai Geisler

Thank you very much for you brief explination.

Yes as you said in the first point, It was settings problem.
Yesterday night I am browsing to findout the problem in Google. I found the OPC configuration documet from ABB. There I saw the settings in "REGEDIT". Then I copied the settings of the working computer(My colegue's PC) to my PC. Then it started working. I am using my PC for the same from one year. I dont know how these settings were changed..!!

For my understanding can you please elobarate the second point you had mention? Or please let me know were I can read this information, i.e., path and project name in the OPC configuration..
Also please send me the link/document for understanding the opc log file.

Thank you once again for you response..

Regards
Vijay


Top
   
 Post subject: Re: OPC Communication
PostPosted: Wed Oct 13, 2010 11:04 am 
Offline

Joined: Fri Feb 18, 2005 2:03 pm
Posts: 2
Hello Vijay,

I will send you the standard documentation of the CoDeSys OPC-Server V2. Most of the log entries in the OPCServer.log are quite clear.
In your case, the controller PLC1 could not be connected:
"ERROR: open communication to <PLC1> failed"
As Rolf mentioned, this could be a OPC configuration problem or a physical connection problem.

To copy an OPC-Configuration from one PC to another, you should not edit it directly in the registry with regedit.
Please use the OPCConfig.exe tool, that is installed with the OPC-Server. Here you can read in the configuration from the working PC and export it to an ini-file. On the other PC, you can import this configuration. This is the standard way.

Regards,
Armin

_________________
3S-Smart Software Solutions GmbH
Dipl.-Ing. Armin Hornung
Produktentwicklung, Produktbereichsleiter Laufzeitsystem-Kern


Top
   
 Post subject: Re: OPC Communication
PostPosted: Thu May 05, 2011 2:37 pm 
Offline

Joined: Mon Apr 11, 2011 9:29 am
Posts: 8
I am getting the same error, and i am sure both configuration match; nevertheless, in the gateway inspector the client is tries to connect to another branch instance of the sever (i see 2 branches) and I am sure i just have one in the 'online configuration'.

CPX-CEC (Active)
|------Channel 1
CPX-CEC
|------Channel 3

(05.05.2011, 15:34:17.097) [PLC1]: ::ConnectGateway(): m_ulGatewayChannels=1
(05.05.2011, 15:34:21.072) [PLC1]: ::DisconnectGateway(m_ulGateway=0): m_ulGatewayChannels=0
(05.05.2011, 15:34:21.073) **** ERROR: Open communication to <PLC1> failed
(05.05.2011, 15:34:22.188) 1394. Reconnect to <PLC1>
(05.05.2011, 15:34:22.193) [PLC1]: ::ConnectGateway(): m_ulGatewayChannels=1
(05.05.2011, 15:34:26.572) [PLC1]: ::DisconnectGateway(m_ulGateway=0): m_ulGatewayChannels=0
(05.05.2011, 15:34:26.572) **** ERROR: Open communication to <PLC1> failed
(05.05.2011, 15:34:28.197) 1395. Reconnect to <PLC1>
(05.05.2011, 15:34:28.202) [PLC1]: ::ConnectGateway(): m_ulGatewayChannels=1
(05.05.2011, 15:34:49.574) [PLC1]: ::DisconnectGateway(m_ulGateway=0): m_ulGatewayChannels=0
(05.05.2011, 15:34:49.574) **** ERROR: Open communication to <PLC1> failed
(05.05.2011, 15:34:51.195) 1396. Reconnect to <PLC1>
(05.05.2011, 15:34:51.203) [PLC1]: ::ConnectGateway(): m_ulGatewayChannels=1

In the Codesys OPC Configurator the name of the PLC is PLC1, why do i get that PLC1??

Thanks in advance??


Top
   
 Post subject: Re: OPC Communication
PostPosted: Fri May 06, 2011 11:33 am 
Offline

Joined: Mon Apr 11, 2011 9:29 am
Posts: 8
I also notice that i dont have the following keys in the register:

[HKEY_LOKAL_MACHINE\SOFTWARE\3S-Smart Software Solutions GmbH\CoDeSys
OPC\Config]
[HKEY_LOCAL_MACHINE\SOFTWARE\3S-Smart Software Solutions GmbH\CoDeSys
OPC\PLCDefaults]

i will reinstall it to see what happens, probably something went wrong during th installation.


Top
   
 Post subject: Re: OPC Communication
PostPosted: Sun May 08, 2011 7:51 pm 
Offline

Joined: Mon Apr 03, 2006 8:43 am
Posts: 71
Hi efra,
the OPC login problems you have probably are caused by wrong gateway settings, or are a hardware issue.
Your PC tries to connect to a device named "PLC1", but the OPC server does not find it.
On doing the OPC configuration by the 3S tool, for any PLC which you want to access via this server, you will find a connection settings work sheet. When you select the communication member out of this list, the server surely will find it. But, if the list is empty, the server does not find any PLC, a wire break maybe or wrong gateway settings.

The name "PLC1" is a logical name, under which the data of a PLC can be accessed. You can rename it in the OPC configurator as well - simply right click to it to open a pull down menu.

There's no need to set registry keys manually. Normally, this should happen automatically on installing the OPC server. However, do not forget to register it (for details see the 3S OPC manual).

Hope this little explanation helps
Rolf


Top
   
 Post subject: Re: OPC Communication
PostPosted: Sun Mar 27, 2016 10:30 pm 
Offline
User avatar

Joined: Thu Jan 21, 2016 10:58 am
Posts: 24
Hello everybody!

I have a general question about OPC-UA, therefore I haven't found a topic for that.

So I just getting know, with OPC-UA. I see the plc as a server, and in the sysmbol config I can put the required variables to the address space then with a cliens in the PC I can reach these variables.

My question is that, two PLC can communicate with each other without any PC?

Thanks,
Gergo


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 8 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited