question

Hoang Nk avatar image
0 Likes"
Hoang Nk asked Andrew O commented

Getting notification when the task is finished

crane_control.fsm

Hi guys,

I'm having a bit of trouble getting the state of a task in the task sequence when it is finished by the task executor. I have attached the model in this question for clarification.

What I would like to do is that, when the Crane1 starts picking up the box from queue1, the code returns the state of the task as 1 (unfinished) and when the crane has picked all 3 boxes, it will return the state as finished. I can only get the state when it starts picking up the box, can't seem to extract the state of the task when the crane has done the task.

Could anyone help me with this? Many thanks in advance.

Regards,

Hoang

FlexSim 22.1.2
task sequence state
crane-control.fsm (79.5 KiB)
· 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.

Andrew O avatar image Andrew O commented ·

Hi @Hoang Nk, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of 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

·
Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered

I suggest to add an extra task after the final load task. This could either be a NODEFUNCTION, executing a node that contains the code to print the state directly. Or a MESSAGE, for example to the crane itself, which then activates the On Message trigger which writes the state.

1668497937873.png

1668498009524.png

1668497991779.png

In this example the state number is given as the first message parameter.

crane-control_1.fsm


1668497937873.png (14.5 KiB)
1668497991779.png (4.2 KiB)
1668498009524.png (3.6 KiB)
crane-control-1.fsm (64.4 KiB)
5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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