CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Sun Jun 25, 2017 4:44 pm

All times are UTC+01:00




Post new topic  This topic is locked, you cannot edit posts or make further replies.  [ 19 posts ]  Go to page 1 2 Next
Author Message
 Post subject: OPC
PostPosted: Fri Mar 07, 2014 7:45 am 
Offline

Joined: Mon Jan 14, 2013 3:47 pm
Posts: 73
How to use OPCUA?
Can I use OPCServer V3 to connect to V2.3 PLC?
OPC configuration without effect?
Is OPCServer certified?
What is _CommState and _CommStateOK?
Is it required to define a "Project name" in the config?
How to DCOM?
Can I use CODESYS OPCServer to connect to any other PLC?
OPC update rate, performance.
Does CODESYS support OPC UA?
How to configure OPC V3 with PLC V3?

It is possible to write a new OPC Client?
How to avoid the problem of failed OPC connections by changed plc ID's
Can I use GSM Modem?
Write Error 0x80004005
How to stert OPCEnum?

Why is my OPC connection slowly if not logged in as admin?
OPC with Win2008 or 2012 Server


Top
   
 
PostPosted: Fri Mar 07, 2014 7:49 am 
Offline

Joined: Mon Jan 14, 2013 3:47 pm
Posts: 73
Can I use OPCServer V3 to connect to V2.3 PLC?

Yes, you can use OPCServer V3 to connect to V2.3 PLC, too. The V3 Server contains Gateway V2.3.

Please note that the syntax of the items has changed.
When using Gateway (V2.3) Global and Local variables are treated with this (new) syntax:

<PLCName>..<GlobaleVariablenName>
<PLCName>.<ModulName>.<VariablenName>

Back to FAQ overview


Top
   
 
PostPosted: Fri Mar 07, 2014 7:54 am 
Offline

Joined: Mon Jan 14, 2013 3:47 pm
Posts: 73
The OPC configuration can be changed, but does not have any effect.

Please check the location, OPCServer is looking for the configuration:

32-Bit Systeme
HKEY_LOCAL_MACHINE\SOFTWARE\3S-Smart Software Solutions GmbH\CodesysOPC

64-Bit Systeme (Windows 7/Server 2008)HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\3S-Smart Software Solutions GmbH\CoDeSysOPC
Attachment:
1.png


Attention: The OPCServer.ini should not be renamed.

Back to FAQ overview


You do not have the required permissions to view the files attached to this post.


Top
   
 
 Post subject: Is OPCServer certified?
PostPosted: Fri Mar 07, 2014 8:05 am 
Offline

Joined: Mon Jan 14, 2013 3:47 pm
Posts: 73
Is OPCServer a certified?

Yes, you can find her on OPCFoundation.org the official result of Compliance Test Tool (CTT).

www.opcfoundation.org/Products/ProductDetails

Back to FAQ overview


Top
   
 
PostPosted: Fri Mar 07, 2014 8:11 am 
Offline

Joined: Mon Jan 14, 2013 3:47 pm
Posts: 73
What is _CommState and _CommStateOK?

The OPCServer generated for each configured PLC two implicit variables, which provide information of the status of the OPC connection to the controller.

_CommStateOK
This variable indicates whether the OPC server can access the control (1) or not (0).

_CommState
This variable specifies what exactly the problem is, if there are problems.
The states are defined as follows:
Code:
STATE_TERMINATE                        = -1
STATE_PLC_NOT_CONNECTED                = 0
STATE_PLC_CONNECTED                    = 1
STATE_NO_SYMBOLS                       = 2
STATE_SYMBOLS_LOADED                   = 3
STATE_RUNNING                          = 4
STATE_DISCONNECT                       = 5
STATE_NO_CONFIGURATION                 = 6
STATE_PLC_NOT_CONNECTED_SYMBOLS_LOADED = 7


Back to FAQ overview


Top
   
 
PostPosted: Fri Mar 07, 2014 8:16 am 
Offline

Joined: Mon Jan 14, 2013 3:47 pm
Posts: 73
Is it required to define a "Project name" in the config?

The project name is almost _NOT_ necessary.
If you communicate via the same gateway as CoDeSys does with download, then the OPC server always adapted to the matching symbol file of the controller.
It should be empty.
Exeption is, if you wrok with Simulation mode.


Back to FAQ overview


Top
   
 
 Post subject: How to DCOM?
PostPosted: Fri Mar 07, 2014 8:22 am 
Offline

Joined: Mon Jan 14, 2013 3:47 pm
Posts: 73
How to DCOM?

We do not recommend to use the DCOM  because the settings are various and if there is any different, it is very hard to find the reason.
Other users to tunnel the DCOM with a special kind of software.  I think this is the better solution. Also if you give everyone all access rights it might no good solution for a protected system.
The main problem is the user management and DCOM. Please understand that we cannot support this windows related topic.

Please find attached:
Attachment:
How To - DCOM Configuration.pdf


Back to FAQ overview


You do not have the required permissions to view the files attached to this post.


Top
   
 
PostPosted: Fri Mar 07, 2014 8:27 am 
Offline

Joined: Mon Jan 14, 2013 3:47 pm
Posts: 73
Can I use CODESYS OPCServer to connect to any other PLC?

No, CODESYS OPCServer can connect to any CODESYS Runtime PLC.
Attachment:
1.png


Back to FAQ overview


You do not have the required permissions to view the files attached to this post.


Top
   
 
PostPosted: Fri Mar 07, 2014 8:35 am 
Offline

