Re: [Emc-users] Beaglebone and MachineKit

2020-12-12 Thread John Dammeyer
The problem with the boards are that they are a little too general purpose.  So 
much more is needed above and beyond isolated outputs or inputs.  

For example, say you want RS485 for the spindle controller.  Or maybe CANopen 
CAN bus for pick and place tools to bring in raw material and remove finished 
goods.  Even just a tool changer.

The Beagle has CAN bus and Serial ports along with I2C and SPI.  These should 
be configured so it's possible add an LCD display with touch screen.  If they 
make one of the CAN pins a switch input then the CAN port is lost.  That's what 
happened with the 4D Systems LCD cape I bought (now discontinued).  Useless if 
I also want a CAN cape.

A cape meant for CNC should know that LIMIT and ESTOP switches should be NC 
type for safety.  So no disabling outputs with the ESTOP signal.

 A hardware PWM module on the Beagle should be an output.  And ideally, with a 
jumper, a PWM to 0-10V output or else STEP with the corresponding DIRECTION 
signal.  

Inputs tied to the AB and Index input of one of the quadrature encoder modules.

Ultimately what's more cost effective and saleable?  A general purpose board 
that still needs another BoB or a dedicated interface that would work with 
_most_ mills or lathes.

IMHO the latter.

John






> -Original Message-
> From: Chris Albertson [mailto:albertson.ch...@gmail.com]
> Sent: December-12-20 10:37 PM
> To: Enhanced Machine Controller (EMC)
> Subject: Re: [Emc-users] Beaglebone and MachineKit
> 
> I just looked.   That is a really nice way to design this.   At first I
> thought "Three boards? Why?"  but this gives you some flexibility to change
> out one board and also you have some packaging options too.
> 
> One thing I want to point out is that anyone here could have this PCB made
> for 40 cents each and have a stack of them in hand before the start of
> 2021.   However it might be worth a re-design using surface mount parts
> because JLCPCB now offers to assemble SMT parts at no cost.  They would
> solder everything but the connectors and it would cost maybe $1 per PCB
> total.
> 
> On Sat, Dec 12, 2020 at 9:44 PM Robert Murphy  wrote:
> 
> > I used a 3 board solution on my BBB before switching from MK to Linuxcnc.
> >
> > https://github.com/ozzyrob/pp_cape
> >
> > https://github.com/ozzyrob/pp_bob_input
> >
> > https://github.com/ozzyrob/pp_bob_output
> >
> >
> > The cape attaches as normal and the 2 other boards sit either side
> > connected by a short ribbon cable.
> >
> > Still have a few sets of boards left over, and one set of 3 fully built
> > that I used but no longer have a use for.
> >
> > There are pretty basic but I found them to work without any issues.
> >
> > On 13/12/20 7:18 am, Alan Condit wrote:
> > > Marcus,
> > >
> > > Jon Elson (Pico-systems) sells the Cramps board designed by Charles
> > > Steinkuehler that can run six Pololu stepper drives (like 35v 1 to 2
> > amps).
> > > I designed a little PCB that can plug into three of the stepper driver
> > > sockets to allow it to control 3 external drives. They are or were
> > > available on OSHPark as CRAMPS-BOB3-a3.
> > >
> > > Alan
> > >
> > >
> > >> From: marcus.bow...@visible.eclipse.co.uk
> > >> To: EnhancedController 
> > >> Cc:
> > >> Bcc:
> > >> Date: Sat, 12 Dec 2020 19:38:12 +
> > >> Subject: [Emc-users] Beaglebone and MachineKit
> > >> John (or anyone else),
> > >>
> > >> Is there a 'cape' currently available to suit the Beaglebone Black
> > >> running MachineKit or LinuxCNC?
> > >> I know there used to be a cape specifically for that purpose, but it has
> > >> been out of production for some time.
> > >> I have a Beaglebone I would like to press into service running either
> > >> LinuxCNC or MachineKit.
> > >> Are images available for both?
> > >>
> > >> Marcus
> > >>
> > >>
> > > ___
> > > Emc-users mailing list
> > > Emc-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> 
> 
> --
> 
> Chris Albertson
> Redondo Beach, California
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Raspberry Pi LinuxCNC 2.8 question.

2020-12-12 Thread Gene Heskett
On Saturday 12 December 2020 22:04:12 Chris Albertson wrote:

> This is NOT a "Raspberry Pi" thing, not even a "Linux thing" asking to
> run an executable is specific to Debian Buster.   I think Debian must
> be a distant 6th place among operating system running on Pi.  
> Raspberian is #1 by far, then a couple of versions of Ubuntu and then
> Debian.That said, all these other in 1st to 5th place are modified
> versions of Debian. Circular logic, I guess.  Butt goes to show most
> users prefer some modifications to Debian.

It (raspian) also is forced on pi users by debian's refusal to modify the 
boot partition layout to match that of the pi, which is different from 
most other arm offerings. In self defense because I need the realtime 
kernel, I developed an install method that does work on pi's. 

> BTW Apple's macOS makes a compromise.  It asks you only the first time
> you run the app.  It says "You are about to run this thing downloaded
> from the Internet, Are you sure?"  If you click "yes" it remembers and
> does not ask the next time.This is the best, I think.   It
> prevents people from getting tricked into running random software but
> is not so anoying.
>
> The problem with with Windows is you can't tell what will happen if
> you click an icon.  You click this thing that claims to be a nude
> photo of some celebrity and it really is a program that logs
> keystrokes and sends them to some Russian mafia guy who wants your
> password to your bank account.
>
> The neat thing about Debian is that it is open source and you can
> modify it any way you like
>
> On Sat, Dec 12, 2020 at 1:22 PM John Dammeyer 
>
> wrote:
> > The only conclusion I can come to, that the checked box for
> > executables isn't the default, is that indeed 99.9% of Raspberry Pi
> > users are not that bright where 100% of Windows users are.


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)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Beaglebone and MachineKit

2020-12-12 Thread Chris Albertson
I just looked.   That is a really nice way to design this.   At first I
thought "Three boards? Why?"  but this gives you some flexibility to change
out one board and also you have some packaging options too.

