Cancel
Showing results for 
Search instead for 
Did you mean: 

Multiportalcrane speed

Pioneer
Pioneer

Hi,

 

I want to use constant travel times for the portal in a MultiPortalCrane, so I adjust the speed depending on the distance the crane has to travel.

 

Unfortunately if I change the speed using 'MultiPortalCrane.PortalSpeed' and then use 'Portal.MoveMuFromTo' to use the crane for a job in the same method then the speed isnt changed until after the job is complete.

 

Is there anyway to update the speed before using the MoveMuFromTo method? 

 

Thanks in advance!

 

BCS

7 REPLIES

Re: Multiportalcrane speed

Siemens Phenom Siemens Phenom
Siemens Phenom

Dear BCS,

you can set the speed of the basic object Transporter, which is the Portal in the Crane library:

var Portal:object := MultiPortalCrane.cont
Portal.speed := 10

 Reagrds,

Peter

Re: Multiportalcrane speed

Pioneer
Pioneer

Hi Peter,

 

Unfortunately this does not work! Changing the speed attribute of the portal does not change the speed in the context menu and does not affect the speed of this portal.

 

Is there any other way to update the speed immediately?

 

Thanks again.

Re: Multiportalcrane speed

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello BCS,

 

you have to change the attribute PortalSpeed of the portal to modify the speed permanently.

Every move command of the portal uses this attribute to set the speed of the portal.

So your method has to look like:

var Crane : object := MultiPortalCrane
var Portal := Crane.Portal1
print Portal.PortalSpeed
// set the speed for next move command
Portal.PortalSpeed := 2.4
// set the speed for curent movement
Portal.speed := 3.2

 

Hope this helps.

 

Regards
GG

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

Re: Multiportalcrane speed

Pioneer
Pioneer

Hi GG,

 

Thank you for your response. 

 

Unfortunately this is no different to what I have tried. See the follow code extract and output.

 

var new_speed : real := 0.25
var Portal : obj := MultiPortalCrane.Cont var dist : real := abs(Portal.XPos - A.XPos) + abs(A.XPos - B.XPos)
dist := dist * root.ScalingFactor

print "Previous speed: " num_to_str(Portal.Speed)
Portal.Speed := new_speed
print "Current speed: " num_to_str(Portal.Speed) MultiPortalCrane.PortalSpeed := new_speed
var start : real := EventController.SimTime Portal.MoveMUFromTo(A, B)
var duration : real := EventController.SimTime - start
print "Actual speed: " + num_to_str(dist/duration)

***Output***
Previous speed: 0.5
Current speed: 0.25
Actual speed: 0.499997

Thanks again.

Re: Multiportalcrane speed

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello BCS,

1) don't use MultiportalCrane.cont to get the portal, use MultiportalCrane.Portal1 for the first portal and MultiportalCrane.Portal2 for the second portal and so on.

2) Is acceleration/deceleration switch on for the MultiportalCrane?

3) Can you provide the simulation model?

 

 

Regards
GG

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

Re: Multiportalcrane speed

Pioneer
Pioneer

Hi GG,

 

1) Portal1 etc. are not attributes of the MultiPortalCrane, so how can I use them?

2) The acceleration switch is off.

3) I will prepare a minimum working example now.

 

Thanks again.

 

EDIT: I have also tried using MultiPortalCrane.getPortals to get the reference to the portal, which did not change the speed immediately either.

Re: Multiportalcrane speed

Pioneer
Pioneer

Please find an example attached. As far as I can tell the speed does not change, despite trying both Portal.Speed and MultiPortalCrane.PortalSpeed.

 

Thanks again!