Count and send signals?

Hey everyone, I was wondering if there is a way to count a number of products to a set number and everytime the number of products is correct it sends a signal to the next node to trigger the process and repeat this until operation is complete?

1 Like

You can add a interger variable in the rouine properties.

grafik

The logic in process node can look like this:

grafik

Think I have done something incorrect @anhu Getting an error message

Did you add this variable in routine properties?

As comparison operators in your if condition use “==” not “=”: This means in your case “Counter == 24”

To count: first assign-Statement :

@anhu That worked i think need to make changes to the next process node, thank you for the assistance

Fixed what went wrong however, now my simulation gets stuck and does not move to the next process, any suggestions?

Hi,

You seem to have if(Counter = 24) instead of if(Counter == 24)
One attempts to assign while the other checks for equality and returns a boolean.

It also looks like anhu pointed that out, could you send out some pictures of those statements or the vcmx?

BR,
Lefa

Hi @Lefa, This all you need,


image
image

Hi,

This actually starts to look a tad more complex than I initially thought. When you run the simulation and have those process executors open, you should be able to see a green circle on the right hand side of those statements which denotes what statement is currently being executed. Can you check on where this stops? Based on your pictures the AssemblyBrush stops at TransportOut. What does your output panel say? Do you have any errors there? Are the source/destination set up properly in transport ins and outs?

This starts to derail slightly away from count and send signals, so let’s gather up some info what could possibly be an issue, then I would recommend starting a new thread.

BR,
Lefa

Hi, the simulation stops on the transport Out in the assembly process executor tab, I stopped it as soon as it stopped. It appears to make 25 products and stops working, doesn’t appear to be triggering the next process.

Hi,

Initially it looks like you’re setting BrushPackaging::H to True but the process is waiting for Assembly::H to be 24. One is “type of” boolean while the other is “type of” integer. How are these two signals connected to each other?, rather how do they know of each others existence?

Would the layout work if you removed the wait signal statement?

BR,
Lefa

Removing the wait signal runs the simulation, how the operator just continues to “work” at the brushpacking process node and ignores all commands. Throws up a bunch of errors.

Hey,

In a sense thats… almost good to hear. In this case even if the wait signal would “pass through” as intended, we would still most likely hit the same errors. Can you swap places with TransportIn and the first getAssembly in the Brushpackage (random tests)? I’d assume the error is somewhere in the brush packaging.

We could also look to create a new thread explaining the issue more thoroughly as this is not exactly count and send signals anymore.

BR,
Lefa

Tested the theory, with and without the wait Signal, with the wait signal same issue as before without the wait signal operator brings in the boxes that are used for pack until the components enter the process node to start the building/packing processes. He lifts a box and build the product and repeats, however he has started to pack the brushes into the boxes which is a new development.