One thing I want to point out is that anyone here could have this PCB made
for 40 cents each and have a stack of them in hand before the start of
2021.   However it might be worth a re-design using surface mount parts
because JLCPCB now offers to assemble SMT parts at no cost.  They would
solder everything but the connectors and it would cost maybe $1 per PCB
total.

On Sat, Dec 12, 2020 at 9:44 PM Robert Murphy  wrote:

> I used a 3 board solution on my BBB before switching from MK to Linuxcnc.
>
> https://github.com/ozzyrob/pp_cape
>
> https://github.com/ozzyrob/pp_bob_input
>
> https://github.com/ozzyrob/pp_bob_output
>
>
> The cape attaches as normal and the 2 other boards sit either side
> connected by a short ribbon cable.
>
> Still have a few sets of boards left over, and one set of 3 fully built
> that I used but no longer have a use for.
>
> There are pretty basic but I found them to work without any issues.
>
> On 13/12/20 7:18 am, Alan Condit wrote:
> > Marcus,
> >
> > Jon Elson (Pico-systems) sells the Cramps board designed by Charles
> > Steinkuehler that can run six Pololu stepper drives (like 35v 1 to 2
> amps).
> > I designed a little PCB that can plug into three of the stepper driver
> > sockets to allow it to control 3 external drives. They are or were
> > available on OSHPark as CRAMPS-BOB3-a3.
> >
> > Alan
> >
> >
> >> From: marcus.bow...@visible.eclipse.co.uk
> >> To: EnhancedController 
> >> Cc:
> >> Bcc:
> >> Date: Sat, 12 Dec 2020 19:38:12 +
> >> Subject: [Emc-users] Beaglebone and MachineKit
> >> John (or anyone else),
> >>
> >> Is there a 'cape' currently available to suit the Beaglebone Black
> >> running MachineKit or LinuxCNC?
> >> I know there used to be a cape specifically for that purpose, but it has
> >> been out of production for some time.
> >> I have a Beaglebone I would like to press into service running either
> >> LinuxCNC or MachineKit.
> >> Are images available for both?
> >>
> >> Marcus
> >>
> >>
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>


-- 

Chris Albertson
Redondo Beach, California

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Beaglebone and MachineKit

2020-12-12 Thread John Dammeyer
Out of curiosity.  Why did you switch away from the BB and MK to LinuxCNC?
John


> -Original Message-
> From: Robert Murphy [mailto:robert.mur...@gmx.com]
> Sent: December-12-20 9:43 PM
> To: emc-users@lists.sourceforge.net
> Subject: Re: [Emc-users] Beaglebone and MachineKit
> 
> I used a 3 board solution on my BBB before switching from MK to Linuxcnc.
> 
> https://github.com/ozzyrob/pp_cape
> 
> https://github.com/ozzyrob/pp_bob_input
> 
> https://github.com/ozzyrob/pp_bob_output
> 
> 
> The cape attaches as normal and the 2 other boards sit either side
> connected by a short ribbon cable.
> 
> Still have a few sets of boards left over, and one set of 3 fully built
> that I used but no longer have a use for.
> 
> There are pretty basic but I found them to work without any issues.
> 
> On 13/12/20 7:18 am, Alan Condit wrote:
> > Marcus,
> >
> > Jon Elson (Pico-systems) sells the Cramps board designed by Charles
> > Steinkuehler that can run six Pololu stepper drives (like 35v 1 to 2 amps).
> > I designed a little PCB that can plug into three of the stepper driver
> > sockets to allow it to control 3 external drives. They are or were
> > available on OSHPark as CRAMPS-BOB3-a3.
> >
> > Alan
> >
> >
> >> From: marcus.bow...@visible.eclipse.co.uk
> >> To: EnhancedController 
> >> Cc:
> >> Bcc:
> >> Date: Sat, 12 Dec 2020 19:38:12 +
> >> Subject: [Emc-users] Beaglebone and MachineKit
> >> John (or anyone else),
> >>
> >> Is there a 'cape' currently available to suit the Beaglebone Black
> >> running MachineKit or LinuxCNC?
> >> I know there used to be a cape specifically for that purpose, but it has
> >> been out of production for some time.
> >> I have a Beaglebone I would like to press into service running either
> >> LinuxCNC or MachineKit.
> >> Are images available for both?
> >>
> >> Marcus
> >>
> >>
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Beaglebone and MachineKit

2020-12-12 Thread Robert Murphy

I used a 3 board solution on my BBB before switching from MK to Linuxcnc.

https://github.com/ozzyrob/pp_cape

https://github.com/ozzyrob/pp_bob_input

https://github.com/ozzyrob/pp_bob_output


The cape attaches as normal and the 2 other boards sit either side
connected by a short ribbon cable.

Still have a few sets of boards left over, and one set of 3 fully built
that I used but no longer have a use for.

There are pretty basic but I found them to work without any issues.

On 13/12/20 7:18 am, Alan Condit wrote:

Marcus,

Jon Elson (Pico-systems) sells the Cramps board designed by Charles
Steinkuehler that can run six Pololu stepper drives (like 35v 1 to 2 amps).
I designed a little PCB that can plug into three of the stepper driver
sockets to allow it to control 3 external drives. They are or were
available on OSHPark as CRAMPS-BOB3-a3.

Alan



From: marcus.bow...@visible.eclipse.co.uk
To: EnhancedController 
Cc:
Bcc:
Date: Sat, 12 Dec 2020 19:38:12 +
Subject: [Emc-users] Beaglebone and MachineKit
John (or anyone else),

Is there a 'cape' currently available to suit the Beaglebone Black
running MachineKit or LinuxCNC?
I know there used to be a cape specifically for that purpose, but it has
been out of production for some time.
I have a Beaglebone I would like to press into service running either
LinuxCNC or MachineKit.
Are images available for both?

Marcus



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Raspberry Pi LinuxCNC 2.8 question.

2020-12-12 Thread John Dammeyer
> From: Chris Albertson [mailto:albertson.ch...@gmail.com]
> 
> This is NOT a "Raspberry Pi" thing, not even a "Linux thing" asking to run
> an executable is specific to Debian Buster.   I think Debian must be a
> distant 6th place among operating system running on Pi.   Raspberian is #1
> by far, then a couple of versions of Ubuntu and then Debian.That said,
> all these other in 1st to 5th place are modified versions of Debian.
>  Circular logic, I guess.  Butt goes to show most users prefer some
> modifications to Debian.
> 
It would be interesting to collect screenshots of peoples Raspberry Pi 
desktops.  Obviously this excludes many of the PiZeroW and any of the headless 
Pi or BBB.  
 
