then when you want to change these values you can do it like this:
speed.Value = “put any number you want here”
acceleration.Value = “put any number you want here”
deceleraion.Value = “put any number you want here”
Just remember that when those values are changed like this they wont go back to their default values when you restart simulation but rather they keep the latest given value. So if you want default speeds at the begin of your simulation you need to set them in your code.
Thank you for your answer.
I ended up writing a bit of code to manually override the path speed, it looks something like this :
while currentSpeed != targetSpeed :
speedViewer.Value = currentSpeed
time = sim.SimTime
delay(0.01)
if currentSpeed < targetSpeed:
currentSpeed = currentSpeed + acceleration * (sim.SimTime-time)
if currentSpeed >= targetSpeed:
currentSpeed = targetSpeed
path.Speed = currentSpeed
print "currentSpeed rose to targetSpeed "
print "Initial Speed = ", initialSpeed," mm/s // Target Speed = ", targetSpeed," mm/s // Time Taken = ", sim.SimTime-motionChangeTimeStamp, " s // Distance Travelled = ",0.5*acceleration*pow(sim.SimTime-motionChangeTimeStamp,2)," mm"
else:
path.Speed = currentSpeed
Works fine, for anyone wondering, you simply cannot use the path acceleration/decelaration property to modify the speed of the path on the fly. Gotta do it yourself