cancel
Showing results for 
Search instead for 
Did you mean: 

Help with Conditional programming for distribution

Experimenter
Experimenter

15032600_10154547161626708_875050162_n.png15050072_10154547157076708_1655829776_n.pngHello!

I'm currently working on a project where I'm stuck. We are trying to make a program that distributes our entities from one buffer into three different buffers depending on their names.

 

Is there any way we could simplify this or fix the code so it actually distributes the way we want to. We're not very used to programming in Plant Simulation 13 which makes thing a bit hard.

 

Thanks in advance!

6 REPLIES

Re: Help with Conditional programming for distribution

Experimenter
Experimenter

Forgot to add the last relevant picture.15052022_10154547154821708_612671567_o.png

Re: Help with Conditional programming for distribution

Experimenter
Experimenter

Might as well add the spp

Re: Help with Conditional programming for distribution

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

For this you can use the exit strategy MU Attribute (tab Exit of the material flow objects). No programming needed...


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com

Re: Help with Conditional programming for distribution

Experimenter
Experimenter

We've tried that but didn't get it to work. What is our settings supposed to be? Our attributes are AA, BB and CC, but they're all moved to the same buffer anyway. We aren't really sure what to fill in the value column in the exit strategy list either.

Re: Help with Conditional programming for distribution

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello HelpHelp,

You're method is almost right. Just remove the 'cont' because '@' is already referring to the MU:

if 	@.name = "AA" 
	@.move(BufferAA)
elseif @.name = "BB"
	@.move(BufferBB) 
else 
	@.move(BufferCC)
end
Regards,

Ralf

Re: Help with Conditional programming for distribution

Siemens Phenom Siemens Phenom
Siemens Phenom

Here you can see how to configure the exit strategy to solve the problem without coding:

 

ExitStrategy.png

 

 

Regards,

Ralf