My desktops on my workstations are quite busy but organized the same regardless 
of the PC.
 
So the development tools are all in the same row.  On all my systems so I know 
where to find things.
John
 
 
 
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Raspberry Pi LinuxCNC 2.8 question.

2020-12-12 Thread Chris Albertson
This is NOT a "Raspberry Pi" thing, not even a "Linux thing" asking to run
an executable is specific to Debian Buster.   I think Debian must be a
distant 6th place among operating system running on Pi.   Raspberian is #1
by far, then a couple of versions of Ubuntu and then Debian.That said,
all these other in 1st to 5th place are modified versions of Debian.
 Circular logic, I guess.  Butt goes to show most users prefer some
modifications to Debian.

BTW Apple's macOS makes a compromise.  It asks you only the first time you
run the app.  It says "You are about to run this thing downloaded from the
Internet, Are you sure?"  If you click "yes" it remembers and does not ask
the next time.This is the best, I think.   It prevents people from
getting tricked into running random software but is not so anoying.

The problem with with Windows is you can't tell what will happen if you
click an icon.  You click this thing that claims to be a nude photo of some
celebrity and it really is a program that logs keystrokes and sends them to
some Russian mafia guy who wants your password to your bank account.

The neat thing about Debian is that it is open source and you can modify it
any way you like

On Sat, Dec 12, 2020 at 1:22 PM John Dammeyer 
wrote:

>
> The only conclusion I can come to, that the checked box for executables
> isn't the default, is that indeed 99.9% of Raspberry Pi users are not that
> bright where 100% of Windows users are.
>
-- 

Chris Albertson
Redondo Beach, California

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Question Regarding Selective Assignments in HAL

2020-12-12 Thread Jon Elson

On 12/12/2020 08:12 PM, Matthew Herd wrote:

   Which raises the question of how the inputs and outputs will be enumerated 
for the second board.  Will the second board inputs enumerate as 
ppmc.00.din.16.in through ppmc.din.31.in and the outputs as ppmc.00.dout.08.out 
through ppmc.00.dout.15.out?  I haven’t yet installed the second USC so I 
haven’t been able to test both on the same parallel port bus.

Yes, the above is correct.

Jon


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Question Regarding Selective Assignments in HAL

2020-12-12 Thread Gene Heskett
On Saturday 12 December 2020 21:12:08 Matthew Herd wrote:

> Thanks all for the answers on this.
>
> Andy, I’ll give your and Jon’s solutions some thought and try one of
> them.  Thank you!
>
> Gene, it’s a Bridgeport BOSS 5, which is a factory CNC knee mill
> heavily based on the standard Series 1.  The head is virtually
> identical to a manual Series 1 machine except for the motor and quill
> arrangement.  So all Bridgeports will reverse spindle speed on
> backgear.  I understand the ratio is approximately 8.3:1, but I
> haven’t been able to verify that.
>
> Jon, I have two USC boards on the same parallel port.  I think there
> is a bit of a clarity issue in the documentation here: 
> http://www.linuxcnc.org/docs/html/drivers/pico-ppmc.html
> .  The
> loadrt command references parallel port addresses.  Then the
> extradac=0xnn explanation indicates that a second board on the same
> parallel port should be referenced as 0x02.  Then later, the pins
> enumerate as ppmc.…. with  being the parallel port, not
> the board ID on the bus.  I understood port to refer to the ID on the
> bus, so I assumed the second board would be ppmc.02…. instead of
> ppmc.00… with the channel or pin number enumerating consecutively. 
> Which raises the question of how the inputs and outputs will be
> enumerated for the second board.  Will the second board inputs
> enumerate as ppmc.00.din.16.in through ppmc.din.31.in and the outputs
> as ppmc.00.dout.08.out through ppmc.00.dout.15.out?  I haven’t yet
> installed the second USC so I haven’t been able to test both on the
> same parallel port bus.
>
> Secondly, I had a few questions about your -1/+1 multiplication for
> the spindle speed.  I just want to confirm that if I command an M3
> S-1000 (assuming a plain configuration as shown in my current config),
> the spindle will run in reverse without any other input.
>
> > On Dec 12, 2020, at 11:53 AM, Jon Elson 
> > wrote:
> >
> > On 12/12/2020 08:12 AM, Matthew Herd wrote:
> >> Hi All,
> >>
> >> I’m sure there’s a simple answer for my question, but I haven’t
> >> been able to figure it out.  Currently the configuration for the
> >> spindle forward and reverse outputs is as follows:
> >>
> >> # connect spindle fwd/rev to I/O controller
> >> net SpindleFwd <= ppmc.2.dout.00.out
> >> net SpindleFwd => spindle.0.forward
> >> net SpindleRev <= ppmc.2.dout.01.out
> >> net SpindleRev => spindle.0.reverse
> >
> > ppmc.2 ???  You have THREE parallel ports with ppmc devices
> > connected?  Generally, you set the I/O port address in the line that
> > loads the ppmc driver in the univ_load.hal file, and it comes
> > out as ppmc.0.x
> >
> >> I would like to selectively reverse direction depending on whether
> >> a backgear input switch is triggered.  I see there is a gearchange
> >> component but I’m not clear on how to utilize it.
> >
> > No, don't use gearchange.  Use mux2 to select either -1.0 or +1.0 to
> > a signal depending on the backgear selector.  Then, feed that to
> > mult2 and multiply that by the spindle speed command
> > (motion.spindle-speed-out) to feed the spindle-speed signal.  If you
> > already have a mult2 in there with some value to scale the speed of
> > the spindle, then just use the mux2 to select between a positive and
> > a negative of that value.
> >
> > I think this is the simplest way to do it, rather than reversing the
> > way TWO different outputs work.
> >
It might, never tested it as the std reverse is to issue an M4, usuall on 
the same line as the S1500.

> > Jon

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)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Question Regarding Selective Assignments in HAL

2020-12-12 Thread Jon Elson

On 12/12/2020 08:12 PM, Matthew Herd wrote:

