question

Mike avatar image
0 Likes"
Mike asked Sri_vikas K commented

How to rotate 90degree at the combiner for all item from input port 2

Rotate item from port 2.fsmHello,

I would like to rotate 90deg for all items coming from input port 2 to the combiner. Could someone help me with script? Based on my project, the rotation must be done on combiner. Rotation at the upstream model can't work for my case. Thanks a lot.

Regards,

Mikecapture.png

FlexSim 23.0.6
rotate items from port 2 on combiner
capture.png (123.5 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel edited

On Entry Trigger /

process flow Event: assign item and port

Condition (port == 2) directly in source code if structure or in activity: token.port == 2

item.rotation.z += 90; // or as absolut value item.rotation.z = 90;


5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Sri_vikas K avatar image
0 Likes"
Sri_vikas K answered Sri_vikas K commented

Hi @Mike

When I use set rotation trigger on queue on exit. It is coming like this for me.2023-04-13.png


2023-04-13.png (458.8 KiB)
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Mike avatar image Mike commented ·
Hi Sir,

Based on my process restriction, I need to rotate only when it is unloaded to combiner.

That is why I need help for the customization. Thanks.


Regards,

0 Likes 0 ·
Sri_vikas K avatar image Sri_vikas K Mike commented ·
Hi @Mike

Follow as @Joerg Vogel suggested. Use an event source in the process flow and assign the condition.

if(port == 2)

{

item.rotation.z +=90

}

0 Likes 0 ·