+
+
+
+
diff --git a/POCloud/advvfdipp.py b/POCloud/advvfdipp.py
index d2f207e..e3b82f4 100644
--- a/POCloud/advvfdipp.py
+++ b/POCloud/advvfdipp.py
@@ -109,7 +109,7 @@ class start(threading.Thread, deviceBase):
def run(self):
"""Actually run the driver."""
global persist
- wait_sec = 30
+ wait_sec = 10
for i in range(0, wait_sec):
print("advvfdipp driver will start in {} seconds".format(wait_sec - i))
time.sleep(1)
@@ -170,3 +170,14 @@ class start(threading.Thread, deviceBase):
except KeyError:
print("part of the schedule entry is missing")
return False
+
+ def advvfdipp_writeplctag(self, name, value):
+ """Write a value to the PLC."""
+ new_val = json.loads(str(value).replace("'", '"'))
+ tag_n = str(new_val['tag']) # "cmd_Start"
+ val_n = new_val['val']
+ w = write_tag(str(plc_ip_address), tag_n, val_n)
+ print("Result of advvfdipp_writeplctag(self, {}, {}) = {}".format(name, value, w))
+ if w is None:
+ w = "Error writing to PLC..."
+ return w