Replace a Script
You improved a procedure and want the new version to run. What to do depends on whether its interface changed.
Same interface: replace the file
The interface is unchanged when no parameter was added, removed, renamed, moved to another group or given another type. Reordering parameters within a group does not change it, and neither does a change to the body, the description, the default value or min and max.
-
Copy the new
<procedure>.hdvp(and the interface file, if it changed) into the script folder. -
Restart the app.
-
Check:
v1/<module>/status/codeis0.v1/<module>/script/procedure-hashshows the new file’s hash;script/interface-hashis unchanged.
The new vision logic runs behind the same nodes. Your PLC program needs no change.
Changed interface: accept it on purpose
A changed interface changes the module’s nodes and breaks PLC programs written for the old ones. The Script Runner therefore never applies it on its own:
-
Copy the new procedure into the script folder and restart the app.
-
Read
v1/<module>/status/code. Expected:-10005(interface changed).status/textgives the accepted and the current hash. The module keeps only itsstatus/,script/and fixedrunnodes and accepts no request. -
Compare
v1/<module>/script/interfacewith what your PLC program expects. Adapt the PLC program. -
Copy
v1/<module>/script/interface-hashinto the module’sacceptedInterfaceHashin the application file and restart the app. -
Check:
status/codeis0, and the new nodes are there.
List a changed interface in your own release notes: for everyone who calls the module it is a breaking change.