I've created my own analog alarm add-on block that has some default values, namely the input scaling of 4000,20000. When I use this add-on block in my code the default value does not load and everythings defaults to 0.
I don't want to lock these values by writing 4000 and 20000 to them in code, I want the user to be able to edit them via SCADA, I however do not feel like manually entering all 96x2 of the values.
How can I make the default values work?
edit: it seems any new instances are set to the correct default values, however all my existing ones are not. How can I 'reinitialise' all my existing add-on blocks to suck in the default values, is there any way to do this?
I've tried exporting and importing my variables but this does not load the default.
edit: I renamed the module, deleted them all, reimported and it seems to have set the default value, unsure why it wouldn't work before.
I don't want to lock these values by writing 4000 and 20000 to them in code, I want the user to be able to edit them via SCADA, I however do not feel like manually entering all 96x2 of the values.
How can I make the default values work?
edit: it seems any new instances are set to the correct default values, however all my existing ones are not. How can I 'reinitialise' all my existing add-on blocks to suck in the default values, is there any way to do this?
I've tried exporting and importing my variables but this does not load the default.
edit: I renamed the module, deleted them all, reimported and it seems to have set the default value, unsure why it wouldn't work before.
Last edited: