Re: [Emc-users] Safely Upgrading LinuxCNC

2021-09-14 Thread John Dammeyer
Tis looking easy.
lsb_release -ic 
debian stretch
uname -r
4.9.0-8-rt-amd64

So this has been downloaded and is now upgrading
deb 
http://linuxcnc.org 
stretch 
base 2.8-rtpreempt

Just to be safe I'm also copying the /home folder to a USB drive. Never did 
install samba like I did for the PI4LINUXCNC so I can access it from the 
network.

Thanks Andy.  Hopefully no other questions.
John



> -Original Message-
> From: Andy Pugh [mailto:bodge...@gmail.com]
> Sent: September-14-21 10:58 PM
> To: Enhanced Machine Controller (EMC)
> Subject: Re: [Emc-users] Safely Upgrading LinuxCNC
> 
> 
> 
> > On 14 Sep 2021, at 23:41, John Dammeyer  wrote:
> >
> > Short of installing the OS and LinuxCNC all over again as if it were a 
> > clean hard drive is there a way to update the OS and LinuxCNC
> without losing everything that's on the hard drive?
> 
> It should be easy.
> 
> You simply need to change the software repository to 2.8 and allow updates.
> 
> No need to change OS or anything else. And everything should work just the 
> same after.
> 
> http://linuxcnc.org/docs/2.8/html/getting-started/updating-linuxcnc.html
> 
> 
> ___
> 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] Safely Upgrading LinuxCNC

2021-09-14 Thread Andy Pugh



> On 14 Sep 2021, at 23:41, John Dammeyer  wrote:
> 
> Short of installing the OS and LinuxCNC all over again as if it were a clean 
> hard drive is there a way to update the OS and LinuxCNC without losing 
> everything that's on the hard drive?

It should be easy. 

You simply need to change the software repository to 2.8 and allow updates. 

No need to change OS or anything else. And everything should work just the same 
after. 

http://linuxcnc.org/docs/2.8/html/getting-started/updating-linuxcnc.html


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


Re: [Emc-users] SPI sub-driver for hostmot2

2021-09-14 Thread Gene Heskett
On Tuesday 14 September 2021 18:44:06 John Figie wrote:

> On Tue, Sep 14, 2021, 3:44 PM Gene Heskett  
wrote:
> > On Tuesday 14 September 2021 15:36:49 John Figie wrote:
> > > So I am still curious if connecting some device to a Mesa Anything
> > > I/O board such as the 7I80 using SPI is easy or difficult to do.
> > >
> > > I see that there was some work proposed for a SPI sub-driver for
> > > hostmot2
> > >  > >ot2> but maybe not much has changed since this was added to the
> > > wiki.
> > >
> > > my understanding is that this would work for some SPI
> > > communications between a card like a 7I80 and some device. The
> > > driver would allow a user to configure the SPI comms for the
> > > number of SPI channels and the amount of data frames transferred
> > > with each request.
> > >
> > > I see that some I/O boards already use SPI communications, along
> > > with discrete I/O such as the 7I65. So I suppose one could make a
> > > device that uses the SPI interface and pretends to be the DACs
> > > from a 7I65, but that would be kind of limited as the
> > > communications is probably just output only.
> >
> > No, your info, and the wiki are out of date, its 2 way using the
> > rpspi.ko driver since about 4 years back up the log and in my case.
> > a 7i90HD card, buffered and protected by a trio of 7i42TA's which in
> > addition to gobbling up noise that can destroy the fpga in the
> > 7i90HD, supplies those ultra handy little green screw terminals to
> > wire it all up with.
>
> Yes I saw the rpspi to 7I90 but that is not what I was asking about. I
> could be wrong but isn't the proposed spi sub driver referring to an
> spi interface between an anything I/O card and some device? By device
> I mean some I/O device like a servo drive or an ADC or whatever and
> there could be multiple SPI interfaces available. I am not using a rp4
> but maybe I should be. I am using a PC but I did add another NIC so I
> have several Ethernet ports and I want just a single Ethernet port as
> my interface to my machine I/O.
>
Then the 7c80 is probably the right cup of tea for you. The ethernet port 
replaces the spi port. But talk to Peter, he is the expert on what his 
cards can do. 

