In this tutorial task, you'll learn how to create a very basic task sequence in a process flow. You'll learn how to link this process flow to a 3D model so that it will control task executers in the model. This tutorial task will also introduce you to the concept of process flow instances.
You'll build a simple task sequence for loading and unloading flow items that will be used by two different operators in the 3D model. When you're finished with this task, your 3D model should look like this:
In this model, you'll use labels extensively to link tokens in a process flow to objects in the 3D model. Process flows can control the logic of the 3D model using labels that contain a reference to a 3D object in the model. As the token moves through the activities in the process flow, the activity's logic can be applied to the object in the 3D model using this reference. Consider reading Key Concepts About Labels for a deeper understanding of how to work with labels in a process flow.
In this model, you'll use labels to:
In this step, you'll add the basic objects that will represent your production line in your 3D simulation model. You'll also change the properties of a shape object to make it look like a cleaning supplies closet. Be aware that the closet won't be used until the next task in the tutorial when you create a more advanced task sequence. When you're finished, your model will look like this:
To create this model:
Object | New Name |
---|---|
Source | Source (remove any numerals) |
Sink | Sink (remove any numerals) |
First Processor | Processor A |
Second Processor | Processor B |
First Operator | Operator A |
Second Operator | Operator B |
Shape | Supply Closet |
Check to make sure that your final 3D model looks like the image in the beginning of this step.
Now you'll create a simple task sequence that both operators will use whenever they need to load and unload a flow item. You'll create a sub flow because process flows can easily use sub flows to assign task sequences to task executers.
In this step, you'll set the process flow to run a separate instance each time an operator runs the sub flow. That means that each operator will use the same sub flow to provide them with the basic template for the task sequence. But each operator will run its own instance of the process flow, which is like running its own copy of the process flow. One advantage of this method is that any shared assets used by the operators will be local to the two operators. See Sub Process Flows and Process Flow Instances for more information.
In this step, you'll only add the activities to the process flow. You'll edit the properties and create the logic in a later step. When you're finished, your process flow will look like this:
To build this process flow:
TransportItems
.Activity | New Name |
---|---|
Start | Start Sub Flow |
Load | Load Item |
Unload | Unload Item |
Finish | Finish Sub Flow |
Check to make sure that your process flow looks similar to the image at the beginning of this step.
Now you'll link this sub flow to the objects simulation model. On the processor, you'll use a special picklist option called Use Task Sequence Sub Flow that will allow you to dynamically run the task sequence every time the processor uses an operator to transport a flow item. You'll set the picklist options so that the processor will assign the task to the operator connected to its center port.
To attach the 3D objects:
Consider saving your simulation model.
The following table provides an overview of how the activities in this process flow will function:
Activity | Explanation |
---|---|
Start Sub Flow | All new tasks generated by the processor will create a token which starts here in the process flow. |
Load Item | The operator connected to the processor's center port will load the flow item. |
Unload Item | The operator will take the flow item to the downstream fixed resource connected to the processor's output port. |
Finish | When the sub flow is complete, the token will enter this activity and be destroyed, indicating the task is now complete. |
In this step, you'll edit the activities in your sub flow so that it is dynamic, meaning it will change based on conditions that are unique to each instance (each processor and operator) that are attached to the sub flow. As a reminder, each time an operator picks up a flow item from the processor and transports it to its destination, that will act as a separate instance of a sub flow.
You'll use the current keyword to refer to whichever object instance is attached to the sub flow. In this case, this will be either Operator A or Operator B, depending on which processor created the task sequence. Using the current keyword allows both operators to run separate copies (instances) of the same task sequence. Running instances is more efficient since you'll only need to build the task sequence once, rather than building one for each operator.
You'll also add references to labels on the token. When the processor calls this task sequence sub flow, it will create a token to represent the task that needs to be completed. Recall that in the previous tutorial step, you set up the labels that would be assigned to this token. The item label contains a dynamic reference to the flow item that needs transportation and the toObject label contains a dynamic reference to the downstream object that will receive the flow item.
To edit these properties on the process flow:
token.item
listed in
the Item box.token.toObject
.When you're finished, the Properties should look similar to this image:
In this step, you'll learn how to open up process flow instances so that you can view them during a simulation run:
As the simulation runs, you'll see the operators loading and unloading flow items in the 3D model. In the TransportItems process flow, you'll see one or two tokens moving through the process flow each time an operator loads and unloads a flow item. Notice also that each of the two process flow instances of the operators correlate with the operators in the 3D model and with the TransportItems process flow.
At this stage, your process flow is very basic and doesn't operate much differently than the standard pre-programmed logic that is available with the Use Transport property on fixed resource. However, in the next tutorial task, you'll see how a process flow allows you to add additional custom tasks that make it much easier to assign complex task sequences to task executers. Continue on to Tutorial Task 2.2 - Customize the Task Sequence.