Is there a reason why the input block: (motor) get [average speed] during {###ms} has a maximum limit of 300 where the # symbol is? #1769
-
The code block, rounded edges, with the same name as in the title as a limit of how long you can look at the average speed of a motor, is there any reason for this? I want to test some numbers beyond 300ms in my project, but I don't understand why that's the limit. I only found the limit though trial an error, and apparently 301 and 302 work as well, as far as my testing goes. Here's what the code looks like,
I have the rest of the code done in blocks, and tried posting it here but it came up with a bunch of gibberish. I can post it in the comments if that provides more context. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It measures the average speed by taking the current angle, subtracted by the angle at the given time before that, and divides by the given time window. So it keeps a history of about 300ms of all position samples for all motors, which adds up to quite a lot of data. If you need to do this over a longer time interval, you could do it in your own code. Measure the position at the start, at the end, and divide by the time between them. |
Beta Was this translation helpful? Give feedback.
It measures the average speed by taking the current angle, subtracted by the angle at the given time before that, and divides by the given time window.
So it keeps a history of about 300ms of all position samples for all motors, which adds up to quite a lot of data.
If you need to do this over a longer time interval, you could do it in your own code. Measure the position at the start, at the end, and divide by the time between them.