> > My rpi4 is sending 32 bit packets to the 7i90 over an spi bus at
> > about 41 megabaud, and getting data back from the 7i90HD at 25
> > megabaud. The rpi3 before it did the same. Doing it with the 7i90HD,
> > my rpi4's ethernet port is still free, so that pi is just another
> > address on my home private network, which is NATted from my internet
> > address, so I can carve steel with a converted 1950 vintage Sheldon
> > lathe and browse the world with firefox at the same time if I want
> > to. I could do that with a pi3b but you could hear the lathe stumble
> > a bit now and then.
> >
> > > But what about the 7I46? Is that I/O card supported by LinuxCNC in
> > > some way? How are the SPI ports configured?
> >
> > Don't know anything about the 7i46, you'll have to ask Peter C.
> > Wallace, who I think is reading these lists.
> >
> > > Is there still interest in the SPI sub-diver for hosmot2? Has the
> > > community moved on to better ways to interface to other devices?
> >
> > The rpspi.ko driver, by a Swedish Uni prof named Bertho Stultans,
> > was contributed to LinuxCNC several years ago, and has been updated
> > at least twice since. It Just Works if you follow the cabling
> > instructions. Effectively the spi disappears and all ypu see at lcnc
> > launch is the cards registration, which looks like this:
> >
> > hm2_rpspi: ERROR: Failed to execute '/sbin/rmmod spi_bcm2835'
> > hm2_rpspi: Platform: Raspberry Pi 4 Model B Rev 1.1
> > hm2_rpspi: Base address 0xfe00 size 0x0180
> > hm2_rpspi: Mapped peripherals from 0xfe00 (size 0x0180) to
> > gpio:0x0xb430, spi:0x0xb4304000, aux:0x0xb4315000
> > hm2_rpspi: SPI0/CE0 clock rate: 41666000/2500 Hz, VPU clock
> > rate: 5 Hz
> > hm2_rpspi: SPI0/CE0 write clock rate calculated: 4166 Hz
> > (clkdiv=12) hm2_rpspi: SPI0/CE0 read clock rate calculated: 2500
> > Hz (clkdiv=20) hm2_rpspi: SPI0/CE0 Valid cookie matched
> > hm2_rpspi: SPI0/CE0 Base: hm2_7i90.0
> > hm2/hm2_7i90.0: Low Level init 0.15
> > hm2/hm2_7i90.0: MD 2: 3x IOPort v0: accepted, using 3
> > hm2/hm2_7i90.0: MD 0: 1x Hostmot2 DPLL v0: accepted, using 1
> > hm2/hm2_7i90.0: MD 1: 1x Watchdog v0: accepted, using 1
> > hm2/hm2_7i90.0: MD 3: 4x Encoder v2: accepted, using 4
> > hm2/hm2_7i90.0: MD 4: 2x PWMGen v0: accepted, using 1
> > hm2/hm2_7i90.0: MD 5: 4x StepGen v2: accepted, using 4
> > hm2/hm2_7i90.0: MD 6: 1x LED v0: accepted, using 1
> > hm2/hm2_7i90.0: 72 I/O Pins used:
> > hm2/hm2_7i90.0: IO Pin 000 (P1-01): StepGen #0, pin Step
> > (Output) hm2/hm2_7i90.0: IO Pin 001 (P1-03): StepGen #0, pin
> > Direction (Output)
> > hm2/hm2_7i90.0: IO Pin 002 (P1-05): StepGen #1, pin Step
> > (Output) hm2/hm2_7i90.0: IO Pin

Re: [Emc-users] SPI sub-driver for hostmot2

2021-09-14 Thread John Figie
On Tue, Sep 14, 2021, 3:44 PM Gene Heskett  wrote:

> On Tuesday 14 September 2021 15:36:49 John Figie wrote:
>
> > So I am still curious if connecting some device to a Mesa Anything I/O
> > board such as the 7I80 using SPI is easy or difficult to do.
> >
> > I see that there was some work proposed for a SPI sub-driver for
> > hostmot2
> > 
> > but maybe not much has changed since this was added to the wiki.
> >
> > my understanding is that this would work for some SPI communications
> > between a card like a 7I80 and some device. The driver would allow a
> > user to configure the SPI comms for the number of SPI channels and the
> > amount of data frames transferred with each request.
> >
> > I see that some I/O boards already use SPI communications, along with
> > discrete I/O such as the 7I65. So I suppose one could make a device
> > that uses the SPI interface and pretends to be the DACs from a 7I65,
> > but that would be kind of limited as the communications is probably
> > just output only.
> >
> No, your info, and the wiki are out of date, its 2 way using the rpspi.ko
> driver since about 4 years back up the log and in my case. a 7i90HD
> card, buffered and protected by a trio of 7i42TA's which in addition to
> gobbling up noise that can destroy the fpga in the 7i90HD, supplies
> those ultra handy little green screw terminals to wire it all up with.
>
Yes I saw the rpspi to 7I90 but that is not what I was asking about. I
could be wrong but isn't the proposed spi sub driver referring to an spi
interface between an anything I/O card and some device? By device I mean
some I/O device like a servo drive or an ADC or whatever and there could be
multiple SPI interfaces available. I am not using a rp4 but maybe I should
be. I am using a PC but I did add another NIC so I have several Ethernet
ports and I want just a single Ethernet port as my interface to my machine
I/O.

>
> My rpi4 is sending 32 bit packets to the 7i90 over an spi bus at about 41
> megabaud, and getting data back from the 7i90HD at 25 megabaud. The rpi3
> before it did the same. Doing it with the 7i90HD, my rpi4's ethernet
> port is still free, so that pi is just another address on my home
> private network, which is NATted from my internet address, so I can
> carve steel with a converted 1950 vintage Sheldon lathe and browse the
> world with firefox at the same time if I want to. I could do that with a
> pi3b but you could hear the lathe stumble a bit now and then.
>
> > But what about the 7I46? Is that I/O card supported by LinuxCNC in
> > some way? How are the SPI ports configured?
>
> Don't know anything about the 7i46, you'll have to ask Peter C. Wallace,
> who I think is reading these lists.
>
> > Is there still interest in the SPI sub-diver for hosmot2? Has the
> > community moved on to better ways to interface to other devices?
>
> The rpspi.ko driver, by a Swedish Uni prof named Bertho Stultans, was
> contributed to LinuxCNC several years ago, and has been updated at least
> twice since. It Just Works if you follow the cabling instructions.
> Effectively the spi disappears and all ypu see at lcnc launch is the
> cards registration, which looks like this:
>
> hm2_rpspi: ERROR: Failed to execute '/sbin/rmmod spi_bcm2835'
> hm2_rpspi: Platform: Raspberry Pi 4 Model B Rev 1.1
> hm2_rpspi: Base address 0xfe00 size 0x0180
> hm2_rpspi: Mapped peripherals from 0xfe00 (size 0x0180) to
> gpio:0x0xb430, spi:0x0xb4304000, aux:0x0xb4315000
> hm2_rpspi: SPI0/CE0 clock rate: 41666000/2500 Hz, VPU clock rate:
> 5 Hz
> hm2_rpspi: SPI0/CE0 write clock rate calculated: 4166 Hz (clkdiv=12)
> hm2_rpspi: SPI0/CE0 read clock rate calculated: 2500 Hz (clkdiv=20)
> hm2_rpspi: SPI0/CE0 Valid cookie matched
> hm2_rpspi: SPI0/CE0 Base: hm2_7i90.0
> hm2/hm2_7i90.0: Low Level init 0.15
> hm2/hm2_7i90.0: MD 2: 3x IOPort v0: accepted, using 3
> hm2/hm2_7i90.0: MD 0: 1x Hostmot2 DPLL v0: accepted, using 1
> hm2/hm2_7i90.0: MD 1: 1x Watchdog v0: accepted, using 1
> hm2/hm2_7i90.0: MD 3: 4x Encoder v2: accepted, using 4
> hm2/hm2_7i90.0: MD 4: 2x PWMGen v0: accepted, using 1
> hm2/hm2_7i90.0: MD 5: 4x StepGen v2: accepted, using 4
> hm2/hm2_7i90.0: MD 6: 1x LED v0: accepted, using 1
> hm2/hm2_7i90.0: 72 I/O Pins used:
> hm2/hm2_7i90.0: IO Pin 000 (P1-01): StepGen #0, pin Step (Output)
> hm2/hm2_7i90.0: IO Pin 001 (P1-03): StepGen #0, pin Direction
> (Output)
> hm2/hm2_7i90.0: IO Pin 002 (P1-05): StepGen #1, pin Step (Output)
> hm2/hm2_7i90.0: IO Pin 003 (P1-07): StepGen #1, pin Direction
> (Output)
> hm2/hm2_7i90.0: IO Pin 004 (P1-09): Encoder #0, pin A (Input)
> hm2/hm2_7i90.0: IO Pin 005 (P1-11): Encoder #2, pin A (Input)
> hm2/hm2_7i90.0: IO Pin 006 (P1-13): Encoder #0, pin B (Input)
> hm2/hm2_7i90.0: IO Pin 007 (P1-15): Encoder #2, pin B (Input)
> hm2/hm2_7i90.0: IO Pin 008 (P1-17): Encoder #0, pin Index (Input)
> hm2/

