OPC-DA Handler

Martin Schmid
Posts: 34
Joined: Fri Aug 15, 2014 5:22 pm

OPC-DA Handler

Post by Martin Schmid » Tue Aug 19, 2014 1:37 pm

Dear Dr. Grawunder,


I'm working with H.Molnar on Odysseus and I'm encountering a problem with the OPC-DA handler.
I'm using the following script:

Code: Select all

#PARSER PQL
#RUNQUERY
output := ACCESS({source='OPC:Demo',
wrapper='GenericPush',
transport='opc-da',
protocol='none',
dataHandler='Tuple',
options=[
['host', 'x.x.x.x'],
['domain', 'none'],
['username', 'administrator'],
['password', 'x'],
['progId','National Instruments.Variable Engine.1'],
['clsId','7EFA5AA7-3A85-4693-8561-4AC60CA09909']
],
schema=[
        ['\\.\PVR-WRS-1\I_DC_1', 'FLOAT']
]
})

When I run the script and click on view sources I get the following error message:

This is the stack trace:

Code: Select all

13290 DEBUG DataHandlerRegistry  - Register DataHandler RelationalElementPartialAggregateDataHandler for Datatypes [RelationalElementPartialAggregate] - de.uniol.inf.is.odysseus.core.datahandler.DataHandlerRegistry.registerDataHandler(DataHandlerRegistry.java:49) 
17434 DEBUG MetadataRegistry  - New Metadatatype registered class de.uniol.inf.is.odysseus.core.metadata.TimeInterval - de.uniol.inf.is.odysseus.core.server.metadata.MetadataRegistry.addMetadataType(MetadataRegistry.java:42) 
19116 DEBUG UserManagementProvider  - Bound UserManagementService Memorystore - de.uniol.inf.is.odysseus.core.server.usermanagement.UserManagementProvider.bindUserManagement(UserManagementProvider.java:120) 
19152 DEBUG AbstractExecutor  - Initializing Executor. - de.uniol.inf.is.odysseus.core.server.planmanagement.executor.AbstractExecutor.initialize(AbstractExecutor.java:255) 
19152 DEBUG AbstractExecutor  - Initializing Executor done. - de.uniol.inf.is.odysseus.core.server.planmanagement.executor.AbstractExecutor.initialize(AbstractExecutor.java:266) 
19218 DEBUG AbstractExecutor  - Compiler bound de.uniol.inf.is.odysseus.planmanagement.compiler.standardcompiler.StandardCompiler@57b8b8f2 - de.uniol.inf.is.odysseus.core.server.planmanagement.executor.AbstractExecutor.bindCompiler(AbstractExecutor.java:473) 
19231 DEBUG AbstractExecutor  - Schedulermanager bound de.uniol.inf.is.odysseus.scheduler.manager.singleschedulermanager.SingleSchedulerManager@47596c17 - de.uniol.inf.is.odysseus.core.server.planmanagement.executor.AbstractExecutor.bindSchedulerManager(AbstractExecutor.java:317) 
19233 DEBUG AbstractOptimizer  - bindBufferPlacementStrategy Query Buffer Placement - de.uniol.inf.is.odysseus.core.server.planmanagement.optimization.AbstractOptimizer.bindBufferPlacementStrategy(AbstractOptimizer.java:106) 
19234 DEBUG AbstractOptimizer  - bindBufferPlacementStrategy Source Buffer Placement - de.uniol.inf.is.odysseus.core.server.planmanagement.optimization.AbstractOptimizer.bindBufferPlacementStrategy(AbstractOptimizer.java:106) 
19235 DEBUG AbstractOptimizer  - bindBufferPlacementStrategy Standard Buffer Placement - de.uniol.inf.is.odysseus.core.server.planmanagement.optimization.AbstractOptimizer.bindBufferPlacementStrategy(AbstractOptimizer.java:106) 
19237 DEBUG AbstractOptimizer  - QuerysharingOptimizer bound de.uniol.inf.is.odysseus.planmanagement.optimization.querysharingoptimizer.StandardQuerySharingOptimizer@3caa8321 - de.uniol.inf.is.odysseus.core.server.planmanagement.optimization.AbstractOptimizer.bindQuerySharingOptimizer(AbstractOptimizer.java:169) 
19237 DEBUG AbstractExecutor  - Optimizer bound de.uniol.inf.is.odysseus.planmanagement.optimization.standardoptimizer.StandardOptimizer@5e870aa4 - de.uniol.inf.is.odysseus.core.server.planmanagement.executor.AbstractExecutor.bindOptimizer(AbstractExecutor.java:282) 
19239 DEBUG AbstractExecutor  - Query Build Configuration de.uniol.inf.is.odysseus.latency.StandardLatencyQueryBuildConfigurationTemplate@6ad02c9a bound - de.uniol.inf.is.odysseus.core.server.planmanagement.executor.AbstractExecutor.bindQueryBuildConfiguration(AbstractExecutor.java:500) 
19239 DEBUG AbstractExecutor  - Query Build Configuration de.uniol.inf.is.odysseus.relational_interval.StandardQueryBuildConfigurationTemplate@186b735c bound - de.uniol.inf.is.odysseus.core.server.planmanagement.executor.AbstractExecutor.bindQueryBuildConfiguration(AbstractExecutor.java:500) 
19241 DEBUG AbstractExecutor  - Bound preTransformationHandler called 'EVALUATIONPRETRANSFORMATION': class de.uniol.inf.is.odysseus.rcp.evaluation.execution.EvaluationTransformationHandler - de.uniol.inf.is.odysseus.core.server.planmanagement.executor.AbstractExecutor.bindPreTransformationHandler(AbstractExecutor.java:358) 
19259 DEBUG AbstractUserManagement  - Creating new user database for Tenant  - de.uniol.inf.is.odysseus.core.server.usermanagement.AbstractUserManagement.initDefaultUsers(AbstractUserManagement.java:656) 
19262 DEBUG AbstractUserManagement  - Creating new user database for Tenant Marco1 - de.uniol.inf.is.odysseus.core.server.usermanagement.AbstractUserManagement.initDefaultUsers(AbstractUserManagement.java:656) 
19262 DEBUG AbstractUserManagement  - Creating new user database for Tenant Marco2 - de.uniol.inf.is.odysseus.core.server.usermanagement.AbstractUserManagement.initDefaultUsers(AbstractUserManagement.java:656) 
19262 DEBUG AbstractUserManagement  - Creating new user database for Tenant Marco3 - de.uniol.inf.is.odysseus.core.server.usermanagement.AbstractUserManagement.initDefaultUsers(AbstractUserManagement.java:656) 
19509 DEBUG OdysseusConsole  - executor gebunden - de.uniol.inf.is.odysseus.core.server.console.OdysseusConsole.bindExecutor(OdysseusConsole.java:259) 
19520 DEBUG AbstractExecutor  - Scheduler already running. - de.uniol.inf.is.odysseus.core.server.planmanagement.executor.AbstractExecutor.startExecution(AbstractExecutor.java:687) 
19541 DEBUG Autostart  - Trying to start /autostart/autostart.qry - de.uniol.inf.is.odysseus.server.autostart.Autostart.runAutostart(Autostart.java:64) 
19541 DEBUG Autostart  - Running autostartfile with URLConnection: bundleentry://75.fwk1197549556/autostart/autostart.qry - de.uniol.inf.is.odysseus.server.autostart.Autostart.runAutostart(Autostart.java:69) 
19546 DEBUG Autostart  - Trying to start /home/eclipse-odysseus/.odysseus/autostart/autostart.qry - de.uniol.inf.is.odysseus.server.autostart.Autostart.runAutostart(Autostart.java:64) 
19546 DEBUG Autostart  - Running autostartfile with FileInputStream: /home/eclipse-odysseus/.odysseus/autostart/autostart.qry  - de.uniol.inf.is.odysseus.server.autostart.Autostart.runAutostart(Autostart.java:76) 
19547 DEBUG Autostart  - Autostartfile /home/eclipse-odysseus/.odysseus/autostart/autostart.qry not found or failed to load - de.uniol.inf.is.odysseus.server.autostart.Autostart.runAutostart(Autostart.java:91) 
19554 DEBUG AutostartExecuteThread  - Begin autostart execution... - de.uniol.inf.is.odysseus.server.autostart.AutostartExecuteThread.run(AutostartExecuteThread.java:33) 
19569 DEBUG TransportHandlerRegistry  - Register new Handler OPC-DA - de.uniol.inf.is.odysseus.core.physicaloperator.access.transport.TransportHandlerRegistry.register(TransportHandlerRegistry.java:36) 
19691 DEBUG AutostartExecuteThread  - Autostart script executed - de.uniol.inf.is.odysseus.server.autostart.AutostartExecuteThread.run(AutostartExecuteThread.java:39) 
36361 ERROR StandardExecutor  - Could not add query 'SELECT * FROM System.output;' - de.uniol.inf.is.odysseus.planmanagement.executor.standardexecutor.StandardExecutor.addQuery(StandardExecutor.java:637) 
de.uniol.inf.is.odysseus.core.server.planmanagement.QueryParseException: de.uniol.inf.is.odysseus.core.sdf.schema.SDFExpressionParseException: de.uniol.inf.is.odysseus.mep.impl.TokenMgrError: Lexical error at line 1, column 8.  Encountered: "\\" (92), after : ""
	at de.uniol.inf.is.odysseus.parser.cql.CQLParser.visit(CQLParser.java:324)
	at de.uniol.inf.is.odysseus.parser.cql.parser.ASTSelectStatement.jjtAccept(ASTSelectStatement.java:36)
	at de.uniol.inf.is.odysseus.parser.cql.CQLParser.visit(CQLParser.java:203)
	at de.uniol.inf.is.odysseus.parser.cql.parser.ASTComplexSelectStatement.jjtAccept(ASTComplexSelectStatement.java:35)
	at de.uniol.inf.is.odysseus.parser.cql.CQLParser.visit(CQLParser.java:181)
	at de.uniol.inf.is.odysseus.parser.cql.parser.ASTPriorizedStatement.jjtAccept(ASTPriorizedStatement.java:36)
	at de.uniol.inf.is.odysseus.parser.cql.parser.SimpleNode.childrenAccept(SimpleNode.java:88)
	at de.uniol.inf.is.odysseus.parser.cql.CQLParser.visit(CQLParser.java:174)
	at de.uniol.inf.is.odysseus.parser.cql.CQLParser.parse(CQLParser.java:157)
	at de.uniol.inf.is.odysseus.parser.cql.CQLParser.parse(CQLParser.java:140)
	at de.uniol.inf.is.odysseus.planmanagement.compiler.standardcompiler.StandardCompiler.translateQuery(StandardCompiler.java:252)
	at de.uniol.inf.is.odysseus.planmanagement.executor.standardexecutor.StandardExecutor.createQueries(StandardExecutor.java:247)
	at de.uniol.inf.is.odysseus.planmanagement.executor.standardexecutor.StandardExecutor.addQuery(StandardExecutor.java:614)
	at de.uniol.inf.is.odysseus.planmanagement.executor.standardexecutor.StandardExecutor.addQuery(StandardExecutor.java:607)
	at de.uniol.inf.is.odysseus.planmanagement.executor.standardexecutor.StandardExecutor.addQuery(StandardExecutor.java:591)
	at de.uniol.inf.is.odysseus.rcp.viewer.stream.table.commands.SelectAllFromSource.createQueryToSelectAllDataFromSource(SelectAllFromSource.java:60)
	at de.uniol.inf.is.odysseus.rcp.viewer.stream.table.commands.SelectAllFromSource.execute(SelectAllFromSource.java:50)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
	at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:829)
	at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:815)
	at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:805)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at de.uniol.inf.is.odysseus.product.studio.starter.OdysseusStudioApplication.start(OdysseusStudioApplication.java:68)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Caused by: de.uniol.inf.is.odysseus.core.sdf.schema.SDFExpressionParseException: de.uniol.inf.is.odysseus.mep.impl.TokenMgrError: Lexical error at line 1, column 8.  Encountered: "\\" (92), after : ""
	at de.uniol.inf.is.odysseus.core.sdf.schema.SDFExpression.init(SDFExpression.java:214)
	at de.uniol.inf.is.odysseus.core.sdf.schema.SDFExpression.<init>(SDFExpression.java:85)
	at de.uniol.inf.is.odysseus.parser.cql.parser.transformation.CreateProjectionVisitor.visit(CreateProjectionVisitor.java:150)
	at de.uniol.inf.is.odysseus.parser.cql.parser.ASTSelectAll.jjtAccept(ASTSelectAll.java:36)
	at de.uniol.inf.is.odysseus.parser.cql.parser.transformation.CreateProjectionVisitor.visit(CreateProjectionVisitor.java:159)
	at de.uniol.inf.is.odysseus.parser.cql.parser.ASTRenamedExpression.jjtAccept(ASTRenamedExpression.java:36)
	at de.uniol.inf.is.odysseus.parser.cql.parser.SimpleNode.childrenAccept(SimpleNode.java:88)
	at de.uniol.inf.is.odysseus.parser.cql.parser.transformation.CreateProjectionVisitor.visit(CreateProjectionVisitor.java:87)
	at de.uniol.inf.is.odysseus.parser.cql.CQLParser.visit(CQLParser.java:285)
	... 50 more
