Transport several products to server ''Groups''

All topics on coding 4Dscript in Enterprise Dynamics.
Post Reply
woutschot
Posts: 6
Joined: Tuesday 20 August, 2013 - 17:41

Transport several products to server ''Groups''

Post by woutschot »

Hello,

I'm trying to route 6 different products to 3 different groups of servers.
When the transporter picks up a product is has to check its label value. The label value correspond to a group of servers where the product can be placed.
See the model I've attached for more information about the layout.
0323 WM-Droogzolder.mod
(166.14 KiB) Downloaded 366 times
For example:
server DR7 to DR16 is group 1 (of servers).
server DR23 to DR30 is group 2 (of servers).
server DR2 to DR6 is not active yet...

When the label value of label ''Prodtype'' is <= 3 then the product must go to group 1.
When the label value of label ''Prodtype'' is >=4 then the product must go to group 2.

Whit in the group of servers the transporter (RB4) may fill round-robin style.

Does anyone have an idea how i should achieve this in 4D-script.
I really hope somebody can help me!!

Best regards,
Wout
marlies
Posts: 301
Joined: Monday 17 January, 2011 - 09:28

Re: Transport several products to server ''Groups''

Post by marlies »

Hi Wout,

It is possible to reuse the standard code of the round robin sendto statement. But instead of looping over all output channels, the code should check only part of the outputchannels depending on the producttype.

The standard code uses the label [t-rr] to keep track of the last channel used. I used this label for the group 1 products. For the products in group 2 I introduced an extra label named [t-rr2].

You'll find the changes in the attached model. I changed the sendto statement of the transporter and I added an extra atom: the intitialize atom. This atom resets the round robin labels to its start values.

Regards,

Marlies
Attachments
0323 WM-Droogzolder_edit.mod
(179.47 KiB) Downloaded 350 times
woutschot
Posts: 6
Joined: Tuesday 20 August, 2013 - 17:41

Re: Transport several products to server ''Groups''

Post by woutschot »

Hi Marlies,

Thank you so much for your reply and time for adjusting my model. This really helps me allot!
It is a really important part of the operational flow.
I hope to be able to continue a bit further now. Again thanks allot!!
Regards.
Wout
woutschot
Posts: 6
Joined: Tuesday 20 August, 2013 - 17:41

Re: Transport several products to server ''Groups''

Post by woutschot »

Hi Marlies,

It Appears that the transporter ''RB4'' is triggered to pick up a product at conveyor ''BC8'' although the product is mentioned for transporter ''RB3''. If this happens then the transporter ''RB4'' waits until a product on conveyor BC8 needs to go to RB4. Then RB4 picks the routine back up although the other conveyors cannot unload in the time RB4 is waiting.

I hope you understand the question and be able to help me. To be sure I have attached me model in this reply.

Best Regards,
Wout
Attachments
0323 WM-Droogzolder_edit.mod
(171.35 KiB) Downloaded 280 times
marlies
Posts: 301
Joined: Monday 17 January, 2011 - 09:28

Re: Transport several products to server ''Groups''

Post by marlies »

Hi Wout,

What is happening is that the conveyor opens all it's output channels (internal code) and that will trigger all the connected transporters to drive to the pickup location (although only one should pickup the product as you describe..).

The transporter atom is good for modelling simple transport movements from A -> B. As your model is getting more complex, especially because of the fact that there has to be a rule that divides tasks over multiple transporter, I would advice to use the Advanced Transporter atom for the upper part of your model.

The advanced transporter needs to be used in combination with the dispatcher (will decide which transporter will pickup which product and will also prevent that all of them get triggered) and in combination with the destinator.

See attached for a small example on how to use the advanced transporter.

Regards, Marlies
Attachments
ExampleTransporters.mod
(33.95 KiB) Downloaded 392 times
woutschot
Posts: 6
Joined: Tuesday 20 August, 2013 - 17:41

Re: Transport several products to server ''Groups''

Post by woutschot »

Hi Marlies,

Thanks for your reply. I will take a look at these (for me) new atoms. Maybe I need your help later.
For now I'll try to rebuild the model with the advanced transporter atoms.

Regards,
Wout
woutschot
Posts: 6
Joined: Tuesday 20 August, 2013 - 17:41

