go away spammer

Author Topic: Need help to program Axon for stepper motor controller with frequency input  (Read 2626 times)

0 Members and 1 Guest are viewing this topic.

Offline andyTopic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
Hi All.
I am new here and would greatly appreciate some help on the Axon!

I have a stepper motor with a controller that needs a FREQUENCY input ( the steps are triggered with the rising edge of each pulse) pin pair. It also has an enable pin pair and a direction pin pair. I have not been able to locate anything on this forum for this. Any guidance and code would be greatly appreciated.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
How about a link to the controller you are using!

It is very likely that the 'frequency' input is really a 'step' input. Try writing your code to toggle this pin at some fairly low rate (frequency) and see if your stepper motor turns.

Offline andyTopic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
Thanks.
the following is the link.
http://www.haydonkerk.com/LinearMotionProducts/Drives/DCM80288055ChopperDrives/tabid/119/Default.aspx

Perhaps one can send a steady frequency and use the enable and disable lines to stop and start the motor....but this would be very crude!


Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
The link helps as I was then able to read through the manual. Wow, nice controller. Now to your original question.

The answers are in the manual. Check table in 2. Specifications and Operating Environment
The Pulse input frequency is a minimum of 0Hz up to a maximum of 500Khz. One pulse will step the motor one step and step size is set by the dip switches in Section 6.

Stepper motors are designed for their positioning ability so are normally driven by pulses where one pulse is some set fraction of a rotation or degrees of a rotation or number of steps per one rotation. To stop the motor just stop pulsing (Section 2 spec is 0Hz min frequency). 
Section 11 has the timing diagram of the control input signals. The pulse input does not need to be continuous, its just needs to meet the minimum time specs.

So one way to start coding is have an output pin pulse (high, delay, low) each time you press a button (connected to an Axon input pin).
Another is the continuously send pulses when the button is depressed. 
You could have another button that increases the rate at which the pulses are send (higher frequency) when the first button is pressed.

Does this help?

Offline andyTopic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
Thanks Waltr that was very helpful.
So
1. Create routine for forming each pulse in the coding >output to Axon pin
2. Call this routine when ever a pulse is needed
3. calling program can vary frequency with delays between calls?
 
Is this a good way to do it?

Is there any code that is around that can help me get started?

Thanks again!

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
That sounds correct.

I don't use the Axon so don't know of code sources but a lot of people do use the Axon so there may be some code around. A web search should come up with something useful.

Offline andyTopic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
Thanks.
Will check Web.
Hope Axon users provide some guidance!

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
WebbotLib has a frequency output function - just search the manual :P

(I demanded Webbot add it into the library for stuff like this, hehe :P)

 


Get Your Ad Here