CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Mon Jun 26, 2017 2:48 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Mar 27, 2013 6:42 pm 
Offline

Joined: Mon Mar 25, 2013 8:51 pm
Posts: 2
We have a controller installed from a supplier (Lenze OEM) which needs to have OPC communication for control of speed. Our other machines are all Allen Bradley and I am having a hard time getting any communication with OPC working. The OPC server runs as a service on the Lenze controller which I am trying to connect to. My plan was to connect to the Codesys OPC server on an external machine to handle the opc passing of speeds between PLC's using Matrikon Data Manager. The issue I've run into is that I can't get an OPC connection working with the controller. The controller runs 3SSoftware-CodeSys V2.3.5.1. I've been trying to connect by setting up the OPCConfig with TCP/IP (Level 2 Route) as per what the code tells me it should connect with. I set the Address to the ip address of the controller on the network and I use Matrikon Explorer to make the connection. I've tried it with project name/without etc as well as changing to TCP/IP (Level 2) or TCP/IP connections. It manages to open a channel, but results in Quality of 0% jumping to 100% for a moment with TCP/IP (Level 2), with TCP/IP (Level 2 Route) it gives me an unknown status and disconnects and with TCP/IP it gives a Quality of 25% and won't give any tags etc. I can retreive no tags with any of these setups.

The controller is on the network and I can ping it without issue, but I can't seem to get any of the opc configurations to work? Is there something I am doing incorrectly, as I understand I should just be able to connect based on the IP address. It's going to be incredibly frustrating if I can't get this communicating with other devices.


Top
   
PostPosted: Wed Mar 27, 2013 8:31 pm 
Offline
Frequent User
Frequent User
User avatar

Joined: Tue Jun 06, 2006 9:03 am
Posts: 399
First of all you mentioned that the OPC server is running inside the controller. Normally this is not the case, unless the controller is the RTE (runtime running on a Windows industrial PC). If it is a standard controller, I am almost sure that you run the OPC server on a PC which then connects to the PLC through Ethernet.
The best way to start is to have the OPC client and OPC server to run on the same PC, because otherwise the problem is most likely DCOM settings in your Windows environment. Windows normally blocks all DCOM access, unless both the client and server run on the same PC.
If you have your OPC server configured with the CODESYS OPC Configurator and set the communication settings correctly then most of the time the problem is related to the Symbol file.
The OPC server will always first connect with the PLC and then try to read the symbols from the PLC, but these are (default) not loaded to the PLC. For this you first need to enable this option in the Target Settings, Tab General, "Download Symbol File".
If this option is not selectable, then it is best to install CODESYS on the same PC as the OPC server is running on and then download the application from this PC. The reason is that then automatically the symbol file is created in the correct folder where the OPC server is running on.

Hopefully this helps you to get it running. If not, then enable the logging options in the OPC Configurator and check the opcserver.log which is created in the installation folder of the OPC server.


Top
   
PostPosted: Thu Mar 28, 2013 4:32 pm 
Offline

Joined: Mon Mar 25, 2013 8:51 pm
Posts: 2
Sorry, I should have explained this better. The controller is an industrial pc running Windows CE, the opc server which runs as a service on it connects to the HMI which is VisiWin software. I would do the variable passing in the VisiWin software, but I don't have a license for it and the supplier will not be back for some time. I've set up a pc with the codesys opc server and client, this is where I'm trying to get the connection from. I've tried copying the .sdb file from the backups I was supplied by the vendor and placing them in the C:\WINDOWS\Gateway folder but haven't tried downloading directly from the controller so I will attempt that and see if I can connect. Thank you for the quick and informative response!


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

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 1 guest


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