Switch ComponentContainer in TransportNode

Hy,

how is it possible to switch a ComponentContainer in an TransportNode during Simulation?

The ComponentContainer is in the correct link and each link has a frame for define the position of the Container!

Different TransportIn’s in the Process adresses on of the PositionFrames of the Container… → The problem is that the products are always in the Container of the TransportNode which just can adress one ComponentContainer! :frowning:

I hope there exist a clean solution for assign an incoming product to correct container??

image

Thx & Regards
Feature

No, you can’t have different containers nor should you change the container associated to the transport node during simulation.

Why would you want to have the products in different containers, are you trying to move them independently during the process using that servo controller?

You can try using TransportOut to a container to move your products from some “input” container to something else. Trying to do TransportOut again after that might not work, though.

You could also have multiple executors and transport nodes, at which point it probably becomes easier to just use multiple “Process Node” type components instead of a single component.

Hy,

yes thats exactly I want to do!

Your advice using TransportOut destroys the product… :frowning:

It would be perfect if Frame given in ProductPosition uses the connected ComponentContainer but unfortunately it doesn’t…

I want to develop a clean PM-solution for us but I’m stuck with this! → I have a lot of processes where this would be the cleanest solution…

Other advices are welcome! :slight_smile:

Regards
Feature

I wonder if you can use a Python script to attach a component to a vcNode without moving it to a different container.
If that is possible, you could have a script react to arriving products by listening on the vcTransportNode’s events and attach them to your servo-controlled links.

I tested both of my ideas but in the end they don’t work.

Using TransportOut to move the product to another container works if you have 2 containers with the output port of first connected to the second and the TransportOut to the first one. This is because TransportOut to container doesn’t actually put it into the container, but looks for a connected output port and then puts the product through that output connection of the target container.
However, this approach fails when trying to move the product out from the process, the TransportOut gets confused even if I move the product back to the transport node’s container using this method first. If you TransportOut to e.g. a Sink process, you get “Product was destroyed” and “Matched Need was destroyed” errors once the sink deletes the product.

I think the TransportOut to next process not working if you have taken the product out of the node’s container and later put it back before the TransportOut could be considered a bug worth reporting to VC support.

The other approach of using vcNode.attach() to attach product to a link doesn’t work because it also takes the product out of the transport node’s container. Seems that there is no way in Python API to attach without changing container as well.

Here is my testing layout
Process node with link test.vcmx (2.0 MB)

Hy,

that’s bad news… → I wonder if I’m the first wanna do this because there are a lot of cases for PM-Components where this is essential!

Hopefully VC implement some clean thing for this in future release…

Maybe another idea to hack it? :wink:

Thx & Regards
Feature

Hi there,

Have you tried to make a Script, that gets a Handler for each ComponentContainer, a Handler for the TransportNode, and then, with the OnProductArriving Event, call a function that sets TransportNode.ComponentContainer with the ComponentContainer that you want?

Hy,

not now but I will try your recommendation after my vacation! :smiley:

Thx & Regards
Feature

Hy @Urwik74 ,

I tried different things based on your advice but I can’t find a way.

Attached is the little testlayout… → Maybe you can find the missing link?

DEMO_PM_Produkt in Container Ablegen_v02.vcmx (126.9 KB)

Thx & Regards
Feature

Hi @captain_feature ,

I have made some changes in your DEMO, now, the TransportNode swaps the ComponentContainer depending on Toggle Property as I see you use this to change from Link_1 to Link2. There’s a message error from the ProcessExecutor but it seems there is no problem. I’ve done some changes in your “PythonScript_ContainerHandling”.

I hope it helps you.

Have a nice day!

Urwik
DEMO_PM_Produkt in Container Ablegen_v02 - Urwik Version.vcmx (98.5 KB)

Hy @Urwik74 ,

no because my goal is that the red and the green box should move with links containing the ComponentContainer up and down…

In my posted example it works on one side but I can’t make it happen that the other side works too.

Thx for your time! :slight_smile:

Regards
Feature

Hi @captain_feature ,

I didn’t understand your question, now I do. I attach a new vcmx that apparently works. I just assign the container when the product leaves the feeder, so when it arrives to the node, the container has already change. The solution its in the UrwikScript.

DEMO_PM_Produkt in Container Ablegen_v02 - Urwik Reply.vcmx (125.7 KB)

Have a nice day!

Regards
Urwik

1 Like

Hy,

wow it works without Errormessages! → Beautiful… :slight_smile:

The last thing in your script is how to make it generic, so that the process find automatically the connected process before… → Maybe you have also an idea for this?

image

Thx & Regards
Feature

Hi,

You could try this to do it generic, but it will only works if you have only one TransportLink entering to your node.

Have a nice day!

Br,

Urwik

I would like to reiterate that changing the associated container during simulation is not a good idea, especially if you have a running process when you do it.

Hy @TSy ,

why it seems to work without problems?

Regards
Feature