Reset a specific datatype script

Hi there!
I have made a specific datatype for an alarm (boolean) value that i read from the PLC. With this datatype i can also reset that alarm with my datatype.

I was hoping on making a toggle button that can reset all the tags that uses that specific datatype.

I was looking into calling this script : system.tag.browseTags
to browse my specific datatype, but after that I’m not so sure on how to proceed to reset.

Thanks for your help!

Show us what you have so far, and we can help you from there. Also let us know what version of Ignition you’re using. Things are a bit different between v7 and v8, so we don’t want to chase the wrong rabbit if we don’t have to. :wink:

Thanks for your reply! I figured it out.

1 Like

So basically here is how we reset an alarm of a specific datatype, we use this to reset communication errors after a major power lost. It does all the called datatype at once.
#Define paths
alarmackpath = ‘‘specificcmdpath’’
TAGTYPE = ‘‘DataTypename’’
#Browse tags
tags = sytem.tag.browseTags(parentspath=’‘tags’’, udtParentType= TAGTYPE, recursive= True)
#Here we define the path of the tag and the extension (reset cmd)
for tag in tags:
tagPath = tag.fullPath
ackalarm = tagPath + alarmackpath
system.tag.write(ackpath, 1)