Cancel
Showing results for 
Search instead for 
Did you mean: 

MU move problem using vehicle.backwards

Pioneer
Pioneer

Hello,

 

I have two tracks not connectet with each other. When I try to move a MU from track1 to track2, the command is executed (had a breakpoint there) but the MU stays on track1. The code looks like that:

worker.move(track1);
	
while NOT worker.waiting loop
	wait 0.1;
end;
	
worker.move(track2, (worker.xPos-track2.xPos)*ScalingFactor);

if x then
worker.backwards;
worker.turnIcon(180);
end;

 

The worker comes from a station onto track1 (1m long). When he's at the end of the track he is waiting and therefore being moved to track2 (btw. is there a better way to catch whether he reached the end or not?) making him not waiting again. If my condition x is true the worker should walk track2 backwards (right-to-left instead of left-to-right). But instead he goes back on track1 as if he has a saved route that he now tries to walk backwards.

How can I solve this problem?

 

Btw. worker is a modified vehicle MU.

1 REPLY

Re: MU move problem using vehicle.backwards

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Someone,

 

the move method just transfers the tip of the MU, you might want to try the transfer method which moves the whole MU.

 

To detect when the MU has reached the end you either can use the exit control or a sensor.

Regards,

Ralf
------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.