Can we make an object move to a specific position while keeping spinning with only using Process flow ?

Can we make an object move to a specific position while keeping spinning with only using Process flow ?

Aria_Zhou
Participant Participant
145 Views
6 Replies
Message 1 of 7

Can we make an object move to a specific position while keeping spinning with only using Process flow ?

Aria_Zhou
Participant
Participant

It's a kinematics question, the above question can be solved by using commands, but I couldn't find a method on only using PF to do it.

I create two tokens to control the actions, one is for moving: [(0,0,0 --> (5,0,0)].

                                                                           another is for rotation: [(0,0,0--> (0,0,360)].

But the moving action always be interrupted by the rotation action instead of working at the same time.

 

Is there any good way to solve this problem? Or it is how the process flow works? 

Thank you in advance!

0 Likes
146 Views
6 Replies
Replies (6)
Message 2 of 7

moehlmann_fe
Enthusiast
Enthusiast

When a kinematic is initialized, a reference to it is stored in the attribute of the object, so the kinematic is updated before a new frame is drawn. I assume it only updates the most recently added kinematic though, which is why the travel motion visually stops.

To see both add them to the same kinematic label.

0 Likes
Message 3 of 7

Aria_Zhou
Participant
Participant

Thank you very much! It's working now, but I have a further question: once I change the rotation kinematics into traveling, which is there are two traveling actions, it won't working in the curvilinear motion (as the GIF shows) but goes straight (as the video shows).

Can process flow helps achieve the curvilinear traveling? Or it can only do by commands?

Thank you!

0 Likes
Message 4 of 7

moehlmann_fe
Enthusiast
Enthusiast

In the gif the object also seems to travel "straight", since the motions along each axis are simply running at the same time. It looks like the object has a finite acceleration value in the gif, which gives the motion a slight curve at the start and end.

To achieve a proper curve (following a circular path) use the "Turn" kinematic type.

https://docs.flexsim.com/en/25.2/Reference/DeveloperAdvancedUser/Kinematics/Kinematics.html#addkinem...

 

0 Likes
Message 5 of 7

Aria_Zhou
Participant
Participant

Thank you very much! I noticed that "wait for complete" is used to set the sequence of kinematics, such a good way!

Plus, in the rotation kinematics target speed, you used the "90/Math.pi", could you tell me why this set as the speed of rotation?

Aria_Zhou_0-1757733670936.png

 

0 Likes
Message 6 of 7

moehlmann_fe
Enthusiast
Enthusiast

The duration of the rotation should match the time it takes to travel along the curve. The distance along a curve with radius r is s = r*radians = r*deg*π/180°. The time to travel that distance is t = s/v, In our example we have r = 2m, deg = 90°and v = 1m/s. Putting those values into the formula we get t = π seconds. So the duration should take π seconds and we just divide the total rotation (90°) by that time to get the speed the object needs to rotate at.

0 Likes
Message 7 of 7

Aria_Zhou
Participant
Participant

understand, thank you very much for you explanation!

0 Likes