Cancel
Showing results for 
Search instead for 
Did you mean: 

Need Help on Simple Stock Removal Problem

Experimenter
Experimenter

Hi guys,

 

I am very new to plant simulation and taking baby step to learn using it.

 

I try to execute simple stock removal problem from from one book, but it is not run as expected. The code errors keep coming out. I attached files for references.

 

is
do
if store. numMU = 99 then
store.deleteMovables;
end;
end

 

3 REPLIES

Re: Need Help on Simple Stock Removal Problem

Valued Contributor
Valued Contributor

Hi,shaa

 

Your version is 14.0,it's very high,sorry,I cannot open it .

Re: Need Help on Simple Stock Removal Problem

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

Hello Shaa,

You are currently building your code in Simtalk 2.0, so a lot of your code is not necessary; there is a syntax error however, you cannot have a space between store. and numMU. Check the help documentation for the difference between the two different syntaxes. In this case, you can simply suffice with the following code.

 

if store.numMU = 99
store.deletemovables
end

Additionally I saw that you have the entrance control on 'before actions'. This means that you will check on the 100th MU coming in, to delete the rest of the MU's. Just an observation. If you want the 99th to be the trigger, you have to turn this off. 

 

Best regards,

 

Nick Peeters
Simulation Consultant
www.cardsplmsolutions.com

Re: Need Help on Simple Stock Removal Problem

Experimenter
Experimenter

Tq very much nick. You solve my problem.