question

Nicholas A2 avatar image
0 Likes"
Nicholas A2 asked Ben Wilson commented

profiletasksequence() error

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.

Forum Post Model.fsm

Thanks,

Nicholas

FlexSim 20.1.1
process flowflexsim 20.1.1tasksequencestask error
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Ben Wilson avatar image Ben Wilson ♦♦ commented ·

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 0 ·

1 Answer

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Jason Lightfoot commented

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:

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.

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:



1611154055676.png (11.5 KiB)
1611154256096.png (3.1 KiB)
1611154296288.png (3.2 KiB)
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Nicholas A2 avatar image Nicholas A2 commented ·

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

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Nicholas A2 commented ·

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 0 ·