question

Fabio G10 avatar image
0 Likes"
Fabio G10 asked Felix Möhlmann commented

How can I stop an object with deceleration ?

Hi everbody.

I have a crane that is travelling to a location in a warehouse. How can I perform a 'real' stop of that crane in the middle of travel, with deceleration to zero speed ?

I've tried Object.stop() but is stops immediately (no-deceleration) and I need the crane to decelerates to zero speed.

Thanks

Fabio

FlexSim 22.1.3
cranestop object
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Felix Möhlmann commented

Pretty sure this is not possible unless you control all the kinematics of travel yourself. You could post it as an Idea, to have a change in speed affect current travel, here on the forum on which people can vote.

· 9
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Felix Möhlmann avatar image Felix Möhlmann commented ·

As Jason said, you would have to interrupt the current travel with a preempting task sequence and 'manually' add kinematics to decelerate to a stop.

The attached model shows how this can be done. The stop is triggered by sending a message to the crane (msgparam1 = 0). The process flow reacts to this and interrupts the travel. In the custom code activity, the current velocity of the crane is read from the kinematics. From that the stopping distance is calculated and new kinematics are added.

Another message (msgparam1 = 1) will resume the crane.

crane_decelerationtostop.fsm.pdf

(Rightclick on the file attachment -> Save Link/Target As (might be called differently depending on the browser) -> Set "Save as type" to All Types -> Save with a name ends with .fsm)

3 Likes 3 ·
Fabio G10 avatar image Fabio G10 Felix Möhlmann commented ·
Excellent Felix ! This approach in your attached model worked for me !

Thank you very much !.

Fabio

0 Likes 0 ·
Boris M6 avatar image Boris M6 Felix Möhlmann commented ·

This answer was very helpful. but can i preemt it as a task, so i can stop it properly and the start a travel task directed to the other way directly from this code?

To create a task that has all this steps, the stop, then the travel to the opposite direction

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Boris M6 commented ·

You can set the preemption setting to abort the active taks. Then, if you know where the crane should travel to next, you can add that travel activity to the process flow.

1662048110832.png

1662048171360.png

0 Likes 0 ·
1662048110832.png (15.7 KiB)
1662048171360.png (25.4 KiB)
Show more comments
Fabio G10 avatar image Fabio G10 commented ·
Thank you Jason !
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.