Re: [Emc-users] Hostmot2 - stepper signal invert

2009-04-20 Thread John Thornton
It is now :)

John

On 19 Apr 2009 at 20:21, Andrew Ayre wrote:

> John,
> 
> Your emails are arriving with a datestamp of 2004. Is your computer
> set 
> to the right year?
> 
> Andy
> 
> John Thornton wrote:
> > 
> > On 18 Apr 2009 at 21:44, Sebastian Kuzminsky wrote:
> > 
> >> Rob Jansen wrote:
> >>> this works - I thought that only worked on standard output lines
> -
> >> not on
> >>> special function pins.
> >>> Sometimes I am thinking too complex...
> >> Well, maybe the hostmot2 manpage could use some clarification
> on
> >> this 
> >> issue.  The distinction between "physical I/O pins on the board
> >> connectors" and "GPIO HAL pins" is currently pretty muddled.
> > 
> > I've added a bit to the manual on this after reading this...
> > 
> >
> http://www.linuxcnc.org/docview/devel/html//drivers_hostmot2.html
> > 
> > Heck it even makes sense to me now :) I think...
> > John
> 
> 
> -- 
> Andy
> PGP Key ID: 0xDC1B5864
> 
> 
> --
> Stay on top of everything new and different, both inside and 
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San
> Francisco.
> 300 plus technical and hands-on sessions. Register today. 
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
> 



--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hostmot2 - stepper signal invert

2009-04-19 Thread Andrew Ayre
John,

Your emails are arriving with a datestamp of 2004. Is your computer set 
to the right year?

Andy

John Thornton wrote:
> 
> On 18 Apr 2009 at 21:44, Sebastian Kuzminsky wrote:
> 
>> Rob Jansen wrote:
>>> this works - I thought that only worked on standard output lines -
>> not on
>>> special function pins.
>>> Sometimes I am thinking too complex...
>> Well, maybe the hostmot2 manpage could use some clarification on
>> this 
>> issue.  The distinction between "physical I/O pins on the board 
>> connectors" and "GPIO HAL pins" is currently pretty muddled.
> 
> I've added a bit to the manual on this after reading this...
> 
> http://www.linuxcnc.org/docview/devel/html//drivers_hostmot2.html
> 
> Heck it even makes sense to me now :) I think...
> John


-- 
Andy
PGP Key ID: 0xDC1B5864

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hostmot2 - stepper signal invert

2009-04-19 Thread John Thornton


On 19 Apr 2009 at 19:58, Rob Jansen wrote:

> 
> One small typo: in the encoders - parameters section the first
> parameter is
> .couner-mode

Thanks for the catch on that spello.

John

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hostmot2 - stepper signal invert

2009-04-19 Thread Rob Jansen
On Mon, Apr 19, 2004 at 3:33 PM, John Thornton  wrote:

> I've added a bit to the manual on this after reading this...
>
> http://www.linuxcnc.org/docview/devel/html//drivers_hostmot2.html
>
> Heck it even makes sense to me now :) I think...
>

It even makes sense to me :-)
Most of this i read on different pages - and as comments in a source file in
src/hal/drivers.

One small typo: in the encoders - parameters section the first parameter is
.couner-mode

Small update from my side: all on the top of the hm2_stepper.hal files there
is a comments section with links to the docs pages on cnclinux - I should
have read the full file before starting my trial-on-error additions ...
PWM spindle control is working but only linear between 10 and 100% but that
I can fix in the spindle's VFD.

I am now adding limit/home switches and probe. I plan to add the ini and hal
files to a web-pages with links to explain the inner working and parameter
settings.

Cheers,

Rob
--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hostmot2 - stepper signal invert

2009-04-19 Thread John Thornton


On 18 Apr 2009 at 21:44, Sebastian Kuzminsky wrote:

> Rob Jansen wrote:
> > this works - I thought that only worked on standard output lines -
> not on
> > special function pins.
> > Sometimes I am thinking too complex...
> 
> Well, maybe the hostmot2 manpage could use some clarification on
> this 
> issue.  The distinction between "physical I/O pins on the board 
> connectors" and "GPIO HAL pins" is currently pretty muddled.

I've added a bit to the manual on this after reading this...

http://www.linuxcnc.org/docview/devel/html//drivers_hostmot2.html

Heck it even makes sense to me now :) I think...
John

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hostmot2 - stepper signal invert

2009-04-18 Thread Sebastian Kuzminsky
Rob Jansen wrote:
> this works - I thought that only worked on standard output lines - not on
> special function pins.
> Sometimes I am thinking too complex...

Well, maybe the hostmot2 manpage could use some clarification on this 
issue.  The distinction between "physical I/O pins on the board 
connectors" and "GPIO HAL pins" is currently pretty muddled.

Each physical I/O pin has *some* representation in HAL, but the 
particulars of that representation depends on what the I/O pin is used for.

