Mesa 5i20 servo configuration

More
05 Jul 2010 22:06 #3282 by PCW
Pinouts can also be changed by making a new 5I20 bit file with the desired pinout. This is not a big deal, normally taking me about 10 minutes or so, if I have a list of where the pins should be.

For constant laser power, can you just take the existing velocity signals from the X and Y encoder HM2 module and do the SQRT of the sum of the squares (maybe theres a comp for this already) and output the value as PWM/analog?

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

More
05 Jul 2010 22:16 #3283 by andypugh
Zig wrote:

Conventional XYZ G code file can then be used to move the laser beam while direction change in Z axis ( think of this as an engraving machine ) would control laser state.
The Z axis is a dummy axis to the extent that there is no physical Z axis actually taking place. This way the entire proces is within established G code generation process abd laser satus is controlled by G code without a need for any other inputs.

Yes, I assumed that. There is no reason for that dummy axis to have a stepgen in the Mesa card, though. Which would leave more GPIO pins free.

Last night i was getting reports that some of the pins did not exist. Obviously something was not done correctly.

Generally a typo. (_ for -, - for . etc) If you but a line:
show all
in the HAL just after all the addf functions you will get a list of all the pin names that have been created.

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

More
05 Jul 2010 22:18 #3284 by andypugh
PCW wrote:

For constant laser power, can you just take the existing velocity signals from the X and Y encoder HM2 module and do the SQRT of the sum of the squares (maybe theres a comp for this already) and output the value as PWM/analog?


There is such a function, it is called "hypot"
www.linuxcnc.org/docview/html//man/man9/hypot.9.html

And it seems to me that doing the maths in HAL and moderating the laser power that way has to be a far better plan.

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

More
06 Jul 2010 00:03 - 06 Jul 2010 00:04 #3285 by Zig
There is no need for complex trig calculations.

By adjusting a monostable ( in external hardware) and triggering it with encoder signals a pulse position modulating scheme is established which works sufficiently well for my purposes.
The idea being that a certain amount of energy is delivered at each increment of motion.

My data files ( g code ) is optimised for a particular axis ( the lighter of the two) . The data is a raster scan. Therefore pulse position modulating scheme provides for good outcome.

I have this system operating on a machine based on rotating motors/leadscrews. This second machine is based on linear motors which provide for a significant improvement in throughtput time as the acceleration is five times higher .

Present machine dynamics acceleration 2000mm/s/s processing speed 100mm/s
Last edit: 06 Jul 2010 00:04 by Zig.

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

More
06 Jul 2010 07:24 #3288 by Zig
MISERY...

The step gen module in hostmot behaves differently to the stepgen in emc2 hal.

Hostmot stepgen does not remember the last Z axis movement.The direction signal does go high on Z axis down moveBUT remains high ONLY while axis is moving down.

Once the Z axis reaches its position the direction signal goes LOW.

Is there anything else that could not go ? :angry:

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

More
06 Jul 2010 10:04 #3290 by andypugh
Zig wrote:

The step gen module in hostmot behaves differently to the stepgen in emc2 hal.

I am not sure why that matters, but that is probably a sign that I don;t understand what you are doing.

You could use a software stepgen for Z, there is no reason that you can't mix and match them, and that would let you allocate the outputs to any GPIO pins you wanted to use. However those pins only update at the servo-thread rate even if you were to create a base thread for the software stepgen.
One compromise would be to use the Mesa stepgen for the pulse generation, but also set up a software stepgen (linked to the same motion pins) and to only use the direction pin of that stepgen, linked to a gpio pin of your choice.

Returning to you earlier post, if you really think that wiring up an external monostable is easier than adding a velocity-linked hypot function in HAL then you are missing an awful lot about the power of HAL.

If I was doing what I think you are doing, (modulating laser intensity with Z velocity and compensating for tracking velocity?) I would be feeding the velocities through a "hypot" and a couple of "scale" functions to a Mesa PWM generator which controlled laser power.

I am not sure what you are using the latching direction pin for, but whatever it is, HAL will have a solution.

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

More
06 Jul 2010 14:18 #3293 by PCW
This is a side effect of mapping 2's complement numbers that set the step generator rate onto sign magnitude hardware (Step+Dir)
The 2s complement numbers do not have a way to represent +0 and -0, only +0 so to make sure the step generator hardware does not
"creep: when stopped, the velocity is set to +0 (which is the positive direction)

What do you do with the signals? maybe theres a better way to accomplish what you need...

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

More
06 Jul 2010 22:02 - 06 Jul 2010 23:15 #3294 by Zig
Z axis is used to enable/ disable the laser, where as the speed of movement of the xy path is used to control the power delivered to the work piece.

This way convenional 2D G code file can be used to engrave with constant energy being delivered to the work piece ( almost ) independent of movement speed ( not velocity )

Edit: 2 &1/2 D


EDIT 2: D type latch fixes the problem
Last edit: 06 Jul 2010 23:15 by Zig.

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

More
06 Jul 2010 23:31 #3295 by Zig
Andy,


I use the Z axis directin flag to enble the laser.

Regarding the monostable issue.

I already have these signals ( inphase and quadrature ) from both X and Y axis within the tacho circuit. Its a matter of picking them up and rerouting to the laser power control section.

It is this pulse density which will control the output power. This will of course be weighed by the Z axis (derived) direction flag. If Z axis down then laser on. The machine will receive its commands from a 2 1/2D G code file which will not have to have any additional information in order to produce results.

I am sure that hal would be able to handle these issues and indeed it is not a hal problem but rather my inability to speak hal fluently which drives me into the arms of external hardware solution.

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

More
07 Jul 2010 00:22 #3296 by andypugh
Zig wrote:

I use the Z axis directin flag to enble the laser.


Eccentric, but each to their own :-)

www.linuxcnc.org/docview/html//man/man9/comp.9.html
should work. Something like this (modify to suit your actual situation)

loadrt comp count=1
addf comp.0 servo-thread
net z-vel axis.2.joint-vel-cmd => comp.0.in0
net laser-on comp.0.out => hm2_5i20.gpio.007.out
setp comp.0.in0 0
setp comp.0.hyst

I am sure that hal would be able to handle these issues and indeed it is not a hal problem but rather my inability to speak hal fluently which drives me into the arms of external hardware solution.


It is worth learning. Nobody ever burned themselves picking up the wrong end of a keyboard.

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

Moderators: PCWjmelson
Time to create page: 0.095 seconds
Powered by Kunena Forum