Recent content by Joan M

  1. J

    Maximum velocity for the motor movement

    Everything working as expected with a much more simple code now... Thank you again.
  2. J

    Maximum velocity for the motor movement

    I've tried it and...// STAGE A vp = v0 + (a0 * t0) // Acceleration stage vp = v1 + (a1 * t1) // Brake stage v0+(a0*t0) = v1+(a1*t1) // vp = vp t1=((v0-v1)+(a0*t0))/a1 // Get the t1 in terms of t0 (braking time in terms of accelerating time). ==> Note v0 is the starting speed and v1 is the...
  3. J

    Maximum velocity for the motor movement

    haruspex, first of all, thank you for your patience... OK, let's try it: // STAGE A // First the speed equations to find t1 in terms of t0 vp = v0 + (a0 * t0) // Acceleration stage vp = v1 + (a1 * t1) // Brake stage v0+(a0*t0) = v1+(a1*t1) // vp = vp t1=((v0-v1)+(a0*t0))/a1 // Get the t1...
  4. J

    Maximum velocity for the motor movement

    OK, so: vp = v0 + (a * t0) // Velocity at the intersection point (vp) equals the initial speed (v0) + the acceleration (now it is positive) multiplied by the run time (t0). vp = v1 + (a * t1) // and Velocity at the intersection point (vp) equals the initial speed (v1) + the acceleration (now...
  5. J

    Maximum velocity for the motor movement

    Ok, If I understood you well we do have this: vp = v0 + (a * t0) // Velocity at the intersection point (vp) equals the initial speed (v0) + the acceleration (now it is positive) multiplied by the run time (t0). vp = v1 - (a * t1) // and Velocity at the intersection point (vp) equals the...
  6. J

    Maximum velocity for the motor movement

    first of all, English is not my first language so, whatever can be understood in these next lines it's from respect. I know the equations, but simply I'm not understanding what you try to tell me... I've been struggling to get this for days, the practice I have with that is 0 after years of...
  7. J

    Maximum velocity for the motor movement

    I don't know t0 neither t1... and both times are different if we start from a v0 that is different than vf... I'm sorry, but I can't see what you are suggesting... Thank you for posting!
  8. J

    Maximum velocity for the motor movement

    _acc (means the acceleration stage data) a_acc should be the inclination of the line. x0_acc could be considered 0 xf_acc is unknown. v0_acc should be the intersection of the accelerating line with the vertical axis (given we consider x0 = 0). vf_acc is the vmax I'm searching. t0_acc could be...
  9. J

    Maximum velocity for the motor movement

    I think I've understood why it is not working... See: ta = Abs((vmax - v0) / a) ' Acceleration time da = (v0 * ta) + (0.5 * a * ta * ta) ' Distance while accelerating tf = Abs((vmax - vf) / a) ' Braking time. df = (vf * tf) + (0.5 * a * tf * tf) ' Distance while braking. If (da + df >...
  10. J

    Maximum velocity for the motor movement

    Then the first four lines in the code are enough to get the right values. ta, da, tf and df will have the right values and we will get a trapezoid and not a triangle in the movement: we will reach the vmax and go a certain amount of time at vmax. I can promise you this works. :wink: In fact...
  11. J

    Maximum velocity for the motor movement

    Hi again gneill (sorry for writing your name wrong before). I'm interested in the absolute value for the braking distance therefore is easier to have the acceleration positive, anyway I could put the acceleration negative (as it should be) and call abs to get the absolute value. I've calculated...
  12. J

    Maximum velocity for the motor movement

    Hi qneill, the user won't be able to introduce the initial or final speeds that exceed vmax as (in this case ) the final speed will always be 0 and the initial speed can be 0 or the speed the last movement was using at the moment the new one has been introduced so the maximum value will be...
  13. J

    Maximum velocity for the motor movement

    Hello all, First of all let me say this is my first post here and I don't know if I'm placing it into the right forum/place. If I'm doing something wrong or similar, please let me know and I'll try to solve it asap. This is not homework, but it is for sure introductory level so I've thought...
Back
Top