Setsys tag, "save" not saving

Hello again HMS, I have the code underneath running and once it reaches the save it gives me error 28, do I need to acknowledge some other part of the tag in order to edit or save the AlHigh or low?

SETSYS TAG, “LOAD” , “A_1_SCALED_OUTPUT”
SETSYS TAG, “AlHigh” , 5
SETSYS TAG, “SAVE”
PRINT “RAN EDIT”

Hi Lucas,

I tried running your code and added a part to print out the change and it seems like it ran fine.

Onchange “Tag1”, “@Alarm_High()”

Function Alarm_High()

SETSYS TAG, “LOAD” , “Test”
SETSYS TAG, “AlHigh” , 227
SETSYS TAG, “SAVE”

print Getsys Tag, “AlHigh”
Endfn

Does that tag already have alarms enabled on it?

Thanks Tim, while I was waiting I did not give up and figured it out.
The SYS was changing the value and printing the tag gave me the value that was entered but it would not save. I ended up trying this on another analog input I have setup and the value changed without a problem. turns out that when I was working on a tutorial the alarms where set to 20% and 90%, after I manually changed the numbers to any other number I was able to save and the script worked fine.

1 Like