Re: Transport several products to server ''Groups''

Post by woutschot »

Hi Marlies,

I have rebuild the upper part of my model with two advanced transporters, including an dispatcher and a destinator.
The advanced transporter (RB4) sometimes try's to place a product on a position which isn't available. Although other servers or conveyors are free to receive products. The same happens sometimes with RB3.

The problem I'd had before (last post) is still a problem:
''It Appears that the transporter ''RB4'' is triggered to pick up a product at conveyor ''BC8'' although the product is mentioned for transporter ''RB3''. If this happens then the transporter ''RB4'' waits until a product on conveyor BC8 needs to go to RB4. Then RB4 picks the routine back up although the other conveyors cannot unload in the time RB4 is waiting.''

Am I using the advanced transporters correctly or are there other ways of dividing the tasks over multiple transporters?

I really hope you can help me out!
I have attached an adjusted model in this reply.

Best regards,
Wout
Attachments
0323 WM-Droogzolder_Adv_Transp.mod
(180.49 KiB) Downloaded 271 times
marlies
Posts: 301
Joined: Monday 17 January, 2011 - 09:28

Re: Transport several products to server ''Groups''

Post by marlies »

Hi Wout,

To start with your 2nd question: RB4 is picking products from BC8 when they have label producttype = 7. So, this is correct according to your dispatchto statement. If this shouldn't happen, there must be something wrong in the model either the wrong pruducts are send to the BC8 conveyor or your dispatchto statement needs to be changed.

Then your first question.
- There is an error in the sendto statement of the advanced transporter (it's a but in the standard code actually). The check shouldn't be:

Code: Select all

ocready(label([t_rr],c),c) 
but

Code: Select all

ocready(label([t_rr],c),out(1,c))
. As the output channel of the destinator (out(1,c)) should be ready and not the oc of the advanced transporter (which is c).
- The RB4 is indeed driving to servers that are already busy. This is logical because the round robin checks the availability of the channel connection from destinator to conveyor. If the conveyor is occupied it will increase the round robin label. As the products are in the servers, the conveyor is available, so products can be sent there. To change this you could do the following:
On entry of the conveyor close the input, reopen the input on exit of the server (implemented in the attached example.
This will prevent that pallets will be left on a conveyor. I can imagine that you want to use the conveyors when all servers are occupied, in that case you'll need to extend the sendto statement with a check on the content of the server instead of using the closeinput/openinput.

Regards, Marlies
Attachments
0323 WM-Droogzolder_Adv_Transp_edit.mod
(191.09 KiB) Downloaded 261 times
woutschot
Posts: 6
Joined: Tuesday 20 August, 2013 - 17:41

Re: Transport several products to server ''Groups''

Post by woutschot »

Hi Marlies,

Thanks allot for your reply.
The problem i still can't resolve is that RB4 isn't picking a product from BC9 OR BC24 when RB3 is blocked and BC8 wants to unload. The process continuous when RB3 is available again.
I have a print screen attached which shows the situation.
RB4 is available, RB3 is busy. BC8,9 and 24 want to unload. The product destination of BC9 and BC24 are available. I've marked them with blue and green.
Only RB4 isn't picking any products from these conveyors. Only when RB3 is available again RB4 comes back to action.
I hope you understand my problem.
Best regards,
Wout
Attachments
Printscreen Problem
Printscreen Problem
Printscreen Problem.jpg (601.84 KiB) Viewed 8957 times
marlies
Posts: 301
Joined: Monday 17 January, 2011 - 09:28

Re: Transport several products to server ''Groups''

Post by marlies »

Hi Wout,

Yes, now I see what you mean.

You can fix that by changing the dispatchto statement in the dispatcher from something like this:

Code: Select all

if(
 label([Prodtype],in(3,cs))<3,
 2,
 1
)
Into something like this:

Code: Select all

if(
 label([Prodtype],in(3,cs))<3,
 if(ocready(2,c), 2,0),
 if(ocready(1,c), 1,0)
)
The point is that the dispatchto statement should result in 0 when the transporter is not available. The transporter is not available when the outputchannel from dispatcher to transporter is not ready (that's what ocready checks). So if the results is 0 (false), the statement should also return 0 instead of the channel nr.

Regards, Marlies
Post Reply