question

Luis Fernando avatar image
0 Likes"
Luis Fernando asked Luis Fernando commented

Set the process time by a label using a Global Table

Hi FlexSim team,

I would like to set the process time of a processor depending on the Model label (by a global table). Is it possible to read from the Global Table the Model (Row) and the Process Time accordingly?

1669245330760.png

Here is attached my model: Process Time by Model label.fsm

Thank you,
Luis


FlexSim 22.2.3
processorlabelprocesstime
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

Matthew Gillespie avatar image
2 Likes"
Matthew Gillespie answered Luis Fernando commented

Your model will work if you move the values in the Models column into the row headers of the table:

1669246280337.png


Otherwise you would need to use the Table.getValueByKey() method:

Table("GlobalTable1").getValueByKey(item.Model, 2, 1)

1669246280337.png (4.7 KiB)
· 3
5 |100000

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

Luis Fernando avatar image Luis Fernando commented ·

Hi Matthew,

I did the changes but it doesn't works. Is anything else that I have to set it up?

Thank you,
Luis


process-time-by-model-label (Edited).fsm

0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ Luis Fernando commented ·

Hello @Luis Fernando,

There are two issues.

The first issue is that your global table 2 values are a string instead of a numerical. You can change this by right clinking on the column and selecting assign data.


Next, your Label Model's value is a letter. In the processor you have it input as if its a number.

With your current setup it looks like you would need to use a command like Table.getrowbykey.

1669670631183.png


process-time-by-model-label-edited_1.fsm

0 Likes 0 ·
Luis Fernando avatar image Luis Fernando Jeanette F ♦♦ commented ·
Thank you Jeanette, and Matthew, this is what I was looking for.

Have a great day
Luis

0 Likes 0 ·