If the physical I/O pin is used for general-purpose I/O (digital input 
or output), then the manpage calls it a "full" gpio, and the user can do 
anything that the firmware supports.

If the physical I/O pin is used by a PWM, stepgen, or encoder, then the 
manpage calls it a "constrained" gpio, and the HAL representation is 
quite limited: the pin has to still be usable by the higher-level 
function that controls it.  For example, a PWM pin cannot be set to be 
an input.


> Meanwhile I also added spindle control with a PWM output. I think the docs
> are a bit outdated (or I just found the wrong ones).Some docs tell me the to
> use dac.0.value (where PWMs are used to create DACs), another one mentions
> pwmgen (but then use hm5i20 as a board type prefix whereas hostmot2 uses
> hm2_5i20 as boardname. Nothing which cannot be fixed with a bit of logical
> thinking.

It sounds like you found the wrong docs.  Unfortunately, this is 
currently easy to do, because there are two drivers that can be used 
with the Mesa 5i20 board.  The older driver is called m5i20, and it has 
HAL pins with names like "m5i20.0.dac-X-value" pins.  The newer driver 
is called hostmot2 (and hm2_5i20), and it has HAL pins with names like 
"hm2_5i20.0.pwmgen.XX".


-- 
Sebastian Kuzminsky
We need numbers, not adjectives.  -- David MacKay
   

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hostmot2 - stepper signal invert

2009-04-18 Thread Rob Jansen
Thanks,

this works - I thought that only worked on standard output lines - not on
special function pins.
Sometimes I am thinking too complex...

Meanwhile I also added spindle control with a PWM output. I think the docs
are a bit outdated (or I just found the wrong ones).Some docs tell me the to
use dac.0.value (where PWMs are used to create DACs), another one mentions
pwmgen (but then use hm5i20 as a board type prefix whereas hostmot2 uses
hm2_5i20 as boardname. Nothing which cannot be fixed with a bit of logical
thinking.

Only thing to do now is to build a proper filter to get a linear analog
output - and publish my configs of course.

Cheers,
Rob

On Fri, Apr 17, 2009 at 6:56 PM, Sebastian Kuzminsky wrote:


> When you start emc2 and it loads the hostmot2 driver modules, it logs
> (in the syslog) the connector/pin and "IO numbers" it's using.  It'll
> look something like this:
>
> IO Pin 048 (P4-01): Stepgen #0, pin Step (Output)
> IO Pin 049 (P4-03): Stepgen #0, pin Dir (Output)
>
>  From this you can take the IO pin number for your Dir signal (049 in
> this example) and invert the signal on that pin with a HAL command like
> this:
>
> setp hm2_5i20.0.gpio.049.invert_output 1
>
--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hostmot2 - stepper signal invert

2009-04-17 Thread Stephen Wille Padnos
Rob Jansen wrote:

>Hi,
>
>is it possible to invert the DIR signal of the stepgen output of the 
>Mesa 5i20 board?
>On my old (parport) config I had the DIR signal inverted so I was 
>looking for a similar option on the hostmot configuration.
>  
>
One way to do that would be to change the sign of the SCALE on the axes 
that need DIR inverted.

So change it from SCALE=2 to SCALE=-2, for instance.

Each pin also has a parameter that ends with "invert_output".  Setting 
this to true will invert the output, just like on the parallel port.
Add something like the following to your HAL file:
setp hm2_5i20.0.gpio.027.invert_output 1
(substituting the correct number for 027, of course :) )

- Steve

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hostmot2 - stepper signal invert

2009-04-17 Thread Sebastian Kuzminsky
Rob Jansen wrote:
> is it possible to invert the DIR signal of the stepgen output of the 
> Mesa 5i20 board?
> On my old (parport) config I had the DIR signal inverted so I was 
> looking for a similar option on the hostmot configuration.

Yes this is easily doable.

When you start emc2 and it loads the hostmot2 driver modules, it logs 
(in the syslog) the connector/pin and "IO numbers" it's using.  It'll 
look something like this:

IO Pin 048 (P4-01): Stepgen #0, pin Step (Output)
IO Pin 049 (P4-03): Stepgen #0, pin Dir (Output)

 From this you can take the IO pin number for your Dir signal (049 in 
this example) and invert the signal on that pin with a HAL command like 
this:

setp hm2_5i20.0.gpio.049.invert_output 1


-- 
Sebastian Kuzminsky
We need numbers, not adjectives.  -- David MacKay
   

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Hostmot2 - stepper signal invert

2009-04-17 Thread Rob Jansen
Hi,

is it possible to invert the DIR signal of the stepgen output of the 
Mesa 5i20 board?
On my old (parport) config I had the DIR signal inverted so I was 
looking for a similar option on the hostmot configuration.

Otherwise I'd have to open the controller-box to change one of the 
phases of each of the motors.

Rob

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users