Caused by: de.uniol.inf.is.odysseus.mep.impl.TokenMgrError: Lexical error at line 1, column 8.  Encountered: "\\" (92), after : ""
	at de.uniol.inf.is.odysseus.mep.impl.MEPImplTokenManager.getNextToken(MEPImplTokenManager.java:589)
	at de.uniol.inf.is.odysseus.mep.impl.MEPImpl.jj_scan_token(MEPImpl.java:1056)
	at de.uniol.inf.is.odysseus.mep.impl.MEPImpl.jj_3_1(MEPImpl.java:796)
	at de.uniol.inf.is.odysseus.mep.impl.MEPImpl.jj_2_1(MEPImpl.java:706)
	at de.uniol.inf.is.odysseus.mep.impl.MEPImpl.UnaryExpression(MEPImpl.java:57)
	at de.uniol.inf.is.odysseus.mep.impl.MEPImpl.PowExpression(MEPImpl.java:161)
	at de.uniol.inf.is.odysseus.mep.impl.MEPImpl.MultiplicativeExpression(MEPImpl.java:191)
	at de.uniol.inf.is.odysseus.mep.impl.MEPImpl.AdditiveExpression(MEPImpl.java:236)
	at de.uniol.inf.is.odysseus.mep.impl.MEPImpl.ComparisonExpression(MEPImpl.java:291)
	at de.uniol.inf.is.odysseus.mep.impl.MEPImpl.EqualityComparison(MEPImpl.java:341)
	at de.uniol.inf.is.odysseus.mep.impl.MEPImpl.AndExpression(MEPImpl.java:384)
	at de.uniol.inf.is.odysseus.mep.impl.MEPImpl.OrExpression(MEPImpl.java:425)
	at de.uniol.inf.is.odysseus.mep.impl.MEPImpl.Expression(MEPImpl.java:30)
	at de.uniol.inf.is.odysseus.mep.MEP.parse(MEP.java:217)
	at de.uniol.inf.is.odysseus.core.sdf.schema.SDFExpression.init(SDFExpression.java:209)
	... 58 more
