Search

User Manual

GETTING STARTED


MODULES AND PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support
SDK Documentation
SDK Examples

ALL USER MANUAL VERSIONS

Ignition 8.1
Ignition 7.9
Ignition 7.8

Deprecated Pages

Employees

Sign In

Skip to end of metadata
Go to start of metadata

The following feature is new in Ignition version 8.0.0
Click here to check out the other new features
This function is used in Python Scripting.

Description

Asynchronously reads the value of the Tags at the given paths. Meaning, execution of the calling script will continue without waiting for this function to finish. This useful in cases where the rest of the script should continue without waiting for the results from system.tag.readAsync.

Instead of returning the tag read results to the calling script, the results are processed by a Python callback function.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.tag.readAsync(tagPaths, callback)

  • Parameters

List tagPaths - A List of Tag paths to read from. If no property is specified in the path, the Value property is assumed.

Callable callback - A Python callback function to process the read results. The function definition must provide a single argument, which will hold a List of qualified values when the callback function is invoked. The qualified values will have three sub members: value, quality, and timestamp.

  • Returns

None

  • Scope

Gateway, Vision Clients, Perspective Sessions

Code Examples
Code Snippet
# Define a function that will iterate over the results of our async read
def checkValues(asyncReturn):
	
	# In this case we'll just create a counter, and increment it when values are
	#    over 100
	counter = 0
	for qValue in asyncReturn:
		if qValue.value > 100:
			counter += 1
			
	# Replace this part of the function with something more useful, such as 
	#    a tag or DB write. 		
	print str(counter)

# Define the tag paths you want to read	
paths = [ "[default]Tag1", "[default]Tag2", ]
			
system.tag.readAsync(paths, checkValues)
Keywords

system tag readAsync, tag.readAsync

  • No labels