Re: [Emc-users] Inverting the PWM signal to mesa 7i78

2017-01-05 Thread Cecil Thomas
Thanks again Andy.  It worked.

Even thought my speed control (mc-60) is cheap 
and low-tech, I am able to make the speed track 
better than  +/- 5%  from 20 to 1200 rpm under 
reasonable thread cutting loads.  That ain't bad for recycled junk.

This exercise with the 5i25 and 7i78 has forced 
me to get a whole lot deeper into understanding 
the concepts and syntax involved in hm2 and hal.

That is a good...but sometimes humbling... thing.

Cecil

At 10:54 AM 1/2/2017, you wrote:
>On 2 January 2017 at 15:47, andy pugh 
> wrote: > There is a 
>slightly better set of docs here: > 
>http://linuxcnc.org/docs/devel/html/drivers/hostmot2.html  
> > But it is very much out-of date. One way in 
>which is is out of date is in insisting that 
>only step-dir mode is supported by the driver, 
>whereas it is now possible to use all the modes 
>up to and including a 6-pin 16-step table 
>generated mode. -- atp "A motorcycle is a 
>bicycle with a pandemonium attachment and is 
>designed for the especial use of mechanical 
>geniuses, daredevils and lunatics." — George 
>Fitch, Atlanta Constitution Newspaper, 1916 
>-- 
>Check out the vibrant tech community on one of 
>the world's most engaging tech sites, 
>SlashDot.org! http://sdm.link/slashdot 
>___ 
>Emc-users mailing list 
>Emc-users@lists.sourceforge.net 
>https://lists.sourceforge.net/lists/listinfo/emc-users


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Inverting the PWM signal to mesa 7i78

2017-01-02 Thread andy pugh
On 2 January 2017 at 20:04, Cecil Thomas  wrote:
> I don't know why this is the case unless the 5i25
> didn't exist when the docs were written

This is exactly it.
Initially there was just the 5i20 and the docs seem to have been
started on the assumption that is all there would ever be, and then
have been partially edited as this has changed.

The 5i20 is expensive and not very powerful, I can't think of any
reason that anyone would use one now when (for example) the 5i24 is
half the price for the same amount of IO.

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1916

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Inverting the PWM signal to mesa 7i78

2017-01-02 Thread Cecil Thomas
Andy,

Thanks for the info.

One of the things I noticed very early on as I 
was trying to work all this out by myself is that 
the 5i25 card is never mentioned in the documentation.
I see all kinds of examples etc. for 5i20 and 
other cards but 5i25 seems to be the red headed step child of documentation.

I don't know why this is the case unless the 5i25 
didn't exist when the docs were written or if it 
was not popular enough or if maybe the docs 
writer didn't have one on hand to play with.

I full well realize that if I already fully 
understood hm2 the lack of 5i25 info would not be 
a problem but at this time my only "window" into hm2 is the 5i25 and 7i78.

In my little world that's all there is!

Thanks again,
Cecil

At 10:54 AM 1/2/2017, you wrote:
>On 2 January 2017 at 15:47, andy pugh 
> wrote: > There is a 
>slightly better set of docs here: > 
>http://linuxcnc.org/docs/devel/html/drivers/hostmot2.html  
> > But it is very much out-of date. One way in 
>which is is out of date is in insisting that 
>only step-dir mode is supported by the driver, 
>whereas it is now possible to use all the modes 
>up to and including a 6-pin 16-step table 
>generated mode. -- atp "A motorcycle is a 
>bicycle with a pandemonium attachment and is 
>designed for the especial use of mechanical 
>geniuses, daredevils and lunatics." — George 
>Fitch, Atlanta Constitution Newspaper, 1916 
>-- 
>Check out the vibrant tech community on one of 
>the world's most engaging tech sites, 
>SlashDot.org! http://sdm.link/slashdot 
>___ 
>Emc-users mailing list 
>Emc-users@lists.sourceforge.net 
>https://lists.sourceforge.net/lists/listinfo/emc-users


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Inverting the PWM signal to mesa 7i78

2017-01-02 Thread andy pugh
On 2 January 2017 at 15:47, andy pugh  wrote:
> There is a slightly better set of docs here:
> http://linuxcnc.org/docs/devel/html/drivers/hostmot2.html
> But it is very much out-of date.

One way in which is is out of date is in insisting that only step-dir
mode is supported by the driver, whereas it is now possible to use all
the modes up to and including a 6-pin 16-step table generated mode.

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1916

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Inverting the PWM signal to mesa 7i78

2017-01-02 Thread andy pugh
On 2 January 2017 at 15:35, Cecil Thomas  wrote:
>   My experience has been that there is a presumption of comprehension
> in the documentation of hm2 that does not necessarily exist in the user (me).

There is a slightly better set of docs here:
http://linuxcnc.org/docs/devel/html/drivers/hostmot2.html
But it is very much out-of date. The fault is mine, really, I added
support for a bunch of extra modules and never updated that file.

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1916

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Inverting the PWM signal to mesa 7i78

2017-01-02 Thread Cecil Thomas
Gregg,
I am using a common treadmill controller called an MC-60. I chose it 
after months of research and deliberation --NOT.
Actually it and the motor were in the treadmill that I was given to 
get it out of a friends house.  It is not four quadrant, just a 
simple scr drive, but it works just fine for my application. I do 
threading on this machine but not rigid tapping.

If you haven't installed the motor yet you will find that the 
treadmill motor's rated speed for the rated hp is probably around 
6000 rpm so you will either need to provide an additional stage of 
belt reduction to get you down to threading speed with enough torque 
to do the job.

Cecil


 >What controller are you using? I need one able to handle a 110 volt 