[Emc-users] Safely Upgrading LinuxCNC

2021-09-14 Thread John Dammeyer
With all the playing around on the Pi4 with LinuxCNC/AXIS version 2.8.2 I feel 
it's probably time to update the real computer connected to the mill which is 
running version 2.7.14
 
Short of installing the OS and LinuxCNC all over again as if it were a clean 
hard drive is there a way to update the OS and LinuxCNC without losing 
everything that's on the hard drive?
 
I realize that this is a big change with joints and axis now used instead of 
just axis and I understand that the software converts the ini/hal files 
automatically.  However OS upgrades always fill me with fear and trepidation.
 
Thanks
John Dammeyer
 
 

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


Re: [Emc-users] Suggestions for a retrofit.

2021-09-14 Thread Andy Pugh


> On 14 Sep 2021, at 22:04, John Figie  wrote:
> 
> so I am wondering how one would go about
> configuring LinuxCNC for the STMBL.

It’s surprisingly simple at the HAL end:

https://github.com/rene-dev/stmbl/blob/master/docs/linuxcnc/stmbl.hal


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


Re: [Emc-users] Debugging Python under LinuxCNC

2021-09-14 Thread John Dammeyer
A bit more information on debugging the Python.  When run from the command line 
with a Python error you get the same information that happens if you run from 
the desktop.  The added advantage is that when it's running correctly you can 
still get log messages.   I've added  a print statement and serial write 
statement in the 

except KeyboardInterrupt:
print("CANSUB: Closing CANUSB")
ser.write('C\r'.encode('utf-8'))
raise SystemExit

And that print now shows up in the terminal screen when LCNC is closed.  It 
does not show up in the two log files:
/home/pi/linuxcnc_print.txt
/home/pi/linuxcnc_debug.txt

My python program also sends out, once per minute,  an 'F' command to the 
CANUSB to request/reset error flags for detecting things like bus and buffer 
errors.  

h.newpin("CANUSB_Flags", hal.HAL_U32, hal.HAL_OUT) 

I read this in LinuxCNC as h.CANUSB_Flags.  If there is an error it remains for 
1 minute until the next 'F' command.  Don't know how to throw up a dialog box 
if the value is non-zero but probably should.  Maybe also want this to be an IO 
pin to send back a request to resend the 'F' to see if the problem is sticky or 
transient.

John

> -Original Message-
> From: John Dammeyer [mailto:jo...@autoartisans.com]
> Sent: September-14-21 1:01 PM
> To: 'Enhanced Machine Controller (EMC)'
> Subject: Re: [Emc-users] Debugging Python under LinuxCNC
> 
> > From: andy pugh [mailto:bodge...@gmail.com]
> >
> > On Mon, 13 Sept 2021 at 21:49, John Dammeyer  wrote:
> >
> > > If I add print() statements where would they show up?  Or would they at 
> > > all?
> >
> > In the terminal, if you start  LinuxCNC from the command line.
> > Otherwise I fear that they might simply get lost.
> >
> Thanks Andy,
> From the desktop I can enable the start from terminal and leave it active but 
> it's really hard to cut and paste information from that.
> Starting the same command line as the desktop icon but from a terminal gives 
> he ability to copy to the clipboard.
> I then edited the serial-relay.py to remove a comment from in front of a 
> print statement, re-ran it, and indeed there are the CAN
> messages.  I've attached a bit of that if anyone is interested they can see 
> how it's part of the output that occurs when LCNC doesn't
> start up correctly.
> 
> Is by chance this information already being logged to some other file 
> somewhere when not started as a terminal session?
> 
> John
> 
> 




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


Re: [Emc-users] Suggestions for a retrofit.

2021-09-14 Thread John Dammeyer
Hi John,
There are a few people on this list who have all 4 or even 5 axis running with 
STMBL.   Andy Pugh, from whom I bought my boards, has it on his A axis. 

This link takes you to the conversation about it.  There are a few kits still 
being made.

https://gitter.im/rene-dev/stmbl

Designers Rene Hall and Nico Stute have been very helpful.  They are in Germany 
so mind the time zone differences if you expect an answer.

John Dammeyer

