question

Theresa B avatar image
0 Likes"
Theresa B asked Theresa B commented

Update Components List based on Port 1 item

Hi, all,

I need a sanity check because I can't seem to work out why Combiner2 isn't behaving properly.

It uses the Column 1 default components list without trouble but when the FlowItem from Port 1 carries the label "ProductNo" = 3, it doesn't seem to change the components list to Column 2 as I think my code should be working. The boxes should be showing "Part" labels 8, 9 or 10.

1676924210739.png


1676924036286.png

A fresh set of eyes would be much appreciated. The model is attached for reference updateComponentIssue.fsm

Thanks in advance!

FlexSim 23.0.2
combinerlabelscombiner component list
1676924036286.png (315.2 KiB)
1676924210739.png (160.1 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 Theresa B commented

You have the column indexes the wrong way around. The goal is to assign new values from the "table" to "thelist", so he column number of "thelist" should stay at 1 and the number for "table" should get higher for the second and third condition.

thelist[index][1] = table[index][2];
inc(thesum, table[index][2]);
· 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.

Theresa B avatar image Theresa B commented ·
Thanks, Felix! I thought I had double/triple/etc.-checked everything but I'd missed that
0 Likes 0 ·