unloading process

Dear All
I want to simulate unloading process during nanoindentation. but I don’t know how to define variable y in order to. A part of my input file is defined below:

loading process:
variable y equal “141-stepdt0.2” (141= y coordinate+ indenter redius+ distance of above substrate)

fix 3 mobile indent 1000.0 sphere 70 v_y 70 30.0 units box
.
.
run 50000

#unloading process
unfix 3
variable y equal “121+stepdt0.2”
fix 3 mobile indent 1000.0 sphere 70 v_y 70 30.0 units box

run 50000

is this right?
I highly appreciate if you can help me regarding this issue
Thanks

It is best if you actually run it, visualize it and see if they work right.

Ray