openopc2 icon indicating copy to clipboard operation
openopc2 copied to clipboard

OpenOpcService crashes if I try to read TAGs values

Open danilNil opened this issue 10 months ago • 5 comments

Hi!

I have two questions:

  1. What did I do wrong in reading tag values? Could it be a Matrikon.OPC.Simulation configuration or limitations?
  2. How do you handle OpenOpcService crashes in production if you need to read tag values with high performance (up to 10,000 values per second)?

Here is my environment:

OPC DA Server

  • Windows Server 2016 Standart 64 bit
  • Python 3.10.11 - 64 bit
  • gbda_aut.dll - 64 bit
  • Matrikon.OPC.Simulation
  • openopc2service

OPC DA Client

  • MacOS with Python 3.10.12
  • openopc2

I ran this code https://github.com/iterativ/openopc2/blob/develop/examples/connect_discover_read_tags.py and got following output:

Attempting Connection to Matrikon.OPC.Simulation
Connecting in Gateway Mode
[('Protocol', 'com'), ('Class', 'Graybox.OPC.DAWrapper'), ('Client Name', ''), ('OPC Host', 'WWServer'), ('OPC Server', 'Matrikon.OPC.Simulation'), ('State', 'Running'), ('Version', '1.9 (Build8629)'), ('Browser', 'Hierarchical'), ('Start Time', '2023-08-11 10:20:30.676000+00:00'), ('Current Time', '2023-08-17 06:07:07.103000+00:00'), ('Vendor', 'Matrikon Inc +1-780-945-4011 http://www.matrikonopc.com')]
Connected to Matrikon.OPC.Simulation
TAGS:
  0 #MonitorACLFile
  1 Bucket Brigade.ArrayOfReal8
  2 Bucket Brigade.ArrayOfString
  3 Bucket Brigade.Boolean
  4 Bucket Brigade.Int1
  5 Bucket Brigade.Int2
  6 Bucket Brigade.Int4
  7 Bucket Brigade.Money
  8 Bucket Brigade.Real4
  9 Bucket Brigade.Real8
READ:
Traceback (most recent call last):
  File "/Users/danilnikiforov/PycharmProjects/venv/hightechplant-mes/lib/python3.10/site-packages/Pyro5/socketutil.py", line 132, in receive_data
    chunk = sock.recv(size, socket.MSG_WAITALL)
ConnectionResetError: [Errno 54] Connection reset by peer

After I tried to read TAG values OpenOpcService crashed with following error from gbda_aut.dll:

Faulting application name: OpenOpcService.exe, version: 0.0.0.0, time stamp: 0x63861178
Faulting module name: gbda_aut.dll, version: 1.0.8.304, time stamp: 0x4d92bcca
Exception code: 0xc0000005
Fault offset: 0x000000000001b966
Faulting process id: 0x3154
Faulting application start time: 0x01d9d04f9bf6925f
Faulting application path: C:\Program Files\OpenOpcService.exe
Faulting module path: C:\Windows\system32\gbda_aut.dll
Report Id: fe95e420-6e07-42b4-b74a-88ffbac523b4
Faulting package full name: 
Faulting package-relative application ID: 

danilNil avatar Aug 17 '23 06:08 danilNil