Lego EV3 set tacho-motor speed [message #1806711] |
Tue, 14 May 2019 06:11  |
Eclipse User |
|
|
|
Hello,
Is there any way to set the motor speed for the Lego EV3 in 4diac? My application is working as expected during debugging, but when outA.motor.enable is called, the motor does not move. I have tried changing the speed manually in the file system, but got a "Permission denied" error even if the file was opened using sudo and write permissions were set. So it stays 0 after every start/reset.
From the documentation, I have seen that there is only a function block to read the speed, but not one to set it. Another thing I've found is that there is the option of reading and writing through custom access, but there is no fileWriter so I assume that is a QW block.
My question is now how to implement such a block that sets the speed to say 100 before calling enable?
I have tried using a QW block with PARAMS=/sys/class/tacho-motor/motor1/speed_sp and OUT=100, but then I get an error:
"terminate called after throwing an instance of 'std::length_error'
what(): basic_string::_S_create
Aborted"
I think I am missing something. Can somebody point me into the right direction?
Thank you in advance.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.25253 seconds