Step 1: Setup the model
- Create a Source, a Queue, a BasicFR, a Processor, a Queue, a Processor, an Operator and a Sink, and lay them out as shown in the picture below. The BasicFR will act as our table, but will not have any logic applied to it, and will not function in any way. It is just there to give the Operator somewhere to travel to. A Visual Tool could have also been used, or any of the Fixed Resources.
- Connect the objects as shown in the picture below, making sure to connect the Operator and the BasicFR to the center port of the first Queue in that order.
Step 2: Edit the Objects
- Click on the first Processor to open its properties in the Quick Properties.
- Under the the Processor section, change Max Content to 10.
- Click on the first Processor to open its properties in the Quick Properties.
- Under the the Processor section, change Process Time to 50.
Step 3: Write the Task Sequence
To make things easy, you will use the Basic Task Sequence Example to start the task sequence. From there, you will alter and add to it to fit your needs.
- Click the first Queue to open its properties in the Quick Properties.
- Under the the Flow section, check the Use Transport box, and select Task Sequence Example_1 from the list. This task sequence example by default provides the same functionality as referencing an operator. The Operator travels to the current object, loads the item, travels to the downstream object, and unloads the item. You will alter this just a little bit.
- Click the Code Edit button to the right of the drop-down list to open the code editor. In this model, the Operator should do this task, and nothing else. So, you will remove the Break task by deleting all of the code on line 21. See the image below.
After the Operator loads the item, we want him to Travel to the BasicFR, and Delay for 10 seconds before traveling to the downstream Processor.
- On the now empty line 21, type the following:
inserttask(ts, TASKTYPE_TRAVEL, centerobject(current,2), NULL);
Press the Enter key to go to the next line.
- On line 22, type the following:
inserttask(ts, TASKTYPE_DELAY, NULL, NULL, 10, STATE_BUSY);
Click the OK button to close the code window.
- Click the OK button on the Properties window to close it.
Step 4: Reset and Run the Model
- Reset and Run the model. The Operator should Travel to the Queue, Load the item, Travel to the BasicFR, Delay for 10 seconds, Travel to the Processor, and Unload the item.
- Save the model. The next tutorial will build off of what you have done here.