question

Hoang Nk avatar image
0 Likes"
Hoang Nk asked Jason Lightfoot commented

How can I make ASRS vehicles to pick multiple loads in code

Hi guys,

I'm making a stacker crane controller in Flexscript and ran into this trouble

1665286789900.png

Obviously when using TASKTYPE_LOAD, the crane picks only 1 flow item from the queue. How can I make it pick more than 1 item at a time?

Many thanks,

Hoang Nguyen

FlexSim 22.1.2
asrs vehicle behaviour
1665286789900.png (108.1 KiB)
· 2
5 |100000

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

Meng,Li avatar image Meng,Li commented ·
You can try combining the items as many as you want into one through combiner or code.
0 Likes 0 ·
Hoang Nk avatar image Hoang Nk Meng,Li commented ·
Thanks, but we're trying to avoid using the combiner due to the nature of our product line :)
0 Likes 0 ·
Ralf Gruber avatar image
0 Likes"
Ralf Gruber answered Jason Lightfoot commented

Hoang,

you will have to add a Load task for each item you want to load. In that case you will have to know at the generation of the task sequence, how many items you are going to load. Another option would be to use the OnLoad trigger of the TE to check after the first item has been loaded if there is another one to load and then create a load task there with preemption.

Good luck

· 4
5 |100000

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

Hoang Nk avatar image Hoang Nk commented ·
Hi Ralf,

Thanks for your answer. However, I have a problem with your suggestion. I want to create an automatic controller for the ASSR vehicle, as a User command. Because of that, I could not manually add a Load task every time there is a pick-up order from WMS. Do you have any idea about this?

0 Likes 0 ·
Ralf Gruber avatar image Ralf Gruber ♦ Hoang Nk commented ·
I was not talking about manually adding singel load tasks in my suggestion ;) You could code a for-loop looping through the load task for as man times as you want items to load. Again, this requires you to know how many items to load when creating the tasksequence.
0 Likes 0 ·
Hoang Nk avatar image Hoang Nk Ralf Gruber ♦ commented ·
Oh nice, I didn't think of doing the for-loop, because indeed I know the number of loads in advance. Thank you for the help :)
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Hoang Nk commented ·
I would not be putting data structures under the tree of user commands as they are not instanced by objects - if you want such a thing you should place the command as a flexscript label on the object - but then if you're doing that you may as well just use the labels of the object and get the benefits of dot notation rather than all this Model.find stuff with string paths.
0 Likes 0 ·
Hoang Nk avatar image
0 Likes"
Hoang Nk answered Jason Lightfoot commented

Hi again,

I have successfully got it running by using the "for" loop as Ralf suggested. However, is there anything I could do to make the ASRS vehicle pick the 3 boxes at the same time, I mean it could visually extend its arm only once and take all 3 boxes instead of extending its arm 3 times for 3 boxes i.e

· 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.

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·
If it's the same action at the same locaiton you can use moveobject(). If it's part of the same task sequence just add another load task. If it's in a different task sequence then you need to change the capacity of the ASRS so that the breakTo task allows it to consider starting a second task sequence.

I feel this could be a new question....

0 Likes 0 ·
Hoang Nk avatar image Hoang Nk Jason Lightfoot ♦ commented ·
The problem is that, when I added 3 load tasks, it really did take 3 boxes from the queue, but the extending arm went out 3 separate times to pick the boxes. I would like to make it in a way that the arm only reaches out once to take all the required number of boxes.

I have read the documentation for "TASKTYPE_LOAD" and apparently, the task is only meant to pick ONE item, hence if there are 3 load tasks then the arm will extend 3 times

I don't know if I have made myself clear about this question, but I only wish that when I run the simulation for demonstration, the stacker crane (ASRS vehicle) goes to the queue in Source 1, extends its arm out, and takes all N boxes at once. At the moment, it can take N boxes but that requires N times for the crane to extend its arm out and that doesn't look so nice to show.

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Hoang Nk commented ·

"If it's the same action at the same locaiton you can use moveobject(). "

So in this case you would have one load task but use moveobject or the Move Object activity in a process flow for the loading of additional items in the same motion.


1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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