stepgen additional Pins needed

More
28 Dec 2010 15:33 - 28 Dec 2010 15:38 #6288 by jgnoss
Hello,

I'm new here, and I hope I got on the right section to post my question.

I have some self made stepper driver that I built for big offset print sheet feeder.

With the right stepper motor, they give a nice torque and really good speed.
My idea now is, using that driver to build a small mill.

My point now is, those driver have some features, where additional pins are necessary and right now I'm just familiarizing with EMC2, hal, etc.
So I have no idea how to implement that additional pins, using EMC2.

Here some Idea what I need.

One Pin necessary is a half/full step Pin. I think that is not so hard to achieve, because that I need to change only on demand.
Steps I think to do that are:
Creating a halui extension that has pins connected to buttons
connecting that Pins to I/O Pins on my MESA card.
That's how I understood the manuals, just have to go deeper into it and do it.


Now the harder part where I got no idea how to do it.

My drivers have external Pins for "High Power" and "Half Power".
That Pins are used as kind of like a "Power Management", in means of giving high current (for example on starting the "Accel ramp"), later going to normal current, and giving only half the current if there is no movement.
The print feeder where I incorporate that drivers are controlled by a MCU, and since I'm writing the firmware, I can manage those pins easy.

For now, it is sufficient to implement one signal that pulls me the driver out of "Half Power Mode" in the moment right before starting Motor movement.
I tried (in hardware) to detect the Step signal (coming from the MESA card) giving me a signal on my "Half Power Pin", this signal stays high until 2 seconds no change occurs on the Step Pin.

Problem on that implementation is, the MCU I used is to slow to detect the 20ns Step signal.
If I use 50us (step hold) it works, but that's not the idea.

Now I hope one of you hal-gurus can give me a hint, how to implement that behavior using or creating a hal component that can give me additional pins going high/low right before the first step, and to the opposite if there is no step for a few seconds.

Thanks for your help

Ju

[edit]

I think implementing that, could be something like open a axis - break right before start moving the lead screw.
Last edit: 28 Dec 2010 15:38 by jgnoss.

Please Log in or Create an account to join the conversation.

More
28 Dec 2010 22:32 #6294 by Rick G
Hello, Ju

As you said the half step full step should not be a problem, and could be set with a pin when you start EMC, not sure that you would want to change it later as that would change the resolution of the Axis.

If you look at the Hal meter you can see which pins change when there is motion. Perhaps you could compare the numbers such as commanded position and actual position and when not equal set a pin to turn the power to high. Also look at velocity. It occurs to me that most of these will have a lag from when movement is commanded and when the signal is sent. Just thinking out loud...

Rick G

Please Log in or Create an account to join the conversation.

More
28 Dec 2010 22:58 #6295 by jgnoss
Thanks Rick for your ideas, I'm going to look at this.
Specially looking at the velocity numbers is a great idea, so I can use the High Power to Normal Power option of my drivers, that's great.
Just have to figure out how to do that.

As in the edited part of my last post.

Anyone has any example or any idea how do machines that if they have breaks on the axis?

That would be my solution I think.

Ju

Please Log in or Create an account to join the conversation.

More
29 Dec 2010 06:08 #6302 by cmorley
motion.in-position might work for you.
:http://www.linuxcnc.org/docs/2.4/html/config_emc2hal.html#r1_1_2

Please Log in or Create an account to join the conversation.

More
24 Jan 2011 15:29 #6826 by Rick G
Most of the stepper drivers I have used in the past have had an option for automatic current reduction after some period of time.
I am currently installing a pair of drivers on a lathe that do not have auto current reduction but have inputs for low power (50%) and high power (150%) of their set power.
As I am using a CNC4PC parallel breakout board and using only 2 steppers there are extra parallel pins that I can use for this.
I am using near components and the individual axis velocity to determine:
A. If the axis is at rest then apply the signal for 1/2 power.
B. If the axis is above a certain speed apply high power.
C. At normal speed no signals are applied and the driver works at it's set power.
A custom_post.hal could look something like this...

Rick G

File Attachment:

File Name: custom_post.hal
File Size:3 KB
Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.095 seconds
Powered by Kunena Forum