question

Manuel Sinco avatar image
0 Likes"
Manuel Sinco asked Santiago Serrano commented

How to calculate the distance between 2 Objects in a conveyor?

I want to calculate the distance between two object in the conveyor, I planned to used the normal distances formula, however it's only for straight paths, if I have any curved conveyors it won't work.

I'm attaching a image to give an example.

I appreciate your help thanks.

FlexSim 18.2.3
distance along conveyor
distance.png (241.9 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.

Joshua S avatar image
0 Likes"
Joshua S answered Joshua S commented

For the item on the Conveyor, you can select it and find out how far along on the Conveyor it is in the quick properties, then for each conveyor you can find out its length by opening a script window and use this code

  1. model.find("Conveyor").as(Conveyor).length
· 2
5 |100000

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

Santiago Serrano avatar image
1 Like"
Santiago Serrano answered Santiago Serrano commented

Hi,

Other way to calculate that, using the decision point is the property of Conveyor Class:

Conveyor.estimateConveyTime()

Arguments: estimateConveyTime( Object origin , double n_a , Object dest , double n_a , double itemLength , int flags = 0 )

this property return the time between two decision point, using default speed

Distance= Conveyor.defaultSpeed * Conveyor.estimateConveyTime( D1, 0 , D2, 1,0)

Where

D1: Decision poitn 1

D2: Decision poitn 2

Item leght: use 1

The manual says use "0" for " n_a"

· 2
5 |100000

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