> -Original Message-
> From: John Figie [mailto:zephyr9...@gmail.com]
> Sent: September-14-21 1:01 PM
> To: Enhanced Machine Controller (EMC)
> Subject: Re: [Emc-users] Suggestions for a retrofit.
> 
> John,
> 
> When STMBL is using the SSERIAL interface is the drive operating in
> position mode and receiving periodic position commands from the motion
> planner in LinuxCNC? If so, then I would think that the performance would
> be quite good with updates at 1mSec rates which would not be too difficult
> for LinuxCNC. When I follow the link about the
> http://linuxcnc.org/docs/html/man/man9/sserial.9.html there is no mention
> of the STMBL as a device, so I am wondering how one would go about
> configuring LinuxCNC for the STMBL.
> 
> But also it looks like a bit of work to acquire all of the parts and build
> one of these STMBLs unless someone is selling the PCBs and other parts.
> Did you build your own STMBLs?
> 
> The STMBL looks pretty nice and it looks like a lot of effort has gone into
> it.
> 
> Regards,
> 
> John Figie
> 
> 
> On Mon, Sep 13, 2021 at 6:09 PM John Dammeyer 
> wrote:
> 
> > Hi John,
> > Yes, I use step/dir for a harmonic drive AC Servo that as yet still has to
> > be put into a casting and married to a face plate.   For now it sits on the
> > cart beside the mill and I can make the A axis turn.
> > http://www.autoartisans.com/mill/HarmonicDrive/D8X_5784_Plastic_Mount.jpg
> > I did try to get one of my DC Servos also working with a second STMBL.
> > However I had trouble tuning it and the HP_UHU (105VDC power supply) has
> > been more than adequate so for now I'm staying with that.
> >
> > I used step/dir because initially my PC is dual boot and I wanted both
> > MACH3 and LCNC to work.  Along with also a BeagleBone with a cape for
> > MachineKit so Parallel port and BoB were mandatory.  That excludes any of
> > the smart serial unless it terminated in a standard Parallel port
> > configuration.
> >
> > John Dammeyer
> >
> > > -Original Message-
> > > From: John Figie [mailto:zephyr9...@gmail.com]
> > > Sent: September-13-21 3:39 PM
> > > To: Enhanced Machine Controller (EMC)
> > > Subject: Re: [Emc-users] Suggestions for a retrofit.
> > >
> > > John,
> > >
> > > Thanks for the info so it looks like the Mesa Smart Serial interface can
> > be
> > > used with this drive. If I understand correctly the SSERIAL interface
> > comes
> > > from one of the mesa FPGA I/O cards and connects to the STMBL drive. (I
> > > mean that is one way to interface to the STMBL drive). Otherwise a step
> > and
> > > direction or a quadrature input would be used with the STMBL drive.
> > >
> > > On Mon, Sep 13, 2021 at 3:53 PM John Dammeyer 
> > > wrote:
> > >
> > > > John,
> > > > The work has already been done with the STMBL project.  The biggest
> > issue
> > > > with that one was the 3 phase motor driver was discontinued so that
> > caused
> > > > a bit of panic.  But it's an open source project that can use step/dir
> > or
> > > > smart serial from the MESA boards.
> > > >
> > > > https://github.com/rene-dev/stmbl
> > > >
> > > > John Dammeyer
> > > >
> > > > > -Original Message-
> > > > > From: John Figie [mailto:zephyr9...@gmail.com]
> > > > > Sent: September-13-21 1:32 PM
> > > > > To: Enhanced Machine Controller (EMC)
> > > > > Subject: Re: [Emc-users] Suggestions for a retrofit.
> > > > >
> > > > > It's been a long time and I have not made much progress. Except now
> > I am
> > > > > retired from my job as an electrical engineer. In my job I developed
> > > > > industrial PMAC servo drives for a leading industrial controls
> > > > manufacturer
> > > > > located in Milwaukee. So to solve my servo amplifier problem I have
> > > > decided
> > > > > to build my own and have already made significant progress. My
> > homemade
> > > > > drives will be able to run either DC brush motors or in the future AC
> > > > > motors. I have a basic torque mode drive in the process of
> > development
> > > > but
> > > > > I am thinking I would like the drive to be a velocity mode drive.
> > > > >
> > > > > My question now is how to interface to LinuxCNC? I really want to
> > connect
> > > > > all of my I/O using the mesa ethernet cards like the 7I80. From the
> > 7I80
> > > > it
> > > > > looks like there is a way to have SPI interfaces. It seems like the
> > SPI
> > > > > would be one way to make a simple digital interface to my drives. The
> > > > 7I80
> > > > > would send velocity commands and velocity feedback to the drives. The
> > > > > drives would re

Re: [Emc-users] SPI sub-driver for hostmot2

2021-09-14 Thread Gene Heskett
On Tuesday 14 September 2021 15:36:49 John Figie wrote:

> So I am still curious if connecting some device to a Mesa Anything I/O
> board such as the 7I80 using SPI is easy or difficult to do.
>
> I see that there was some work proposed for a SPI sub-driver for
> hostmot2
> 
> but maybe not much has changed since this was added to the wiki.
>
> my understanding is that this would work for some SPI communications
> between a card like a 7I80 and some device. The driver would allow a
> user to configure the SPI comms for the number of SPI channels and the
> amount of data frames transferred with each request.
>
> I see that some I/O boards already use SPI communications, along with
> discrete I/O such as the 7I65. So I suppose one could make a device
> that uses the SPI interface and pretends to be the DACs from a 7I65,
> but that would be kind of limited as the communications is probably
> just output only.
>
No, your info, and the wiki are out of date, its 2 way using the rpspi.ko 
driver since about 4 years back up the log and in my case. a 7i90HD 
card, buffered and protected by a trio of 7i42TA's which in addition to 
gobbling up noise that can destroy the fpga in the 7i90HD, supplies 
those ultra handy little green screw terminals to wire it all up with.

