profiletasksequence() error

profiletasksequence() error

nicholas_a2
Not applicable
1,690 Views
4 Replies
Message 1 of 5

profiletasksequence() error

nicholas_a2
Not applicable

[ FlexSim 20.1.1 ]

My organization is new to using Flexsim. When creating simple models we have no issues. I recently attempted to add a second operator to a model I created. When running with one operator I have no issues and it works flawlessly. When I added a second operator, I had to adjust the process flow to get the second operator to move. As soon as I did that I populated a new error. Another colleague and I took the training class. Unfortunately, that was 6 months ago and we just started to really get into using the software again.

I searched the forums and located two other posts regarding this issue. They provided great information, but I am still a little lost due to a lack of experience. I was wondering if someone could help point me in the right direction on how to overcome this error. I have included the model, error, and system console script.

36094-task-error-profiletasksequence.jpg

36095-system-console-profiletasksequence-error.jpg

Forum Post Model.fsm

Thanks,

Nicholas

0 Likes
Accepted solutions (1)
1,691 Views
4 Replies
Replies (4)
Message 2 of 5

jason_lightfoot_adsk
Autodesk
Autodesk
Accepted solution

If you run this script it will profile the task sequence that is running on the operator:

applicationcommand("outputconsole");
Object op3=Model.find("Operator3");
profiletasksequence(gettasksequence(op3,0));

Which will output this:

Task Sequence:    Total number of tasks = 6,  Priority = 0,  Preempt = None
        Currently active task = 5,  Tasks left to finish = 2

Wait for Task            involved1: NULL involved2: NULL var1: 29 var2: NULL var3: NULL var4: NULL 
Nodefunction            involved1: Tools/ProcessFlow/ProcessFlow/Create TS: Assign Task Sequence to Operator3>variables/callbackNode involved2: Tools/ProcessFlow/ProcessFlow>stats/instances/ProcessFlow var1: /Tools/ProcessFlow/ProcessFlow>stats/instances/ProcessFlow/tokens/1 var2: NULL var3: NULL var4: NULL 
Travel            involved1: Queue3 involved2: NULL var1: 0 var2: 0 var3: 0 var4: 0 
Nodefunction            involved1: Tools/ProcessFlow/ProcessFlow/Travel:To Queue3~2>variables/callbackNode involved2: Tools/ProcessFlow/ProcessFlow>stats/instances/ProcessFlow var1: /Tools/ProcessFlow/ProcessFlow>stats/instances/ProcessFlow/tokens/1 var2: NULL var3: NULL var4: NULL 
ACTIVE >>> Load            involved1: NULL involved2: NULL var1: 0 var2: 0 var3: 0 var4: 0 
Nodefunction            involved1: Tools/ProcessFlow/ProcessFlow/Load: Flowitem from Queue3>variables/callbackNode involved2: Tools/ProcessFlow/ProcessFlow>stats/instances/ProcessFlow var1: /Tools/ProcessFlow/ProcessFlow>stats/instances/ProcessFlow/tokens/1 var2: NULL var3: NULL var4: NULL 

You can also see this task sequence in the variables part of the operator's tree:

36096-1611154055676.png

You can see in both that the active task is a Load task, but both involved objects (Involved1 and involed2) which relate to the item to load and where to load from are NULL.

36088-1611154256096.png

The issue is that in this Load activity, you reference token.item but the token only has these labels so it evaluates token.item as NULL:

36078-1611154296288.png


Message 3 of 5

nicholas_a2
Not applicable

Jason - Thank you for the quick response. If I provide labels to the tokens would that resolve the issue?

0 Likes
Message 4 of 5

jason_lightfoot_adsk
Autodesk
Autodesk

Yes, or just make sure that the reference to the item being picked up is correct - so it could be the content of Queue3.

0 Likes
Message 5 of 5

Ben_WilsonADSK
Community Manager
Community Manager

Hi @Nicholas A2, was jason.lightfoot's answer helpful? If so, please click the red "Accept" button at the bottom their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes