question

Javier Lg avatar image
0 Likes"
Javier Lg asked Javier Lg commented

Match a number with a "wait for event" with a global table

Hi Everyone,

I have a simple model with a source, one transport from one point to other and then go back to the start point.

I would like to stop the transit of the cars because maintenance in the some controls points. For this I used a variable (Model 1) which works very good and stop the transit when the variable is one (1 = active maintenance)

But I need to use tables because I would like to create a loop and I just want to use a token as a pivot to change the number of row.

In the model number 2 I replaced the variable for a global table:

1662557479265.png


And then the model don't want to continue to work.


I need a solution like (Wait until for a condition) but linked to a Global table ( probably I have to create one loop in a custom code that ask each minute if the condition is matched

If someone can help me with this issue, I would be appreciated. Thank you very much.



FlexSim 22.2.1
global tablewaitforeventwait until
1662557479265.png (64.6 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.

Javier Lg avatar image Javier Lg commented ·

I cannot upload the models

0 Likes 0 ·
Jacob W2 avatar image Jacob W2 ♦ commented ·

Hi @Javier Lg,

It's hard to know how to help without looking at your model. To receive a more accurate solution, please post your model or a sample model that demonstrates your question. You can upload your models or other files by appending ".jpg" to the filename. Files ending in .jpg are not effected by the bug. You can also upload your model and other files to FlexSim's file share site. Include the file name in your question so that we know which upload to reference.

Proprietary models can be posted as a private question visible only to FlexSim U.S. support staff. You can also contact your local FlexSim distributor for phone or email help.

0 Likes 0 ·
Javier Lg avatar image Javier Lg Jacob W2 ♦ commented ·

Hi Jacob,

I cannot add a file as jpg and also into the FlexSim file share site.

Anyways I put the files here in this link in my drive :

https://drive.google.com/drive/folders/1PAqCMY0-RJujY1YBon_VMSKNUkYPatnv?usp=sharing


Please let me know if it's works properly

Thanks in advance

0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Javier Lg commented

You can either set the table cell to contain a tracked variable, so you can listen to its OnChange event.

1662572547150.png

Or you can listen to the change by proxy, by reacting to the event that changes the value; the token entering the respective Custom Code activity further down in your process flow.

1662572573558.png


1662572547150.png (24.8 KiB)
1662572573558.png (37.2 KiB)
· 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.

Javier Lg avatar image Javier Lg commented ·

Thanks a lot for your solution Felix

0 Likes 0 ·