Cancel
Showing results for 
Search instead for 
Did you mean: 

when I change a table I receive an error message.

Experimenter
Experimenter

Hello

I'm new here.

I started working with Plant simulation recently.

I´d like to receive help from here, please.

 

I'm traing to create a simulation with two input. A plate and six screws. and I have a variable that control the quantity of screws and then I calculate the number of plates for that. But the last plate may not contain 6 screws. So I created a method to resolve it. That was my intention. But the last plate change the assemblytable of the assembly object. Command '@. move' does not perform because the Mu = void after change the assemblytable.

How could I fix this?

Could you help me please.

Thanks a lot.

 

My Method:

 

is
    assyList : table[string,integer];
    r,t : integer;

do

    r:= (OP // 6);   -- OP is the variable control the screw quantity
    t:= (OP - (r * 6));

 

    assyList.create;
    assyList.writeRow(1,1, "2",6);
    .Models.Entrance_1.Ass_IN.AssemblyList := assyList;

 

    IF .Models.Entrance_1.screwsource.StatNumOut >= OP then

        assyList.create;
        assyList.writeRow(1,1, "2",t);
        .Models.Entrance_1.Ass_IN.AssemblyList := assyList;

    end;

    @.move;

end;

 

error message is:  A 'void' cannot accept the method 'move'.

 

2 REPLIES

Re: when I change a table I receive an error message.

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Alefazani,

If you just want to prevent the error, you can wrap the move statement in an if condition:

if @ /= void then
    @.move;
end;

 

Regards,

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

Re: when I change a table I receive an error message.

Experimenter
Experimenter

Thanks a lot.