Codesys Opc Server
Codesys Opc Server
Codesys Opc Server
AC500 Scalable PLC for Individual Automation OPC Server OLE for Process Control
OPC Server
OPC OLE COM DCOM TCP/IP Ethernet
____________________________________________________________________________________________________________
V8
OPC Server
AC500
3.3.2 Menu <Edit> ..................................................................................................................................... 17 3.3.3 Single-PLC configuration .................................................................................................................. 18 3.3.4 Multi-PLC configuration .................................................................................................................... 23 3.3.5 Registry entries (example)................................................................................................................ 24
3.4 Start of CoDeSysOPC.exe .............................................................................................................. 25 3.5 End of CoDeSysOPC.exe ................................................................................................................ 25 3.6 Starting and ending of Gateway.exe ............................................................................................ 25
8 Index
................................................................................................................................................... 30
9 Glossary ........................................................................................................................................... 31
____________________________________________________________________________________________________________
V8
OPC Server
AC500
1 Overview of OPC
1.1 General information of the OPC server
OPC is a standardized interface for accessing process data. It is based on the Microsoft COM/DCOM standard and has been expanded according to the requirements when accessing data in the field of automation. Here, it is primarily used to read/write values from/to the controller. Typically, OPC clients are visualizations or programs for the acquisition of operating data, etc. OPC servers are usually provided for PLC systems and field bus cards. The OPC server is not a passive subprogram library, but an executable program which is started when the connection between client and server is established. This is why it is able to notify the client when the value or status of a variable has changed. Due the characteristics of DCOM, it is even possible to access an OPC server which is running on another computer. Furthermore, a data source can be simultaneously accessed by more than one client via OPC. Another advantage OPC gains by the usage of COM is that different programming languages (C++, Visual Basic, Delphi, Java) can be used. However, a resulting disadvantage is the considerably higher usage of resources (memory and CPU time).
Note: CoDeSys OPC server V2.3.9.0 is able to communicate with the controllers listed in section 1.2 Fields of application of the OPC server. It fulfills the requirements of OPC standard V2.3.9.0.
_____________________________ 1) OPC = OLE for Proceess Control OLE = Object Linking and Embedding
For further information see also http://www.opcfoundation.org and http://www.opceurope.org 2) COM = Component Object Model (Basis fr OLE) DCOM = Distributed Component Object Model
____________________________________________________________________________________________________________
V8
OPC Server
AC500
TCP/IP or Shared Memory Symbol file for projects on PLC 1 and / or PLC 2
Gateway
Serial, TCP/IP
PLC 1
PLC 2
For the time being only access to one AC500 possible (later on simultaneous connection to several control systems possible).
The CoDeSys OPC server uses the CoDeSys gateway server as a gateway.
Caution: The symbol file is the basis for the data exchange via the CoDeSys OPC server. When a project is loaded from the CoDeSys programming system to the controller, it is possible to simultaneously create a symbol file (*.sym or *.sdb) and store it in the gateway. The symbol file contains so-called items. An item (data object) exactly corresponds to one variable in the controller program. Using these items the variable values on the controller can be called. The OPC server requests the content of the symbol file from the gateway and creates an item list from it. Since the content of the item list is determined by the variables available in the controller, it cannot be influenced by the OPC client. The OPC server reads the symbol file last loaded for a project via the gateway channel. The item list in the OPC server is updated in definable intervals with the values from the controller(s). Compared to the direct access to the controller, reading and writing the variable values via this cache list has the advantage of fast access times (max. approx. 1 ms per item). A figure drawn from past experience for the amount which can be handled by the OPC without problems when taking over variables into the item list, is approx. 15 000 items, symbol files size approx. 1.5 MB. The utilization for reading and writing the variable values naturally depends on the number of items which are set to 'active' and therefore are to be considered when updating the values. The OPC server supports grouping of data. Here, it is distinguished between "public groups" which are allocated by the OPC server and "private groups" which can be composed by a client. If the corresponding option is activated in the configuration, the OPC server groups the items (i.e. the variables of a project) block-wise. Then, one 'public group' is created per block.
____________________________________________________________________________________________________________
V8
OPC Server
AC500
'Private groups' can be combined of individual items as desired in the client. First, they do not affect the grouping in the OPC server but they can be made to 'public groups', if required. For example, private groups are suitable to activate or deactivate specific variable groups with only one command depending on whether they are to be accessed or not. Grouped data should be read by the OPC server in a consistent way, i.e. all variables at the same time. Please note that this is not always possible for target systems with limited communication buffers!
Note: It is possible to access an OPC server which is running on another computer in the network even if an OPC server is also running on the local computer. What's new compared to CoDeSys OPC server V2.0:
Caution: For the time being, multi PLC operation with several controllers (i.e. connection of the client to several controllers) is not allowed. At the beginning, only the use with one controller will be possible. The item list is also generated during offline operation, i.e. when no communication can be established with the corresponding subscriber. Then, the item list is loaded from the symbol file. Thus, the visualization can be designed in the office without having the hardware available and then be taken into operation on-site in the system. However, if a wrong (old) project is accidentally stored in the selected PLC, no variables can be provided. Furthermore, individual variables (items) can be added to the symbol file. Therefore, it is not mandatory to insert the variables of an entire block.
Note: Please refer also to the documentation CoDeSys / Volume 7 / Chapter 10 " Programming and Test".
____________________________________________________________________________________________________________
V8
OPC Server
AC500
New function: The item list is also generated during offline operation, i.e. when no communication can be established with the corresponding subscriber. Then, the item list is loaded from the symbol file. Thus, the visualization can be designed in the office without having the hardware available and then be taken into operation on-site in the system. However, if a wrong (old) project is accidentally stored in the selected PLC, no variables can be provided. Furthermore, individual variables (items) can be added to the symbol file as of CoDeSys Version 2.3.9.0. Therefore, it is not mandatory to insert the variables of an entire block. Peculiarities: The first version of the CoDeSys OPC server for AC500 only allows communication with one subscriber. The operation mode Single-PLC can be selected (see chapter 3.3.3 Single-PLC configuration). For the present, the operating mode Multi-PLC can be used with only one PLC (see chapter 3.3.4 Multi-PLC configuration).
Note: The better the system, the faster and more stable the communication with the OPC server. Particularly for extensive configurations with multiple users and many items, a fast PC should be used. Fast systems also guarantee that the transmission times do not fall below the values listed in section 4.2 "Time response of the OPC server".
____________________________________________________________________________________________________________
V8
OPC Server
AC500
Note: Particularly for extensive systems the selection of the variables to be enabled is important. The more variables are enabled the higher is the system load and the slower becomes the communication. In order to keep the system load as low as possible, only those variables (items) should be enabled that are actually used in the visualization software (client). The corresponding variables must be grouped during the project planning (e.g. Var_Global: visualization or in individual subgroups, functions or function blocks). Further information about defining OPC variables can be found in chapter 3.2 "Settings in the programming software". During this process, a file named <projectname>.sym is created which contains all enabled OPC variables (items). Now, this project must be sent via the current gateway to the PLC and stored there in the Flash memory.
Note: This procedure is important as the OPC server compares the project settings in the gateway with the settings in the PLC. In case of any differences, the items are not displayed or updated in the OPC server.
Note: When preparing a project in the office without having the corresponding hardware available, the symbol file must be copied to the system path \Gateway Files after finishing the CoDeSys project. This means that the file <project name>.sdb must, for example, be copied to the directory C:\WINNT\Gateway Files.
Caution: The following settings must be observed for the AC500 controllers. Otherwise, no communication is possible. - Buffer size = 4800 - No Login Service = set - Motorola byteorder = set
Note: Further information can be found in the OPC documentation, chapter 3.3 "Configuring the OPC server using OPCconfig.exe".
Note: If the project name and the gateway driver do not match, no items are available for the client. If the transmission rate and the timeout settings are not correct, the items cannot be updated. The status BAD is displayed.
____________________________________________________________________________________________________________
V8
OPC Server
AC500
____________________________________________________________________________________________________________
V8
OPC Server
AC500
The following drivers (for AC500 and AC31 Series 90) are in preparation and will be released with CoDeSys V2.x: ArcnetX.dll GDrvABBRS232RouteX.dll GDrvABBTcpIpL2X.dll GDrvArcAC.dll Communication DLL ABB RS232(routed) driver DLL ABB Ethernet driver ABB ARCNET driver
The following drivers cannot be used with AC500. These drivers are only intended for AC31 Series 90 controllers. Arcnet32.dll Arcnetn.dll GDrvArcnet3f4f.dll GDrvArcnetRouteFast.dll GDrvABBArcnet.dll GDrvABBModemRoute.dll GDrvABBRS232.dll GDrvABBRS232Route.dll GDrvABBTcpIpL2.dll Communication DLL Communication DLL ABB ARCNET driver ABB ARCNET driver ABB ARCNET driver ABB modem driver ABB serial driver ABB serial driver ABB Ethernet driver
OPC server V2.3.9.0 requires the gateway from the CoDeSys CD-ROM V1.0 or higher! The following drivers are recommended for creating new projects: Serial: - Serial (RS-232) Ethernet: - TCP/IP 3S standard driver 3S standard driver
After the first start of the gateway the path for the 'Gateway Files' directory is set in the registry (default: C:\WINNT\Gateway Files). When the connection to the controller is established, the symbol files created by CoDeSys and stored in the project directory are copied to this directory. These files are either the symbol files *.sym or their binary version *.sdb. The latter can be read faster by the OPC server.
____________________________________________________________________________________________________________
V8
OPC Server
AC500
Note: When preparing a project in the office without having the corresponding hardware available, the symbol file must be copied to the system path \Gateway Files after finishing the CoDeSys project. This means that the file <project name>.sdb must, for example, be copied to the directory C:\WINNT\Gateway Files.
Subdirectory REDIST (standard OPC files): CALLRPROXY.DLL OCSDAAuto.DLL OCSSpy_PS.DLL OPCCOMN_PS.DLL OPCenum.EXE OPCPROXY.DLL
____________________________________________________________________________________________________________
V8
OPC Server
10
AC500
____________________________________________________________________________________________________________
V8
OPC Server
11
AC500
____________________________________________________________________________________________________________
V8
OPC Server
12
AC500
Configuring all POUs If all project variables shall be defined with the same properties, all POUs must be selected. The desired attributes are activated by clicking the checkboxes. When an attribute is active, the checkbox is filled with a black checkmark. Inactive attributes must be unchecked (white). Gray checkmarks are not allowed.
Configuring individual program blocks or variables If only variables of individual POUs or individual variables shall be activated, first all attributes of the entire project must be deactivated. To do so, select all POUs and deactivate all attribute checkboxes. Now, all checkboxes must be white.
Caution: The deletion of object attributes is not applied until it is confirmed with the <OK> button. Each deletion must be confirmed with the <OK> button prior to defining further settings. Otherwise, the object attributes are not deleted. The dialog 'Set object attributes' must be opened again. Now, the individual project POUs or variables can be selected and set with the desired attributes.
____________________________________________________________________________________________________________
V8
OPC Server
13
AC500
The following attributes can be set: Export variables of object Export data entries The variables of the selected object are written to the symbol file. Entries for accessing the total variables are created for structures and arrays of the object. Assumption: 'Export variables of object' is activated. For structures of the object, one entry is created for each component of the variable. Assumption: 'Export variables of object' is activated. For the arrays of the object one entry is created for each component of the variable. Assumption: 'Export variables of object' is activated. The OPC server can modify the variables of the object.
Write access:
Note: For Single-PLC configuration: The OPC server automatically starts with the connection settings last used (these settings are kept in the registry). These settings can be verified or changed in the file OPCconfig.exe prior to starting the OPC server. This means that the setting of the gateway is automatically updated in the configuration. Each time a project is sent to the PLC, the corresponding gateway settings are applied. The gateway connection can be set to local or TCP/IP. A local connection is used, if the OPC server and the used gateway reside on the same computer. A TCP/IP connection is used, if the gateway of another computer is accessed by the OPC server via a network.
Note: A TCP/IP connection to the gateway can also be used, if the OPC server and the gateway reside on the same computer. However, with this setting, higher transmission times must be expected compared to the setting 'local'. Caution: For parallel operation of the OPC server and CoDeSys or SyCon.net, the settings of the communication channels must match completely. Multiple access to a PLC is only possible via the same gateway channel. Here, not only the corresponding driver and address are important, but also all further settings such as the timeout value.
3.2.5 Step 5: Creating of the symbol file and transmission to the gateway
When compiling the project, the symbol file is created and stored to the project directory. When downloading the project (<Online> <Login> -> 'Download'), the symbol file (*.sym or *.sdb) with the present settings is additionally loaded to the gateway (directory 'Gateway Files'). The communication with the OPC server uses the settings of the symbol file located in the path \WinNT\Gateway Files\, for example.
____________________________________________________________________________________________________________
V8
OPC Server
14
AC500
Note: The number of symbols should not exceed approx. 15 000 (corresponds to a symbol file size (*.sym) of approx. 1.5 MB). Please refer to chapter 4 "Behaviour of the OPC server".
Note: When preparing a project in the office without having the corresponding hardware available, the symbol file must be copied to the system path \Gateway Files after finishing the CoDeSys project. This means that the file <project name>.sdb must, for example, be copied to the directory C:\WINNT\Gateway Files. The representation of variables in the symbol file is the same as in the watch window. Example: PLC_PRG.A PLC_PRG.structure.X[4] .GlobVar1
Caution: Primarily it is important that in the OPC server configuration the project name corresponds to the used communication driver (i.e. if communication channel = TCP/IP_Address 192.68.0.251 and project name = OPC_test_program, the Ethernet subscriber with the IP address 192.68.0.251 must contain the project OPC_test_program). For setting these parameters, please refer to section 3.2.3, step 3: "Setting the communication parameters in the project" and the CoDeSys documentation respectively. First, it has to be determined which mode is used: Single-PLC or Multi-PLC. The mode of operation depends on the following factors: Mode of operation Single-PLC Factors - is used, if the symbol entries are read by only one controller.
Note: In Single-PLC mode, the configuration of the gateway channel is adapted automatically. This means that each time a project is sent to the PLC, the corresponding gateway settings are applied to the OPC configuration. Caution: Single-PLC mode should only be used if the configuration shall be adapted automatically. - Generally, we recommend to use the setting Multi-PLC. Multi-PLC - is used if the symbol entries are read by only one controller and the configuration shall not be adapted automatically. This means that the settings in
____________________________________________________________________________________________________________
V8
OPC Server
15
AC500
the OPC configuration are adapted manually. For instance, this is important if you have set up an Ethernet network with several controllers and the symbol file shall only be read by one controller (head controller). If the programming of the other controllers would be performed via the same gateway, the OPC configuration would be changed with each program download.
Note: For the time being, OPC can only access variables of one controller. Communication with several subscribers will be released in a future version.
Note: A download of the desired project to the corresponding target controller should be performed immediately before using the OPC server. If the target controller is not available, the current symbol file should be copied into the gateway files directory.
Note: When adding or deleting variables in the project, the item list can be updated without the need to exit the OPC client and the OPC server by downloading once again (with the option 'Dump symbol entries' activated). For instance, the client then receives a corresponding message (status "Bad") when it tries to access a deleted variable.
Note: Please note that a possibly existing boot project does no longer match a project which was changed and downloaded again. Hence, it is recommended to store the program in the PLC Flash memory each time after downloading it. For configuring the OPC server and modifying the registry entries of the server, the configurator OPCconfig.exe is started (refer to OPC documentation, section 3.3.5 "Registry entries (example)"). The following sections describe the commands of the <File> and <Edit> menu as well as the specific dialogs for the Single-PLC or Multi-PLC configuration.
____________________________________________________________________________________________________________
V8
OPC Server
16
AC500
This command opens the configuration saved last using <File> <Save>. After the configuration of the server, the PLC(s) and the connection(s) is finished, it has to be saved using this command in order to become valid. This command opens (creates) a new configuration. The dialogs contain default settings or empty input fields. Using this option, the mode Single-PLC or Multi-PLC is selected. If the menu entry 'Single-PLC' is displayed, Multi-PLC mode is currently active. If 'A; Single-PLC' is displayed, Single-PLC mode is active. Caution: This menu item is only available in Multi-PLC operating mode. Using the <Export> command, the current configuration can be exported to a text file. For this, the standard dialog 'Save file as' is opened where you can enter a file name. The default file name extension ".ini" is appended automatically. The ini file contains the configuration parameters and can be edited and re-imported using the command <File> <Import>. When importing a file, the stored ini files can be selected in the standard dialog 'File open'.
Export Import
____________________________________________________________________________________________________________
V8
OPC Server
17
AC500
Append PLC Caution: This menu item is only available in Multi-PLC operating mode. Multi-PLC mode, settings for the OPC server: Using this option, another controller is inserted to the configuration; refer to section 3.3.4 "Multi-PLC configuration" in the OPC documentation. Rename PLC Caution: This menu item is only available in Multi-PLC operating mode. Multi-PLC mode, settings for the OPC server: Using this option, a controller previously inserted to the configuration can be renamed; refer to section 3.3.4 "Multi-PLC configuration" in the OPC documentation. Delete PLC Caution: This menu item is only available in Multi-PLC operating mode. Multi-PLC mode, settings for the OPC server: Using this option, a controller can be deleted from the configuration; refer to section 3.3.4 "Multi-PLC configuration" in the OPC documentation. Reset PLC Single-PLC and Multi-PLC, settings for the PLC: The configuration parameters set with <Edit> <PLC Default Settings> are loaded from the registry. Always available: The dialog 'PLC Default Settings' appears. Here, you can enter self-defined values for the PLC configuration settings. This dialog corresponds to the 'Settings for PLC' dialog (refer to OPC documentation, section 3.3.3. "SinglePLC configuration"). The values set in this dialog are saved to the registry after confirming the dialog with <OK>. Using the command <Edit> <Reset PLC>, these settings can be re-loaded for a PLC selected in the configuration tree.
Note: Possibly appearing dialogs for saving are not mentioned in the following procedure. Start the program OPCconfig.exe. First, activate the Single-PLC mode by selecting the option <SinglePLC> from the <File> menu. The menu entry is then marked with a checkmark. -> A; Single PLC. Select the menu option <File> <New> to open the following default dialog.
____________________________________________________________________________________________________________
V8
OPC Server
18
AC500
In the left area of the window, the server, the controller (PLC) and the connection are represented in a tree structure and can be selected by clicking with the mouse. The right part of the window displays the corresponding configuration dialog for the entry selected in the tree structure. The <Edit> menu is not used for the Single-PLC configuration. The following server settings can be made in the right part of the window, if the topmost entry 'Server' is selected in the configuration tree. Update Rate (ms): Default: 200 Basic update rate of the OPC server in milliseconds = Cycle time used for reading all item values from the controller. These values are written to the cache the client communicates with using a separately defined update rate.
Caution: If the update rate is set too low, no communication can be established to the controller. The status of the items is displayed as BAD in the client. Please also refer to chapter 4 "Behaviour of the OPC server". Public Groups: Default: deactivated (no checkmark) The OPC server creates one public group for each IEC block as well as for the global variables. Sync Init: Default: activated (checkmark) Synchronous initialization: When starting, the OPC server does not react until the symbol configuration is loaded. Log Events: Default: deactivated (no checkmark) If this option is activated, the actions performed and the errors occurred at the OPC server are logged and saved to a log file. The file is saved to the project directory and named OPCServer.log. The messages of several OPC sessions are subsequently listed in a log file.
____________________________________________________________________________________________________________
V8
OPC Server
19
AC500
The following controller settings can be made in the right part of the window, if the entry 'PLC' under 'Server' is selected in the configuration tree.
Project name: Name of the project currently loaded. For Single-PLC mode, this entry is not mandatory.
Note: If the communication with the OPC server is performed via the gateway channel which was used for downloading the program to the PLC, no project name has to be entered. If another gateway channel is used for the OPC server, the project name has to be entered here. Communication Timeout (ms): Default: 10000 The OPC server exits automatically after this time period if it does not receive an answer to a transmitted service from the controller. Number of Tries: Default: 3 Number of attempts the OPC server tries to re-establish the connection to the controller after a timeout. The time interval between the re-establishment attempts is defined at 'Reconnect Time'. Buffer Size (Byte): Default: 4800 Communication buffer size on the target system. For all AC31 controllers, a buffer size of < 5000 must be entered. Wait time (s): Default: 10 Time in seconds for which the OPC server waits until the controller is ready (important for controller autostart).
____________________________________________________________________________________________________________
V8
OPC Server
20
AC500
After the OPC server is started, it tries to communicate with the configured controllers. Then it notifies the client whether communication to the controllers is possible or not. The controllers must log in within the set wait time, otherwise the status is passed to the client.
Note: The wait time must be defined long enough to enable all subscribers to log in. If this time is set too short it could happen that some subscribers cannot log in during the start. In this case, the wait time setting should be increased. This time depends on the number of subscribers and the number of items defined in the symbol file.
Note: After modifying the CoDeSys project and adding new items to the symbol configuration, the previously set parameters are possibly no longer correct. In this case the parameters must be adapted (i.e. the wait time must be increased). Reconnect Time (s): Default: 10 Time interval during which the OPC server attempts (as often as set at 'Number of Tries') to reestablish the connection to the controller via the gateway after a communication break-off. Active: Not available (only available in Multi-PLC mode) Motorola Byteorder: Default: deactivated (no checkmark) The target system does not use the Motorola byte order. This option must be activated for all AC500 controllers.
Note: This function is active in all AC500 controllers. It is not active for all AC31 controllers. No Login Service: Default: activated (checkmark) This option must be deactivated for specific target systems which require the transmission of a login service.
Note: The login service must not be transmitted for all ABB controllers. This function must be activated. The following settings for the connection to the PLC can be made in the right part of the window, if the entry 'Connection' is selected in the configuration tree.
____________________________________________________________________________________________________________
V8
OPC Server
21
AC500
If no settings are made yet or if the existing settings shall be modified, the Communication Parameters dialog can be opened by clicking on the button Edit. This dialog is identical to the gateway settings available in the programming software CoDeSys when selecting <Online> <Communication Parameters>.
Click here to magnify / reduce image First you have to define whether the communication shall use a local or a TCP/IP gateway channel. In addition, a list of all driver settings loaded via the gateway up to now is displayed. Here, the driver must be selected with which the OPC server shall communicate. Confirm the settings with <OK>. Please refer to section 3.2.3, step 3: "Setting the communication parameters in the project" and the CoDeSys documentation respectively. Now your selection should be applied. The dialog box looks as follows:
____________________________________________________________________________________________________________
V8
OPC Server
22
AC500
Note: For the time being, OPC can only access variables of one controller. Communication with several subscribers will be released in a future version. First, only the entry 'Server' is displayed in the left part of the window. The desired controllers must be inserted using the command <Edit> <Append PLC>. Then they can be configured individually as already described for the single PLC configuration. Differences compared to the Single-PLC configuration: In the Edit menu, the following commands are additionally available for the PLC currently selected in the configuration tree: Append PLC A new 'PLC' entry is inserted. Additional PLCs are always inserted below the currently highlighted entry. The name "PLC<n>" is automatically assigned, where n is counted up beginning with 1. The highlighted entry is removed from the configuration. Each PLC can be assigned a user defined name. To do so, highlight the desired PLC entry and then select <Edit> <Rename PLC>. An edit field is opened where you can enter the name.
____________________________________________________________________________________________________________
V8
OPC Server
23
AC500
The name of the project which was downloaded to this controller via the gateway can be entered to the Project name input field of the 'Settings for PLC' dialog.
Note: If communication with the OPC server is performed via the same gateway channel as for downloading, the program to the PLC, it is not required to assign a project name. The project name has to be entered, if another gateway channel is used for the OPC server. By selecting or deselecting the option Active in the 'Settings for PLC' dialog it can be defined whether the controller shall be considered by the OPC server or not.
____________________________________________________________________________________________________________
V8
OPC Server
24
AC500
Right-clicking on this icon displays information about the version of the OPC server. Starting in test mode: The connection between the OPC server and the client can also be tested if no controller is connected. For this purpose, the command CoDeSysOPC.exe /TestMode has to be entered to start the OPC server manually. The server then runs in test mode and automatically generates a series of test items which can be used to test the client communication.
Caution: The items generated in test mode are only test variables. These are not the variables from the symbol file of your project. The OPC icon in the status bar is also displayed while simulation mode is running.
If required, the gateway can be exited manually. To do so, right-click on the gateway icon to open the context menu. Select <Exit> to close the gateway server.
____________________________________________________________________________________________________________
V8
OPC Server
25
AC500
Note: For the time being, OPC can only access variables of one controller. Communication with several subscribers will be released in a future version. - Number of items: This setting is defined in the CoDeSys project (creation of symbol file). Only variables which shall be visualized later should be added to the symbol file. The lower the number of variables, the faster the configuration. - Number of active items: This setting is defined in the client (visualization software). The items should be assigned to individual groups which are updated at the same time. The groups are only enabled when they are needed, i.e. not all items of the project must be updated simultaneously. As a result, only the currently needed items are read. - Correct parameter assignment when setting the OPC configuration: *The setting of the following parameters is mandatory for AC500 controllers: - Buffer size: 4800 - Motorola Byteorder: active - No Login Service: active * Parameter is used for optimizing the communication: In order to reach a stable communication, the following parameters must be set high enough. - Updaterate - Timeouttime - Waittime - Reconnecttime
Caution: If the transmission rate is set too low in the configuration, the communication becomes considerably slower or is no longer possible. The transmission rate should be set approximately to the value which can be reached.
____________________________________________________________________________________________________________
V8
OPC Server
26
AC500
Serial Single-PLC Update rate [ms] 1 subscriber 4 Items 100 Items 500 Items 800 Items 50 500 1000 1000 Measured time approx. [s] 0.1 1 3 7 Multi-PLC Update rate [ms] 50 500 1000 1000 Measured time approx. [s] 0.2 1 3 7 Single-PLC Update rate [ms] xx xx xx xx
Ethernet Multi-PLC Update rate [ms] xx xx xx xx Measured time approx. [s] xx xx xx xx Measured time approx. [s] xx xx xx xx
____________________________________________________________________________________________________________
V8
OPC Server
27
AC500
gateway=Local device=ABB TCP/IP Level 2 instance=TCP_IP_251 parameters=11 parameter0=Address value0=192.168.0.251 parameter1=Port value1=1200 parameter2=Receive Timeout value2=2000 parameter3=Routing levels value3=0 parameter4=Coupler (Level 1) value4=0 parameter5=Channel (Level 1) value5=0 parameter6=Address (Level 1) value6=0, 0, 0, 0, 0 parameter7=Coupler (Level 2) value7=0 parameter8=Channel (Level 2) value8=0 parameter9=Address (Level 2) value9=0, 0, 0, 0, 0 parameter10=Block size value10=128
Gateway channel [local] Parameter for gateway connection to PLC1 (driver setting): - Gateway driver [ABB TCP/IP Level 2] - Driver name [TCP_IP_251] - IP address 192.168.0.251
____________________________________________________________________________________________________________
V8
OPC Server
28
AC500
7 Short checklist
7.1 Short checklist
Please check the following if the communication via OPC does not work: 1. Gateway installed and running? Icon in the taskbar (bottom right) active? 2. Installation and registration of the OPC server ok? Is automatically performed when "CoDeSysOPC /Install" (installation + registration) or "CoDeSysOPC /RegServer" (registration only) are executed. 3. Project preparation / settings in the programming system CoDeSys ok? - Project options: 'Dump symbol entries' selected? - Communication parameters: Selected gateway channel ok? - Project saved, compiled and download performed? - The symbol files *.sym and *.sdb must exist in the path WinNT\Gateway Files. 4. If OPC shall be used on another computer (only possible if the OPC server is also running on the local computer and if the CoDeSys project is not additionally accessed (currently logged in) on the other computer): Establish a connection to the other computer using DCOMCNFG.EXE (file is located in the system directory): - select the entry 'OPC server for CoDeSys...' in the 'Applications' tab, - click on the 'Properties' button, open the 'Location' tab, activate 'Run application on the following computer' and then enter the desired computer. 5. Verify the connection and the server settings: OPCCFG.EXE: - Connection: (entry must correspond to the valid gateway channel defined in the CoDeSys communication parameters) - Usual server settings: Update Rate 200 ms, Public Groups: no, Sync Init: no - Usual PLC settings: Communication timeout 10s (10000), Number or reconnect attempts: 3, buffer size: 4800, wait time target system 10s, reconnect interval: 10s, Active: yes, Motorola Byteorder: yes, No Login Service: yes ..Connection settings for PLC: Warning: For Multi-PLC mode, local and TCP/IP cannot be mixed, verify driver settings - Save -> The new configuration becomes effective when a new connection to the OPC server is established 6. Verify whether symbol entries are available: DiagnosticOPCClient.exe Establish connection (Connect OPC-Server) -> in the right-hand window, right-click on Private Groups, confirm the dialog with OK, right-click on the created group entry -> add all items -> all created symbol entries (variables) should be displayed now. The OPC server is automatically exited as soon as all clients have cleared the connection to it. The OPC server is displayed in the Task Manager as a process.
____________________________________________________________________________________________________________
V8
OPC Server
29
AC500
8 Index OPC
B
Behaviour of the OPC server 26
C
Connection to an OPC server on another PC 27
E
Example of an ini file for the OPC server configuration 27
G
Glossary OPC 31
I
Installation of the CoDeSys OPC server 9
O
Overview of OPC 3
S
Short checklist 29
U
Use of the CoDeSys OPC server 12
____________________________________________________________________________________________________________
V8
OPC Server
30
AC500
9 Glossary
OPC = OLE for Proceess Control OLE = Object Linking and Embedding For further information see also http://www.opcfoundation.org and http://www.opceurope.org COM = Component Object Model (Basis fr OLE) DCOM = Distributed Component Object Model
____________________________________________________________________________________________________________
V8
OPC Server
31
AC500
____________________________________________________________________________________________________________
V8
OPC Server
32
AC500
ABB STOTZ-KONTAKT GmbH Eppelheimer Strae 82 69123 Heidelberg, Germany Postfach 10 16 80 69006 Heidelberg, Germany Telephone (06221) 701-0 Telefax (06221) 701-240 Internet http://www.abb.de/stotz-kontakt E-Mail [email protected]