While Loop

While Loop

ayman_labib
Not applicable
379 Views
1 Reply
Message 1 of 2

While Loop

ayman_labib
Not applicable

[ FlexSim 21.2.3 ]

Hello, I'm a very low experience FlexSim User and I would like to ask you how to write properly a while loop for this expression, please. I don't have any idea about how to write it... I would like to read this code every second.


Object current = param(1);

treenode activity = param(2);

Token token = param(3);

treenode processFlow = ownerobject(activity);



int iFound = 0;


int iNumberOfTotes = Table("tableLane10").numRows;


for (int iTote = 1; iTote<= iNumberOfTotes; iTote ++)

{

if (Table("tableLane10")[iTote][1]==Model.find("DP1").labelOrderID)

{

Table("ResumeLanes")[10][1]=1;

break;

}

else

{

Table("ResumeLanes")[10][1]=0;

}

}


0 Likes
Accepted solutions (1)
380 Views
1 Reply
Reply (1)
Message 2 of 2

FelixMoehlmann
Mentor
Mentor
Accepted solution

There is no way to put a delay inside code in FlexSim. If you want to execute the code every second, I'd suggest to use a custom code process flow activity and simply create a token every second to run it.

1638947370092.png

0 Likes