question

Claire Krupp avatar image
0 Likes"
Claire Krupp asked Phil BoBo edited

How to immediately change the acceleration of a conveyor in trigger

We need to change the acceleration parameters of a section of conveyor based on parameters such as "number of items on", or "items blocking a Photo Eye". I can use the Conveyor.targetSpeed function to change the speed, and that has an immediate effect, but the Conveyor.acceleration function is Read-only, so I can't change it that way. If I try to use the tree address to change it I get an error message too.

The data we have is only expressed in terms of acceleration, so we would really like to use that instead.

I tried setting up two Conveyor Types: "ConTypeFast" and "ConTypeSlow" and then using this code to change the Conveyors Type:

Variant newtype = Model.find("ConveyorSystem>variables/conveyorTypes/ConTypeSlow");
	Model.find("Conveyor1>variables/type").value = newtype;
// Change conveyorType to Slow


Variant checktype1 = Model.find("Conveyor1>variables/type").value;
//check parameter has changed

The logic is successful, in that the parameter is changed correctly and the conveyor visual immediately changes to the new type, but the speed and acceleration does not change. Even if you manually stop the run, change the conveyor type, and restart the run, the display changes but the speeds do not, until you do a Reset.

There is a similar question from 2017 about this, where the logic above is recommended, but no mention is made of it not being activated immediately. I also cannot find any mention of it in the manual.

In AGV logic you have a similar "agvType" parameter. When you change it, the AGV changes speed/accel almost immediately, (sometimes waiting until it reaches the destination CP), so why is the conveyor behavior different?

Any suggestions?

I am attaching a sample model..change-conveyor-type.fsm

FlexSim 19.1.0
triggersaccelerationconveyor properties
· 3
5 |100000

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

Jeff Nordgren avatar image Jeff Nordgren commented ·

@Claire K,

Try the following code to change the acceleration of a conveyor:

setnodenum(Model.find("ConveyorSystem>variables/conveyorTypes/ConTypeFast/acceleration"),88);

Where "ConTypeFast" is the name of the Type of Conveyor. The above code should change the acceleration of the ConTypeFast conveyor to 88. Maybe this will work for you?

Thanks.

1 Like 1 ·
Claire Krupp avatar image Claire Krupp Jeff Nordgren commented ·

I will give it a try, thanks!

0 Likes 0 ·
Claire Krupp avatar image Claire Krupp Jeff Nordgren commented ·

@Jeff Nordgren it does change the acceleration of the Conveyor Type, but the conveyor ignores the change until I do a Reset, just as the other things I tried!

I will have to make do with changing the Target Speed and figure out what ending speed will correspond to the correct acceleration/deceleration.

Is there any documentation on the equation used to determine how much acceleration or deceleration is applied? Is it based on getting to the target speed within a certain time, or is it based on distance?

Another couple questions:

a) if two adjacent conveyors have different speeds, does the item change to the new speed instantaneously?

b) if a conveyor is empty for a while, will it eventually stop moving?

thanks for your help,

Claire

0 Likes 0 ·

1 Answer

Phil BoBo avatar image
0 Likes"
Phil BoBo answered Phil BoBo edited

> In AGV logic you have a similar "agvType" parameter. When you change it, the AGV changes speed/accel almost immediately, (sometimes waiting until it reaches the destination CP), so why is the conveyor behavior different?

AGVs are a single object that performs travel tasks to get from place to place. Its acceleration, deceleration, and speed settings are used at each moment when it starts a travel task. A conveyor has multiple items on it that are all traveling. In reality those are two different types of objects with two different types of behavior. In the simulation, they are also two different types of objects with two different types of behavior. They behave differently because they are different.

> The data we have is only expressed in terms of acceleration, so we would really like to use that instead.

This doesn't make sense. What sort of data do you have? How do you have data about a conveyor that doesn't have its speed? Conveyors have speed. If you change their speed, then they accelerate or decelerate to the new speed. That's how real conveyors work, and that's how FlexSim conveyor objects work.

A conveyor has a current speed. If you change the target speed to a higher value, then it will change its speed at its acceleration rate until the current speed is equal to the target speed. If you change the target speed to a lower value, then it will change its speed at its deceleration rate until the current speed is equal to the target speed.

> if two adjacent conveyors have different speeds, does the item change to the new speed instantaneously?

Assuming that by "adjacent" you mean two conveyors that are inline instead of side-by-side (parallel), then the item changes speed based on the settings on the Transfer object that connects the two conveyors. By default, during the transition between the two conveyors, it uses the speed of the Receiving Conveyor, but this behavior can be customized in the Transfer's properties to also be the Sending conveyor, Faster, Slower, or the conveyor under the item's center.

Yes, at the time that the speed driver of the item changes, the item's speed will change instantaneously. The moment when that change happens is controlled via the setting explained above which determines the speed of the item during the transition between the conveyors.

> Is there any documentation on the equation used to determine how much acceleration or deceleration is applied? Is it based on getting to the target speed within a certain time, or is it based on distance?

Acceleration and deceleration are defined in terms of distance units per time unit per time unit. It is based on time and applied based on changing the current speed to the target speed using the rate defined in acceleration or deceleration. It is not based on item distance. There are no distances involved other than the distance unit used to define speeds and rates. It changes one speed to another speed over time using the acceleration/deceleration rates.

> if a conveyor is empty for a while, will it eventually stop moving?

No. A conveyor will continue moving at whatever speed it is currently moving. It only changes speed if you tell it to change speed. Whether any items are on it or not is irrelevant.

5 |100000

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