Generic conveyor (belt) speed control

Typically: "How do I... ", "How can I... " questions
Post Reply
vaggkout
Posts: 5
Joined: 02 Sep 2024, 10:27

Generic conveyor (belt) speed control

Post by vaggkout »

I am trying to make the belt stop uppon a proxSensor signal, but it seems like if you give an initial velocity to the belt you cant change it after. Any thoughts on that ?
Thank you

fferri
Posts: 1297
Joined: 09 Sep 2013, 19:28

Re: Generic conveyor (belt) speed control

Post by fferri »

Yes you can change the velocity afterwards.

To command the conveyor externally or from another script, simply do:

Code: Select all

sim.writeCustomTableData(conveyorHandle, '__ctrl__', {vel=0.1})

vaggkout
Posts: 5
Joined: 02 Sep 2024, 10:27

Re: Generic conveyor (belt) speed control

Post by vaggkout »

thank you for your answer.
i can't do it. i dont know whether it is a problem of my script, but it looks like if you initialize the belt velocity, then you cant effect its velocity through the script. (i used sim.writeCustomTableData(conveyorHandle, '__ctrl__', {vel=0.1}) and after that sim.writeCustomTableData(conveyorHandle, '__ctrl__', {vel=0.0}) but the belt still move).
i am trying to make it stop through a proximity sensor signal. so when the proxsensor triggers then the velocity of the belt should be 0.0.

coppelia
Site Admin
Posts: 10504
Joined: 14 Dec 2012, 00:25

Re: Generic conveyor (belt) speed control

Post by coppelia »

Hello,

what version of CoppeliaSim do you run?
Also, the conveyor will not immediately stop, it will gradually slow-down then stop. If you want it to react faster, modify its Acceleration property upwards.

Cheers

vaggkout
Posts: 5
Joined: 02 Sep 2024, 10:27

Re: Generic conveyor (belt) speed control

Post by vaggkout »

thank you for your answer.
I realized that after a while and i did it.
thank you again

Post Reply