question

Julian Valdes avatar image
2 Likes"
Julian Valdes asked Herwina Richelle Andres commented

CNC Machine and Tool Changes

Using the concepts from this question, I'm still not clear how FlexSim would manage something like CNC machines tool changes:

One CNC has up to 12 cutting tools, each tool has a specific tool life and tool change time (setup time):

Example :

Processor stops every:

150 (for 3 min)

450 (for 5 min)

1000 (for 12 min)

1750 (for 4 min) processed parts.

Etc.....

FlexSim 16.0.1
process flowmtbf mttrbreakdownscheduled down
· 2
5 |100000

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

Jeff Nordgren avatar image
2 Likes"
Jeff Nordgren answered Jeff Nordgren commented

In this model I modified the Process Flow of the model from this answer to do the four breakdowns as you requested. Because you didn't state differently, if there is a break for the 150th item, which also happens to be the 450th item, it will do both breaks. The same goes for all the breaks. In other words, it will do all the breaks based on the number of processed flowitems by the processor, if that includes all the breaks, then all of them will be done. I've attached is what the Process Flow looks like.

If you have any questions or problems, please ask.


· 2
5 |100000

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

Joerg Vogel avatar image
2 Likes"
Joerg Vogel answered Herwina Richelle Andres commented

I think the classic approach fits, too. The starting point is the answer of @Brenton King in this answer. In the source code editor get rid of the picklist description tags by pressing the icon, bottom left showing all together a hand, text picture and a red mark. Then you find in the if-condition the variable "cnt". That is the n-th item you want set a different setup time for. You can replace the variable with the number. The return value is the setup time for this item.

you can copy the two code lines of the if-statement and the return for each different n-th item you want to set a different setup time. In following code I have commented those lines and write "simple :" before the return. Uncomment them if you like the simple approach. Delete the next line starting with the variable setuptime then, too.

The unchanged code itself combines the different setup time values, if more than one condition becomes true. The last condition tests if the initial setup time variable value is changed. Then this value is returned as the setup time. Otherwise the setup time return value is zero. The command minutes(num value) returns the value in simulation time units - typically in seconds.

  1. double setuptime = 0;
  2.  
  3. //int cnt = 300;
  4. if (fmod(getinput(current),150) == 0)
  5.  
  6. // simple: return minutes(3);
  7.  
  8. setuptime += minutes(3);
  9.  
  10. if (fmod(getinput(current),450) == 0)
  11.  
  12. // simple: return minutes(5);
  13.  
  14. setuptime += minutes(5);
  15.  
  16. if (fmod(getinput(current),1000) == 0)
  17.  
  18. // simple: return minutes(12);
  19.  
  20. setuptime += minutes(12);
  21.  
  22. if (fmod(getinput(current),1750) == 0)
  23.  
  24. // simple: return minutes(4);
  25.  
  26. setuptime += minutes(4);
  27.  
  28. if(setuptime)
  29.  
  30. return setuptime;
  31. else return 0;
· 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.