question

Gabriela VR avatar image
0 Likes"
Gabriela VR asked Gabriela VR commented

How can the crane`s hook stay down until it goes to the next position?

Hello,

I`m trying to keep the "hook" of the crane to unload and stay low until it goes to the next position to pick up the next item that way it doesn`t waste time going back up while is empty. Is that possible?

Thank you in advance,

CRANE UNLOADING.fsm


FlexSim 21.1.1
processflowflexsim 21.1.1crane movement
crane-unloading.fsm (110.3 KiB)
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

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Gabriela VR commented

You could change the lift height of the crane to 0 in an On Unload trigger with the following code:

current.setVariable("liftheight", 0);

If the crane can pick up multiple items at the same time, you should first check whether it was the last item that got unloaded, so the code becomes:

if(current.subnodes.length < 2)
{
    current.setVariable("liftheight", 0);
}

Then you reset it in an On Load trigger, when the crane picks up an item the next time:

current.setVariable("liftheight", 4);

(4 is the default value, you can of course choose another value if you like)

· 3
5 |100000

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

Gabriela VR avatar image Gabriela VR commented ·

Thank you for your answer! Is this the right way? because is not working

0 Likes 0 ·
1619232042300.png (10.6 KiB)
Jeanette F avatar image Jeanette F ♦♦ Gabriela VR commented ·

That's because you set the lift height twice. The second time was the typical height so you wouldn't see any change.

Move the second lift height code to the load trigger code like the Felix suggested to you.

1 Like 1 ·
Gabriela VR avatar image Gabriela VR Jeanette F ♦♦ commented ·

You're totally right, thank you so much!

0 Likes 0 ·