If I define output as intermediate result (= instead of :=) the query runs and I get the following console output:

Code: Select all

10908 DEBUG DataHandlerRegistry  - Register DataHandler RelationalElementPartialAggregateDataHandler for Datatypes [RelationalElementPartialAggregate] - de.uniol.inf.is.odysseus.core.datahandler.DataHandlerRegistry.registerDataHandler(DataHandlerRegistry.java:49) 
11038 DEBUG MetadataRegistry  - New Metadatatype registered class de.uniol.inf.is.odysseus.core.metadata.TimeInterval - de.uniol.inf.is.odysseus.core.server.metadata.MetadataRegistry.addMetadataType(MetadataRegistry.java:42) 
12998 DEBUG UserManagementProvider  - Bound UserManagementService Memorystore - de.uniol.inf.is.odysseus.core.server.usermanagement.UserManagementProvider.bindUserManagement(UserManagementProvider.java:120) 
13027 DEBUG AbstractExecutor  - Initializing Executor. - de.uniol.inf.is.odysseus.core.server.planmanagement.executor.AbstractExecutor.initialize(AbstractExecutor.java:255) 
13027 DEBUG AbstractExecutor  - Initializing Executor done. - de.uniol.inf.is.odysseus.core.server.planmanagement.executor.AbstractExecutor.initialize(AbstractExecutor.java:266) 
13091 DEBUG AbstractExecutor  - Compiler bound de.uniol.inf.is.odysseus.planmanagement.compiler.standardcompiler.StandardCompiler@44556d67 - de.uniol.inf.is.odysseus.core.server.planmanagement.executor.AbstractExecutor.bindCompiler(AbstractExecutor.java:473) 
13105 DEBUG AbstractExecutor  - Schedulermanager bound de.uniol.inf.is.odysseus.scheduler.manager.singleschedulermanager.SingleSchedulerManager@28aa7c3b - de.uniol.inf.is.odysseus.core.server.planmanagement.executor.AbstractExecutor.bindSchedulerManager(AbstractExecutor.java:317) 
13107 DEBUG AbstractOptimizer  - bindBufferPlacementStrategy Query Buffer Placement - de.uniol.inf.is.odysseus.core.server.planmanagement.optimization.AbstractOptimizer.bindBufferPlacementStrategy(AbstractOptimizer.java:106) 
13108 DEBUG AbstractOptimizer  - bindBufferPlacementStrategy Source Buffer Placement - de.uniol.inf.is.odysseus.core.server.planmanagement.optimization.AbstractOptimizer.bindBufferPlacementStrategy(AbstractOptimizer.java:106) 
13108 DEBUG AbstractOptimizer  - bindBufferPlacementStrategy Standard Buffer Placement - de.uniol.inf.is.odysseus.core.server.planmanagement.optimization.AbstractOptimizer.bindBufferPlacementStrategy(AbstractOptimizer.java:106) 
13111 DEBUG AbstractOptimizer  - QuerysharingOptimizer bound de.uniol.inf.is.odysseus.planmanagement.optimization.querysharingoptimizer.StandardQuerySharingOptimizer@51d9edd8 - de.uniol.inf.is.odysseus.core.server.planmanagement.optimization.AbstractOptimizer.bindQuerySharingOptimizer(AbstractOptimizer.java:169) 
13111 DEBUG AbstractExecutor  - Optimizer bound de.uniol.inf.is.odysseus.planmanagement.optimization.standardoptimizer.StandardOptimizer@3a8e29e3 - de.uniol.inf.is.odysseus.core.server.planmanagement.executor.AbstractExecutor.bindOptimizer(AbstractExecutor.java:282) 
13113 DEBUG AbstractExecutor  - Query Build Configuration de.uniol.inf.is.odysseus.latency.StandardLatencyQueryBuildConfigurationTemplate@29760a96 bound - de.uniol.inf.is.odysseus.core.server.planmanagement.executor.AbstractExecutor.bindQueryBuildConfiguration(AbstractExecutor.java:500) 
13114 DEBUG AbstractExecutor  - Query Build Configuration de.uniol.inf.is.odysseus.relational_interval.StandardQueryBuildConfigurationTemplate@305977f0 bound - de.uniol.inf.is.odysseus.core.server.planmanagement.executor.AbstractExecutor.bindQueryBuildConfiguration(AbstractExecutor.java:500) 
13116 DEBUG AbstractExecutor  - Bound preTransformationHandler called 'EVALUATIONPRETRANSFORMATION': class de.uniol.inf.is.odysseus.rcp.evaluation.execution.EvaluationTransformationHandler - de.uniol.inf.is.odysseus.core.server.planmanagement.executor.AbstractExecutor.bindPreTransformationHandler(AbstractExecutor.java:358) 
13131 DEBUG AbstractUserManagement  - Creating new user database for Tenant  - de.uniol.inf.is.odysseus.core.server.usermanagement.AbstractUserManagement.initDefaultUsers(AbstractUserManagement.java:656) 
13134 DEBUG AbstractUserManagement  - Creating new user database for Tenant Marco1 - de.uniol.inf.is.odysseus.core.server.usermanagement.AbstractUserManagement.initDefaultUsers(AbstractUserManagement.java:656) 
13135 DEBUG AbstractUserManagement  - Creating new user database for Tenant Marco2 - de.uniol.inf.is.odysseus.core.server.usermanagement.AbstractUserManagement.initDefaultUsers(AbstractUserManagement.java:656) 
13135 DEBUG AbstractUserManagement  - Creating new user database for Tenant Marco3 - de.uniol.inf.is.odysseus.core.server.usermanagement.AbstractUserManagement.initDefaultUsers(AbstractUserManagement.java:656) 
13353 DEBUG OdysseusConsole  - executor gebunden - de.uniol.inf.is.odysseus.core.server.console.OdysseusConsole.bindExecutor(OdysseusConsole.java:259) 
13374 DEBUG AbstractExecutor  - Scheduler already running. - de.uniol.inf.is.odysseus.core.server.planmanagement.executor.AbstractExecutor.startExecution(AbstractExecutor.java:687) 
13379 DEBUG Autostart  - Trying to start /autostart/autostart.qry - de.uniol.inf.is.odysseus.server.autostart.Autostart.runAutostart(Autostart.java:64) 
13379 DEBUG Autostart  - Running autostartfile with URLConnection: bundleentry://75.fwk1197549556/autostart/autostart.qry - de.uniol.inf.is.odysseus.server.autostart.Autostart.runAutostart(Autostart.java:69) 
13392 DEBUG Autostart  - Trying to start /home/eclipse-odysseus/.odysseus/autostart/autostart.qry - de.uniol.inf.is.odysseus.server.autostart.Autostart.runAutostart(Autostart.java:64) 
13392 DEBUG Autostart  - Running autostartfile with FileInputStream: /home/eclipse-odysseus/.odysseus/autostart/autostart.qry  - de.uniol.inf.is.odysseus.server.autostart.Autostart.runAutostart(Autostart.java:76) 
13392 DEBUG Autostart  - Autostartfile /home/eclipse-odysseus/.odysseus/autostart/autostart.qry not found or failed to load - de.uniol.inf.is.odysseus.server.autostart.Autostart.runAutostart(Autostart.java:91) 
13408 DEBUG AutostartExecuteThread  - Begin autostart execution... - de.uniol.inf.is.odysseus.server.autostart.AutostartExecuteThread.run(AutostartExecuteThread.java:33) 
13415 DEBUG TransportHandlerRegistry  - Register new Handler OPC-DA - de.uniol.inf.is.odysseus.core.physicaloperator.access.transport.TransportHandlerRegistry.register(TransportHandlerRegistry.java:36) 
13449 DEBUG AutostartExecuteThread  - Autostart script executed - de.uniol.inf.is.odysseus.server.autostart.AutostartExecuteThread.run(AutostartExecuteThread.java:39) 
70608 DEBUG StandardQueryOptimizer  - Start rewriting of query... - de.uniol.inf.is.odysseus.planmanagement.optimization.query.standardqueryoptimizer.StandardQueryOptimizer.optimizeQuery(StandardQueryOptimizer.java:134) 
70623 DEBUG StandardQueryOptimizer  - Rewriting of query done. - de.uniol.inf.is.odysseus.planmanagement.optimization.query.standardqueryoptimizer.StandardQueryOptimizer.optimizeQuery(StandardQueryOptimizer.java:138) 
70625 DEBUG StandardQueryOptimizer  - Starting transformation for the logical query... - de.uniol.inf.is.odysseus.planmanagement.optimization.query.standardqueryoptimizer.StandardQueryOptimizer.optimizeQuery(StandardQueryOptimizer.java:157) 
70660 DEBUG StandardQueryOptimizer  - Transformation into a physical query done. - de.uniol.inf.is.odysseus.planmanagement.optimization.query.standardqueryoptimizer.StandardQueryOptimizer.optimizeQuery(StandardQueryOptimizer.java:161) 
70671 DEBUG ReceiverPO  - Process_open - de.uniol.inf.is.odysseus.core.server.physicaloperator.access.push.ReceiverPO.process_open(ReceiverPO.java:72) 
70679 DEBUG AutoReconnectController  - Connection state changed: false - org.openscada.opc.lib.da.AutoReconnectController.connectionStateChanged(AutoReconnectController.java:133) 
70679 DEBUG AutoReconnectController  - Requesting connection - org.openscada.opc.lib.da.AutoReconnectController.connect(AutoReconnectController.java:107) 
70680 DEBUG AutoReconnectController  - Trigger reconnect - org.openscada.opc.lib.da.AutoReconnectController.triggerReconnect(AutoReconnectController.java:164) 
70699 DEBUG AutoReconnectController  - Connecting to server - org.openscada.opc.lib.da.AutoReconnectController.performReconnect(AutoReconnectController.java:213) 
70700 INFO  Server  - Socket timeout: 0  - org.openscada.opc.lib.da.Server.connect(Server.java:109) 
70743 INFO  JISession  - Created Session: -133938208 - org.jinterop.dcom.core.JISession.createSession(?:?) 
70743 INFO  JISession  - Release_References_TimerTask:[RUN] Session:  -133938208 , listOfDeferencedIpids.size(): 0 - org.jinterop.dcom.core.JISession$Release_References_TimerTask.run(?:?) 
70754 INFO  JIComOxidRuntime  - Running ClientPingTimerTask ! - org.jinterop.dcom.core.JIComOxidRuntime$ClientPingTimerTask.run(?:?) 
70754 INFO  JIComOxidRuntime  - Running ServerPingTimerTask ! - org.jinterop.dcom.core.JIComOxidRuntime$ServerPingTimerTask.run(?:?) 
70757 DEBUG JIComTransport  - Opening socket on /10.1.183.3:135 - org.jinterop.dcom.transport.JIComTransport.attach(?:?) 
74237 DEBUG JIComTransport  - Socket closed... Socket[unconnected] host 10.1.183.3, port 135 - org.jinterop.dcom.transport.JIComTransport.close(?:?) 
74245 INFO  JIComOxidRuntime  - addUpdateOXIDs: finally this oid is { IPID ref count is 1 } and OID in bytes[] 00000: A2 90 1A E5 4A 12 4E 4A                          |¢..åJ.NJ        |

 , hasExpired false }  - org.jinterop.dcom.core.JIComOxidRuntime.addUpdateOXIDs(?:?) 