Joined: Mon Jan 14, 2013 3:47 pm
Posts: 73
Question
I have a question regarding your OPC server and its update time.
We have in our plant some machines running Codesys RTE and gateway and OPS server.
Our symbol file has approximately 4000 entries. These are used to drive the visualisation screen.
With this many symbols we find that the best update rate is approx 100ms.
We would also like to collect a smaller amount of data, something like 16 boolean variables but at a much faster update rate.
I am not getting a fast enough item update rate from the server.
Any ideas how I can get an update rate of 10 to 20 ms to a 2nd OPC cliect?

Answer
A constant update rate of 10 to 20ms is almost impossible. Beside the fact that the communication is already busy there are several other reasons which prevent it in general:
 
- Windows applications can be interrupted anytime, earliest recall after 10ms
- overhead by several partners in the communication chain (OPC Client ßà OPC Server ßà Gateway Server ßà PLC)
- OPC architecture isn’t build for such a fast communication
 
If you really need it, we can show you a solution which is realized with the PLCHandler, a fee required C++ class which facilitates communication between a client (e.g. visualization) and the PLC. As the data is stored in a buffer on the PLC you can reach little update rates and cycle consistent data. But you must create an own windows application.

Back to FAQ overview


Top
   
 
PostPosted: Fri Mar 07, 2014 8:40 am 
Offline

Joined: Mon Jan 14, 2013 3:47 pm
Posts: 73
Does CODESYS support OPC UA?

This new feature is scheduled to be release with V3.5 SP5.


Top
   
 
PostPosted: Fri Mar 07, 2014 8:47 am 
Offline

Joined: Mon Jan 14, 2013 3:47 pm
Posts: 73
How to configure OPC V3 with PLC V3?

Example:
1. Generate the symbolconfig in CoDeSys and download the project to the PLC (ConrtolWin) / select the items which are read/writ able in Symbolconfig. (Compile and download Errorfree the project to the plc)
2. Generate OPC Config (Gateway 3 Connection with the same ID that on scan in CoDeSys: and save as OPCServer.ini
Attachment:
1.png

Attachment:
2.png

   
3. Connect with OPC Client (example Matrikon) / browse the items on CoDeSys.OP.DA
 
Attachment:
3.png


 
But the point were many user fail:
1. In OPC Config you must save the OPCConfig.ini in the directory where the OPCConfig.exe is.
mytestWago.ini for example will not work (wrong Name)
But this is not your case think this was right on your side (as I interpret your screenshots)
2. Add the wrong OPC Server

Attachment:
4.png

 

But the Point is for OPC V3: you have to add OPC.DA in Matrikon not the OPC.02 (this is V2.3)
 
OK:
Attachment:
5.png

 
Then it looks like:
Attachment:
6.png


Back to FAQ overview

 


You do not have the required permissions to view the files attached to this post.


Top
   
 
PostPosted: Fri Mar 07, 2014 8:54 am 
Offline

Joined: Mon Jan 14, 2013 3:47 pm
Posts: 73
It is possible to write a new OPC Client?

Plese see also: Forum


You'll find a helpful example code here:
Tutorial
lhcb-online

opc.idl or opcda.idl can retrieved from "OPC Core Components SDK" from the OPC Foundation (free):
opc.idl
opcda.idl can be received from „OPC Core Components SDK“ from OPC-Foundation (http://www.opcfoundation.org/) for free.


OPC Example in c#:
Forum:
Forum
Codeproject


Back to FAQ overview


Top
   
 
PostPosted: Fri Mar 07, 2014 9:08 am 
Offline

Joined: Mon Jan 14, 2013 3:47 pm
Posts: 73
[b]How to avoid the problem of failed OPC connections by changed plc ID's?[b]

The best way ist to use IP address or name of plc.

a) IpAddress ( Tcp/Ip blockdriver:
Attachment:
1.png


Or within the OPCServer.ini file:
[PLC:PLC1]
interfacetype=GATEWAY3
reconnecttime=15
waittime=10
active=1
logevents=1
logfilter=15
gateway=Tcp/Ip
gatewayaddress=localhost
gatewayport=1217
parameters=1
parameter0=IpAddress
value0=192.168.101.127


b) By name:
Attachment:
2.png


Back to FAQ overview


You do not have the required permissions to view the files attached to this post.


Top
   
 
 Post subject: Can I use GSM Modem?
PostPosted: Fri Mar 07, 2014 9:12 am 
Offline

Joined: Mon Jan 14, 2013 3:47 pm
Posts: 73
Can I use GSM Modem?

It is possible, but the connection time can be very long. For this reason the timeouts must should be changed.
Example:
Attachment:
1.png


Back to FAQ overview


You do not have the required permissions to view the files attached to this post.


Top
   
 
 Post subject: Write Error 0x80004005
PostPosted: Fri Mar 07, 2014 9:16 am 
Offline

Joined: Mon Jan 14, 2013 3:47 pm
Posts: 73
Write Error 0x80004005

Summary
In redundant mode, the error 0x80004005 occurs while writing

More information
E_FAIL and is a generic error, and is thrown by many causes.
In particular, the OPC Redundancy mode, this error can be delivered to the client, if none of the reports explicitly PLCs "I am master."

Solution:
If at least one of the master PLC variable is set to true,
then writing is possible.

Back to FAQ overview


Top
   
 
Display posts from previous:  Sort by  
Post new topic  This topic is locked, you cannot edit posts or make further replies.  [ 19 posts ]  Go to page 1 2 Next

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