My rpi4 is sending 32 bit packets to the 7i90 over an spi bus at about 41 
megabaud, and getting data back from the 7i90HD at 25 megabaud. The rpi3 
before it did the same. Doing it with the 7i90HD, my rpi4's ethernet 
port is still free, so that pi is just another address on my home 
private network, which is NATted from my internet address, so I can 
carve steel with a converted 1950 vintage Sheldon lathe and browse the 
world with firefox at the same time if I want to. I could do that with a 
pi3b but you could hear the lathe stumble a bit now and then.

> But what about the 7I46? Is that I/O card supported by LinuxCNC in
> some way? How are the SPI ports configured?

Don't know anything about the 7i46, you'll have to ask Peter C. Wallace, 
who I think is reading these lists.

> Is there still interest in the SPI sub-diver for hosmot2? Has the
> community moved on to better ways to interface to other devices?

The rpspi.ko driver, by a Swedish Uni prof named Bertho Stultans, was 
contributed to LinuxCNC several years ago, and has been updated at least 
twice since. It Just Works if you follow the cabling instructions. 
Effectively the spi disappears and all ypu see at lcnc launch is the 
cards registration, which looks like this:

hm2_rpspi: ERROR: Failed to execute '/sbin/rmmod spi_bcm2835'
hm2_rpspi: Platform: Raspberry Pi 4 Model B Rev 1.1
hm2_rpspi: Base address 0xfe00 size 0x0180
hm2_rpspi: Mapped peripherals from 0xfe00 (size 0x0180) to 
gpio:0x0xb430, spi:0x0xb4304000, aux:0x0xb4315000
hm2_rpspi: SPI0/CE0 clock rate: 41666000/2500 Hz, VPU clock rate: 
5 Hz
hm2_rpspi: SPI0/CE0 write clock rate calculated: 4166 Hz (clkdiv=12)
hm2_rpspi: SPI0/CE0 read clock rate calculated: 2500 Hz (clkdiv=20)
hm2_rpspi: SPI0/CE0 Valid cookie matched
hm2_rpspi: SPI0/CE0 Base: hm2_7i90.0
hm2/hm2_7i90.0: Low Level init 0.15
hm2/hm2_7i90.0: MD 2: 3x IOPort v0: accepted, using 3
hm2/hm2_7i90.0: MD 0: 1x Hostmot2 DPLL v0: accepted, using 1
hm2/hm2_7i90.0: MD 1: 1x Watchdog v0: accepted, using 1
hm2/hm2_7i90.0: MD 3: 4x Encoder v2: accepted, using 4
hm2/hm2_7i90.0: MD 4: 2x PWMGen v0: accepted, using 1
hm2/hm2_7i90.0: MD 5: 4x StepGen v2: accepted, using 4
hm2/hm2_7i90.0: MD 6: 1x LED v0: accepted, using 1
hm2/hm2_7i90.0: 72 I/O Pins used:
hm2/hm2_7i90.0: IO Pin 000 (P1-01): StepGen #0, pin Step (Output)
hm2/hm2_7i90.0: IO Pin 001 (P1-03): StepGen #0, pin Direction 
(Output)
hm2/hm2_7i90.0: IO Pin 002 (P1-05): StepGen #1, pin Step (Output)
hm2/hm2_7i90.0: IO Pin 003 (P1-07): StepGen #1, pin Direction 
(Output)
hm2/hm2_7i90.0: IO Pin 004 (P1-09): Encoder #0, pin A (Input)
hm2/hm2_7i90.0: IO Pin 005 (P1-11): Encoder #2, pin A (Input)
hm2/hm2_7i90.0: IO Pin 006 (P1-13): Encoder #0, pin B (Input)
hm2/hm2_7i90.0: IO Pin 007 (P1-15): Encoder #2, pin B (Input)
hm2/hm2_7i90.0: IO Pin 008 (P1-17): Encoder #0, pin Index (Input)
hm2/hm2_7i90.0: IO Pin 009 (P1-19): Encoder #2, pin Index (Input)
hm2/hm2_7i90.0: IO Pin 010 (P1-21): Encoder #1, pin A (Input)
hm2/hm2_7i90.0: IO Pin 011 (P1-23): Encoder #3, pin A (Input)
hm2/hm2_7i90.0: IO Pin 012 (P1-25): Encoder #1, pin B (Input)
hm2/hm2_7i90.0: IO Pin 013 (P1-27): Encoder #3, pin B (Input)
hm2/hm2_7i90.0: IO Pin 014 (P1-29): Encoder #1, pin Index (Input)
hm2/hm2_7i90.0: IO Pin 015 (P1-31): Encoder #3, pin Index (Input)
hm2/hm2_7i90.0: IO Pin 016 (P1-33): StepGen #2, pin Step (Output)
hm2/hm2_7i90.0: IO Pin 017 (P1-35): StepGen #2, pin Direction 
(Output)
hm2/hm2_7i90.0: IO Pin 018 (P1-37): StepGen #3, pin Step (Output)
hm2/hm2_7i90.0: IO Pin 01

Re: [Emc-users] Suggestions for a retrofit.

2021-09-14 Thread John Figie
John,

When STMBL is using the SSERIAL interface is the drive operating in
position mode and receiving periodic position commands from the motion
planner in LinuxCNC? If so, then I would think that the performance would
be quite good with updates at 1mSec rates which would not be too difficult
for LinuxCNC. When I follow the link about the
http://linuxcnc.org/docs/html/man/man9/sserial.9.html there is no mention
of the STMBL as a device, so I am wondering how one would go about
configuring LinuxCNC for the STMBL.

But also it looks like a bit of work to acquire all of the parts and build
one of these STMBLs unless someone is selling the PCBs and other parts.
Did you build your own STMBLs?

The STMBL looks pretty nice and it looks like a lot of effort has gone into
it.

Regards,

John Figie


