question

Jelmer B avatar image
0 Likes"
Jelmer B asked Jelmer B commented

Different move time for robot

Hello, I'm trying to simulate a delayed robot movement in conjunction with my conveyors. The robot picks up 8 flow items at once in a total of 2,5 seconds. The robot drops the 8 flow items at once in a total of 2 seconds. The moving time of the robot between picking up the items and dropping the items is different for the 1st and the 3rd movement, which is 15 seconds. The rest of the movements is 10 seconds. I don't know how to set this up.

How can this be done? Thanks in advance! See attachement for the model.simulation robot.fsm

1643143153229.png

FlexSim 22.0.1
robotmovementdifferent time
1643143153229.png (234.1 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

Steven Hamoen avatar image
0 Likes"
Steven Hamoen answered Jelmer B commented

@Jelmer B The problem is that the robot calculates also the move time between every individual pick up. So I have tried creating the following solution in the motion time function:

/**Custom Code*/
Object current = ownerobject(c);
Object item = param(1);


if( current.subnodes.length == 8 || current.subnodes.length == 0)
{
    if( getinput(current) == 8 || getinput(current) == 24)
    {
        return 15;
    }
    else
    {
        return 20;
    }
}
else
{
    return 0;
}

So the idea was the if the robot is full or empty (content 8 or 0) you either return 15 or 10 based on what movement it is. Otherwise you return 0. But FlexSim doesn't like the 0, it crashes (I think because there will be a division by zero. So you can either make it a very small time and you can even subtract it from the loading and unloading time.

Other option would be to use a combiner after the queue so that the robot will only pick up 1 object and this function should work without the 0 part.



· 1
5 |100000

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

Jelmer B avatar image Jelmer B commented ·

Thanks @Steven Hamoen!

0 Likes 0 ·