question

Joaquín MSV avatar image
0 Likes"
Joaquín MSV asked Joaquín MSV commented

Get the AGV stopped/allocated in a control point

I want to implement a process where an operator loads directly items in container transported by an AGV stopped in a CP. To define the station for unload function I would like to know how to get the object that CP has now on it. Something like CP.subnodes[1] (which obviously does not work).

Any idea on how to implement this in an easy and clean way?

Thanks in advance.

FlexSim 24.0.3
agvload unloadcontrolpoints
5 |100000

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

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Joaquín MSV commented

You can consider pushing the agv to a list and using a process flow to read from that. This will allow you to synchronise the arrival events of item and agv.

As far as the syntax for finding the allocated traveler using FlexScript you need the AGV.AllocatableObject eg.:

Object cp=Model.find("ControlPoint2");
return  cp.as(AGV.AllocatableObject).allocations[1].allocator;  //returns the AGV
· 1
5 |100000

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

Joaquín MSV avatar image Joaquín MSV commented ·
Many thanks for the help. I've defined a pointer label in the CP and assigned there the returned value. Then, in the "on deallocate" (the "on exit" was not working properly) trigger I've cleared the label by assigning a 0x0. That way I can check which AGV is there and once gone, reset value to O.
0 Likes 0 ·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered

Work with Flexscript API classes of AGV like AGV.AllocationPoint.

5 |100000

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