question

Erica W avatar image
0 Likes"
Erica W asked Joerg Vogel commented

Use operator to change flow item orientation

Is there a way to use an operator to change the orientation of a flow item? I would like for the operator to move a cylinder to a point, then turn it on its side.

FlexSim 17.1.2
operatorsflow item orientation
5 |100000

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

1 Answer

·
Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Joerg Vogel commented

You need an event to change something in Flexsim. A message can be such an event. The Operator is a Taskexecuter, which needs tasksequences to let him do something. Each time you activate the option Use Transport in the Flow Properties the Flexsim Engine creates a transport tasksequence. The Task Sequence Example_1 contains the source code, which the Engine creates on its own. In the attached model I let the operator travel to the Basic FR and then I send a message to himself. You find in the OnMessage Trigger of the Operator (Source Code Editor) a reference to the item I assume that is it there and line of code which rotate the object. Unfortunately the rotation stays only as long as the operator transports the item. The item might get its standard orientation back when it enters the next object. If the operation should be changed totaly the shape must be rotated in the item.


· 3
5 |100000

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

Erica W avatar image Erica W commented ·

Thank you! This is very helpful.

0 Likes 0 ·
Erica W avatar image Erica W commented ·
@Jörg Vogel

Could you please look at my current model, the top process "On Sorter Scan", and tell me what I have indexed related to the transport dscanned-simulation-7202017.fsmispatcher incorrectly? I tried to use your example, but use a combiner instead of BasicFR1.

Thank you!

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Erica W commented ·

@Erica W

Everything is OK, just one little information is different compared to the female operator. You have probably used the sampler tool to get the reference to the operator doing the work. The source code need such information, too. In pre-sampler times we build center connections to reference objects directly. Drag a connection while holding the "s" key from the queue to the operator. Because the operator is inside a visual tool, you have to wait over the operator while you drag the connection line a yellow frame shows up around the operator. Then you can release the mouse button.

Otherwise you can change the reference in the source code:

treenode dispatcher = current.centerObjects[1];

This line references the taskexecuter doing the job.**

Mark only the current.centerObjects[1] and activate the sampler tool in the source code editor (left bottom border) and fetch the operator, then take the first entry model().find("Operator1").

The line should look like:

treenode dispatcher = model().find("Operator1");

**additional information: The line tells exactly a dispatcher to administer the tasksequences. When a dispatcher gets a tasksequence to store and distribute, the dispatcher object decide which taskexecuter gets the tasksequence to work on. Because each taskexecuter (operator, transporter and so on) inherits the functionality of a dispatcher, there isn't a mistake by describing the reference as a taskexecuter doing the job.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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