OPC Data Access: Expert Workshop E143
OPC Data Access: Expert Workshop E143
OPC Data Access: Expert Workshop E143
Workplace
Process Graphic displays
Faceplates
History Logs
Direct Logs
OPC-Sever-Object
Top level object connection to Server
OPC-Group-Object
Organizes the items. Info about cycle time etc
OPC Item object
Represents attributes from Nodes and Leafs
© ABB Consult IT - 3
Revision C
OPC
Data Access Workplace Data subscription example
Plant Network
Connectivity Aspect
Server Server
Control Network
Controller
© ABB Consult IT - 4
Revision C
OPC
Data Access OPC DA Flow Chart
Automation clients such History and Trend Process Graphics 3rd party OPC
as VB code, Clients
C++ code, Excel sheets.
Data Subscription
800xA OPC Data Aspect Directory
Access Server Structures
• Control Structure
•Service Structure
CS Lib
COM/DCOM
RTA Board AC800 OPC 3rd party OPC Data
© ABB Consult IT - 5
Server Servers
Revision C
OPC
Data Access Data Subscription Example Detailed
OPC Handler
OPC Adapter
OPC Server
Panel
AC800 OPC Server
System Alarms & Events
MMS Service
© ABB Consult IT - 8
Revision C
OPC
Data Access Basic OPC DA Troubleshooting
No subscription in graphical display?
Controller must be
Revision C
selected
OPC
Data Access
OPC Communication Asynchronous Loops
Connectivity Server (AC 800M)
T=0 T=2 T=4 T=6 T=8 T=10 T=12 T=14 T=16 T=18 T=20 T=22 T=24 T=26 T=28 T=30
Sampling in
T=0 T=5 T=10 T=15 T=20 controller
Sampling in OPC server. In this example the
© ABB Consult IT - 17
Change to
”true”
Session Log
I 2006-02-10 14:52:35.125 AddGroup 'AdvDsOPCAdapterGroup87' to OPCServer object da0168
I 2006-02-10 14:52:35.125 OPCGroup object constructor d96b60 ... Done
Active = true. Requested Update Rate = 1000. Revised Update Rate = 1000.
I 2006-02-10 14:52:35.156 Advise 2.0 on OPCGroup ... Done
I 2006-02-10 14:52:35.171 AddItems (new #items = 5) to OPCGroup d96b60 with 0 items...Done
I 2006-02-10 14:52:58.546 AddItems (new #items = 2) to OPCGroup db0b40 with 3 items...Done
I 2006-02-10 15:01:09.656 RemoveItems (#items = 5) from OPCGroup d96b60...Done
© ABB Consult IT - 20
Changed system
variables can be seen in
the SetupWizard
OPCItemsDebug.cfg
Applications.Application_1.Signals.Sig2.Out
© ABB Consult IT - 22
Revision C
OPC
Data Access AC800 OPC Server – Tracing Method 2
2006-02-10 16:12:05.312 hr = 0 ODC for Group: AdvDsOPCAdapterGroup6 Applications.Application_1.Signals.Sig2.Out Value= 35.54556 Quality=
GOOD Timestamp= 2006-02-10 15:12:05.109
2006-02-10 16:12:10.312 hr = 0 ODC for Group: AdvDsOPCAdapterGroup6 Applications.Application_1.Signals.Sig2.Out Value= 2.719116E-02
Quality= GOOD Timestamp= 2006-02-10 15:12:10.124
2006-02-10 16:12:15.312 hr = 0 ODC for Group: AdvDsOPCAdapterGroup6 Applications.Application_1.Signals.Sig2.Out Value= 35.54556 Quality=
GOOD Timestamp= 2006-02-10 15:12:15.124
2006-02-10 16:12:20.327 hr = 0 ODC for Group: AdvDsOPCAdapterGroup6 Applications.Application_1.Signals.Sig2.Out Value= 2.719116E-02
Quality= GOOD Timestamp= 2006-02-10 15:12:20.124
2006-02-10 16:12:25.312 hr = 0 ODC for Group: AdvDsOPCAdapterGroup6 Applications.Application_1.Signals.Sig2.Out Value= 35.54556 Quality=
GOOD Timestamp= 2006-02-10 15:12:25.124
2006-02-10 16:12:30.312 hr = 0 ODC for Group: AdvDsOPCAdapterGroup6 Applications.Application_1.Signals.Sig2.Out Value= 2.719116E-02
Quality= GOOD Timestamp= 2006-02-10 15:12:30.124
2006-02-10 16:12:35.312 hr = 0 ODC for Group: AdvDsOPCAdapterGroup6 Applications.Application_1.Signals.Sig2.Out Value= 35.54556 Quality=
GOOD Timestamp= 2006-02-10 15:12:35.124
2006-02-10 16:12:40.312 hr = 0 ODC for Group: AdvDsOPCAdapterGroup6 Applications.Application_1.Signals.Sig2.Out Value= 2.719116E-02
© ABB Consult IT - 23
Filter
Logs
Processes
Results
© ABB Consult IT - 26
Revision C
© ABB Consult IT - 27
Revision C
OPC
Data Access
AppLog Example
OPC
Data Access Workplace – OPC Handler Log
Subscription request
2007-11-13 13:26:36:409, DCASCS12, AfwWorkplaceApplication, PID: 6540, Thread: 5048
OPC Communicator, Common, level = 3, Tag =
AddItems: 5 items, OPC group handles hC(4), hS(0) OpcHandler=0x9917658
ItemID = '{2C0C1797-1363-444D-8C92-D8CE69693A8D}:FUNCTION BLOCK:OUT'(VT_R4 (Requested
VT_EMPTY)): active(1), hC(1) hS(2563), blob(656/0), HR(0)
Subscription response
2007-11-13 13:26:36:471, DCASCS12, AfwWorkplaceApplication, PID: 6540, Thread: 5048
OPC Communicator, Common, level = 2, Tag =
NewValues_1_0: OpcHandler=0x9917658
GroupSH:0 Item cH(1), sH(2563), ItemID:'{2C0C1797-1363-444D-8C92-D8CE69693A8D}:FUNCTION
BLOCK:OUT', NewValue:value(VT_R4) = 12.3664, Quality:0xc0, TimeStamp:11/13/2007 13:26:35, Result:0x0
© ABB Consult IT - 28
Revision C
OPC
Data Access Subscription Cache
Connected clients:
Id: 0, BackendId: 0x00CD9370, Node: 'GIT3052', App: 'AdvEAEngine', User: '800xAService', Items:
5 (5 active + 0 inactive)
Id: 1, BackendId: 0x00CDCF20, Node: 'GIT3052', App: 'AdvHtHistorySrv', User: '800xAService',
Items: 15 (15 active + 0 inactive)
Id: 2, BackendId: 0x00CDD4B8, Node: 'GIT3052', App: 'AdvAeAlarmManager', User: '800xAService',
Items: 1 (1 active + 0 inactive)
Id: 3, BackendId: 0x00CE9BE0, Node: 'GIT3052', App: 'AfwWorkplaceApplication', User: ‘Admin',
Items: 2 (2 active + 0 inactive)
Acc. num adapter call errors: 0, num stored errors: 0, max stored errors: 50
Acc. num item errors: 0, num stored errors: 0, max stored errors: 500
---------------------------------------
Ack. num items added: 20, last time: 2/13/2006 10:45:52 PM
Ack. num items removed: 4, last time: 2/13/2006 10:45:54 PM
Ack. num OPC call errors: 0, num stored errors: 0, max stored errors: 50
Ack. num item errors: 70, num stored errors: 70, max stored errors: 500
Last item error: AddItem, hr = 0xc0040007 (OPC_E_UNKNOWNITEMID(0xc0040007) The item is no longer
available in the server address space. ), time: 2/13/2006 10:53:08 PM
* OPC Groups (focused clients marked with 'o' and focused groups marked with '+') *
Number of OPC groups: 5
Group #1: client id = 0, name = 'AdvDsOPCAdapterGroup0', environment = {F6590D3D-7BB4-4430-A21E-62C1F2A1518A},
group server handle = 0, update rate = 500 [ms], number of items: 2
Group #2: client id = 0, name = 'AdvDsOPCAdapterGroup1', environment = {F6590D3D-7BB4-4430-A21E-62C1F2A1518A},
group server handle = 1, update rate = 1000 [ms], number of items: 8
Group #3: client id = 0, name = 'AdvDsOPCAdapterGroup2', environment = {F6590D3D-7BB4-4430-A21E-62C1F2A1518A},
group server handle = 2, update rate = 2000 [ms], number of items: 2
Group #4: client id = 0, name = 'AdvDsOPCAdapterGroup3', environment = {F6590D3D-7BB4-4430-A21E-62C1F2A1518A},
group server handle = 3, update rate = 5000 [ms], number of items: 10
Group #5: client id = 4, name = 'AdvDsOPCAdapterGroup13', environment = {F6590D3D-7BB4-4430-A21E-62C1F2A1518A},
group server handle = 4, update rate = 1000 [ms], number of items: 10
Parameters:
Client Id = A:4
Focus Policy =
Group Handle = A:4
Result:
Focus policy is exclusive focus (1 = do not show focused groups outside focused clients).
Revision C
OPC
Data Access OPC DA Adapter and Workplace
Parameters:
Client Id = C
Focus Policy =
Group Handle = C
Result:
Focus policy is exclusive focus (1 = do not show focused groups outside focused clients).
Revision C
OPC
Data Access Third Party OPC Connection
5.1.1 Description
This exercise deals with OPC DA troubleshooting tools and technique available to
debug OPC DA subscriptions in the 800xA system.
5.1.2 Objectives
Upon completion of this exercise you will be able to:
• Trace the flow of data from the controller to Process Graphics.
• Narrow down the area where data subscription problem exist.
1/4
E143-05 Exercise 5.1 - RevC.doc
2. The number of OPC items you are subscribing on doesn’t really give a true
indication of the OPC load. A better value is the number of item changes. How
many item changes do you get when there is no workplace opened use applog
operations to find out the number of item changes you have? Open a number of
graphic displays how much do the number of item changes increase?
2/4
Maintenenance Expert workshop
You suspect an intermittent subscription problem. You have seen that you get holes in
trend displays and you also get crosses in graphic displays. Your task is to determine if
the problem is related to the OPC server or upstream from the OPC server. The steps
below highlights more the technique since there is no problem in the test system Using
the applog technique is more difficult than just using subscribe for live data in control
connection aspects but you may need to use the applog technique when there is
nothing left or you want to log data for a longer time.
1. Start with logging the information from the AC 800M OPC server. Use a variable
which is changing all the time from any of the objects Sin1, SIG2 or Sig3. Create
an item trace by defining the full OPC tem path in the (OPCItemsDebug.cfg) file.
Examine the result in (OPCItemsDebug.log) file. What quality did you get?
Which time is used in the file of the logged values?
2. If you didn’t see any problem in the file concerning bad quality. You suspect that
the problem is located further up in the data flow chain. You will now set up a log
which logs the subscription from Graphic Displays on the workplace process. Use
the common log of the OPC DA communication component. Check that you get
values when you are opening graphic displays. Use the following graphic displays.
Send the result to files for offline analyzes.
Sin1Display
Sig2Display
Sig3Display
a) If you didn’t find any problem in the logs from the workplace application.
Your next task is to trace down the data flow in the OPC Data Access server.
This is the software component between the AC 800M OPC server and the
clients. In order to avoid a huge amount data to monitor you must concentrate
on one specific OPC group. Use the operation ListOPCGroups to find the
group of the graphic display of the workplace application. Use the Basic log of
the OPCAdapter. Set the level to 2. How is the OPC item presented as?
3/4
E143-05 Exercise 5.1 - RevC.doc
You want to investigate the handling of cached information. You suspect that cached
information is not used. You want to investigate what happens when the graphic is
newly deployed. What happens to Graphic displays when the workplace is restarted?
What happens to workplaces when you have made changes to control software?
1. Use the common log of the OPC DA communication component. Before you open
up the Graphic display Sin1Display check the box “Save incoming logs to file”.
Deploy the Graphic display. Is the BLOB information rebuild?
2. Close the graphic display. Call it up again what happens to the BLOB
information? Can it be reused? Close the Graphic display.
3. Make a change to the application containing the SIN1 object. Add a global
variable. Call up the same Graphic display again. Could the BLOB information be
reused?
4. Make a change to the object type by adding an internal variable. Could the BLOB
information be reused?
4/4
Maintenenance Expert workshop
5.2.1 Description
This exercise deals with a connection to a 3: rd party OPC DA server. The exercise
emphasizes on the importance of DCOM settings.
5.2.2 Objectives
Upon completion of this exercise you will be able to:
• Set up a connection to a 3: rd party OPC server which is located on a different
node than the Connectivity Server.
• Be able to exchange data with the OPC server.
• Make a correct DCOM settings
1/2
E143-05 Exercise 5.2 - RevA.doc
2/2