& Construction

Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
& Manufacturing

Professional CAD/CAM tools built on Inventor and AutoCAD
Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
Professional CAD/CAM tools built on Inventor and AutoCAD
Set up logic to simulate robot order palletizing in your FlexSim model.
Type:
Tutorial
Length:
14 min.
Tutorial resources
These downloadable resources will be used to complete this tutorial:
Transcript
00:03
In FlexSim, a robot is a task executer that transports flow items from a start location to an end location.
00:11
Once you build a simulation of your robotic system, you can evaluate and refine it within your model.
00:18
This example shows how you could create a robotic order palletizing operation in FlexSim.
00:24
Here, a pallet arrives with a specific order assigned.
00:29
The robot transports the pallet to the conveyor.
00:33
Then, it transports the corresponding number of red, green, and blue items to fulfill the order, transferring items as they arrive.
00:44
To recreate this, begin with a model that is already built, but does not yet include the logic for robotic order palletizing.
00:53
From the Toolbar, select Process Flow > General > Process Flow.
01:01
The first step is to establish communication between the process flow and the 3D model by adding a List.
01:08
Select Toolbox > Add > Global List > Item List.
01:17
In the List Properties dialog, keep the defaults and click OK.
01:22
Reset and Run the model.
01:26
While the pallets and items arrive at their respective queues,
01:29
there is no logic that connects the robot to these items to transport them yet.
01:34
Stop and Reset the model.
01:38
Select the three item arrival Queues in the model.
01:42
In Properties, under Triggers, for On Entry, click Add > Lists > Push to List.
01:54
Expand List and select the global list that you just created, ItemList1.
02:02
In the ProcessFlow, add a List activity and rename it “Item List”.
02:09
Then, expand the List drop-down and select Global List > ItemList1.
02:16
Now, any time an item arrives at the Queue in the model, it will push to the Global Item List that can be used in the process flow.
02:24
Next, add an Event-Triggered Source in the process flow and rename it “Pallet Arrival”.
02:32
For the Object, sample the Empty Pallet Queue: On Entry in the model.
02:39
In the Label Assignment / Match Value table, for the Entering Item, Label Name, type “Pallet”.
02:48
Set the operation to assign.
02:52
When you Reset and Run the model, a pallet enters the model, and a corresponding token arrives at the Pallet Arrival activity in the flow.
03:02
Click the token.
03:05
In Properties, with the label selected, click the Selection icon, and the corresponding pallet highlights in the model.
03:16
Notice that there are three items now on the List.
03:20
In Item List, click View Entries to see the three items, one from each Queue.
03:28
Click each item in the model to view the corresponding Type Label of 1, 2, or 3 in Properties.
03:37
Next, add an Assign Labels activity and rename it “Setup Order”.
03:44
Click Add until there are three Labels for the activity.
03:49
Name the first Label “Red”, the second “Green”, and the third “Blue”.
03:57
Set the Value for the Red Label to Statistical Distribution > D Uniform.
04:06
Then, set the Maximum to “5”.
04:10
Back in the Activity Quick Properties, Copy the Red Value and Paste it into the Value field for the Green and Blue Labels as well.
04:18
Now, add a Resource to the ProcessFlow, and rename it “Robot”.
04:25
For the Reference, sample Robot1 in the model.
04:30
Add an Acquire activity and rename it “Acquire Robot”.
04:37
For the Resource Reference, sample the Robot Resource in the flow.
04:43
Then, set its Assign To Label to “token.Robot”.
04:48
Next, set up the steps that will instruct the Robot to pick up and transport the pallet to the Conveyor.
04:54
Add a Load Task to the flow and rename it “Robot Load Order Pallet”.
05:01
Set the Executer / Task Sequence to “token.Robot”, and the Item to “token.Pallet”.
05:09
Add an Unload Task and rename it “Robot Unload Pallet”.
05:15
As previously, set the Executer to “token.Robot” and the Item to “token.Pallet”.
05:24
Then, for the Destination, sample the Conveyor Drop in the Model.
05:30
Reset and Run the model.
05:32
The robot transports the pallet to the conveyor as planned.
05:37
However, the pallet needs to stop on the conveyor for loading.
05:41
Reset the model.
05:44
In the model, select the control point on the conveyor.
05:49
In Properties, under Triggers, click Add > On Arrival.
05:57
For On Arrival, click Add > Stop/Resume > Stop Item and keep the Stop Item defaults.
06:08
Now, create a token that represents each request for the robot to retrieve an item.
06:13
Reset and Run the model, and a pallet token generates.
06:18
Select it, and in Properties under Labels, you see the quantities of red, green, and blue types assigned to the pallet.
06:30
Add a Create Tokens activity, rename it “Create Red Item Tokens”, and then set the Quantity to “token.Red”.
06:41
Copy the activity and Paste it twice, connecting all three in an activity block.
06:48
Rename the second one to “Create Green Item Tokens”, with a Quantity of “token.Green”,
06:55
and rename the third to “Create Blue Item Tokens”, with a Quantity of “token.Blue”.
07:02
Add a connector from the first block to the create tokens block.
07:07
Add a Start sub flow activity and rename it “Item Requests”.
07:14
Use the Sampler for each of the Create Token activities to connect them to Item Requests.
07:21
When you Reset and Run the model, upon arrival of the pallet at the Conveyor, seven item tokens are generated in the process flow.
07:32
To visually distinguish among token types in the process flow, for each Create Tokens activity, Add a Label with the Name “Type”,
07:41
and then set the Value to the corresponding Type for that color.
07:45
Red is Type “1”, Green is Type “2”, and Blue is Type “3”.
07:52
Then, in ProcessFlow Properties, click More Properties.
07:59
In the resulting dialog, in the Visualization tab, under Token Colors, set the Label Name to Type.
08:09
Reset and Run the model.
08:12
When the tokens generate, they are now colored by Type, making them easy to distinguish visually.
08:20
Add a Pull from List activity under Item Requests and rename it “Pull Matching Item”.
08:28
For the List Reference, sample the Item List to connect the Pull from List to the List.
08:35
Leave the Request and Require numbers set to 1; this means that only one item pulls from the list for each token.
08:43
In the Assign To field, enter “token.Item”.
08:49
Then, set the Query to WHERE (filter) > Type
08:55
and set this to “WHERE Type IS puller.Type”.
08:59
Then, to ensure that the requests for the Robot do not conflict, add a Zone.
09:06
In the Zone Quick Properties, click More Properties.
09:13
Then, in the Zone Properties dialog, on the Partitions tab, set Partition By to “token.Robot”.
09:23
Click Apply.
09:27
Next, on the Partition Constraints tab, click Add.
09:32
In this case, keep the Calculation and Limit as shown, to allow the Robot one token at a time.
09:40
Click OK, then rename the Zone to “Robot Zone”.
09:45
Next, add an Enter Zone to the sub flow, and then use the sampler to connect it to the Robot Zone.
09:52
Add a Load task and rename it “Robot Load Item”.
09:59
Set the Executer to “token.Robot”, and the Item to “token.Item”.
10:06
Add an Unload Task and rename it “Robot Unload Item to Pallet”.
10:14
Set the Executer to “token.Robot”, the Item to “token.Item”, and the Station to “token.Pallet”.
10:24
Add an Exit Zone activity to the sub flow, and then use the sampler to connect it to Robot Zone.
10:32
Next, add a connector from the Create Tokens activity block and add a Pull from List activity.
10:40
Then, use the Sampler to add a List.
10:44
For the List, rename it “Packed Items” and keep it as Use Internal List.
10:52
Add a Push to List activity to the sub flow after Exit Zone, renamed to “Notify Order Pallet”.
10:59
Use the List Reference Sampler to sample the Packed Items List.
11:05
Delete the Assign To value, and then set the Partition ID to “token.parent”.
11:14
For Pull from List, set the Partition ID to “token”, Delete the Assign To value, and then rename the activity “Wait for Completed Items”.
11:29
Add an Assign Labels activity to the bottom of the Create Tokens block and rename it “Total Items”.
11:36
Then, set the Label Name to “TotalItems” and the Value to “token.Red+token.Green+token.Blue”.
11:47
In Wait for Completed Items, set the Request Number and Require Number to “token.TotalItems”.
11:56
Add a Finish sub flow activity to the sub flow.
12:00
Next, add a connector from Wait for Completed Items, and then add a Custom Code activity, renamed to “Release Pallet on Conveyor”.
12:11
For the Custom Code, click Add > Control > Conveyor > Stop / Resume Item on Conveyor.
12:23
In the corresponding dialog, set the Item to “token.Pallet”, and the Action to Resume Item.
12:33
Finally, add a Release Resource below Release Pallet on Conveyor to release the Robot.
12:41
Rename it “Release Robot”, and in the Resource Assigned To field, enter “token.Robot”.
12:49
Add a Sink and rename it “Order Complete”.
12:56
Reset and Run the model.
12:59
The simulation is paused once the tokens for the first order are created.
13:04
Here, the red token enters the load zone, while the green and blue tokens wait for the robot to be available.
13:12
With the model running again, you can see that the appropriate items are loaded.
13:18
Notice that a green item waits at the Queue.
13:22
However, since the order does not require this Green item, it waits.
13:27
Once all appropriate items are loaded onto the pallet, the order token is notified that the order is complete.
13:35
The token releases the pallet onto the conveyor, releases the robot, and exits the model.
Video transcript
00:03
In FlexSim, a robot is a task executer that transports flow items from a start location to an end location.
00:11
Once you build a simulation of your robotic system, you can evaluate and refine it within your model.
00:18
This example shows how you could create a robotic order palletizing operation in FlexSim.
00:24
Here, a pallet arrives with a specific order assigned.
00:29
The robot transports the pallet to the conveyor.
00:33
Then, it transports the corresponding number of red, green, and blue items to fulfill the order, transferring items as they arrive.
00:44
To recreate this, begin with a model that is already built, but does not yet include the logic for robotic order palletizing.
00:53
From the Toolbar, select Process Flow > General > Process Flow.
01:01
The first step is to establish communication between the process flow and the 3D model by adding a List.
01:08
Select Toolbox > Add > Global List > Item List.
01:17
In the List Properties dialog, keep the defaults and click OK.
01:22
Reset and Run the model.
01:26
While the pallets and items arrive at their respective queues,
01:29
there is no logic that connects the robot to these items to transport them yet.
01:34
Stop and Reset the model.
01:38
Select the three item arrival Queues in the model.
01:42
In Properties, under Triggers, for On Entry, click Add > Lists > Push to List.
01:54
Expand List and select the global list that you just created, ItemList1.
02:02
In the ProcessFlow, add a List activity and rename it “Item List”.
02:09
Then, expand the List drop-down and select Global List > ItemList1.
02:16
Now, any time an item arrives at the Queue in the model, it will push to the Global Item List that can be used in the process flow.
02:24
Next, add an Event-Triggered Source in the process flow and rename it “Pallet Arrival”.
02:32
For the Object, sample the Empty Pallet Queue: On Entry in the model.
02:39
In the Label Assignment / Match Value table, for the Entering Item, Label Name, type “Pallet”.
02:48
Set the operation to assign.
02:52
When you Reset and Run the model, a pallet enters the model, and a corresponding token arrives at the Pallet Arrival activity in the flow.
03:02
Click the token.
03:05
In Properties, with the label selected, click the Selection icon, and the corresponding pallet highlights in the model.
03:16
Notice that there are three items now on the List.
03:20
In Item List, click View Entries to see the three items, one from each Queue.
03:28
Click each item in the model to view the corresponding Type Label of 1, 2, or 3 in Properties.
03:37
Next, add an Assign Labels activity and rename it “Setup Order”.
03:44
Click Add until there are three Labels for the activity.
03:49
Name the first Label “Red”, the second “Green”, and the third “Blue”.
03:57
Set the Value for the Red Label to Statistical Distribution > D Uniform.
04:06
Then, set the Maximum to “5”.
04:10
Back in the Activity Quick Properties, Copy the Red Value and Paste it into the Value field for the Green and Blue Labels as well.
04:18
Now, add a Resource to the ProcessFlow, and rename it “Robot”.
04:25
For the Reference, sample Robot1 in the model.
04:30
Add an Acquire activity and rename it “Acquire Robot”.
04:37
For the Resource Reference, sample the Robot Resource in the flow.
04:43
Then, set its Assign To Label to “token.Robot”.
04:48
Next, set up the steps that will instruct the Robot to pick up and transport the pallet to the Conveyor.
04:54
Add a Load Task to the flow and rename it “Robot Load Order Pallet”.
05:01
Set the Executer / Task Sequence to “token.Robot”, and the Item to “token.Pallet”.
05:09
Add an Unload Task and rename it “Robot Unload Pallet”.
05:15
As previously, set the Executer to “token.Robot” and the Item to “token.Pallet”.
05:24
Then, for the Destination, sample the Conveyor Drop in the Model.
05:30
Reset and Run the model.
05:32
The robot transports the pallet to the conveyor as planned.
05:37
However, the pallet needs to stop on the conveyor for loading.
05:41
Reset the model.
05:44
In the model, select the control point on the conveyor.
05:49
In Properties, under Triggers, click Add > On Arrival.
05:57
For On Arrival, click Add > Stop/Resume > Stop Item and keep the Stop Item defaults.
06:08
Now, create a token that represents each request for the robot to retrieve an item.
06:13
Reset and Run the model, and a pallet token generates.
06:18
Select it, and in Properties under Labels, you see the quantities of red, green, and blue types assigned to the pallet.
06:30
Add a Create Tokens activity, rename it “Create Red Item Tokens”, and then set the Quantity to “token.Red”.
06:41
Copy the activity and Paste it twice, connecting all three in an activity block.
06:48
Rename the second one to “Create Green Item Tokens”, with a Quantity of “token.Green”,
06:55
and rename the third to “Create Blue Item Tokens”, with a Quantity of “token.Blue”.
07:02
Add a connector from the first block to the create tokens block.
07:07
Add a Start sub flow activity and rename it “Item Requests”.
07:14
Use the Sampler for each of the Create Token activities to connect them to Item Requests.
07:21
When you Reset and Run the model, upon arrival of the pallet at the Conveyor, seven item tokens are generated in the process flow.
07:32
To visually distinguish among token types in the process flow, for each Create Tokens activity, Add a Label with the Name “Type”,
07:41
and then set the Value to the corresponding Type for that color.
07:45
Red is Type “1”, Green is Type “2”, and Blue is Type “3”.
07:52
Then, in ProcessFlow Properties, click More Properties.
07:59
In the resulting dialog, in the Visualization tab, under Token Colors, set the Label Name to Type.
08:09
Reset and Run the model.
08:12
When the tokens generate, they are now colored by Type, making them easy to distinguish visually.
08:20
Add a Pull from List activity under Item Requests and rename it “Pull Matching Item”.
08:28
For the List Reference, sample the Item List to connect the Pull from List to the List.
08:35
Leave the Request and Require numbers set to 1; this means that only one item pulls from the list for each token.
08:43
In the Assign To field, enter “token.Item”.
08:49
Then, set the Query to WHERE (filter) > Type
08:55
and set this to “WHERE Type IS puller.Type”.
08:59
Then, to ensure that the requests for the Robot do not conflict, add a Zone.
09:06
In the Zone Quick Properties, click More Properties.
09:13
Then, in the Zone Properties dialog, on the Partitions tab, set Partition By to “token.Robot”.
09:23
Click Apply.
09:27
Next, on the Partition Constraints tab, click Add.
09:32
In this case, keep the Calculation and Limit as shown, to allow the Robot one token at a time.
09:40
Click OK, then rename the Zone to “Robot Zone”.
09:45
Next, add an Enter Zone to the sub flow, and then use the sampler to connect it to the Robot Zone.
09:52
Add a Load task and rename it “Robot Load Item”.
09:59
Set the Executer to “token.Robot”, and the Item to “token.Item”.
10:06
Add an Unload Task and rename it “Robot Unload Item to Pallet”.
10:14
Set the Executer to “token.Robot”, the Item to “token.Item”, and the Station to “token.Pallet”.
10:24
Add an Exit Zone activity to the sub flow, and then use the sampler to connect it to Robot Zone.
10:32
Next, add a connector from the Create Tokens activity block and add a Pull from List activity.
10:40
Then, use the Sampler to add a List.
10:44
For the List, rename it “Packed Items” and keep it as Use Internal List.
10:52
Add a Push to List activity to the sub flow after Exit Zone, renamed to “Notify Order Pallet”.
10:59
Use the List Reference Sampler to sample the Packed Items List.
11:05
Delete the Assign To value, and then set the Partition ID to “token.parent”.
11:14
For Pull from List, set the Partition ID to “token”, Delete the Assign To value, and then rename the activity “Wait for Completed Items”.
11:29
Add an Assign Labels activity to the bottom of the Create Tokens block and rename it “Total Items”.
11:36
Then, set the Label Name to “TotalItems” and the Value to “token.Red+token.Green+token.Blue”.
11:47
In Wait for Completed Items, set the Request Number and Require Number to “token.TotalItems”.
11:56
Add a Finish sub flow activity to the sub flow.
12:00
Next, add a connector from Wait for Completed Items, and then add a Custom Code activity, renamed to “Release Pallet on Conveyor”.
12:11
For the Custom Code, click Add > Control > Conveyor > Stop / Resume Item on Conveyor.
12:23
In the corresponding dialog, set the Item to “token.Pallet”, and the Action to Resume Item.
12:33
Finally, add a Release Resource below Release Pallet on Conveyor to release the Robot.
12:41
Rename it “Release Robot”, and in the Resource Assigned To field, enter “token.Robot”.
12:49
Add a Sink and rename it “Order Complete”.
12:56
Reset and Run the model.
12:59
The simulation is paused once the tokens for the first order are created.
13:04
Here, the red token enters the load zone, while the green and blue tokens wait for the robot to be available.
13:12
With the model running again, you can see that the appropriate items are loaded.
13:18
Notice that a green item waits at the Queue.
13:22
However, since the order does not require this Green item, it waits.
13:27
Once all appropriate items are loaded onto the pallet, the order token is notified that the order is complete.
13:35
The token releases the pallet onto the conveyor, releases the robot, and exits the model.
How to buy
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © 2025 Autodesk Inc. All rights reserved
Sign in for the best experience
Save your progress
Get access to courses
Receive personalized recommendations
May we collect and use your data?
Learn more about the Third Party Services we use and our Privacy Statement.May we collect and use your data to tailor your experience?
Explore the benefits of a customized experience by managing your privacy settings for this site or visit our Privacy Statement to learn more about your options.