Switch Ouput Channel by material availability
-
- Posts: 7
- Joined: Monday 05 August, 2019 - 17:56
Switch Ouput Channel by material availability
In my model I have two material and two machines.
The first machine processes both materials into one, the second only material 1.
Now I need feedback if material 2 fails the material should be forwarded to the second machine. If material 2 is then available again, then all materials will be returned to machine 1.
Does anyone have an idea?
The first machine processes both materials into one, the second only material 1.
Now I need feedback if material 2 fails the material should be forwarded to the second machine. If material 2 is then available again, then all materials will be returned to machine 1.
Does anyone have an idea?
- Attachments
-
- screenshot.jpg (155.32 KiB) Viewed 25348 times
-
- Posts: 7
- Joined: Monday 05 August, 2019 - 17:56
Re: Switch Ouput Channel by material availability
It is also important that the feedback comes from the warehouse. If no product A is received after a certain time, the output channel should be adjusted.
- HarryBunnik
- Posts: 362
- Joined: Monday 07 February, 2011 - 11:22
Re: Switch Ouput Channel by material availability
Hello jjjermain,
Could you use the cut-off time at the assembler and the content of the 1st product on the "Send To" statement? So then the Assembler is doing the sorting, instead of the queue in front of the assembler.
Success,
Harry
Could you use the cut-off time at the assembler and the content of the 1st product on the "Send To" statement? So then the Assembler is doing the sorting, instead of the queue in front of the assembler.
Success,
Harry
-
- Posts: 7
- Joined: Monday 05 August, 2019 - 17:56
Re: Switch Ouput Channel by material availability
Hi Harry, thank you.HarryBunnik wrote: ↑Tuesday 06 August, 2019 - 08:52 Hello jjjermain,
Could you use the cut-off time at the assembler and the content of the 1st product on the "Send To" statement? So then the Assembler is doing the sorting, instead of the queue in front of the assembler.
Success,
Harry
I understand. But I need a Feedback from storage 1 to the Output channels, If no product A is received after a certain time, the output channel should be adjusted? For a self-organisation process.
- HarryBunnik
- Posts: 362
- Joined: Monday 07 February, 2011 - 11:22
Re: Switch Ouput Channel by material availability
Ha jjjermain,
At the moment it is not entirely clear to me.
Regards,
Harry
At the moment it is not entirely clear to me.
- Do you really need to send the material 1 to machine 2, when material 2 is too late, or can this also be done from machine 1 by only sending an empty material further?
- So you would like to block material 1 before entering machine 1. If material 2 arrives within, lets say, 10 seconds, you want to send both to the machine 1. If not, you want to send material 1 to machine 2.
- Does the next arrival of material 1 also waits again 10 seconds, or is it then going on production speed to machine 2, as long as no material 2 arrives?
Regards,
Harry
-
- Posts: 7
- Joined: Monday 05 August, 2019 - 17:56
Re: Switch Ouput Channel by material availability
Hi, Harry,HarryBunnik wrote: ↑Wednesday 07 August, 2019 - 10:01 Ha jjjermain,
At the moment it is not entirely clear to me.
- Do you really need to send the material 1 to machine 2, when material 2 is too late, or can this also be done from machine 1 by only sending an empty material further?
- So you would like to block material 1 before entering machine 1. If material 2 arrives within, lets say, 10 seconds, you want to send both to the machine 1. If not, you want to send material 1 to machine 2.
These options are changing the approach how to solve this problem, so I'm curious what you have in mind.
- Does the next arrival of material 1 also waits again 10 seconds, or is it then going on production speed to machine 2, as long as no material 2 arrives?
Regards,
Harry
thank you for your quick answer.
In this production the focus is on creating product A (requires material 1 and 2). If material 2 fails, then the production should be switched to product B. If then material 2 is available again, then product A should be manufactured again.
Because this is a self-organizing model, I need a feedback loop. This should best come from stock 1 product A. So to speak, if after a certain time no product A arrives in stock, then the production should be switched to product 2.
I am also not sure if I used the right atoms.
Translated with www.DeepL.com/Translator
- HarryBunnik
- Posts: 362
- Joined: Monday 07 February, 2011 - 11:22
Re: Switch Ouput Channel by material availability
Ha jjjermain,
OK, then I understand the problem. In which version of ED are you making your model? Then I can create an example in the same version.
I'm thinking of using an Event-atom. When a material 1 is entering the queue, I close the exit of that queue (CloseOutput(c) on the Entry trigger of the Queue) and only open it when there is a material 2 available (on the Entry trigger there), or when the Event (scheduled for a certain waiting time) is going off and the related material 1 is still in the queue. In that case the material 1 is sent to machine 2.
Regards,
Harry
OK, then I understand the problem. In which version of ED are you making your model? Then I can create an example in the same version.
I'm thinking of using an Event-atom. When a material 1 is entering the queue, I close the exit of that queue (CloseOutput(c) on the Entry trigger of the Queue) and only open it when there is a material 2 available (on the Entry trigger there), or when the Event (scheduled for a certain waiting time) is going off and the related material 1 is still in the queue. In that case the material 1 is sent to machine 2.
Regards,
Harry
-
- Posts: 7
- Joined: Monday 05 August, 2019 - 17:56
Re: Switch Ouput Channel by material availability
Hi, Harry,HarryBunnik wrote: ↑Wednesday 07 August, 2019 - 16:27 Ha jjjermain,
OK, then I understand the problem. In which version of ED are you making your model? Then I can create an example in the same version.
I'm thinking of using an Event-atom. When a material 1 is entering the queue, I close the exit of that queue (CloseOutput(c) on the Entry trigger of the Queue) and only open it when there is a material 2 available (on the Entry trigger there), or when the Event (scheduled for a certain waiting time) is going off and the related material 1 is still in the queue. In that case the material 1 is sent to machine 2.
Regards,
Harry
thank you, that would be outstanding.
Version: Enterprise Dynamics 10 Stunden (64-bit) - 10.0.0.2013
- HarryBunnik
- Posts: 362
- Joined: Monday 07 February, 2011 - 11:22
Re: Switch Ouput Channel by material availability
Ha jjjermain,
This is actually quite tricky, since you want to already sort it out before the actual machines based on time. As a result there is some description involved to explain what I did:
1) When a Material 1 (M1) arrives in the queue there are a few things happening:
- I now always create an event that I've defined on the User Events atom with the name "StartCutOff".
This event will check after a certain time (defined as a variable on the initialize atom named "valMaxWaitingTime" with a value of 20 sec).
You can of course adjust this to the value you want. I've made it a global variable, so that there is one central point where I can update this.
- If the content of the second queue doesn't contain an already waiting Material 2 (M2), I close the M1-queue.
- I register this M1 in a table. That allows me to check within the event if this is also the M1 that triggered the current event.
2) When a M2 arrives at the Queue_M2:
- I set the output channel of Queue_M1 to 1 (machine 1) and open the output of Queue_M1.
3) When a M1 is leaving the Queue_M1
- I close the output of Queue_M1 again (this to prevent Machine1 of already receiving the next M1, although there is no M2 available, which would be the normal behavior).
- I unregister this M1 from the table. That way the event is still going off, but can't find it's related M1 in the table and realizes it is already processed, so no action is needed.
Note that the SendTo statement on the Queue is using a label named "OutgoingChannel" which is defining which Exit Channel needs to be taken.
4) When no M2 is arriving within the set waiting time, the event is going off.
- A check is made if the first M1 in the queue (when one there) is also the first line in the administration table. When that is the case, it was waiting for the maximum time and need to be sent to Machine2.
- Again, when the M1 leaves the Queue_M1, this queue is closed.
5) When the processed M1 leaves Machine1:
- a check is done if there is a product waiting for longer than the maximum time.
If so, then its event was already triggered but there was no option to sent it on. So it is still waiting there a should be sent to Machine2.
If there is one waiting for less than the maximum waiting time, it should wait a bit longer until the scheduled Event is triggered and opens the Queue_M1 (or a M2 arrives).
In the initialize atom there are some labels set back to their original value on reset. Also, some global variable are declared here to make the coding a bit easier to read.
I hope it's all clear, but I think that together with the example model you'll figure it out.
And, of course, I hope the model is doing what you have in mind
.
Success with your project,
Harry
This is actually quite tricky, since you want to already sort it out before the actual machines based on time. As a result there is some description involved to explain what I did:
1) When a Material 1 (M1) arrives in the queue there are a few things happening:
- I now always create an event that I've defined on the User Events atom with the name "StartCutOff".
This event will check after a certain time (defined as a variable on the initialize atom named "valMaxWaitingTime" with a value of 20 sec).
You can of course adjust this to the value you want. I've made it a global variable, so that there is one central point where I can update this.
- If the content of the second queue doesn't contain an already waiting Material 2 (M2), I close the M1-queue.
- I register this M1 in a table. That allows me to check within the event if this is also the M1 that triggered the current event.
2) When a M2 arrives at the Queue_M2:
- I set the output channel of Queue_M1 to 1 (machine 1) and open the output of Queue_M1.
3) When a M1 is leaving the Queue_M1
- I close the output of Queue_M1 again (this to prevent Machine1 of already receiving the next M1, although there is no M2 available, which would be the normal behavior).
- I unregister this M1 from the table. That way the event is still going off, but can't find it's related M1 in the table and realizes it is already processed, so no action is needed.
Note that the SendTo statement on the Queue is using a label named "OutgoingChannel" which is defining which Exit Channel needs to be taken.
4) When no M2 is arriving within the set waiting time, the event is going off.
- A check is made if the first M1 in the queue (when one there) is also the first line in the administration table. When that is the case, it was waiting for the maximum time and need to be sent to Machine2.
- Again, when the M1 leaves the Queue_M1, this queue is closed.
5) When the processed M1 leaves Machine1:
- a check is done if there is a product waiting for longer than the maximum time.
If so, then its event was already triggered but there was no option to sent it on. So it is still waiting there a should be sent to Machine2.
If there is one waiting for less than the maximum waiting time, it should wait a bit longer until the scheduled Event is triggered and opens the Queue_M1 (or a M2 arrives).
In the initialize atom there are some labels set back to their original value on reset. Also, some global variable are declared here to make the coding a bit easier to read.
I hope it's all clear, but I think that together with the example model you'll figure it out.
And, of course, I hope the model is doing what you have in mind
![Wink ;-)](./images/smilies/icon_e_wink.gif)
Success with your project,
Harry
-
- Posts: 7
- Joined: Monday 05 August, 2019 - 17:56
Re: Switch Ouput Channel by material availability
Hi, Harry,HarryBunnik wrote: ↑Thursday 08 August, 2019 - 16:17 Ha jjjermain,
This is actually quite tricky, since you want to already sort it out before the actual machines based on time. As a result there is some description involved to explain what I did:
1) When a Material 1 (M1) arrives in the queue there are a few things happening:
- I now always create an event that I've defined on the User Events atom with the name "StartCutOff".
This event will check after a certain time (defined as a variable on the initialize atom named "valMaxWaitingTime" with a value of 20 sec).
You can of course adjust this to the value you want. I've made it a global variable, so that there is one central point where I can update this.
- If the content of the second queue doesn't contain an already waiting Material 2 (M2), I close the M1-queue.
- I register this M1 in a table. That allows me to check within the event if this is also the M1 that triggered the current event.
2) When a M2 arrives at the Queue_M2:
- I set the output channel of Queue_M1 to 1 (machine 1) and open the output of Queue_M1.
3) When a M1 is leaving the Queue_M1
- I close the output of Queue_M1 again (this to prevent Machine1 of already receiving the next M1, although there is no M2 available, which would be the normal behavior).
- I unregister this M1 from the table. That way the event is still going off, but can't find it's related M1 in the table and realizes it is already processed, so no action is needed.
Note that the SendTo statement on the Queue is using a label named "OutgoingChannel" which is defining which Exit Channel needs to be taken.
4) When no M2 is arriving within the set waiting time, the event is going off.
- A check is made if the first M1 in the queue (when one there) is also the first line in the administration table. When that is the case, it was waiting for the maximum time and need to be sent to Machine2.
- Again, when the M1 leaves the Queue_M1, this queue is closed.
5) When the processed M1 leaves Machine1:
- a check is done if there is a product waiting for longer than the maximum time.
If so, then its event was already triggered but there was no option to sent it on. So it is still waiting there a should be sent to Machine2.
If there is one waiting for less than the maximum waiting time, it should wait a bit longer until the scheduled Event is triggered and opens the Queue_M1 (or a M2 arrives).
In the initialize atom there are some labels set back to their original value on reset. Also, some global variable are declared here to make the coding a bit easier to read.
I hope it's all clear, but I think that together with the example model you'll figure it out.
07-08-2019 Community ED 10.0.mod
And, of course, I hope the model is doing what you have in mind.
Success with your project,
Harry
thank you very much for the model! Thanks also for the great explanation.
Actually I still have a problem and the requirements have changed a bit. The initial situation remains the same, but now, if material 2 fails, machine 1 should behave like machine 2 and process the material in machine 1 just like machine 2.
Maybe you can help me again?
![Smile :)](./images/smilies/icon_e_smile.gif)