Jon, I have two USC boards on the same parallel port.  I think there is a bit of a 
clarity issue in the documentation here:  
http://www.linuxcnc.org/docs/html/drivers/pico-ppmc.html 
.  The loadrt command 
references parallel port addresses.  Then the extradac=0xnn explanation indicates 
that a second board on the same parallel port should be referenced as 0x02.
Nope.  The ppmc.n. references the parallel port, starting at 
0. Then, functions on the various devices are just 
enumerated from 0. So, if you have two PWM controllers, they 
will enumerate (normally)
as ppmc.0.pwm.00 through ppmc.0.pwm.03 and the second board 
will be ppmc.0.pwm.04 through pwm.07.  The first board's 
encoders will be encoder.00 through encoder.03 and the 2nd 
board will be encoder.04 through encoder.07.



Since multiple boards exchange sync signals on the parallel 
cable, it is best to have all boards on the same parallel 
port.  I'm guessing what you have done is to assign the I/O 
port address of your parallel port to the 3rd possible 
parport in the loadrt command line.  I guess there's no 
reason that this is in any way "wrong", it just surprised 
me, as I've never used the additional parallel port "slots" 
on the command line.


Secondly, I had a few questions about your -1/+1 multiplication for the spindle 
speed.  I just want to confirm that if I command an M3 S-1000 (assuming a plain 
configuration as shown in my current config), the spindle will run in reverse 
without any other input.

No, I don't think that will work, but it might.  generally, 
you use M03 for "forward" spindle, and M04 for "reverse".  
The way this works is the spindle speed is fed to the 
spindle DAC as a positive number (absolute value), and the 
direction is commanded by the SSR1 (forward) or SSR2 (reverse).
spindle.0.forward and spindle.0.reverse are brought out from 
inside LinuxCNC when the spindle speed is non-zero in that 
direction. univpwm_io.hal just routes those to the first two 
solid state relays.



Jon


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Raspberry Pi LinuxCNC 2.8 question.

2020-12-12 Thread Gene Heskett
On Saturday 12 December 2020 20:53:57 Jon Elson wrote:

> On 12/12/2020 06:01 PM, Gene Heskett wrote:
> > Simple, works 100% of the time if you can type. I've never
> > ever found a file manager that actually gets it right
> > OOTB. I think theres an unwritten rule that it won't. Why
> > muck around with a file manager? Except for the swiss army
> > knife called mc, most don't do what they need then to do
> > anyway.  Cheers, Gene Heskett
>
> For LinuxCNC, I create a toolbar launcher that has linuxcnc
> /blah/blah/configs//blah.ini

Exactly.

> so it launches LinuxCNC without having to select the configs
> file with the menu.  The procedure to create a toolbar
> launcher varies from Linux distro to distro, so I did not
> put that here.
>
> Jon
>
in a terminal, konsole preferred:
linuxcnc -l ENTER
has worked for arund 15 years on every distro we've supported.
Simple, skips the chooser stuff. As long as it is in your path, it just 
works. ISTR it even worked with my first BDI install. There were a lot 
of things broken with the bdi install at the time, but I don't recall 
that being one of them.

Thanks Jon.

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)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Question Regarding Selective Assignments in HAL

2020-12-12 Thread Matthew Herd
Thanks all for the answers on this.

Andy, I’ll give your and Jon’s solutions some thought and try one of them.  
Thank you!

Gene, it’s a Bridgeport BOSS 5, which is a factory CNC knee mill heavily based 
on the standard Series 1.  The head is virtually identical to a manual Series 1 
machine except for the motor and quill arrangement.  So all Bridgeports will 
reverse spindle speed on backgear.  I understand the ratio is approximately 
8.3:1, but I haven’t been able to verify that.

Jon, I have two USC boards on the same parallel port.  I think there is a bit 
of a clarity issue in the documentation here:  
http://www.linuxcnc.org/docs/html/drivers/pico-ppmc.html 
.  The loadrt command 
references parallel port addresses.  Then the extradac=0xnn explanation 
indicates that a second board on the same parallel port should be referenced as 
0x02.  Then later, the pins enumerate as ppmc.…. with  being the 
parallel port, not the board ID on the bus.  I understood port to refer to the 
ID on the bus, so I assumed the second board would be ppmc.02…. instead of 
ppmc.00… with the channel or pin number enumerating consecutively.  Which 
raises the question of how the inputs and outputs will be enumerated for the 
second board.  Will the second board inputs enumerate as ppmc.00.din.16.in 
through ppmc.din.31.in and the outputs as ppmc.00.dout.08.out through 
ppmc.00.dout.15.out?  I haven’t yet installed the second USC so I haven’t been 
able to test both on the same parallel port bus.

Secondly, I had a few questions about your -1/+1 multiplication for the spindle 
speed.  I just want to confirm that if I command an M3 S-1000 (assuming a plain 
configuration as shown in my current config), the spindle will run in reverse 
without any other input.


> On Dec 12, 2020, at 11:53 AM, Jon Elson  wrote:
> 
> On 12/12/2020 08:12 AM, Matthew Herd wrote:
>> Hi All,
>> 
>> I’m sure there’s a simple answer for my question, but I haven’t been able to 
>> figure it out.  Currently the configuration for the spindle forward and 
>> reverse outputs is as follows:
>> 
>> # connect spindle fwd/rev to I/O controller
>> net SpindleFwd <= ppmc.2.dout.00.out
>> net SpindleFwd => spindle.0.forward
>> net SpindleRev <= ppmc.2.dout.01.out
>> net SpindleRev => spindle.0.reverse
> ppmc.2 ???  You have THREE parallel ports with ppmc devices connected?  
> Generally, you set the I/O port address in the line that loads the ppmc 
> driver in the univ_load.hal file, and it comes out as
> ppmc.0.x
>> I would like to selectively reverse direction depending on whether a 
>> backgear input switch is triggered.  I see there is a gearchange component 
>> but I’m not clear on how to utilize it.
> No, don't use gearchange.  Use mux2 to select either -1.0 or +1.0 to a signal 
> depending on the backgear selector.  Then, feed that to mult2 and multiply 
> that by the spindle speed command
> (motion.spindle-speed-out) to feed the spindle-speed signal.  If you already 
> have a mult2 in there with some value to scale the speed of the spindle, then 
> just use the mux2 to select between a positive and a negative of that value.
> 
> I think this is the simplest way to do it, rather than reversing the way TWO 
> different outputs work.
> 
> Jon
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Raspberry Pi LinuxCNC 2.8 question.

