I'm not sure the ideal way to do this, but off the top of my head I think you would want to set up a conditional for when they collide.
This can be done in SL blocks. In this example, since the spring is already there, you could probably just ramp up the stiffness of Ks and compensate with higher b value to damp when collision occurs. Something like
Ks = k*10
b = b*10
Ks = k
b = b;
You'd have to figure out what vvalues make sense here based on your system. Running Simulation should make it apparent how to adjust your k and b.