Announcements

Announcement: We’re aware of an issue affecting starting a new topic from category pages and creating new blog posts. New topics can still be started directly from the relevant board. Learn more here.

What is the recommend way to change the default conveyor speed?

What is the recommend way to change the default conveyor speed?

patrick_zweekhorst
Collaborator Collaborator
883 Views
5 Replies
Message 1 of 6

What is the recommend way to change the default conveyor speed?

patrick_zweekhorst
Collaborator
Collaborator

[ FlexSim 21.0.2 ]

Hi,


What is the recommend way of changing the default conveyor speed in FlexSim 2021? In 2020 we used the OnModelReset trigger to change the speed of a conveyor OnReset by setting the speed property in the conveyor type. Something like this:

Model.find("ConveyorSystem>variables/conveyorTypes/ConveyorTypeWassen/speed").value =  newSpeed;

What is the best option to do this now? I understand that we need a for loop to loop over all the conveyors of that type (since they are now in a group and don’t have a conveyor type property anymore). I thought of doing something like this:

double newSpeed= someValue;
Group conveyorWassenGroup = Group( "ConveyorTypeWassen" );
for( int i = 1; i <= conveyorWassenGroup.length; i++ )
{
    Conveyor conveyor = conveyorWassenGroup[ i ];
    conveyor.default= newSpeed; //Not working, throws error, can't set this property
    conveyor.targetSpeed = newSpeed; //Not working
}

But that is not allowed, since we can’t set the defaultSpeed. Do we still need to go in the tree and change the speed variable or is there an option that I am missing here?

Thank you for your time

0 Likes
Accepted solutions (1)
884 Views
5 Replies
Replies (5)
Message 2 of 6

jason_lightfoot_adsk
Autodesk
Autodesk

Should be conveyor.setProperty("Speed",newspeed) but will investigate further.

0 Likes
Message 3 of 6

Matthew_Gillespie
Autodesk
Autodesk
Accepted solution
conveyor.setProperty("ConveyorSpeed", newspeed)


Matthew Gillespie
FlexSim Software Developer

Message 4 of 6

patrick_zweekhorst
Collaborator
Collaborator

@Matthew Gillespie,
Thank you for your answer. How do you know you need to use ConveyorSpeed and not Speed like Jason does? Is this because this object in from the Conveyor module?

0 Likes
Message 5 of 6

Matthew_Gillespie
Autodesk
Autodesk

@Patrick Zweekhorst You can see the actual name in the SQL dropdown.

36296-1611679574360.png

It's not ideal right now, but the ConveyorSpeed property is named differently than the task executer's Speed property to avoid a name collision. We're hoping to update the setProperty method to also accept the alias (Speed in this case) of the property. We're also working on providing a documented list of properties by object.



Matthew Gillespie
FlexSim Software Developer

0 Likes
Message 6 of 6

jason_lightfoot_adsk
Autodesk
Autodesk

Seems this is a bug in the ModelParameter setting that I used to check - if you open the popup option having selected Speed, it will then populate the code with "Speed" instead of "ConveyorSpeed"

0 Likes