On Mon, Sep 13, 2021 at 6:09 PM John Dammeyer 
wrote:

> Hi John,
> Yes, I use step/dir for a harmonic drive AC Servo that as yet still has to
> be put into a casting and married to a face plate.   For now it sits on the
> cart beside the mill and I can make the A axis turn.
> http://www.autoartisans.com/mill/HarmonicDrive/D8X_5784_Plastic_Mount.jpg
> I did try to get one of my DC Servos also working with a second STMBL.
> However I had trouble tuning it and the HP_UHU (105VDC power supply) has
> been more than adequate so for now I'm staying with that.
>
> I used step/dir because initially my PC is dual boot and I wanted both
> MACH3 and LCNC to work.  Along with also a BeagleBone with a cape for
> MachineKit so Parallel port and BoB were mandatory.  That excludes any of
> the smart serial unless it terminated in a standard Parallel port
> configuration.
>
> John Dammeyer
>
> > -Original Message-
> > From: John Figie [mailto:zephyr9...@gmail.com]
> > Sent: September-13-21 3:39 PM
> > To: Enhanced Machine Controller (EMC)
> > Subject: Re: [Emc-users] Suggestions for a retrofit.
> >
> > John,
> >
> > Thanks for the info so it looks like the Mesa Smart Serial interface can
> be
> > used with this drive. If I understand correctly the SSERIAL interface
> comes
> > from one of the mesa FPGA I/O cards and connects to the STMBL drive. (I
> > mean that is one way to interface to the STMBL drive). Otherwise a step
> and
> > direction or a quadrature input would be used with the STMBL drive.
> >
> > On Mon, Sep 13, 2021 at 3:53 PM John Dammeyer 
> > wrote:
> >
> > > John,
> > > The work has already been done with the STMBL project.  The biggest
> issue
> > > with that one was the 3 phase motor driver was discontinued so that
> caused
> > > a bit of panic.  But it's an open source project that can use step/dir
> or
> > > smart serial from the MESA boards.
> > >
> > > https://github.com/rene-dev/stmbl
> > >
> > > John Dammeyer
> > >
> > > > -Original Message-
> > > > From: John Figie [mailto:zephyr9...@gmail.com]
> > > > Sent: September-13-21 1:32 PM
> > > > To: Enhanced Machine Controller (EMC)
> > > > Subject: Re: [Emc-users] Suggestions for a retrofit.
> > > >
> > > > It's been a long time and I have not made much progress. Except now
> I am
> > > > retired from my job as an electrical engineer. In my job I developed
> > > > industrial PMAC servo drives for a leading industrial controls
> > > manufacturer
> > > > located in Milwaukee. So to solve my servo amplifier problem I have
> > > decided
> > > > to build my own and have already made significant progress. My
> homemade
> > > > drives will be able to run either DC brush motors or in the future AC
> > > > motors. I have a basic torque mode drive in the process of
> development
> > > but
> > > > I am thinking I would like the drive to be a velocity mode drive.
> > > >
> > > > My question now is how to interface to LinuxCNC? I really want to
> connect
> > > > all of my I/O using the mesa ethernet cards like the 7I80. From the
> 7I80
> > > it
> > > > looks like there is a way to have SPI interfaces. It seems like the
> SPI
> > > > would be one way to make a simple digital interface to my drives. The
> > > 7I80
> > > > would send velocity commands and velocity feedback to the drives. The
> > > > drives would return status and fault information back to LinuxCNC.
> > > >
> > > > Is it possible for me to use the SPI interfaces with LinuxCNC in the
> way
> > > I
> > > > have described? If so, how does one go about setting up the SPI
> > > interfaces
> > > > and defining what data is passed back and forth? I am hoping Andy
> Pugh,
> > > PCW
> > > > or someone that knows can comment.
> > > >
> > > > LinuxCNC  <--Ethernet--> 7I80 -<> I/O inputs and outputs
> > > >  |-<> SPI comms
> to
> > > > servo amps  7I46?
> > > >  | < encoder
> inputs
> > > for
> > > > axis and MPGs
> > > >
> > > > LinuxCNC with position loop only should be able to run with a slower
> > > 1mSec
> > > > or maybe 500uSec thread and no other high speed thread would be
> needed. I
> > > > may how

Re: [Emc-users] Debugging Python under LinuxCNC

2021-09-14 Thread John Dammeyer
> From: andy pugh [mailto:bodge...@gmail.com]
> 
> On Mon, 13 Sept 2021 at 21:49, John Dammeyer  wrote:
> 
> > If I add print() statements where would they show up?  Or would they at all?
> 
> In the terminal, if you start  LinuxCNC from the command line.
> Otherwise I fear that they might simply get lost.
> 
Thanks Andy,
>From the desktop I can enable the start from terminal and leave it active but 
>it's really hard to cut and paste information from that.
Starting the same command line as the desktop icon but from a terminal gives he 
ability to copy to the clipboard.
I then edited the serial-relay.py to remove a comment from in front of a print 
statement, re-ran it, and indeed there are the CAN messages.  I've attached a 
bit of that if anyone is interested they can see how it's part of the output 
that occurs when LCNC doesn't start up correctly.

Is by chance this information already being logged to some other file somewhere 
when not started as a terminal session?

John



