question

Oscar C13 avatar image
0 Likes"
Oscar C13 asked Felix Möhlmann commented

Name of the token

Hello, I am having troubles with obtain the name of the token created by a event triggeed source.

1663323132726.png

I suppose that the name is defined in the "Token Name" box, but I can´t refer to that name later in a decision box.

What would I have to put in the token name and what would I have to put in the decision block?

I tried with token.name, current.name, "name"...


FlexSim 22.1.3
event-triggered source
1663323132726.png (16.8 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.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Felix Möhlmann commented

"token.name" is the correct expression to access the name of a token. Could you share screenshots of what you assign in the Token Name field and what syntax you are using in the Decide activity?

· 4
5 |100000

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

Oscar C13 avatar image Oscar C13 commented ·

1663326228228.png

Decision:
1663326271841.png


error:

1663326289977.png

0 Likes 0 ·
1663326228228.png (18.7 KiB)
1663326271841.png (18.7 KiB)
1663326289977.png (4.7 KiB)
Felix Möhlmann avatar image Felix Möhlmann Oscar C13 commented ·

You are trying to assign a label value as the name. The token is being created in the event-triggered source, so I don't know where the label (and the value) should come from?

In the Decide activity you are expecting the value to either be 0 or 1. What decides which of the values should be assigned?

0 Likes 0 ·
Oscar C13 avatar image Oscar C13 Felix Möhlmann commented ·
The event-triggeres source is waiting for a change in the variable. That variable only can value 0 or 1 and that variable is controlled by a PLC. So, I want to do different actions depending on the value.


I hope I have explained myself properly.


0 Likes 0 ·
Show more comments