Getting notification when the task is finished

Getting notification when the task is finished

hoang_nk
Not applicable
207 Views
2 Replies
Message 1 of 3

Getting notification when the task is finished

hoang_nk
Not applicable

[ FlexSim 22.1.2 ]

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

0 Likes
Accepted solutions (1)
208 Views
2 Replies
Replies (2)
Message 2 of 3

moehlmann_fe
Collaborator
Collaborator
Accepted solution

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

Message 3 of 3

andrew_o2
Not applicable

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