cancel
Showing results for 
Search instead for 
Did you mean: 

Work center selection in a super routing using procedure

Former Member
0 Kudos

Hi,

I am using a procedure to select the work center in a super routing. However the selection of the work center is not working correctly because the system is selecting always the same machine and the result is an overcapacity.

The procedure that I had implemented is:

Let say we have only two machine and we want two select the first machine that full fit (cover) the requirements.

Machine1: MARTIN 718

Machine2: MARTIN 924

*/ SELECCION DE MAQUINA MARTIN 718

$SELF.WORKCENTER = 'MARTI718' IF ( NUMERO_DE_COLORES > 0 AND NUMERO_DE_COLORES <= 4 ) AND

( WJ2 <= 1800 AND WJ2 >= 360 AND WA <= 635 AND WA >= 190 AND ESTILODECOMPONENTE <> 'T' ) OR ( WJ2 <= 1800 AND ESTILODECOMPONENTE = 'T' )

*/ SELECCION DE MAQUINA MARTIN 924

$SELF.WORKCENTER = 'MARTI924' IF ( NUMERO_DE_COLORES > 0 AND NUMERO_DE_COLORES <= 2 ) AND ( WJ2 <= 2400 AND WJ2 >= 720 AND WA <= 1150 AND WA >= 255 AND ESTILODECOMPONENTE <> 'T' ) OR ( WJ2 <= 2400 AND ESTILODECOMPONENTE = 'T' ).

As you can see there are some limits that are overlapping between the machine. The idea is to stop de procedure when one of the machine full fit one of the requirements.

Does any one knows how to do this.

Regards

Isaias

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

There are certainly not mutually exclusive condition between the two work center. Don't know whether you can revise the condition to be mutually exclusive. Where the conditions applied to both work center, use SET_DEFAULT to select the work center in stead.

Try something like this.

$SET_DEFAULT ( $SELF, WORKCENTER, 'MARTI718'),

$SELF.WORKCENTER = 'MARTI924' IF ( NUMERO_DE_COLORES > 0 AND NUMERO_DE_COLORES <= 2 ) AND ( WJ2 <= 2400 AND WJ2 >= 720 AND WA <= 1150 AND WA >= 255 AND ESTILODECOMPONENTE 'T' ) OR ( WJ2 <= 2400 AND ESTILODECOMPONENTE = 'T' ).

Therefore, for condition that only applied to mart924 then the work center is set. Otherwise work center is marti718 is set.

Not sure whether it suit with your requirement. Please note that there is no statement like return or exit in object dependencies code. Unless we develop function routine and variant function, then we have to find some work around here and there.

Answers (0)