DC, 1.5HP treadmill motor. My 9x20 CNC conversion is on hold due to a 
lack of motor controller.


 >>I am running a cnc'd jet 9x20 lathe with a treadmill motor and dc 
motor controller with a 5k pot for speed control in manual.

 >>Thanks,
 >>Cecil


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Inverting the PWM signal to mesa 7i78

2017-01-02 Thread Cecil Thomas
Thanks Gene and Andy.  I believe Andy's answer is specific enough for 
me to implement and I will try it as soon as I get to the shop.
I am pretty slow on the software side of hal and hm2.  It is taking 
me a while to get my mind around the syntax.

  My experience has been that there is a presumption of comprehension 
in the documentation of hm2 that does not necessarily exist in the user (me).

 >(the docs are here, but could certainly be clearer, it's too 
complicated a subject to be properly covered by a simple manpage 
layout like that) 
http://linuxcnc.org/docs/2.7/html/man/man9/hostmot2.9.html#General%20Purpose%20I/O


 >>How and where do I 'invert the pwm'
 >>
<>Thanks,
 >>Cecil


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Inverting the PWM signal to mesa 7i78

2017-01-02 Thread andy pugh
On 2 January 2017 at 04:39, Cecil Thomas  wrote:
> How and where do I 'invert the pwm'

The PWM signal appears to be on GPIO number 8 from the 5i25. So insert
this line in your HAL file somewhere:

setp hm2_5i25.0.gpio.008.invert_output 1

(the docs are here, but could certainly be clearer, it's too
complicated a subject to be properly covered by a simple manpage
layout like that)
http://linuxcnc.org/docs/2.7/html/man/man9/hostmot2.9.html#General%20Purpose%20I/O

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1916

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Inverting the PWM signal to mesa 7i78

2017-01-01 Thread Gene Heskett
On Sunday 01 January 2017 23:39:21 Cecil Thomas wrote:

> I am running a cnc'd jet 9x20 lathe with a treadmill motor and dc
> motor controller with a 5k pot for speed control in manual.
>
> I previously was running the speed controlled from LCNC from the
> parport to  an opto interupter for isolation from the motor
> controller which worked fine.
>
> I was running Gecko 320's with direct connection to the parport cable
> (no breakout board).  Everything worked as advertised but a little
> slow due to latency issues. I recently upgraded to mesa 5i25/7i78 and
> have worked out all the problems (mostly created by myself).
> ...Except for one:
>
> I am using the 7i78's isolated pwm to analog output for speed control
> and it works as advertised as well which means that the "wiper"
> voltage on pin 17 starts out at 10 volts when the speed command is 0
> rpm and goes down to 0 volts when the speed command is at max.
> I know that the 7i78 manual warns that this will be the case and that
> the "pwm must be inverted" if I need the analog out to follow the
> speed command directly instead of inversely.
>
> Problem is that I can't figure out where or how to "invert the
> PWM".  The only signal I seem to be able to access in hal is floating
> point rpm 0 to max (my max is 1200 rpm).  So when I invert the signal
> the result is the mathmatical reciprocal of 1 to 1200
> or 1 to .0008. Of course when this gets to the motor controller
> the resulting output is 0 speed at all demands.
>
> How and where do I 'invert the pwm'

I think, (Hi Cecil) that you should treat the 5i25's pwm output pin as if 
it was a gpio, and set it to "is-inverted". That should turn the output 
upside down and do what you need.  That does seem odd though.  And I am 
assuming the pwm itself is generated in the 5i25.  I would be inclined 
to replace that 7i78's d/a with a SpinX1, which is what I have 2 of in 
my systems now, one in the lathe you helped load last summer, running a 
vfd and a 1hp 3phase I bought a pair of from a local recycler, and the 
7x12 has a 1 hp treadmill motor being controlled by one of the Pico 
systems pwm-servo's.

At risk of being a bit picky to set up, another way is to also use a 
sum2, with input 0 set at 10 with a gain of 1, and input 1's gain 
(scale?) at -1, feeding its input with the 0-10 signal from the PID. 
Feed the resultant 10 to 0 signal to the 5i25.  But I'd druther just 
tell that gpio pin to invert the waveform. Thats just an extra setp in 
the hal file.

Have a better 2017 Cecil.
> Thanks,
> Cecil
>
>
> --
> Check out the vibrant tech community on one of the world's
> most engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Inverting the PWM signal to mesa 7i78

2017-01-01 Thread Cecil Thomas
I am running a cnc'd jet 9x20 lathe with a treadmill motor and dc 
motor controller with a 5k pot for speed control in manual.

I previously was running the speed controlled from LCNC from the 
parport to  an opto interupter for isolation from the motor 
controller which worked fine.

I was running Gecko 320's with direct connection to the parport cable 
(no breakout board).  Everything worked as advertised but a little 
slow due to latency issues. I recently upgraded to mesa 5i25/7i78 and 
have worked out all the problems (mostly created by myself).
...Except for one:

I am using the 7i78's isolated pwm to analog output for speed control 
and it works as advertised as well which means that the "wiper" 
voltage on pin 17 starts out at 10 volts when the speed command is 0 
rpm and goes down to 0 volts when the speed command is at max.
I know that the 7i78 manual warns that this will be the case and that 
the "pwm must be inverted" if I need the analog out to follow the 
speed command directly instead of inversely.

Problem is that I can't figure out where or how to "invert the 
PWM".  The only signal I seem to be able to access in hal is floating 
point rpm 0 to max (my max is 1200 rpm).  So when I invert the signal 
the result is the mathmatical reciprocal of 1 to 1200
or 1 to .0008. Of course when this gets to the motor controller 
the resulting output is 0 speed at all demands.

How and where do I 'invert the pwm'

Thanks,
Cecil


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users