question

Kevin-Hsiang avatar image
0 Likes"
Kevin-Hsiang asked Kevin-Hsiang commented

When using global table, how to looked from column 1 and whole row

Hello,

This question is about lookup the global table column 1 and whole row.

In this model, I want to ask the AGV cart to the specific rack(and each rack represent a type ), so I use the Global Table to choose the specific type.

I want lookup from Global Table(named "AssignedToRack"),but I don't know how to looked from column 1 and whole row. like: lookup row1->row2->row3...

kivasystem_1.fsm1645180210932.png

I had read more tutorial to try, but still not find the appropriate answers.

is there any smart way to do this operation?

Regards,

Kevin

FlexSim 22.0.1
agvglobal table
1645180210932.png (378.8 KiB)
kivasystem-1.fsm (152.9 KiB)
· 2
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 Kevin-Hsiang commented

To assign the row values to tokens in ascending order you can use the input statistic of the activity.

"getstat(activity, "Input", STAT_CURRENT)" returns the number of tokens that have entered the activity. If you combine it with the modulo operator "%" you can repeatedly return the values from 1 to 10.
(1, 2, 3, ...10, 1, 2, 3, ...)

  1. (getstat(activity, "Input", STAT_CURRENT)%10)+1

kivasystem-2.fsm


kivasystem-2.fsm (152.2 KiB)
· 2
5 |100000

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