question

joey avatar image
0 Likes"
joey asked Joerg Vogel commented

Why is the item position not at the original position?

Hello everyone, I have a problem that needs an answer, please help me. I have created a model, which works according to the logic I set.But the problem that I am currently encountering is making virtual models.I have set up a truck to arrange products as shown.

But it looks like it will do as I want just the first round when the truck comes back to pick up the product again, the first position of the product will be scrolled down again as shown.

What I needed was that when the truck picked up again, the initial product location would be the same as the truck picked up in the first round.I tried fixing the truck's reset but it was unsuccessful and this is the model I'm creating.edit-model.fsm I must thank everyone in advance for their help.

FlexSim 19.1.0
taskexecuteron reset
11.png (60.5 KiB)
22.png (71.9 KiB)
edit-model.fsm (2.7 MiB)
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

Braydn T avatar image
1 Like"
Braydn T answered Joerg Vogel commented

@joey

You are not resetting the lastXPosition, lastYPosition, and lastZPosition to their original values after you unload, so it continues to load based on where the last box to be loaded was located.

· 17
5 |100000

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

joey avatar image joey commented ·

Hi @Braydn T From the code that you gave, it will assign to only 1 car as in the picture.

Which I want to use more than 1 car, so I try to use the group instead, but it is unsuccessful. What do I have to do? Please help me.

0 Likes 0 ·
Braydn T avatar image Braydn T joey commented ·

@joey

You will have to set those variables on each item in the group individually. Maybe you could use a loop that loops through all the task executors in a group and resets their positions, but then you will have undesirable behavior because when one task executor unloads, it will reset the positions for all of them. I think the best spot to put the code would be in the on unload trigger of all of the task executors.

0 Likes 0 ·
joey avatar image joey Braydn T commented ·

@Braydn I don't understand. Can you explain more, please?

0 Likes 0 ·
Show more comments
joey avatar image joey commented ·

Hi @Braydn You mean let me find the new lastXPosition, lastYPosition, and lastZPosition values? If yes, I don't understand these numbers. Can you explain more about how they came? Thank you.

-1 Like -1 ·
Braydn T avatar image Braydn T joey commented ·

@joey Your model determines where to load the box based on the position of the last box. On reset, the model resets those variables (that contain the location of the last box) to the beginning position. You just need to reset those variables to the values they are in the onreset trigger when you unload.

0 Likes 0 ·
joey avatar image joey Braydn T commented ·

@Braydn I tried to do as you suggest. But without success I reset the last box position to reset. But the results are the same.Can you have an example for me to learn more?

0 Likes 0 ·
Show more comments
Show more comments