pi@linuxcnc:~ $ /usr/bin/linuxcnc 
'/home/pi/linuxcnc/configs/G3616-Pi4/G3616-Pi4.ini'
LINUXCNC - 2.8.2
Machine configuration directory is '/home/pi/linuxcnc/configs/G3616-Pi4'
Machine configuration file is 'G3616-Pi4.ini.expanded'
Starting LinuxCNC...
Found file(REL): ./G3616-Pi4.hal
Note: Using POSIX realtime
hm2: loading Mesa HostMot2 driver version 0.15
hm2_eth: loading Mesa AnyIO HostMot2 ethernet driver version 0.2
hm2_eth: 192.168.1.121: INFO: Hardware address (MAC): 00:60:1b:12:07:93
hm2_eth: discovered 7I92
hm2/hm2_7i92.0: Low Level init 0.15
hm2/hm2_7i92.0: 34 I/O Pins used:
hm2/hm2_7i92.0: IO Pin 000 (P2-01): IOPort
hm2/hm2_7i92.0: IO Pin 001 (P2-14): StepGen #5, pin Step (Output)
hm2/hm2_7i92.0: IO Pin 002 (P2-02): StepGen #0, pin Step (Output)
hm2/hm2_7i92.0: IO Pin 003 (P2-15): IOPort
hm2/hm2_7i92.0: IO Pin 004 (P2-03): StepGen #0, pin Direction (Output)
hm2/hm2_7i92.0: IO Pin 005 (P2-16): StepGen #5, pin Direction (Output)
hm2/hm2_7i92.0: IO Pin 006 (P2-04): StepGen #1, pin Step (Output)
hm2/hm2_7i92.0: IO Pin 007 (P2-17): StepGen #4, pin Step (Output)
hm2/hm2_7i92.0: IO Pin 008 (P2-05): StepGen #1, pin Direction (Output)
hm2/hm2_7i92.0: IO Pin 009 (P2-06): StepGen #2, pin Step (Output)
hm2/hm2_7i92.0: IO Pin 010 (P2-07): StepGen #2, pin Direction (Output)
hm2/hm2_7i92.0: IO Pin 011 (P2-08): StepGen #3, pin Step (Output)
hm2/hm2_7i92.0: IO Pin 012 (P2-09): StepGen #3, pin Direction (Output)
hm2/hm2_7i92.0: IO Pin 013 (P2-10): IOPort
hm2/hm2_7i92.0: IO Pin 014 (P2-11): IOPort
hm2/hm2_7i92.0: IO Pin 015 (P2-12): IOPort
hm2/hm2_7i92.0: IO Pin 016 (P2-13): IOPort
hm2/hm2_7i92.0: IO Pin 017 (P1-01): IOPort
hm2/hm2_7i92.0: IO Pin 018 (P1-14): IOPort
hm2/hm2_7i92.0: IO Pin 019 (P1-02): PWMGen #0, pin Out0 (PWM or Up) (Output)
hm2/hm2_7i92.0: IO Pin 020 (P1-15): IOPort
hm2/hm2_7i92.0: IO Pin 021 (P1-03): IOPort
hm2/hm2_7i92.0: IO Pin 022 (P1-16): IOPort
hm2/hm2_7i92.0: IO Pin 023 (P1-04): IOPort
hm2/hm2_7i92.0: IO Pin 024 (P1-17): IOPort
hm2/hm2_7i92.0: IO Pin 025 (P1-05): IOPort
hm2/hm2_7i92.0: IO Pin 026 (P1-06): IOPort
hm2/hm2_7i92.0: IO Pin 027 (P1-07): IOPort
hm2/hm2_7i92.0: IO Pin 028 (P1-08): IOPort
hm2/hm2_7i92.0: IO Pin 029 (P1-09): IOPort
hm2/hm2_7i92.0: IO Pin 030 (P1-10): IOPort
hm2/hm2_7i92.0: IO Pin 031 (P1-11): IOPort
hm2/hm2_7i92.0: IO Pin 032 (P1-12): IOPort
hm2/hm2_7i92.0: IO Pin 033 (P1-13): IOPort
hm2/hm2_7i92.0: registered
Found file(REL): ./custom.hal
Received CANopen Msg = 718105
Received CANopen Msg = 298701
note: MAXV max: 3.000 units/sec 180.000 units/min
note: LJOG max: 3.000 units/sec 180.000 units/min
note: LJOG default: 1.000 units/sec 60.000 units/min
note: AJOG max: 180.000 units/sec 10800.000 units/min
note: AJOG default: 90.000 units/sec 5400.000 units/min
Received CANopen Msg = 718105
Received CANopen Msg = 298701
note: jog_order='XYZA'
note: jog_invert=set([])
Received CANopen Msg = 298701
Received CANopen Msg = 718105
Received CANopen Msg = 298701
Received CANopen Msg = 298701
Received CANopen Msg = 718105
Received CANopen Msg = 298701
Received CANopen Msg = 298701
Received CANopen Msg = 718105
Received CANopen Msg = 298701
Received CANopen Msg = 298701
Received CANopen Msg = 718105
Received CANopen Msg = 298701
Received CANopen Msg = 298701
Received CANopen Msg = 718105
Received CANopen Msg = 298701
Received CANopen Msg = 298701
Received CANopen Msg = 718105
Received CANopen Msg = 298701
Received CANopen Msg = 298701
Received CANopen Msg = 718105
Received CANopen Msg = 298701
Received CANopen Msg = 298701
Received CANopen Msg = 718105
Received CANopen Msg = 298701
Received CANopen Msg = 298701
Received CANopen Msg = 7

[Emc-users] SPI sub-driver for hostmot2

2021-09-14 Thread John Figie
So I am still curious if connecting some device to a Mesa Anything I/O
board such as the 7I80 using SPI is easy or difficult to do.

I see that there was some work proposed for a SPI sub-driver for hostmot2
 but
maybe not much has changed since this was added to the wiki.

my understanding is that this would work for some SPI communications
between a card like a 7I80 and some device. The driver would allow a user
to configure the SPI comms for the number of SPI channels and the amount of
data frames transferred with each request.

I see that some I/O boards already use SPI communications, along with
discrete I/O such as the 7I65. So I suppose one could make a device that
uses the SPI interface and pretends to be the DACs from a 7I65, but that
would be kind of limited as the communications is probably just output only.

But what about the 7I46? Is that I/O card supported by LinuxCNC in some
way? How are the SPI ports configured?

Is there still interest in the SPI sub-diver for hosmot2? Has the community
moved on to better ways to interface to other devices?

