Hello dear users,
Someone can share with me an example of count method.
Basically, I need a example where the Methoda looks to a display panel and count the numbers of MUs that entrance in a Single Proc, the goal is count 3 MUs and active iten exit Locked of Source.
Is it clear?
it's not clear how the counting relates to a display panel.
You can easily add an entrance control where you count the incoming part and once the amount of 3 is reached you can close the exit of the source.
In general, I need a method to count the number Mus that pass through the process - The display panel was just an idea I had (which judges not be the best)
In general, the methods numMU, statNumIn and statNumOut give you the information you mention. They work for objects like SingleProc, Buffer, etc. NumMU also works for Frames.
Perhaps this is already enough information, though it is not clear what kind of model you want to realize. If you can share some more details we might be able to help you a bit more.
if i understand your question right you want to count till 3 MUs leave your station and then the exit should be locked?
So you can set a global variable (integer) over your station. Then you write a method for the exit-control which count up with every leaving MU the varibale. Then you check if your whished amount is reached and you lock the exit.
is wishedNumber : integer; do wishedNumber := 3; @.move(F2); -- global variable Amount := Amount + 1; if Amount = wishedNumber then ?.ExitLocked := true; end; end;
See the attached model. Hope i understood your question right
follow the example that I intend to develop my scheduling