Hello,
In my model I am trying to reference object as a destination for the transporter to pick the pallet and place it on to the object destination.
This is how I am using it in the code.
treenode forkliftdispatcher = Model.find("Distpatcher 1"); string thisDrop-off; //looping into a for loop with j as index //if loop to check Station and Type is matching as per the below given table with the pallet variables.(same) thisDrop-off = Table("Part_Location")[j][Destination]; TaskSequence ts = TaskSequence.create(forkliftDispatcher,0,0); ts.addTask(TASKTYPE_TRAVEL, Model.find("buffer"); ts.addTask(TASKTYPE_LOAD, item,Model.find("buffer"); ts.addTask(TASKTYPE_TRAVEL, Model.find(thisDropOff); ts.addTask(TASKTYPE_UNLOAD, item,Model.find(thisDropOff); ts.dispatch(); //end of for loop
I am referring to the global table like this in my model
Station | Type | Destination |
Station 1 | L | Drop1 |
Station 2 | H | Drop2 |
Station 3 | L | Drop3 |
Here in the Destination column, the values are the Queue names in my model. When I run this code, it is picking the pallet and dropping it in the mentioned Queue. But aftersometime it is giving me the Tasksequence error with invalid task and invalid task type. Involved 1 and 2 as NULL.
When I give all the values in the Destination column as "Drop1" (a single Queue as destination to all columns). Then it's running correctly.
If I give all the values in the Destination column as "Drop2" it is running correctly.
But If I give different Queue as destination in the Destination column in the Table shown above. It throws me the error.
How to resolve this? Please help.