Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
================================================================================
OpenOPC for Python 1.4.0
RELEASE NOTES

Added functionality to read only changed data (without breaking the current API).

Here's a snippet to illustrate usage:

read_type = 'CD' # 'SR'=SyncRead, 'AR'=AsyncRefresh, 'CD'=ChangedData (new functionality)
if read_type == 'SR':
print("\n...Initial read (sync):\n\n" + str(opc.read(taglist, group=tag_group, sync=True, include_error=True))) # include_error=True also forces sync
elif read_type == 'AR':
print("\n...Initial read (async/refresh):\n\n" + str(opc.read(taglist, group=tag_group, sync=False, include_error=False)))
elif read_type == 'CD':
print("\n...Initial read (on data change):\n\n" + str(opc.read(taglist, group=tag_group, sync=False, include_error=False, update=500))) # note: initial read performs an AsyncRefresh
else:
print("\n\n*********** Invalid read_type ***********\n\n")
print("\n...Next reads... by group:")
for i in range(4):
print("\nIteration: " + str(i))
loop = True
while loop:
print('')
tag_iter = opc.iread(group=tag_group, sync=(read_type=='SR'), update=(1 if read_type=='CD' else -1)) # although true update value will be from initial group read, the update needs to be specified as greater than 0 in order to only read changed data
loop = False
for (name, val, qual, time) in tag_iter:
if read_type=='CD': loop = True
if val != None: # val==None means data didn't change
print(name, val, qual, time)
pytime.sleep(2)


================================================================================
OpenOPC for Python 1.3.1
Copyright (c) 2008-2015 by Barry Barnreiter (barrybb@gmail.com)

Expand Down
Loading