74246 INFO  JISession  - [addToSession] Adding IPID: 00002822-0d94-0000-bcd4-3de3ff317737 to session: -133938208 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
74246 INFO  JISession  - for IID: 00000000-0000-0000-c000-000000000046 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
74246 INFO  JIComObjectImpl  - addRef: Adding 5 references for 00002822-0d94-0000-bcd4-3de3ff317737 session: -133938208 - org.jinterop.dcom.core.JIComObjectImpl.addRef(?:?) 
74246 DEBUG JIComTransport  - Opening socket on /10.1.183.3:3735 - org.jinterop.dcom.transport.JIComTransport.attach(?:?) 
74571 INFO  JIComOxidRuntime  - addUpdateOXIDs: finally this oid is { IPID ref count is 2 } and OID in bytes[] 00000: A2 90 1A E5 4A 12 4E 4A                          |¢..åJ.NJ        |

 , hasExpired false }  - org.jinterop.dcom.core.JIComOxidRuntime.addUpdateOXIDs(?:?) 
74572 INFO  JISession  - [addToSession] Adding IPID: 00009c24-0d94-0000-9d08-a2506470e2d3 to session: -133938208 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
74572 INFO  JISession  - for IID: 39c13a4d-011e-11d0-9675-0020afd8adb3 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
74572 INFO  JIComObjectImpl  - addRef: Adding 5 references for 00009c24-0d94-0000-9d08-a2506470e2d3 session: -133938208 - org.jinterop.dcom.core.JIComObjectImpl.addRef(?:?) 
74589 INFO  JIComOxidRuntime  - addUpdateOXIDs: finally this oid is { IPID ref count is 3 } and OID in bytes[] 00000: A2 90 1A E5 4A 12 4E 4A                          |¢..åJ.NJ        |

 , hasExpired false }  - org.jinterop.dcom.core.JIComOxidRuntime.addUpdateOXIDs(?:?) 