2020-12-12 Thread Jon Elson

On 12/12/2020 06:01 PM, Gene Heskett wrote:
Simple, works 100% of the time if you can type. I've never 
ever found a file manager that actually gets it right 
OOTB. I think theres an unwritten rule that it won't. Why 
muck around with a file manager? Except for the swiss army 
knife called mc, most don't do what they need then to do 
anyway.  Cheers, Gene Heskett 
For LinuxCNC, I create a toolbar launcher that has linuxcnc 
/blah/blah/configs//blah.ini


so it launches LinuxCNC without having to select the configs 
file with the menu.  The procedure to create a toolbar 
launcher varies from Linux distro to distro, so I did not 
put that here.


Jon


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Raspberry Pi LinuxCNC 2.8 question.

2020-12-12 Thread John Dammeyer
> 
> On 12/12/2020 03:41 PM, John Dammeyer wrote:
> >> From: Nicklas SB Karlsson [mailto:nk@nksb.online]
> >>
> >> To make a link to a file "ln -s filename filename", read manual page
> >> "man ln", I always create the link in the wrong direction first time.
> >>
> > Oh gawd, that would mean using the command line.  How antiquated is that 
> > when the File manager drop down menu and dialogs do
> it for you?
> >
> >
> Can you do symbolic links with the menus?
> 
> Jon
>
I guess the question is would you want to?  And if so why?  I haven't needed 
one yet.

I'd like to emphasize here we're dealing with LinuxCNC and a graphical user 
interface.  That means you have a mouse and a keyboard and possibly even a 
touch screen and perhaps even a pendant. 

The MDI line is obviously command line oriented because the language (G-Code) 
is strings of characters.   The File Menu drop down gives the ability to choose 
what file to load.  

Move over to OctoPrint which on a Beagle and Replicape has been driving me 
batty this week.   No command line there really.  In fact, the easy way is to 
drag the gcode file over to the left side of the user interface and drop it.  
Then double click on it to load it ready for 3D printing.

The days of going outside the card to manually crank the engine on the front 
and then carefully adjust the spark advance lever as you drive are over.  For 
many things the command line is the lazy way to a solution.  Especially when 
there are tools that make dialog and menu oriented programs easy to write.

John






___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Raspberry Pi LinuxCNC 2.8 question.

2020-12-12 Thread Jon Elson

On 12/12/2020 03:41 PM, John Dammeyer wrote:

From: Nicklas SB Karlsson [mailto:nk@nksb.online]

To make a link to a file "ln -s filename filename", read manual page
"man ln", I always create the link in the wrong direction first time.


Oh gawd, that would mean using the command line.  How antiquated is that when 
the File manager drop down menu and dialogs do it for you?



Can you do symbolic links with the menus?

Jon


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Raspberry Pi LinuxCNC 2.8 question.

2020-12-12 Thread Jon Elson

On 12/12/2020 02:40 PM, Nicklas SB Karlsson wrote:
To make a link to a file "ln -s filename filename", read 
manual page "man ln", I always create the link in the 
wrong direction first time.


Yes, me too!  It is just totally Unix-like that the 
parameters are reversed depending on if it is an ln command 
or ln -s.  There never was a style sheet for the command syntax.


Jon


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Raspberry Pi LinuxCNC 2.8 question.

2020-12-12 Thread Gene Heskett
On Saturday 12 December 2020 16:41:29 John Dammeyer wrote:

> > From: Nicklas SB Karlsson [mailto:nk@nksb.online]
> >
> > To make a link to a file "ln -s filename filename", read manual page
> > "man ln", I always create the link in the wrong direction first
> > time.
>
> Oh gawd, that would mean using the command line.  How antiquated is
> that when the File manager drop down menu and dialogs do it for you?
>
> 

I'm glad you put a GRIN on that, somebody might even think you are 
serious.

> John
>
Good grief Charley Brown.  How about learning to use that command line?

Open a Konsole, add a few tabs, and in one of them any of them type 
linuxcnc -lENTER

The -l tells linuxcnc to use the same gui it used the last time you ran 
it.

Simple, works 100% of the time if you can type. I've never ever found a 
file manager that actually gets it right OOTB. I think theres an 
unwritten rule that it won't. Why muck around with a file manager?  
Except for the swiss army knife called mc, most don't do what they need 
then to do anyway.



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)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Raspberry Pi LinuxCNC 2.8 question.

2020-12-12 Thread John Dammeyer
> From: Nicklas SB Karlsson [mailto:nk@nksb.online]
> 
> To make a link to a file "ln -s filename filename", read manual page
> "man ln", I always create the link in the wrong direction first time.
> 
Oh gawd, that would mean using the command line.  How antiquated is that when 
the File manager drop down menu and dialogs do it for you?



John



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Beaglebone and MachineKit

2020-12-12 Thread Jon Elson
On 12/12/2020 01:38 PM, marcus.bow...@visible.eclipse.co.uk 
wrote:

John (or anyone else),

Is there a 'cape' currently available to suit the 
Beaglebone Black running MachineKit or LinuxCNC?
I know there used to be a cape specifically for that 
purpose, but it has been out of production for some time.
Yes, I make the "cramps" board that does that.  There may be 
newer version, this is the original scheme from Charles 
Steinkuehler.  See

http://pico-systems.com/osc2.5/catalog/product_info.php?cPath=2_id=1

Jon


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Raspberry Pi LinuxCNC 2.8 question.

2020-12-12 Thread Nicklas SB Karlsson
To make a link to a file "ln -s filename filename", read manual page 
"man ln", I always create the link in the wrong direction first time.


Den 2020-12-12 kl. 19:48, skrev John Dammeyer:

Hi all,
This seems so elementary but has me perplexed.
  
For the last 30 years or so Microsoft Windows has had the ability to create desktop shortcuts that are small files that link to the physical executable.  My BeagleBone with MachineKit can do that and so can the Pi LinuxCNC 2.8 as well as a Pi3 I have with a standard desktop.
  
