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 writes values to Tags at specified paths. The script will not wait for the write operation to complete before moving on, but you can provide a callback function to run further code after the write has finished.

For a blocking tag write operation, see system.tag.writeBlocking.

Client Permission Restrictions

Permission Type: Tag Editing

Client access to this scripting function is blocked to users that do not meet the role/zone requirements for the above permission type. This function is unaffected when run in the Gateway scope.

Syntax

system.tag.writeAsync(tagPaths, values, [callback])

  • Parameters

List tagPaths - A List of Tag paths to write to. A tag property can be included in the path. If no property is specified in a Tag path, the Value property is assumed.

List values - The values to write to the specified paths.

Callable callback - A function that will be invoked after the write operation is complete. The function must take a single argument: a List of QualityCode objects corresponding to the results of the write operation. [optional]

  • Returns

None

  • Scope

Gateway, Vision Client, Perspective Session

Code Examples
Code Snippet - Write to Multiple Tags
paths = ["[default]Tag1", "[default]Folder/Tag2"]
values = [10, 10]
system.tag.writeAsync(paths, values)
Code Snippet - Using a Callback Function
paths = ["[default]Tag1", "[default]Folder/Tag2"]
values = [10, 10]

def myCallback(asyncReturn):
	for result in asyncReturn:
		# Do something if a bad qualified value was returned
		if not result.good:
			print result

system.tag.writeAsync(paths, values, myCallback)
Keywords

system tag writeAsync, tag.writeAsync

  • No labels