74589 INFO  JISession  - [addToSession] Adding IPID: 0000c423-0d94-0000-81d8-8bbf36dcd1a1 to session: -133938208 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
74590 INFO  JISession  - for IID: f31dfde2-07b6-11d2-b2d8-0060083ba1fb - org.jinterop.dcom.core.JISession.addToSession(?:?) 
74590 INFO  JIComObjectImpl  - addRef: Adding 5 references for 0000c423-0d94-0000-81d8-8bbf36dcd1a1 session: -133938208 - org.jinterop.dcom.core.JIComObjectImpl.addRef(?:?) 
74601 DEBUG AutoReconnectController  - Connection state changed: true - org.openscada.opc.lib.da.AutoReconnectController.connectionStateChanged(AutoReconnectController.java:133) 
74602 DEBUG AccessBase  - Create a new group - org.openscada.opc.lib.da.AccessBase.start(AccessBase.java:210) 
74609 DEBUG JIComTransport  - Opening socket on /10.1.183.3:3735 - org.jinterop.dcom.transport.JIComTransport.attach(?:?) 
74865 INFO  JIComOxidRuntime  - addUpdateOXIDs: Adding OID to holder SetID[null] , currentSetOIDs[{{ IPID ref count is 3 } and OID in bytes[] 00000: A2 90 1A E5 4A 12 4E 4A                          |¢..åJ.NJ        |

 , hasExpired false } ={ IPID ref count is 3 } and OID in bytes[] 00000: A2 90 1A E5 4A 12 4E 4A                          |¢..åJ.NJ        |

 , hasExpired false } }], current size of currentSetOIDs is 1 - org.jinterop.dcom.core.JIComOxidRuntime.addUpdateOXIDs(?:?) 
74866 INFO  JIComOxidRuntime  - addUpdateOXIDs: finally this oid is { IPID ref count is 1 } and OID in bytes[] 00000: C1 A3 75 81 5E 38 CC D8                          |Á£u.^8ÌØ        |

 , hasExpired false }  - org.jinterop.dcom.core.JIComOxidRuntime.addUpdateOXIDs(?:?) 
74867 INFO  JISession  - [addToSession] Adding IPID: 0000a81b-0d94-0000-8dca-0e6f9a0dc953 to session: -133938208 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
74867 INFO  JISession  - for IID: 39c13a50-011e-11d0-9675-0020afd8adb3 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
74868 INFO  JIComObjectImpl  - addRef: Adding 5 references for 0000a81b-0d94-0000-8dca-0e6f9a0dc953 session: -133938208 - org.jinterop.dcom.core.JIComObjectImpl.addRef(?:?) 
74919 INFO  JIComOxidRuntime  - addUpdateOXIDs: finally this oid is { IPID ref count is 2 } and OID in bytes[] 00000: C1 A3 75 81 5E 38 CC D8                          |Á£u.^8ÌØ        |

 , hasExpired false }  - org.jinterop.dcom.core.JIComOxidRuntime.addUpdateOXIDs(?:?) 
74924 INFO  JISession  - [addToSession] Adding IPID: 0000a81b-0d94-0000-8dca-0e6f9a0dc953 to session: -133938208 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
74924 INFO  JISession  - for IID: 39c13a50-011e-11d0-9675-0020afd8adb3 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
74924 INFO  JIComObjectImpl  - addRef: Adding 5 references for 0000a81b-0d94-0000-8dca-0e6f9a0dc953 session: -133938208 - org.jinterop.dcom.core.JIComObjectImpl.addRef(?:?) 
74990 DEBUG Group  - Creating new group instance with COM group org.openscada.opc.dcom.da.impl.OPCGroupStateMgt@646c93ac - org.openscada.opc.lib.da.Group.<init>(Group.java:74) 
75008 INFO  JIComOxidRuntime  - addUpdateOXIDs: finally this oid is { IPID ref count is 3 } and OID in bytes[] 00000: C1 A3 75 81 5E 38 CC D8                          |Á£u.^8ÌØ        |

 , hasExpired false }  - org.jinterop.dcom.core.JIComOxidRuntime.addUpdateOXIDs(?:?) 
75009 INFO  JISession  - [addToSession] Adding IPID: 0000681d-0d94-0000-b291-22fd5dc5675b to session: -133938208 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
75009 INFO  JISession  - for IID: 39c13a54-011e-11d0-9675-0020afd8adb3 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
75010 INFO  JIComObjectImpl  - addRef: Adding 5 references for 0000681d-0d94-0000-b291-22fd5dc5675b session: -133938208 - org.jinterop.dcom.core.JIComObjectImpl.addRef(?:?) 
75067 INFO  JIComOxidRuntime  - addUpdateOXIDs: finally this oid is { IPID ref count is 4 } and OID in bytes[] 00000: C1 A3 75 81 5E 38 CC D8                          |Á£u.^8ÌØ        |

 , hasExpired false }  - org.jinterop.dcom.core.JIComOxidRuntime.addUpdateOXIDs(?:?) 
