question

joey avatar image
0 Likes"
joey asked Mischa Spelt commented

Labels increase or decrease according to the number of items

I want to set the label number,To increase or decrease according to the number of items in the queue(queue1-queu4).

This is the label that I want to increase or decrease according to the number of items in the queue(queue1-queu4).

set-location1.fsm

FlexSim 19.0.2
labels
12.png (35.1 KiB)
set-location1.fsm (56.3 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

·
Steven Hamoen avatar image
2 Likes"
Steven Hamoen answered Mischa Spelt commented

@joeyYou don't need a label for that. something like this:

current.subnodes.length

will give you the content directly.

If you insists on creating a label just use the onentry and onexit trigger with the option: data -> Increment Value and use 1 on the onentry and -1 on the onexit. And don't forget to reset the label to 0 with the onreset.

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

joey avatar image joey commented ·

Hi @steven.hamoen

I try to create a model based on your advice, but it's still not successful.

I want you to help see my model,Which point am I defining from your suggestion?

set-location2.fsm

Thank you.

0 Likes 0 ·
set-location2.fsm (56.0 KiB)
Gabriel Morgante avatar image Gabriel Morgante joey commented ·

@joey

You have to first create a label to receive the 'Increment Value' and then set your trigger to increment it's value on 'current'.

I've fixed your model to work as you wanted, take a look. 19358-set-location2.fsm

0 Likes 0 ·
joey avatar image joey Gabriel Morgante commented ·

Thank you.

1 Like 1 ·
Show more comments

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.