The trace log is composed of a series of messages. Each message logs a single OPC client – server event. A message is prefaced with a local machine date and time stamps and the source of the trace message. The date/time and source are not shown in the following sample trace log for the purposes of clarity.
The sample trace log illustrates the sequence of messages logged with the trace level set to All. The OPC client initiated the following sequence of events (note that the OPC client used to generate the log is Data Access 1.0A compliant).
The OPC client connected to the CIMPLICITY OPC Server.
The client created an OPC group and called it Group1. The client created two advise sinks for Group1 for:
Receiving subscription notification callbacks (i.e. unsolicited updates from the OPC Server for all items in Group1).
Receiving asynchronous write complete callbacks (i.e. notification from the OPC Server when an asynchronous write operation completed).
The client create a second OPC group called Group2 with similar advise sinks as Group1.
The client added an OPC item to Group1 called \\CIMPDEMO\DEMO_COSINE.VALUE. This references the current value of the point DEMO_COSINE in the project CIMPDEMO.
The OPC Server immediately began reporting data change notifications to the client (via a callback into the client).
The client proceeded to add two more points: \\CIMPDEMO\DEMO_COUNTER.VALUE and \\CIMPDEMO\DEMO_RANDOM.VALUE.
Note that immediately after each new item was added, the number of items reported in the callback to the client increased. This is because the values are changing in CIMPLICITY and being reported to the client at the requested OPC group update rate.
The client then removed the OPC group, Group2. Prior to doing this, it disconnects the advise sinks previously set up.
The client then deletes the OPC group, Group1. First, it removes the item references from the group and then it disconnects the advise sinks.
Finally, the client disconnects from the OPC Server.
OPC Client connected
Added OPC Group 'Group1'
Group 'Group1': client connected OPCSTMFORMATDATATIME V1.0 advise sink
Group 'Group1': client connected OPCSTMFORMATWRITECOMPLETE V1.0 advise sink
Added OPC Group 'Group2'
Group 'Group2': client connected OPCSTMFORMATDATATIME V1.0 advise sink
Group 'Group2': client connected OPCSTMFORMATWRITECOMPLETE V1.0 advise sink
Group 'Group1': added item '\\CIMPDEMO\DEMO_COSINE.VALUE' (handle=18155968)
Group 'Group1': Invoked V1.0 data change callback (with timestamps) for 1 item(s)
Group 'Group1': Invoked V1.0 data change callback (with timestamps) for 1 item(s)
Group 'Group1': added item '\\CIMPDEMO\DEMO_COUNTER.VALUE' (handle=18157088)
Group 'Group1': Invoked V1.0 data change callback (with timestamps) for 2 item(s)
Group 'Group1': Invoked V1.0 data change callback (with timestamps) for 2 item(s)
Group 'Group1': added item '\\CIMPDEMO\DEMO_RANDOM.VALUE' (handle=18158672)
Group 'Group1': Invoked V1.0 data change callback (with timestamps) for 3 item(s)
Group 'Group1': Invoked V1.0 data change callback (with timestamps) for 3 item(s)
Group 'Group2': client disconnected V1.0 OPCSTMFORMATDATATIME advise sink
Group 'Group2': client disconnected V1.0 OPCSTMFORMATWRITECOMPLETE advise sink
Removed OPC Group 'Group2'
Group 'Group1': Invoked V1.0 data change callback (with timestamps) for 3 item(s)
Group 'Group1': Invoked V1.0 data change callback (with timestamps) for 3 item(s)
Group 'Group1': removed item '\\CIMPDEMO\DEMO_COSINE.VALUE' (handle=18155968)
Group 'Group1': removed item '\\CIMPDEMO\DEMO_COUNTER.VALUE' (handle=18157088)
Group 'Group1': removed item '\\CIMPDEMO\DEMO_RANDOM.VALUE' (handle=18158672)
Group 'Group1': client disconnected V1.0 OPCSTMFORMATDATATIME advise sink
Group 'Group1': client disconnected V1.0 OPCSTMFORMATWRITECOMPLETE advise sink
Removed OPC Group 'Group1'
OPC Client disconnected
Option 1. Set up OPC connection trace logging. |