From 1e346cda6c5bde5f59f0639f46d02db0c47dddb1 Mon Sep 17 00:00:00 2001
From: kruger <kruger@astron.nl>
Date: Thu, 14 Jan 2021 08:46:31 +0100
Subject: [PATCH] value change callback fixed

---
 opcuaserv.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/opcuaserv.py b/opcuaserv.py
index 46a0a9f..f38b8ac 100644
--- a/opcuaserv.py
+++ b/opcuaserv.py
@@ -8,6 +8,7 @@ from datetime import datetime;
 import logging
 #import Vars
 #import HWconf
+from pcctypes import *
 
 Vars_R={}
 Vars_W={}
@@ -26,7 +27,7 @@ class SubHandler(object):
 #        myvar2.Value.Value=val
 #        myvar2.SourceTimestamp = datetime.utcnow()
 
-        Inst=Vars.Instr(Vars.DevType.Var,VarD,len(val),val)
+        Inst=Instr(DevType.Var,VarD,len(val),val)
         Q1.put(Inst)
  #       P1.SetVarValue(vname,val)
         #readback
@@ -106,6 +107,7 @@ def InitServer(port=4840):
 #exit()
 
 def start():
+    global running
     running=True
 
 #print("Add modes:")
-- 
GitLab