Yes I know that the distance that SPI works over is limited, but on the
other hand it is a pretty simple interface and the data rates can easily be
10Mbits/sec if limited to short distances like 10 - 20 cm.

Regards,

John Figie

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


Re: [Emc-users] Debugging Python under LinuxCNC

2021-09-14 Thread John Dammeyer


> From: ken.stra...@gmail.com [mailto:ken.stra...@gmail.com]
> 
> Hopefully not to completely hijack this thread but...
> 
> I am working on a project that will use a Pi Pico interfaced to LinuxCNC.
> Are there any debugging tools for microPython?
> 

Hi Ken,
Not really hijacking.  I'm curious.  What will your Pi Pico do?  How will you 
interface to LinuxCNC?
John




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


Re: [Emc-users] Debugging Python under LinuxCNC

2021-09-14 Thread ken.strauss
Hopefully not to completely hijack this thread but...

I am working on a project that will use a Pi Pico interfaced to LinuxCNC.
Are there any debugging tools for microPython?

-Original Message-
From: Fox Mulder  
Sent: September 14, 2021 1:27 PM
To: emc-users@lists.sourceforge.net
Subject: Re: [Emc-users] Debugging Python under LinuxCNC

That's not true for Python development in general. If you develop a
standalone Python program you can use IDEs with all their features like
breakpoints and show/edit variable contents etc. :)

The problem starts if the python program is called from another program
which is not attached to the debugger. In most cases the IDE can't attach to
this python instance and therefor can't be used. Debugging like in the old
days with print or better a logging system is still the best way. But this
is the same for C/C++ or other programs which are executed from another
program outside the IDE.

Am 14.09.21 um 19:06 schrieb John Dammeyer:
> I'm more used to working with program development systems that have
breakpoints, allow single stepping through assembly code and examining
variable values and even processor registers.  Working with Python is like
writing in BASIC with the Radio Shack TRS80 home computer.   I've gone back
to the dark ages...

Ciao,
  Rainer


___
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] Debugging Python under LinuxCNC

2021-09-14 Thread Fox Mulder

That's not true for Python development in general. If you develop a
standalone Python program you can use IDEs with all their features like
breakpoints and show/edit variable contents etc. :)

The problem starts if the python program is called from another program
which is not attached to the debugger. In most cases the IDE can't
attach to this python instance and therefor can't be used. Debugging
like in the old days with print or better a logging system is still the
best way. But this is the same for C/C++ or other programs which are
executed from another program outside the IDE.

Am 14.09.21 um 19:06 schrieb John Dammeyer:

I'm more used to working with program development systems that have 
breakpoints, allow single stepping through assembly code and examining variable 
values and even processor registers.  Working with Python is like writing in 
BASIC with the Radio Shack TRS80 home computer.   I've gone back to the dark 
ages...


Ciao,
 Rainer


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


Re: [Emc-users] Debugging Python under LinuxCNC

2021-09-14 Thread andy pugh
On Tue, 14 Sept 2021 at 19:09, John Dammeyer  wrote:

> I'm more used to working with program development systems that have 
> breakpoints, allow single stepping through assembly code and examining 
> variable values and even processor registers.

You can do that in Python.

https://realpython.com/python-debugging-pdb/

-- 
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] Spindle setup for 5i25/7i76

2021-09-14 Thread andy pugh
On Mon, 13 Sept 2021 at 22:54, Alan Condit  wrote:
> I have the Cycletrol-150 Manual. It says that you can replace the 5k ohm 
> potentiometer with a 0-10v analog signal. The 7i76 manual says that you can 
> use it to replace a 5k potentiometer control (0-10v). So that should work and 
> indeed seems to be working. I have tried adjusting the detectors to 90°. I 
> have an old Tectronix scope and they look pretty good there. It now has a 
> solid “at speed indication” up to about 250rpm. So now I am suspecting that I 
> don’t have the PNCConf configuration quite correct for the spindle. At the 
> top of the range the Speed Indicator fluctuates from about 400 to 600 rpm 
> while the motor sounds like it is holding dead steady.

You could try plotting encoder _position_ in Halscope to see if it is
a straight line.
(trigger halscope on a falling edge of spindle index enable, then
start (for example) a G33 move)

-- 
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] Debugging Python under LinuxCNC

2021-09-14 Thread John Dammeyer
> From: andy pugh [mailto:bodge...@gmail.com]
> 
> On Mon, 13 Sept 2021 at 21:49, John Dammeyer  wrote:
> 
> > If I add print() statements where would they show up?  Or would they at all?
> 
> In the terminal, if you start  LinuxCNC from the command line.
> Otherwise I fear that they might simply get lost.
> 
> --
Thanks Andy,
I thought maybe I was missing some special hot key that would launch a window 
from within LCNC that then displayed print messages.  Like working with the 
various IDE's for code development that have a window panel for terminal 
output.   

I'm more used to working with program development systems that have 
breakpoints, allow single stepping through assembly code and examining variable 
values and even processor registers.  Working with Python is like writing in 
BASIC with the Radio Shack TRS80 home computer.   I've gone back to the dark 
ages...

However I do have CAN bus communications with the CANUSB functional in both 
directions to/from the CANOpen device.

The next step is to see if I can use socketCAN instead of pySerial since then 
the component doesn't care if it's a CANUSB on the Pi4 or a HAT using an 
MCP2515.  For the PC it would still have to be USB based but the component 
remains the same.

If anyone is interested I'll post my serial-relays.py program.
John Dammeyer



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


Re: [Emc-users] Debugging Python under LinuxCNC

2021-09-14 Thread andy pugh
On Mon, 13 Sept 2021 at 21:49, John Dammeyer  wrote:

> If I add print() statements where would they show up?  Or would they at all?

In the terminal, if you start  LinuxCNC from the command line.
Otherwise I fear that they might simply get lost.

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