I tried to assign a Batch number for each batch. So when this batch is in production, I know this is Batch No.24 ( for example) and next Batch will be No.25. We have two part models -- 50T and 675T, we run one batch then switch to the other model batch. If we run 50T first, then all the batches for 50T are odd numbers (1,3,5,7 ....), and the batches for 675T are even numbers(2,4,6,....).
I used Assembly machine, and container to pull a batch. Then use DismantleStation to deliver MUs to the conveyor.
What is the best way to put Batch Sequence number on each MU?
Solved! Go to Solution.
add an attribute 'BatchNumber' of type integer to your class object of your MUs. At the assembly station you also add a variable of type inter as global batch number. Assign the global batch number to the batch you crreated on the assembly station. As soon as the container leaves the Assembly, increment the global batch number.
Hope this helps.
1. you have differnt userdefined attributes e.g.
batchN and batch_N.
Please correct to batch_N for all MUs
2. Then add a method with the following code to the
entry method of the line object:
I corrected the BatchN and Batch_N. Now it's only BatchN for all MUs. And I added a method at the dismentalStation:
This method was triggered at the Entrance or Exit under Controls. But I got an error message: Unknown: Unidentifier BatchN.
Well, you didn't follow, what I posted you to do.
The (main) MUs entering the dismantle station and exiting to the drain1 do not have the user defined attribute
Only the mus you dismantled from the main MU , which are leaving to the line.
Therefore the method was placed as line entry method.
Now, it's working. I put th e Global Variable: Batch_var:=Batch_var+1 in the DismentalStation, as a user defined method. I followed your direction to put @.BatchN:=Batch_var at the Line method and triggered at the Exit. It works.
Thank you so much.