question

Kshitij Dhake avatar image
0 Likes"
Kshitij Dhake asked Kshitij Dhake commented

Stop time depending upon type of material change

sample-1_autosave.fsmI am trying to model material change on one processor. I am using process flow for material change down time. However, I am only able to do it for 1 material change. I have 3 different materials on the station. I want to model the station in the following way :
1. Stop processor after every 200 flow items for 60s
2. Stop processor after every 100 flow items for 30s

3. Stop processor after every 50 flow items for 15s

FlexSim 22.2.0
material change
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 Kshitij Dhake commented

You could use the "Different Time for Nth Item" option for the setup time and pass in the value for N and the setup time as a model parameter. Then change this parameter when the item type changes.

Or you pass in the values through labels on the items.

sample-1-autosave_1.fsm


· 6
5 |100000

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

Kshitij Dhake avatar image Kshitij Dhake commented ·
How can I set the setup time to "down state" ?


0 Likes 0 ·
Kshitij Dhake avatar image Kshitij Dhake commented ·
The nth interval will only work for material changes with regular intervals? In my scenario I have 3 different material changes
0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Kshitij Dhake commented ·

Maybe I misunderstood your goal. You mention three changeover intervals. Do these add up or are exclusive? Because the 100th item would also be a 50th item, so would be processor be down for 30s or 45s?

You could do this by using the code of the "Nth item" option multiple times. Adding to the setup time each time.

If they are not added together, then instead of adding to the variable (+=) you overwrite its value (0) each time.

When dislaying the state in a chart, the state names are taken from the linked state table which you can edit to your liking. In the attached model I changed the display name of the "Setup" state to "Changeover".

sample-1-autosave-2.fsm

0 Likes 0 ·
Kshitij Dhake avatar image Kshitij Dhake commented ·

Got it. The times would add up. The process will be down for 45s at 50th and 100th. The code makes sense. Would you please be able to explain what is "setupTime += 15" ?

I also thought of using this where I can set interval and time. Will this be a right approach?

Object current = ownerobject(c);
Object item = param(1);
int port = param(2);

/***popup:NthItem*/
/**Different Time for Nth Item*/
int cnt = /**\nN: *//***tag:count*//**/Model.parameters.SetupInterval/**/;
int cnt1 = /**\nN: *//***tag:count*//**/Model.parameters.Parameter1/**/;
if (fmod(getinput(current),cnt) == 0)
  return /**\nTime for Nth item: *//***tag:time_nth*//**/Model.parameters.SetupTime/**/;
if (fmod(getinput(current),cnt1) == 0)
return /**\nTime for Nth item: *//***tag:time_nth*//**/Model.parameters.Parameter2/**/;
else return /**\nTime for all others: *//***tag:time_others*//**/0/**/;

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Kshitij Dhake commented ·

"setuptime += 15" is the same as writing "setuptime = setuptime + 15", it's adding the value 15 to the variable 'setuptime'.

In my example the variable starts at 0. If the item is the 50th, 100th or 200th, the respective value is added.

Your code would currently return only the value for the first condition that is true. If its the "cnt"th item, it returns the parameter "SetupTime", if it's the "cnt1"th item it would return "Parameter2" and otherwise 0.

0 Likes 0 ·
Kshitij Dhake avatar image Kshitij Dhake Felix Möhlmann commented ·

Got it. Thank you

0 Likes 0 ·