question

David Seo avatar image
0 Likes"
David Seo asked Joerg Vogel answered

how to change dynamically 'targetcomponentsum' in the Combiner

I want to change dynamically the target quantity of the Combiner not using PF.

So I used the custom code like followed;

setvarnum(current, "targetcomponentsum", item.Type + 1);

setvarnum(current, "Target Quantity", item.Type + 1);

One or Two script is not valid.

What's wrong with it?

combinerupdatemaxsum-test.fsm

FlexSim 18.1.2
update dynamically the targetcomponentsum in the combiner
5 |100000

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

Joerg Vogel avatar image
1 Like"
Joerg Vogel answered

The answer is from the old forum. Componentsum is a combination of a node and a table value. You have to set one or more table cell values, which gives you the amount of the items coming through a port number higher than the port one, and then you set a variable node value of the componentsum. In your example you set two variable node values. This causes the error.

5 |100000

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

jing.c avatar image
1 Like"
jing.c answered

Hi @david.seo

You should change the table under "componentlist" instead of "Target Component" as the pic shown.

I also updated your model and may it helps~

combinerupdatemaxsumv181bychj.fsm


5 |100000

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