But the difference between the LinuxCNC Pi and all the others is that shortcut put on the desktop always throws up a dialog telling me what I already know.  That this program is trying to run and would I like that or do I want to run it in the Terminal.  The answer is always I want to run it.
  
All the other systems can either be configured or automatically just run the application.   The configuration in the various desktops is usually a checkbox.  So although LinuxCNC 2.8 on the Pi has created a small shortcut file it does not have the ability to not disable the dialog.  Other Linux systems do.  I could grab and provide screen shots showing the differences but that's probably not needed.
  
Is there a way in this version of the LinuxCNC to bring it 30 years into the future or even just do like MachineKit on the Beagle and not ask that stupid question each time?
  
Thanks.

John
  
"ELS! Nothing else works as well for your Lathe"

Automation Artisans Inc.
www dot autoartisans dot com
  


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Raspberry Pi LinuxCNC 2.8 question.

2020-12-12 Thread John Dammeyer
Thank you.  I asked several other 'Linux' experts and their comments were all 
pretty well like this.
=
"Windows will just let you click nilly willy on anything to run it . 
yeah, that sounds real cool  what could possibly go wrong 

Makes me wonder when Windows will get around to doing it properly when 
Linux has been warning people forever when they are about to run an 
executable instead of bring up a document in a word processor or a 
picture in photo editing software or what-have-you."
=

The only conclusion I can come to, that the checked box for executables isn't 
the default, is that indeed 99.9% of Raspberry Pi users are not that bright 
where 100% of Windows users are.

Thanks again for finding that link.  I tried and failed.
John

> -Original Message-
> From: andy pugh [mailto:bodge...@gmail.com]
> Sent: December-12-20 11:49 AM
> To: Enhanced Machine Controller (EMC)
> Subject: Re: [Emc-users] Raspberry Pi LinuxCNC 2.8 question.
> 
> On Sat, 12 Dec 2020 at 18:50, John Dammeyer  wrote:
> 
> > Is there a way in this version of the LinuxCNC to bring it 30 years into 
> > the future or even just do like MachineKit on the Beagle and
> not ask that stupid question each time?
> 
> I googled for "seems to be an executable script" and the first hit had
> the answer:
> 
> https://www.raspberrypi.org/forums/viewtopic.php?t=248380
> 
> 
> --
> 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, 1912
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Beaglebone and MachineKit

2020-12-12 Thread John Dammeyer
A google search brings this up.

http://blog.machinekit.io/p/hardware-capes.html

I believe this one is still available.
http://xylotex.netfirms.com/OSCommerce/catalog/product_info.php?cPath=33_id=146=b1c8a413d99cd8dd006bc517f67c18cb

I have the older one.  I would have used the Beagle for my Mill but the 
enabling wiring was backwards for NC limit switches IIRC.  And ultimately for 
me, not enough I/O.

I'm a big proponent of using a Break Out Board (BoB) for the interface between 
whatever automation system you choose and the physical hardware.  It generally 
provides the terminal strips and often the buffering and a DB-25 or 26 pin 
header (or two) out to the control system.

So at the moment, I could plug my BBB with Xylotex cape and MachineKit into the 
BoB and run the system.  I can connect with the Parallel Port on the PC and 
then dual boot windows with MACH3 or LinuxCNC and evaluate behaviours.

Or taking it one step further, using an Ethernet connected MESA 7i92H and 
LinuxCNC running on either the PC or a Raspberry Pi4.  Sadly MESA has never 
interfaced to even the Windows newer MACH4 so an Ethernet SmoothStepper would 
be required for that.  And it's about twice the price of the MESA board.

So the questions to ask yourself are:
1. Beagle ($43) + Xylotex cape ($25) and still some sort of BoB  (MachineKit)
2. Raspberry Pi4 with 2GB ($49) + MESA 7i92H ($89) and still some sort of BoB 
(LinuxCNC)

Without a doubt the Beagle approach is cheaper until you factor in two parallel 
port connections with the MESA and only one with BBB.

John



> -Original Message-
> From: marcus.bow...@visible.eclipse.co.uk 
> [mailto:marcus.bow...@visible.eclipse.co.uk]
> Sent: December-12-20 11:38 AM
> To: EnhancedController
> Subject: [Emc-users] Beaglebone and MachineKit
> 
> John (or anyone else),
> 
> Is there a 'cape' currently available to suit the Beaglebone Black
> running MachineKit or LinuxCNC?
> I know there used to be a cape specifically for that purpose, but it has
> been out of production for some time.
> I have a Beaglebone I would like to press into service running either
> LinuxCNC or MachineKit.
> Are images available for both?
> 
> Marcus
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Beaglebone and MachineKit

2020-12-12 Thread Alan Condit
Marcus,

Jon Elson (Pico-systems) sells the Cramps board designed by Charles
Steinkuehler that can run six Pololu stepper drives (like 35v 1 to 2 amps).
I designed a little PCB that can plug into three of the stepper driver
sockets to allow it to control 3 external drives. They are or were
available on OSHPark as CRAMPS-BOB3-a3.

Alan


> From: marcus.bow...@visible.eclipse.co.uk
> To: EnhancedController 
> Cc:
> Bcc:
> Date: Sat, 12 Dec 2020 19:38:12 +
> Subject: [Emc-users] Beaglebone and MachineKit
> John (or anyone else),
>
> Is there a 'cape' currently available to suit the Beaglebone Black
> running MachineKit or LinuxCNC?
> I know there used to be a cape specifically for that purpose, but it has
> been out of production for some time.
> I have a Beaglebone I would like to press into service running either
> LinuxCNC or MachineKit.
> Are images available for both?
>
> Marcus
>
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Beaglebone and MachineKit

2020-12-12 Thread Mark Johnsen
It's been so long since I looked at this, but I think it's the CRAMPS board:
http://pico-systems.com/osc2.5/catalog/product_info.php?products_id=1

Mark

On Sat, Dec 12, 2020 at 11:38 AM 
wrote:

> John (or anyone else),
>
> Is there a 'cape' currently available to suit the Beaglebone Black
> running MachineKit or LinuxCNC?
> I know there used to be a cape specifically for that purpose, but it has
> been out of production for some time.
> I have a Beaglebone I would like to press into service running either
> LinuxCNC or MachineKit.
> Are images available for both?
>
> Marcus
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Raspberry Pi LinuxCNC 2.8 question.