75067 INFO  JISession  - [addToSession] Adding IPID: 0000cc1c-0d94-0000-9aa5-281f7fc67a95 to session: -133938208 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
75067 INFO  JISession  - for IID: 39c13a52-011e-11d0-9675-0020afd8adb3 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
75067 INFO  JIComObjectImpl  - addRef: Adding 5 references for 0000cc1c-0d94-0000-9aa5-281f7fc67a95 session: -133938208 - org.jinterop.dcom.core.JIComObjectImpl.addRef(?:?) 
75083 DEBUG AccessBase  - Realizing item: \\.\PVR-WRS-1\I_DC_1 - org.openscada.opc.lib.da.AccessBase.realizeItem(AccessBase.java:222) 
75149 DEBUG Item  - Adding new item '\\.\PVR-WRS-1\I_DC_1' (0x00000001) for group org.openscada.opc.lib.da.Group@1e9d0bc9 - org.openscada.opc.lib.da.Item.<init>(Item.java:42) 
75156 DEBUG Group  - Adding item: '\\.\PVR-WRS-1\I_DC_1', 1 - org.openscada.opc.lib.da.Group.addItem(Group.java:245) 
75162 DEBUG AutoReconnectController  - performReconnect completed : true - org.openscada.opc.lib.da.AutoReconnectController$1.run(AutoReconnectController.java:178) 
75178 DEBUG OPCDATransportHandler  - 0: 0.0 - de.uniol.inf.is.odysseus.wrapper.opcda.physicaloperator.access.OPCDATransportHandler.process(OPCDATransportHandler.java:211) 
75685 DEBUG OPCDATransportHandler  - 0: 0.0 - de.uniol.inf.is.odysseus.wrapper.opcda.physicaloperator.access.OPCDATransportHandler.process(OPCDATransportHandler.java:211) 
76192 DEBUG OPCDATransportHandler  - 0: 0.0 - de.uniol.inf.is.odysseus.wrapper.opcda.physicaloperator.access.OPCDATransportHandler.process(OPCDATransportHandler.java:211) 
76698 DEBUG OPCDATransportHandler  - 0: 0.0 - de.uniol.inf.is.odysseus.wrapper.opcda.physicaloperator.access.OPCDATransportHandler.process(OPCDATransportHandler.java:211) 
77204 DEBUG OPCDATransportHandler  - 0: 0.0 - de.uniol.inf.is.odysseus.wrapper.opcda.physicaloperator.access.OPCDATransportHandler.process(OPCDATransportHandler.java:211) 
77711 DEBUG OPCDATransportHandler  - 0: 0.0 - de.uniol.inf.is.odysseus.wrapper.opcda.physicaloperator.access.OPCDATransportHandler.process(OPCDATransportHandler.java:211) 
The protocol handler actually seems to work but I always get the same value from the OPC Server, even though the register on the server holds different values.

Any help will be greatly appreciated.

M.Schmid
Last edited by Martin Schmid on Mon Sep 29, 2014 11:48 am, edited 1 time in total.

User avatar
ckuka
Posts: 35
Joined: Tue Jul 29, 2014 10:55 am
Location: Shanghai, P.R. China/中国上海
Contact:

Re: OPC-DA Handler

Post by ckuka » Wed Aug 20, 2014 3:35 am

Hi,
It looks like you have an additional CQL query with:
SELECT * FROM System.output;
This actually fails because of the name of the attribute "\\.\PVR-WRS-1\I_DC_1". You can solve that by placing a RENAME operator [1] after the ACCESS operator and rename the attribute to, i.e., "DC1".

For the transport, I changed the handler a little bit (in the SVN). Now it should forward the current value on an item changed event.


[1] http://odysseus.offis.uni-oldenburg.de: ... e+operator
kind regards / 祝好
Christian Kuka

Martin Schmid
Posts: 34
Joined: Fri Aug 15, 2014 5:22 pm

Re: OPC-DA Handler

Post by Martin Schmid » Wed Aug 20, 2014 9:38 am

Dear Mr. Kuka,

The rename operator fixed the "show all problem". Thank you.

However, I'm getting the following error now:

Code: Select all

53998 DEBUG AccessBase  - Realizing item: \\.\PVR-WRS-1\I_DC_1 - org.openscada.opc.lib.da.AccessBase.realizeItem(AccessBase.java:222) 
54051 WARN  AccessBase  - Failed to add item: \\.\PVR-WRS-1\I_DC_1 (C0040007) - org.openscada.opc.lib.da.AccessBase.realizeAll(AccessBase.java:269) 
This is my full Odysseus console output:

Code: Select all

52658 DEBUG StandardQueryOptimizer  - Start rewriting of query... - de.uniol.inf.is.odysseus.planmanagement.optimization.query.standardqueryoptimizer.StandardQueryOptimizer.optimizeQuery(StandardQueryOptimizer.java:134) 
52662 DEBUG StandardQueryOptimizer  - Rewriting of query done. - de.uniol.inf.is.odysseus.planmanagement.optimization.query.standardqueryoptimizer.StandardQueryOptimizer.optimizeQuery(StandardQueryOptimizer.java:138) 
52662 DEBUG StandardQueryOptimizer  - Starting transformation for the logical query... - de.uniol.inf.is.odysseus.planmanagement.optimization.query.standardqueryoptimizer.StandardQueryOptimizer.optimizeQuery(StandardQueryOptimizer.java:157) 
52691 DEBUG StandardQueryOptimizer  - Transformation into a physical query done. - de.uniol.inf.is.odysseus.planmanagement.optimization.query.standardqueryoptimizer.StandardQueryOptimizer.optimizeQuery(StandardQueryOptimizer.java:161) 
52695 DEBUG ReceiverPO  - Process_open - de.uniol.inf.is.odysseus.core.server.physicaloperator.access.push.ReceiverPO.process_open(ReceiverPO.java:72) 
52711 DEBUG AutoReconnectController  - Connection state changed: false - org.openscada.opc.lib.da.AutoReconnectController.connectionStateChanged(AutoReconnectController.java:133) 
52711 DEBUG AutoReconnectController  - Requesting connection - org.openscada.opc.lib.da.AutoReconnectController.connect(AutoReconnectController.java:107) 
52711 DEBUG AutoReconnectController  - Trigger reconnect - org.openscada.opc.lib.da.AutoReconnectController.triggerReconnect(AutoReconnectController.java:164) 
52722 DEBUG AutoReconnectController  - Connecting to server - org.openscada.opc.lib.da.AutoReconnectController.performReconnect(AutoReconnectController.java:213) 
52723 INFO  Server  - Socket timeout: 0  - org.openscada.opc.lib.da.Server.connect(Server.java:109) 
52754 INFO  JISession  - Created Session: 117186604 - org.jinterop.dcom.core.JISession.createSession(?:?) 
52755 INFO  JISession  - Release_References_TimerTask:[RUN] Session:  117186604 , listOfDeferencedIpids.size(): 0 - org.jinterop.dcom.core.JISession$Release_References_TimerTask.run(?:?) 
52764 INFO  JIComOxidRuntime  - Running ServerPingTimerTask ! - org.jinterop.dcom.core.JIComOxidRuntime$ServerPingTimerTask.run(?:?) 
52764 INFO  JIComOxidRuntime  - Running ClientPingTimerTask ! - org.jinterop.dcom.core.JIComOxidRuntime$ClientPingTimerTask.run(?:?) 
52772 DEBUG JIComTransport  - Opening socket on /10.1.183.3:135 - org.jinterop.dcom.transport.JIComTransport.attach(?:?) 
53214 DEBUG JIComTransport  - Socket closed... Socket[unconnected] host 10.1.183.3, port 135 - org.jinterop.dcom.transport.JIComTransport.close(?:?) 
53217 INFO  JIComOxidRuntime  - addUpdateOXIDs: finally this oid is { IPID ref count is 1 } and OID in bytes[] 00000: D6 1F 6B BE 97 F8 18 0A                          |Ö.k¾.ø..        |

 , hasExpired false }  - org.jinterop.dcom.core.JIComOxidRuntime.addUpdateOXIDs(?:?) 
