Using kinematics to rotate a conveyor

Using kinematics to rotate a conveyor

achuta_kalidindi
Not applicable
240 Views
11 Replies
Message 1 of 12

Using kinematics to rotate a conveyor

achuta_kalidindi
Not applicable

[ FlexSim 16.0.1 ]

Can you let me know how to use kinematics to rotate a conveyor in a model?

Accepted solutions (1)
241 Views
11 Replies
Replies (11)
Message 2 of 12

Ben_WilsonADSK
Community Manager
Community Manager
Accepted solution

Attached is a sample model that has some turntables in it. They use kinematics for the rotation.

The left turntable will index the item to the center, then rotate, then convey the item off. The right turntable will rotate and convey at the same time.

235-basicturntables.gif

To see how the kinematics work, double click the BasicTE, then hit the Properties button. This will open the BasicTE's default properties GUI. From there you can examine the various offset behaviors, plus look at the labels on the object, which are used by the offset code.

Message 3 of 12

Ben_WilsonADSK
Community Manager
Community Manager

Here are two other examples of rotating conveyors using kinematics.

236-reversingtables-90and180.gif

The left system reorients items 90 degrees, the right by 180 degrees.

Message 4 of 12

christoph_gruber
Not applicable

Hi Ben, I try to use your two models above in new Flexsim 2017 but it doesn´t work. Do you have any ideas why? @Ben Wilson

0 Likes
Message 5 of 12

Ben_WilsonADSK
Community Manager
Community Manager

@christoph gruber, @Matt Long

FlexSim 2017 introduced a bug in updating kinematics. This will be fixed when 17.0.1 is released.

Unfortunately it looks like the work around mentioned in that post does not fix these models (adding a -1 as the optional 3rd parameter).

We'll have to wait to here from the dev team to see if this is related to the bug already found and fixed, or something new.

0 Likes
Message 6 of 12

christoph_gruber
Not applicable

@Ben Wilson

Ben, I have to modify your basicturntable for my model requirement (see the attached file). First, in my model I have to use only non accumulation conveyors and second, if the turntable had finished his job he should turn back in the start position (also the reset position). For the second requirement I found a solution with a little code on the OnResourceAvailable and the Custom Draw trigger. But I don´t know if this is a smart solution, do you have any idea for a better way to do this?

And for the first requirement I get an error message (Clock overflow, run Stopped.) if the target conveyor is occupied or not working. I don´t know what can I do!?

Thank you very much for your answers in advance.

basicturntable-turn-back.fsm

0 Likes
Message 7 of 12

logan_gold
Community Manager
Community Manager

@christoph gruber, I am still looking into this model to help answer all of your questions. However, the reason it is throwing a clock overflow error is happening because of the logic in the TurnTable's OnUnload trigger (around time 61.98).

The trigger is used to create a delay task so that the TurnTable will delay for a certain amount of time. The delay time is determined by getting the item's size and dividing by the Conveyor's speed - the Conveyor where the item is to be unloaded. Since it is trying to unload to StraightConveyor67 at this time, but StraightConveyor67 is currently stopped, then the speed is 0 which gives an undefined number when it is divided into the item's size. The delay task is still dispatched, but when it tries to execute with that undefined number as the delay time, the exception is thrown.

Since I am still working through the model, I'm not sure what should be changed to make sure this doesn't happen. Once I have a better understanding of everything, I will let you know any suggestions I have. I will also try to answer your other question at that time as well.

0 Likes
Message 8 of 12

logan_gold
Community Manager
Community Manager

@christoph gruber,

After looking through all the logic and testing different options, the fix for this issue that consistently works without being overly complicated is to set the delay time to 0 if the Conveyor's speed is 0. So in the OnUnload trigger, I changed line 10 from:

double conveytime = itemx/speed;

To these three lines:

double conveytime = 0;
if (speed > 0)
	conveytime = itemx/speed;

This will prevent the exception from happening. However, if an item tries to enter a stopped Conveyor, that item will sit on the Entry Transfer object instead until the Conveyor starts up again. After an item enters the Entry Transfer object and before it gets onto the Conveyor, it is possible for the TurnTable to load another flowitem.

If that is not the behavior you'd like for this model, then I believe the model will need to be adjusted to prevent items from entering the TurnTable if their destination Conveyor is stopped to prevent it from happening.

Message 9 of 12

christoph_gruber
Not applicable

@Logan Gold

I figure out it´s not necessarry to change the logic in the OnUnload trigger from the Turntable. If in the Entry Transfer objects from the destination Conveyors the"Hold Transprots if Space is Blocked" is checked the exception is prevent and it´s also not possible for the TurnTable to load another flowitem!

5532-basicturntable-turn-back-1.jpg

basicturntable-turn-back-1.fsm

Message 10 of 12

logan_gold
Community Manager
Community Manager

Awesome, good to hear.

0 Likes
Message 11 of 12

s9816358
Not applicable
Could you tell me how to write the kinematic code ? I can't understand the code
0 Likes
Message 12 of 12

ryan_c10
Not applicable

Hi @Tuan,

This is a very old post. Please ask your question as a separate question to keep things organized. If you want, you can reference this post in your new post to aid whoever might answer your question. Please see Best practices for using this Answers site - FlexSim Community for more details. Thanks!