2020-12-12 Thread andy pugh
On Sat, 12 Dec 2020 at 18:50, John Dammeyer  wrote:

> Is there a way in this version of the LinuxCNC to bring it 30 years into the 
> future or even just do like MachineKit on the Beagle and not ask that stupid 
> question each time?

I googled for "seems to be an executable script" and the first hit had
the answer:

https://www.raspberrypi.org/forums/viewtopic.php?t=248380


-- 
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, 1912


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Raspberry Pi LinuxCNC 2.8 question.

2020-12-12 Thread andy pugh
On Sat, 12 Dec 2020 at 18:50, John Dammeyer  wrote:

> Is there a way in this version of the LinuxCNC to bring it 30 years into the 
> future or even just do like MachineKit on the Beagle and not ask that stupid 
> question each time?

The desktop shortcut is just a little text file. Maybe comparing the
contents with a working shortcut would help?

But this _soulds_ like an excessively strict security policy.

-- 
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, 1912


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Beaglebone and MachineKit

2020-12-12 Thread marcus . bowman

John (or anyone else),

Is there a 'cape' currently available to suit the Beaglebone Black 
running MachineKit or LinuxCNC?
I know there used to be a cape specifically for that purpose, but it has 
been out of production for some time.
I have a Beaglebone I would like to press into service running either 
LinuxCNC or MachineKit.

Are images available for both?

Marcus


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Raspberry Pi LinuxCNC 2.8 question.

2020-12-12 Thread John Dammeyer
Hi all,
This seems so elementary but has me perplexed.  
 
For the last 30 years or so Microsoft Windows has had the ability to create 
desktop shortcuts that are small files that link to the physical executable.  
My BeagleBone with MachineKit can do that and so can the Pi LinuxCNC 2.8 as 
well as a Pi3 I have with a standard desktop.
 
But the difference between the LinuxCNC Pi and all the others is that shortcut 
put on the desktop always throws up a dialog telling me what I already know.  
That this program is trying to run and would I like that or do I want to run it 
in the Terminal.  The answer is always I want to run it.
 
All the other systems can either be configured or automatically just run the 
application.   The configuration in the various desktops is usually a checkbox. 
 So although LinuxCNC 2.8 on the Pi has created a small shortcut file it does 
not have the ability to not disable the dialog.  Other Linux systems do.  I 
could grab and provide screen shots showing the differences but that's probably 
not needed.
 
Is there a way in this version of the LinuxCNC to bring it 30 years into the 
future or even just do like MachineKit on the Beagle and not ask that stupid 
question each time?
 
Thanks.
John
 
"ELS! Nothing else works as well for your Lathe"
Automation Artisans Inc.
www dot autoartisans dot com 
 

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Question Regarding Selective Assignments in HAL

2020-12-12 Thread Jon Elson

On 12/12/2020 08:12 AM, Matthew Herd wrote:

Hi All,

I’m sure there’s a simple answer for my question, but I haven’t been able to 
figure it out.  Currently the configuration for the spindle forward and reverse 
outputs is as follows:

# connect spindle fwd/rev to I/O controller
net SpindleFwd <= ppmc.2.dout.00.out
net SpindleFwd => spindle.0.forward
net SpindleRev <= ppmc.2.dout.01.out
net SpindleRev => spindle.0.reverse
ppmc.2 ???  You have THREE parallel ports with ppmc devices 
connected?  Generally, you set the I/O port address in the 
line that loads the ppmc driver in the univ_load.hal 
file, and it comes out as

ppmc.0.x

I would like to selectively reverse direction depending on whether a backgear 
input switch is triggered.  I see there is a gearchange component but I’m not 
clear on how to utilize it.
No, don't use gearchange.  Use mux2 to select either -1.0 or 
+1.0 to a signal depending on the backgear selector.  Then, 
feed that to mult2 and multiply that by the spindle speed 
command
(motion.spindle-speed-out) to feed the spindle-speed 
signal.  If you already have a mult2 in there with some 
value to scale the speed of the spindle, then just use the 
mux2 to select between a positive and a negative of that value.


I think this is the simplest way to do it, rather than 
reversing the way TWO different outputs work.


Jon


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Question Regarding Selective Assignments in HAL

2020-12-12 Thread Gene Heskett
On Saturday 12 December 2020 09:53:33 andy pugh wrote:

> On Sat, 12 Dec 2020 at 14:47, John Figie  wrote:
> > I think a multiplexer will do what you want.
> > http://linuxcnc.org/docs/2.8/html/man/man9/mux2.9.html
>
> mux2 only multiplexes floats. See my reply for how to use mux_generic
> to make bitwise muxes.

I'd forgotten the float limitation, you are correct as usual. 

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)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Question Regarding Selective Assignments in HAL

2020-12-12 Thread Gene Heskett
On Saturday 12 December 2020 09:12:47 Matthew Herd wrote:

> Hi All,
>
> I’m sure there’s a simple answer for my question, but I haven’t been
> able to figure it out.  Currently the configuration for the spindle
> forward and reverse outputs is as follows:
>
> # connect spindle fwd/rev to I/O controller
> net SpindleFwd <= ppmc.2.dout.00.out
> net SpindleFwd => spindle.0.forward
> net SpindleRev <= ppmc.2.dout.01.out
> net SpindleRev => spindle.0.reverse
>
> I would like to selectively reverse direction depending on whether a
> backgear input switch is triggered.  I see there is a gearchange
> component but I’m not clear on how to utilize it.  Does the gearchange
> component translate to the pin assignments for spindle.0.forward and
> spindle.0.reverse?  Don’t I need some additional logic?  The goal is
> to have logic like so:
>
> if (backgear == TRUE) {
>   net SpindleFwd <= ppmc.2.dout.00.out
>   net SpindleFwd => spindle.0.forward
>   net SpindleRev <= ppmc.2.dout.01.out
>   net SpindleRev => spindle.0.reverse
> } else {
>   net SpindleFwd <= ppmc.2.dout.01.out
>   net SpindleFwd => spindle.0.forward
>   net SpindleRev <= ppmc.2.dout.00.out
>   net SpindleRev => spindle.0.reverse
> }
>
> As you can see, the only change is that I’m swapping which output is
> assigned to spindle.0.forward and spindle.0.reverse.
>
Hal doesn't have an IF/ELSE/ENDIF function that I know of. So you'll have 
to use a pair of mux2's to steer the signal according to the status 
of "backgear", easy enough to do. Drive the mux2's sel pin 
with "backgear", but interchange the inputs of the two modules. The 
biggest problem is speed as the update is limited by servo loop, 
generally 1 kilohertz, timing, so you can't steer a 10 kilohertz 
pwmgen's output that way. Even a 100 hz pwm would become badly damaged 
by that sort of a switch.

