Stepper moto contolled acceleration and deceleration

Supporting Java SE version 7 and up
pjpac
Phidgetsian
Posts: 5
Joined: Thu Jun 21, 2018 5:20 am
Contact:

Stepper moto contolled acceleration and deceleration

Postby pjpac » Thu Jun 21, 2018 9:54 am

I'm new to phidgets and I'm modifying a program written in java to control a NEMA-17 Bipolar 32mm Stepper running in continuous mode and connected to a PhidgetStepper Bipolar HC ID: 1067_0B which itself is connected to my laptop running on windows. I'm using NetBeans. So far so good, the sequences "velocity, time" work OK but I also need to control the acceleration (and deceleration).
I use stepperPhidget.setAcceleration(0, double) and the acceleration is under control when the speed increases to a value that has not been reached at an earlier step of the sequence. However when a step n+1 involves a lower speed than step n, instead of decelerating progressively, the stepper jumps to the lower speed. Intriguingly (at least to me), the stepper also jumps to the higher speed if the speed of step n+2 is between the speeds of the steps n and n+1, while if the speed of step n+2 is larger than the speed of the step n, the stepper will jump to the nth speed value and will start to accelerate progressively from then on to reach the targeted speed. For instance,
n1: 0 to 500 rpm is progressive,
n2: 500 to 250 rpm is a jump,
n3: 250 to 750 rmp is completed as a jump from 250 to 500 rpm and progressive from 500 to 750 rpm.
This is reproducible as soon as the stepper is disengaged and next re-engaged.

It seems a bit odd but being new I might be missing something important. Eventually, I plan to set sequences of "velocity, time, ac/de-celeration", but starting to program acceleration and deceleration sounds like trying to reinvent the wheel, and I would definitely welcome any comments and suggestions.

Best wishes

fraser
Engineering
Posts: 239
Joined: Thu Nov 19, 2009 4:41 pm
Contact:

Re: Stepper moto contolled acceleration and deceleration

Postby fraser » Thu Jun 21, 2018 11:50 am

This is a known bug in the stepper, and "steps" are being made to correct the problem. Both of your noted scenarios are problems. Additionally, setting n+1 to a lower velocity, and n+2 to a velocity in the opposite direction, it jumps back to n and decelerates down to n+2 (similar to your 2nd scenario). This was a problem introduced with the recent inclusion of Run Mode

I wish I could provide further information than "we are looking into it, please stand by"

pjpac
Phidgetsian
Posts: 5
Joined: Thu Jun 21, 2018 5:20 am
Contact:

Re: Stepper moto contolled acceleration and deceleration

Postby pjpac » Thu Jun 21, 2018 11:58 am

Thanks for your quick reply. I'll see to get organize to adjust to the situation and I will keep an eye open for a more definitive option when the bug is eventually fixed.

Best wishes

User avatar
Patrick
Lead Developer
Posts: 3078
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Stepper moto contolled acceleration and deceleration

Postby Patrick » Fri Jun 22, 2018 11:30 am

This will eventually be fixed with a firmware upgrade.

-Patrick


Return to “Java”

Who is online

Users browsing this forum: No registered users and 1 guest