Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

transporter destination and loading container

Pioneer
Pioneer

Hi everyone,
I'm trying to use the sensors, but with bad results, to define the destination of a transporter and then once at the destination to load the container.
1)the initSensor method controls the initial destination
2)the loadSensor method controls the loading
I tried to define the commands for initSensor but they are not taken into account.
Which commands should I use to define the destination and loading of the container?

5 REPLIES 5

Re: transporter destination and loading container

Pioneer
Pioneer
 

Re: transporter destination and loading container

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

the destination needs to be a track-segment

 

if @ = .MUs.AGV1:1
 pod := podlist.read(1)
 @.destination:= str_to_obj(pod).location
end

 

But the transporter will collide with the pod (you placed them on the tracks).

This you can use to load the pod on the transporter (collision control of the AGV in the class library):

@.frontMU.move(self.~)--load the pod at the collision

 

At the end you can use the destination control of the transporter to program the next destination.

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: transporter destination and loading container

Pioneer
Pioneer

thank you @Steffen_B
I used CollisionControl as a method in AGV attributes and it works perfectly.
But in the Init method I wrote:

param SensorID: integer, Front: boolean
var pod : object -- is correct I change in object

-- move agv 1 on the track defined of podlist(1) 
if @ = .MUs.AGV1:1                  	-- WORK
	pod := podlist.read(1)		-- WORK
	@.destination := pod.location	-- WORK
end

-- the rest doesn´t work
-- move agv 2 on the track defined of podlist(2) if @ = .MUs.AGV2:1 stopuntil .MUs.AGV1:1.empty = false prio 1
-- or waituntil .mus.agv1.occupied = true prio 1 pod := podlist.read(2) @.destination := pod.location end -- move agv 3 on the track defined of podlist(3) if @ = .MUs.AGV3:1 stopuntil .MUs.AGV2:1.Occupied = true prio 1 pod := podlist.read(3) @.destination := pod.location end -- move agv 4 on the track defined of podlist(4) if @ = .MUs.AGV4:1 stopuntil .MUs.AGV3:1.Occupied = true prio 1 pod := podlist.read(4) @.destination := pod.location end

It works only for the first AGV, then the second should wait but does not wait and does not go to the indicated destination. Why? Is there a mistake in the sensor or in the code?sensor.PNG.

 

 

 

Re: transporter destination and loading container

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

and the second AGV triggers also the sensor??

At least you need to stop the AGV in the control, if you want to wait for a condition (and then start it again)

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: transporter destination and loading container

Pioneer
Pioneer

Thank you, now works.
I added stop=true and stop=false.