I'm not well versed in all the machines ever made, but I've never heard 
of a backgear, or spindle gearshift that reversed the spindles direction 
of rotation.  Not saying that is impossible but it sure seems odd.

> Thanks,
> Matt

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)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Question Regarding Selective Assignments in HAL

2020-12-12 Thread andy pugh
On Sat, 12 Dec 2020 at 14:47, John Figie  wrote:
>
> I think a multiplexer will do what you want.
> http://linuxcnc.org/docs/2.8/html/man/man9/mux2.9.html

mux2 only multiplexes floats. See my reply for how to use mux_generic
to make bitwise muxes.

-- 
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, 1912


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Question Regarding Selective Assignments in HAL

2020-12-12 Thread andy pugh
On Sat, 12 Dec 2020 at 14:15, Matthew Herd  wrote:

> I would like to selectively reverse direction depending on whether a backgear 
> input switch is triggered.  I see there is a gearchange component but I’m not 
> clear on how to utilize it.  Does the gearchange component translate to the 
> pin assignments for spindle.0.forward and spindle.0.reverse?

No, it handles the ratio change, so that the correct motor speed is
sent to the drive for the selected spindle speed.

> if (backgear == TRUE) {
> net SpindleFwd <= ppmc.2.dout.00.out
> net SpindleFwd => spindle.0.forward
> net SpindleRev <= ppmc.2.dout.01.out
> net SpindleRev => spindle.0.reverse
> } else {
> net SpindleFwd <= ppmc.2.dout.01.out
> net SpindleFwd => spindle.0.forward
> net SpindleRev <= ppmc.2.dout.00.out
> net SpindleRev => spindle.0.reverse
> }

One way is with a pair of bitwise mux components.
http://linuxcnc.org/docs/2.8/html/man/man9/mux_generic.9.html

loadrt mux_generic config="bb2,bb2"
...
addf mux-gen.00 servo-thread
addf mux-gen.01 servo-thread
...
net backgear => mux-gen.00.sel-bit-00mux-gen.01.sel-bit-00
net SpindleFwdCmd spindle.0.forward => mux-gen.00.in-bit-00
mux-gen.01.in-bit-01
net SpindleRevCmd spindle.0.reverse => mux-gen.01.in-bit-00
mux-gen.00.in-bit-01
net SpindleFwdPin => mux-gen.00.out-bit => ppmc.2.dout.00.out
net SpindleRevPin => mux-gen.00.out-bit => ppmc.2.dout.01.out


-- 
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, 1912


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Question Regarding Selective Assignments in HAL

2020-12-12 Thread John Figie
I think a multiplexer will do what you want.
http://linuxcnc.org/docs/2.8/html/man/man9/mux2.9.html



On Sat, Dec 12, 2020, 8:15 AM Matthew Herd  wrote:

> Hi All,
>
> I’m sure there’s a simple answer for my question, but I haven’t been able
> to figure it out.  Currently the configuration for the spindle forward and
> reverse outputs is as follows:
>
> # connect spindle fwd/rev to I/O controller
> net SpindleFwd <= ppmc.2.dout.00.out
> net SpindleFwd => spindle.0.forward
> net SpindleRev <= ppmc.2.dout.01.out
> net SpindleRev => spindle.0.reverse
>
> I would like to selectively reverse direction depending on whether a
> backgear input switch is triggered.  I see there is a gearchange component
> but I’m not clear on how to utilize it.  Does the gearchange component
> translate to the pin assignments for spindle.0.forward and
> spindle.0.reverse?  Don’t I need some additional logic?  The goal is to
> have logic like so:
>
> if (backgear == TRUE) {
> net SpindleFwd <= ppmc.2.dout.00.out
> net SpindleFwd => spindle.0.forward
> net SpindleRev <= ppmc.2.dout.01.out
> net SpindleRev => spindle.0.reverse
> } else {
> net SpindleFwd <= ppmc.2.dout.01.out
> net SpindleFwd => spindle.0.forward
> net SpindleRev <= ppmc.2.dout.00.out
> net SpindleRev => spindle.0.reverse
> }
>
> As you can see, the only change is that I’m swapping which output is
> assigned to spindle.0.forward and spindle.0.reverse.
>
> Thanks,
> Matt
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Question Regarding Selective Assignments in HAL

2020-12-12 Thread Matthew Herd
Hi All,

I’m sure there’s a simple answer for my question, but I haven’t been able to 
figure it out.  Currently the configuration for the spindle forward and reverse 
outputs is as follows:

# connect spindle fwd/rev to I/O controller
net SpindleFwd <= ppmc.2.dout.00.out
net SpindleFwd => spindle.0.forward
net SpindleRev <= ppmc.2.dout.01.out
net SpindleRev => spindle.0.reverse

I would like to selectively reverse direction depending on whether a backgear 
input switch is triggered.  I see there is a gearchange component but I’m not 
clear on how to utilize it.  Does the gearchange component translate to the pin 
assignments for spindle.0.forward and spindle.0.reverse?  Don’t I need some 
additional logic?  The goal is to have logic like so:

if (backgear == TRUE) {
net SpindleFwd <= ppmc.2.dout.00.out
net SpindleFwd => spindle.0.forward
net SpindleRev <= ppmc.2.dout.01.out
net SpindleRev => spindle.0.reverse
} else {
net SpindleFwd <= ppmc.2.dout.01.out
net SpindleFwd => spindle.0.forward
net SpindleRev <= ppmc.2.dout.00.out
net SpindleRev => spindle.0.reverse
}

As you can see, the only change is that I’m swapping which output is assigned 
to spindle.0.forward and spindle.0.reverse.

Thanks,
Matt

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users