-
-
Notifications
You must be signed in to change notification settings - Fork 2
incendium.tag.write
César Román edited this page Apr 30, 2024
·
9 revisions
Write a value to a tag.
Note that this function will block until the write operation is complete or times out.
Args:
- tag_path (
str
): The path of the tag to write to. - value (
object
): The value to write.
Returns:
- int: 0 if the write failed immediately, 1 if it succeeded immediately, and 2 if it is pending.
import incendium.tag
# This code would go on a property change event for a numeric text
# field to calculate and write a value to a tag.
if event.propertyName == intValue:
calcValue = event.newValue - 2.5
incendium.tag.write("Tanks/tankHiSP", calcValue)