53217 INFO  JISession  - [addToSession] Adding IPID: 00000422-0d94-0000-a11b-b38b72c24117 to session: 117186604 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
53217 INFO  JISession  - for IID: 00000000-0000-0000-c000-000000000046 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
53218 INFO  JIComObjectImpl  - addRef: Adding 5 references for 00000422-0d94-0000-a11b-b38b72c24117 session: 117186604 - org.jinterop.dcom.core.JIComObjectImpl.addRef(?:?) 
53218 DEBUG JIComTransport  - Opening socket on /10.1.183.3:3735 - org.jinterop.dcom.transport.JIComTransport.attach(?:?) 
53458 INFO  JIComOxidRuntime  - addUpdateOXIDs: finally this oid is { IPID ref count is 2 } and OID in bytes[] 00000: D6 1F 6B BE 97 F8 18 0A                          |Ö.k¾.ø..        |

 , hasExpired false }  - org.jinterop.dcom.core.JIComOxidRuntime.addUpdateOXIDs(?:?) 
53458 INFO  JISession  - [addToSession] Adding IPID: 00006424-0d94-0000-b20e-7f3bd8ac53c2 to session: 117186604 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
53458 INFO  JISession  - for IID: 39c13a4d-011e-11d0-9675-0020afd8adb3 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
53459 INFO  JIComObjectImpl  - addRef: Adding 5 references for 00006424-0d94-0000-b20e-7f3bd8ac53c2 session: 117186604 - org.jinterop.dcom.core.JIComObjectImpl.addRef(?:?) 
53486 INFO  JIComOxidRuntime  - addUpdateOXIDs: finally this oid is { IPID ref count is 3 } and OID in bytes[] 00000: D6 1F 6B BE 97 F8 18 0A                          |Ö.k¾.ø..        |

 , hasExpired false }  - org.jinterop.dcom.core.JIComOxidRuntime.addUpdateOXIDs(?:?) 
53486 INFO  JISession  - [addToSession] Adding IPID: 00003425-0d94-0000-83f6-8762c69290ed to session: 117186604 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
53487 INFO  JISession  - for IID: f31dfde2-07b6-11d2-b2d8-0060083ba1fb - org.jinterop.dcom.core.JISession.addToSession(?:?) 
53488 INFO  JIComObjectImpl  - addRef: Adding 5 references for 00003425-0d94-0000-83f6-8762c69290ed session: 117186604 - org.jinterop.dcom.core.JIComObjectImpl.addRef(?:?) 
53504 DEBUG AutoReconnectController  - Connection state changed: true - org.openscada.opc.lib.da.AutoReconnectController.connectionStateChanged(AutoReconnectController.java:133) 
53504 DEBUG AccessBase  - Create a new group - org.openscada.opc.lib.da.AccessBase.start(AccessBase.java:210) 
53505 DEBUG JIComTransport  - Opening socket on /10.1.183.3:3735 - org.jinterop.dcom.transport.JIComTransport.attach(?:?) 
53804 INFO  JIComOxidRuntime  - addUpdateOXIDs: Adding OID to holder SetID[null] , currentSetOIDs[{{ IPID ref count is 3 } and OID in bytes[] 00000: D6 1F 6B BE 97 F8 18 0A                          |Ö.k¾.ø..        |

 , hasExpired false } ={ IPID ref count is 3 } and OID in bytes[] 00000: D6 1F 6B BE 97 F8 18 0A                          |Ö.k¾.ø..        |

 , hasExpired false } }], current size of currentSetOIDs is 1 - org.jinterop.dcom.core.JIComOxidRuntime.addUpdateOXIDs(?:?) 
53804 INFO  JIComOxidRuntime  - addUpdateOXIDs: finally this oid is { IPID ref count is 1 } and OID in bytes[] 00000: A5 10 2F CC 98 86 0E F4                          |¥./Ì...ô        |

 , hasExpired false }  - org.jinterop.dcom.core.JIComOxidRuntime.addUpdateOXIDs(?:?) 
53804 INFO  JISession  - [addToSession] Adding IPID: 0000182d-0d94-0000-868a-ae5d769de638 to session: 117186604 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
53804 INFO  JISession  - for IID: 39c13a50-011e-11d0-9675-0020afd8adb3 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
53804 INFO  JIComObjectImpl  - addRef: Adding 5 references for 0000182d-0d94-0000-868a-ae5d769de638 session: 117186604 - org.jinterop.dcom.core.JIComObjectImpl.addRef(?:?) 
53855 INFO  JIComOxidRuntime  - addUpdateOXIDs: finally this oid is { IPID ref count is 2 } and OID in bytes[] 00000: A5 10 2F CC 98 86 0E F4                          |¥./Ì...ô        |

 , hasExpired false }  - org.jinterop.dcom.core.JIComOxidRuntime.addUpdateOXIDs(?:?) 
53857 INFO  JISession  - [addToSession] Adding IPID: 0000182d-0d94-0000-868a-ae5d769de638 to session: 117186604 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
53857 INFO  JISession  - for IID: 39c13a50-011e-11d0-9675-0020afd8adb3 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
53857 INFO  JIComObjectImpl  - addRef: Adding 5 references for 0000182d-0d94-0000-868a-ae5d769de638 session: 117186604 - org.jinterop.dcom.core.JIComObjectImpl.addRef(?:?) 
53916 DEBUG Group  - Creating new group instance with COM group org.openscada.opc.dcom.da.impl.OPCGroupStateMgt@69db0229 - org.openscada.opc.lib.da.Group.<init>(Group.java:74) 
53928 INFO  JIComOxidRuntime  - addUpdateOXIDs: finally this oid is { IPID ref count is 3 } and OID in bytes[] 00000: A5 10 2F CC 98 86 0E F4                          |¥./Ì...ô        |

 , hasExpired false }  - org.jinterop.dcom.core.JIComOxidRuntime.addUpdateOXIDs(?:?) 
53929 INFO  JISession  - [addToSession] Adding IPID: 0000b830-0d94-0000-8657-997599dd7e7f to session: 117186604 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
53929 INFO  JISession  - for IID: 39c13a54-011e-11d0-9675-0020afd8adb3 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
53929 INFO  JIComObjectImpl  - addRef: Adding 5 references for 0000b830-0d94-0000-8657-997599dd7e7f session: 117186604 - org.jinterop.dcom.core.JIComObjectImpl.addRef(?:?) 
53983 INFO  JIComOxidRuntime  - addUpdateOXIDs: finally this oid is { IPID ref count is 4 } and OID in bytes[] 00000: A5 10 2F CC 98 86 0E F4                          |¥./Ì...ô        |

 , hasExpired false }  - org.jinterop.dcom.core.JIComOxidRuntime.addUpdateOXIDs(?:?) 
