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
Generic conveyor (belt) speed control
Re: Generic conveyor (belt) speed control
Yes you can change the velocity afterwards.
To command the conveyor externally or from another script, simply do:
To command the conveyor externally or from another script, simply do:
Code: Select all
sim.writeCustomTableData(conveyorHandle, '__ctrl__', {vel=0.1})
Re: Generic conveyor (belt) speed control
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.
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.
Re: Generic conveyor (belt) speed control
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
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
Re: Generic conveyor (belt) speed control
thank you for your answer.
I realized that after a while and i did it.
thank you again
I realized that after a while and i did it.
thank you again