Count items at process node

I currently have a process node layout as such, how do i count the number of items passing through or exiting out of the process node?

image

You can add a “Conveyor Sensor” to the convyeor. This will count them and do other things.
You can also create a variable like “myProductCount” inside the process node and you can have the logic “Assign myProductCount = myProductCount + 1”

do i create the variable under unload item process node? my current process steps are as above, where do i assign this logic? (eg. in between which steps) also with the created variable how do i display it in statistics or kanban

Hi,

What you can do is click on the process node in which you want to count the products.
Then go to the modeling tab, click properties, and then click integer:


Give it some naming, i.e. ‘externalCounter’, and then in your process node you can add your counter behaviour:
image
(The first line ensures that the value is reset when you start the simulation)

Of course which process node, and in which line you place the ‘externalCounter + 1’ line all depends on what you want to measure

Now you can use that property to display the value, for example with the statistics display:

See attached example file:
Counter display statistics.vcmx (51.9 KB)

hi jesper, i am using visual components essentials which does not seem to have a modelling tab

Hi,

In this case you could actually create a very similar system, but with process variables instead. First, go to the process executor and click the routine name to access routine properties:

Then you can generate a process variable (exists only inside this one specific process, in this executor) and pick a logical type (REAL or INTEGER both work)

Then you can generate following statement:
image

Note that this process variable does not need to be zeroed, it will init as zero every time you reset the simulation.

Other ways of doing it would be to use statistics directly

br,
lefa

1 Like

Hi lefa after doing this , how do i show the count in statistics ?

Hi,

That variable exists only within the executor and can be difficult to log, what jesper suggested could be logged.

Luckily, there is a native way of doing this directly via statistics.

Click open statistics and select a layout panel (1x1 is fine) and then click on the node and production rate

Then swap the production rate to simulation run from last interval. You can also change the polling time

br,
lefa