53984 INFO  JISession  - [addToSession] Adding IPID: 00003031-0d94-0000-8077-e5b103135cbf to session: 117186604 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
53984 INFO  JISession  - for IID: 39c13a52-011e-11d0-9675-0020afd8adb3 - org.jinterop.dcom.core.JISession.addToSession(?:?) 
53984 INFO  JIComObjectImpl  - addRef: Adding 5 references for 00003031-0d94-0000-8077-e5b103135cbf session: 117186604 - org.jinterop.dcom.core.JIComObjectImpl.addRef(?:?) 
53998 DEBUG AccessBase  - Realizing item: \\.\PVR-WRS-1\I_DC_1 - org.openscada.opc.lib.da.AccessBase.realizeItem(AccessBase.java:222) 
54051 WARN  AccessBase  - Failed to add item: \\.\PVR-WRS-1\I_DC_1 (C0040007) - org.openscada.opc.lib.da.AccessBase.realizeAll(AccessBase.java:269) 
If you have any further input it will be greatly appreciated.

Martin Schmid
Posts: 34
Joined: Fri Aug 15, 2014 5:22 pm

Re: OPC-DA Handler

Post by Martin Schmid » Wed Aug 20, 2014 10:58 am

Alright.


There was actually a problem with our OPC Server due to a update. Everything is running fine now, so the problem was on our side in this case. As I mentioned before, the issue with clicking on "show data" which is (as far as I know) synonymous with "Select * from "sourcename" was completely resolved by Mr. Kuka's suggestion of renaming the source. :P

There is however a different issue with accessing Tags that are encased in 'tagname'. So far only tags that are not encased like 'tagname' work. Is there a standard procedure of escaping characters in PQL/CQL for OPC-Tags? We'd like to access the tag

\\.\PVR-WRS-1\'I_DC_1.1'

HaMo

Re: OPC-DA Handler

Post by HaMo » Wed Aug 20, 2014 12:09 pm

Hi all,
in addition to Martins post:

the simple colons are the problem.
Is there a solution?
Last edited by HaMo on Fri Aug 22, 2014 9:50 am, edited 1 time in total.

Martin Schmid
Posts: 34
Joined: Fri Aug 15, 2014 5:22 pm

Re: OPC-DA Handler

Post by Martin Schmid » Wed Aug 20, 2014 3:17 pm

Additional question:

Is it possible to add timestamps to the OPC-DA values? There is an option to write metadata for the simpleCSV transport protocol handler but apparently it's not there for the OPC-DA handler.
Or is there another way to add timestamps to the values?

Thanks in advance,


M.Schmid

User avatar
ckuka
Posts: 35
Joined: Tue Jul 29, 2014 10:55 am
Location: Shanghai, P.R. China/中国上海
Contact:

Re: OPC-DA Handler

Post by ckuka » Wed Aug 20, 2014 5:04 pm

@HaMo: Looks like a problem with the PQL parser. We're working on it.

@Martin: The SimpleCSV is a protocol handler. Basically a protocol handler either takes a value from a transport handler and transforms it into a tuple or takes a tuple and transforms it into some value for a transport handler. The OPC-DA is a transport handler. A transport handler is responsible for the transport of values from and to Odysseus. However, the OPC-DA is some kind of special because the received data do not have to be parsed by a protocol handler (like it is the case for, i.e., XML data).

The option "writeMetadata" of the SimpleCSV protocol handler [1] determines whether the metadata (timestamp, priority, latency,..) should be appended to the CSV transformed tuple values. This option is only useful when writing CSV data. if you just want to get the timestamp to your payload take a look at [2] to copy these metadata to the payload of the tuple. If you just want to add a timestamp to your incoming data you can declare an attribute data type as STARTTIMESTAMP (if the time is already included in the data). In this case Odysseus will use the value of the attribute as the start timestamp. If no attribute has this data type Odysseus will use the system time (you can see that in the generated physical plan of a query). In addition, there is the timestamp operator [3] to explicitly set the time metadata of a tuple.


[1] http://odysseus.offis.uni-oldenburg.de: ... ol+handler
[2] http://odysseus.offis.uni-oldenburg.de: ... d+operator
[3] http://odysseus.offis.uni-oldenburg.de: ... p+operator
kind regards / 祝好
Christian Kuka

User avatar
Marco Grawunder
Posts: 272
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: OPC-DA Handler

Post by Marco Grawunder » Thu Aug 21, 2014 4:16 pm

What happens, when the schema is defined as follows:

Code: Select all

Code: Select all
    #PARSER PQL
    #RUNQUERY
    output := ACCESS({source='OPC:Demo',
    wrapper='GenericPush',
    transport='opc-da',
    protocol='none',
    dataHandler='Tuple',
    options=[
    ['host', 'x.x.x.x'],
    ['domain', 'none'],
    ['username', 'administrator'],
    ['password', 'xxxx'],
    ['progId','National Instruments.Variable Engine.1'],
    ['clsId','7EFA5AA7-3A85-4693-8561-4AC60CA09909']
    ],
    schema=[
            ["\\.\PVR-WRS-1\'I_DC_1.1'", 'FLOAT']
    ]
    })
i.e. defining the attribute with " instead of '. For me it works ... Of course without accessing the server ... ;)

Martin Schmid
Posts: 34
Joined: Fri Aug 15, 2014 5:22 pm

Re: OPC-DA Handler

Post by Martin Schmid » Thu Aug 21, 2014 7:15 pm

i.e. defining the attribute with " instead of '. For me it works ... Of course without accessing the server ... ;)
I'll check this tomorrow right away.

On another note, is it possible to extract the native OPC-DA timestamp? (OPC specifications require a timestamp to be sent, whether it is from the OPC Server itself or the underlying device)
The OPC server also provides a "Quality" for each tag, can we access that as well?

As far as I have seen from the documentation, the Odysseus OPC-DA handler only carries a single value

Code: Select all

     ["\\.\PVR-WRS-1\'I_DC_1.1'", 'FLOAT']
Thank you in advance for your help

User avatar
ckuka
Posts: 35
Joined: Tue Jul 29, 2014 10:55 am
Location: Shanghai, P.R. China/中国上海
Contact:

Re: OPC-DA Handler

Post by ckuka » Fri Aug 22, 2014 12:59 am

Hi,
The transport handler can also handle multiple items, i.e.,

Code: Select all

    output := ACCESS({source='OPC:Demo',
    wrapper='GenericPush',
    transport='opc-da',
    protocol='none',
    dataHandler='Tuple',
    options=[
    ['host', 'x.x.x.x'],
    ['domain', 'none'],
    ['username', 'administrator'],
    ['password', 'xxxx'],
    ['progId','National Instruments.Variable Engine.1'],
    ['clsId','7EFA5AA7-3A85-4693-8561-4AC60CA09909']
    ],
    schema=[
            ["\\.\PVR-WRS-1\'I_DC_1.1'", 'FLOAT'],
            ["\\.\PVR-WRS-1\'I_DC_2.1'", 'FLOAT'],
            ["some other path'", 'FLOAT']
    ]
    })
In that case, Odysseus (or the transport handler) will push a new tuple into the processing graph each time an item referenced in the schema definition is changed in the OPC server. But be aware that the tuple will include the updated item value and the values of the other items that do not have changed. Thus, doing an aggregation like SUM or AVG might produce unexpected results.
kind regards / 祝好
Christian Kuka

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest