Cancel
Showing results for 
Search instead for 
Did you mean: 

Addressing Mu's

Builder
Builder

Hello everyone,

 

I have 3 same Mu's in a store but i want to move only one of it. how can i address that only one Mu should move to successor.

i wrote the following program

is
i:integer;
k:integer;
do
for i:=1 to store.Xdim loop
for k:=1 to store.ydim loop
if store.pe(i,k).cont /= void and store.pe(i,k).cont.name = "Variant_A" then
Store.pe(i,k).cont.move(drain);
end;
next;
next;
end;

 

With this program all the 3 Mus are moving

Could anyone help me please

 

thank you

 

regards

 

10 REPLIES

Re: Addressing Mu's

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Like this?

Store.MU(1).move

 


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com

Re: Addressing Mu's

Builder
Builder

yes but how can i write it in my program above?

 

In the store ia have 3 Mu's with the same name Variant_A, but i want to move only one of them

Thank you very much

Re: Addressing Mu's

Siemens Phenom Siemens Phenom
Siemens Phenom

You write it exactly like Gert Nomden told you:

Store.MU(1).move(Drain);

 

If you want to move a specific type of part, and if you have version 12.1 or newer, you can write it like this:

Store.findPart("Variant_A").move(Drain);

 

You should check though if there is a part (or specific type of part) by comparing the result with void. In SimTalk 2.0 the code looks like this:

var part : object := Store.findPart("Variant_A")
if part /= void
    part.move(Drain)
end

 

If you have version 12 or older, you can use your program. You just to need to add one line behind the move statement. That line is:

return;

_________________________________________________________________
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Re: Addressing Mu's

Builder
Builder

Thank you Michael

But i wrote the program in following format.

is
i:integer;
k:integer;
do
for i:=1 to store.Xdim loop
for k:=1 to store.ydim loop
if store.pe(i,k).cont /=void and Store.pe(i,k).cont.name="Variant_A" then
store.pe(i,k).cont.move(drain);
end;
next;
next;
end;

 

I couldn't able to use MU as it is showing unknown identifier.

Is there anyway by changing the above program i could fix it

 

best regards

Re: Addressing Mu's

Siemens Phenom Siemens Phenom
Siemens Phenom

Like I said: You just need to add "return;" behind the move.

_________________________________________________________________
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Re: Addressing Mu's

Builder
Builder

Thank you very much

Now also all the 3 parts which have name variant_A are moving. But i want to move only one part out of 3.

 

Actually my store receives 3 parts of Variant_A and i want to move only one part and remaining should stay in the store.

 

Best regards 

Re: Addressing Mu's

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Hi gopi,

You need both the return statement to be in place (to end the loop as soon as it found a correct part) AND trigger the method once. If you apply this logic in an entrance control, every item will be moved.

 


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com

Re: Addressing Mu's

Builder
Builder

Hi Nomden

 

Could you please have a look at my model once. i couldn't able to fix it.

 

the method is next to the store.

thank you very much

 

best regards

Re: Addressing Mu's

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

...cont.move(Drain);

return;

 

Your return is placed before the move comman. It should be after, otherwise you exit the method befor the move is done.


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com