Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

set variable to 0 using simtalk

Master
Master

Hi,

How to reset the variable value to 0, once the worker does the job?

For ex: I have a method:

  var row:= x
  var col:= 5-y
  if store.pe(row,col).mu /= void
  store.pe(row,col).mu.move
  end

where x and y are variable names. Once a part is picked from the store as per variable number, the variable should automatically set to 0 untill another number is entered . How to reset it to 0 ?

4 REPLIES 4

Re: set variable to 0 using simtalk

Phenom
Phenom

in your if clause, set:

 

x:=0;

y:=0;

Re: set variable to 0 using simtalk

Master
Master

@simulator 

Im getting this errorCapture.JPG

Re: set variable to 0 using simtalk

Legend
Legend

hi @SS3 

 

value of row and column must be greater than 0....

Re: set variable to 0 using simtalk

Phenom
Phenom

The error occurs before 

 

you set x, y.

 

Therefore  has nothing to do with the suggested x,y  setting.

 

As for the error message ( non positive values are not allowed)

 

please verify the row value which probably should be > 0