question

Choi Hyun Woong avatar image
0 Likes"
Choi Hyun Woong asked Felix Möhlmann answered

How to view coupling nodes in tree node using script?

The AGV destination was set and verified by coding.

Object destination = current.as(TaskExecuter).activeTask.involved1

Destinations are associated with the AGV control point.

How to view the control point using script?


AGV is currently running job #7, destination is Plane1/Separator3.

1689148349024.png


Plane1/Separator3 is connected to AGV ControlPoint3.

1689148214789.png


FlexSim 23.1.2
scriptcoupling node
1689148214789.png (12.3 KiB)
1689148349024.png (20.7 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.

1 Answer

·
Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered

In general:

To move from coupling node to its counterpart, you either get the value or use a "+" in the path in a find command. Once you have a reference to the coupling node on the control point, you can use ownerobject() to shift the reference to the control point itself.

Object separator;
Object cp = ownerobject(separator.find(">stored/AGV/Location/1+"));


For AGV connections in particular:

The command cpconnection() can be used to get a connected object by type and rank of the connection.

Object separator;
Object cp = cpconnection(separator, "Location", 1);

For more information, see the command help.

capture1.png


capture1.png (37.8 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.

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.