question

Xavi Aguirre avatar image
0 Likes"
Xavi Aguirre asked Xavi Aguirre commented

Process Flow Travel Activity: Read Destination from Table

destinations.fsm

Hi,

I'm trying to set up a loop of destinations for a TaskExecuter that reads from a table called "Destinos".

The idea is that the operator travels to dest1, waits, then dest2, etc.

My idea was to feed the destinations through a Table and use the : Object Name By Global Lookup Table option.

Unfortunately it is not working for me. If I write in the destination NN1 (node name) it works fine, but if it reads it from the table, it gives me an error.

I've tried to write in the destination the command: gettablestr("Destinos", 1, 1) and I get an error to. However if I write this in the script window I get NN1 as output. ¿What I am missing?

Thanks!

FlexSim 17.0.1
process flowtraveltable commands
destinations.fsm (25.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

Sam Stubbs avatar image
0 Likes"
Sam Stubbs answered Xavi Aguirre commented

You had it almost right, the error was firing because in the Global Table reference it is expecting the table name to be in quotes (" "), without the quotes it was trying to read Destinos as a variable, which it didn't recognize.

Also, instead of a Delay activity (which will just delay the token) it sounds like you are looking for a Delay Task activity, which will cause the TaskExecuter to delay.

I've reattached your model with the fixes.

5301-destinations.fsm


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

Xavi Aguirre avatar image Xavi Aguirre commented ·

Thank you very much @Sam Stubbs. I've tried many combinations and I was pretty sure to have tried that too! Maybe I was mislead because if you pick it up from the menu, it writes it without quotes.

0 Likes 0 ·