Re: [Emc-users] CANopen on LinuxCNC

2021-01-22 Thread John Dammeyer
> From: andy pugh [mailto:bodge...@gmail.com]
> On Fri, 22 Jan 2021 at 23:16, John Dammeyer  wrote:
> 
> > And I take it from your answer that this sort of driver at this point in 
> > time does not exist.
> 
> Not as far as I know, but it might be a fairly simple thing to create.
> It need to create HAL pins then gather the data from wherever, and put
> it on the HAL pins.
> 
> --
That's probably more of a patchy method.  

CANopen has a number of states and needs some sort of master to co-ordinate the 
state changes.  
INIT, PRE-OPERATIONAL and OPERATIONAL are the 3 main ones.  There's also an 
ERROR and STOPPING etc.  

During the PRE-OP state the master can send Service Data Object messages (SDO) 
which are a REQUEST/RESPONSE process.  Once OPERATIONAL all nodes may transmit 
asynchronously Process Data Object messages (PDO).  

CANopen works with an Object Dictionary which theoretically is huge (greater 
than 16MB) and a bit tough on an 8 bit processor with 64k addressability.  So 
the Object Dictionary is broken into a 16 bit index and 8 bit sub index pair 
which points to a data object that could be a bit, nibl, byte, word and even 
string.  You can see how this quickly could become very large.

However internally the Object Dictionaries tend to be lists or groups of tables 
that are accessed via binary searches so it's not as bad as it looks.

To make LinuxCNC work with CANopen the ideal is to create an Object Dictionary 
that has HAL pins mapped to Object Dictionary entries.  Now the system master 
can send an SDO request for the value of 3001:23 which has a size of 4 bytes.  
The CANopen part of the driver then captures that HAL pin allocated to that 
location and returns it in the Reply Data Object (RDO) message.

The LinuxCNC part of the CANopen driver could also be told to periodically 
produce  PDO message that contains in bytes 4..7 the HAL pin image located in 
3001:23.

CANopen doesn't care how the data gets into 3001:23.  The nodes out there don't 
care either.  Any number of nodes can receive that PDO and grab the information 
in bytes 4..7.  So you might have 3 different displays on a long manufacturing 
machine each showing the value reported in that PDO.

The information for what's in a PDO and how often it's sent is also contained 
in pre-defined locations in the Object Dictionary.

It's not super complicated.   But it requires something that can run apart 
from, but has access to HAL pins and probably runs at the SERVO_PERIOD rate.  
And obviously a method of updating/reading a 1 to 8 byte value without being 
interrupted by some other task updating it at the same time.

The OD entries connected to HAL pins can be set to be Read Only so it's 
possible to access motion values like position etc. without changing them.  Or 
they can be Read/Write so you can start or stop the spindle with an RPM value.

John





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


Re: [Emc-users] Carousel component indexing/trigger problem

2021-01-22 Thread andy pugh
On Thu, 14 Jan 2021 at 10:35, andy pugh  wrote:

> Note: As it stands jogging won't work as current_position is one less
> than the actual position.
> Did you check M6 Tnn commands, or only jogging?

Where are we with this?

-- 
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] CANopen on LinuxCNC

2021-01-22 Thread andy pugh
On Fri, 22 Jan 2021 at 23:16, John Dammeyer  wrote:

> And I take it from your answer that this sort of driver at this point in time 
> does not exist.

Not as far as I know, but it might be a fairly simple thing to create.
It need to create HAL pins then gather the data from wherever, and put
it on the HAL pins.

-- 
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] CANopen on LinuxCNC

2021-01-22 Thread John Dammeyer
> From: andy pugh [mailto:bodge...@gmail.com]
> 
> On Fri, 22 Jan 2021 at 22:27, John Dammeyer  wrote:
> 
> > The infrastructure for CAN messaging is already there and it won't matter 
> > if it's a plug in car or USB device.  There are a number of
> CAN dongles that aren't always like serial ports and so SocketCAN provides 
> the common access.
> 
> Maybe, but you still need to find a way to get the data from SocketCAN
> in to HAL, which is going to need some sort of driver.
> 
> --
> atp

And I take it from your answer that this sort of driver at this point in time 
does not exist.

John

> "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] hi guys

2021-01-22 Thread Sven Wesley
Den tors 14 jan. 2021 kl 23:28 skrev andrew beck :

> I have some proxy switches on my cnc lathe I am retrofitting and have a few
> questions
>
> the switches are omron 10-40v dc and NPN NO
> basically opposite to what i need I think lol.
> I think the mesa cards prefer PNP NC proxy switches
> anyway I saw on the forum that you can use a resistor to interface with the
> npn proxies.
>
>
> https://www.forum.linuxcnc.org/27-driver-boards/27877-mesa-cards-and-inductive-proximity-switches?start=10
>
> PCW mentioned a 2K 1 W pullup to 24V
> I just wanted to send a quick email asking about this.  before I connect up
> and blow something always good to check first here
>
> regards
> Andrew
>


Here's a link to Norbert's Mesa wiring PDF. It has an example page with
prox sensors.
https://forum.linuxcnc.org/media/kunena/attachments/3278/7i76_Anschluss_2016-12-03.pdf

Regards,
Sven

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


Re: [Emc-users] CANopen on LinuxCNC

2021-01-22 Thread andy pugh
On Fri, 22 Jan 2021 at 22:27, John Dammeyer  wrote:

> The infrastructure for CAN messaging is already there and it won't matter if 
> it's a plug in car or USB device.  There are a number of CAN dongles that 
> aren't always like serial ports and so SocketCAN provides the common access.

Maybe, but you still need to find a way to get the data from SocketCAN
in to HAL, which is going to need some sort of driver.

-- 
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] CANopen on LinuxCNC

2021-01-22 Thread John Dammeyer

> -Original Message-
> From: andy pugh [mailto:bodge...@gmail.com]
> Sent: January-22-21 1:57 PM
> To: Enhanced Machine Controller (EMC)
> Subject: Re: [Emc-users] CANopen on LinuxCNC
> 
> On Fri, 22 Jan 2021 at 21:35, John Dammeyer  wrote:
> 
> > Under Linux CAN messages are available via SocketCAN.  So it's easy enough 
> > to hook up something like a Lawicel CANUSB
> http://www.can232.com/canusb/
> 
> That appears as a COM port, so would probably be conveniently
> interfaced by a HAL driver similar to (for example) hy_vfd.

Actually, SocketCAN is the better way to interface to it or other CAN devices 
rather than treating it as a serial port.  

The infrastructure for CAN messaging is already there and it won't matter if 
it's a plug in car or USB device.  There are a number of CAN dongles that 
aren't always like serial ports and so SocketCAN provides the common access.  
For example, run LinuxCNC on that Pi4 and plug in an MCP2515 HAT for CAN bus 
and you are now using SPI.  But with SocketCAN it doesn't matter.  Same with 
BBB and say MachineKit.  The CAN devices inside the processor are also 
accessible via SocketCAN.

I wouldn't run real time motion control with it but for tool changers, pick and 
place handlers, oilers etc. all ideal and modular.
John


> 
> I suppose some sort of thin shim layer between an existing general
> purpose driver might be an option, but adds yet another dependency.
> 
> --
> 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] CANopen on LinuxCNC

2021-01-22 Thread andy pugh
On Fri, 22 Jan 2021 at 21:35, John Dammeyer  wrote:

> Under Linux CAN messages are available via SocketCAN.  So it's easy enough to 
> hook up something like a Lawicel CANUSB http://www.can232.com/canusb/

That appears as a COM port, so would probably be conveniently
interfaced by a HAL driver similar to (for example) hy_vfd.

I suppose some sort of thin shim layer between an existing general
purpose driver might be an option, but adds yet another dependency.

-- 
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] Another Mesa vhdl question (STMBL summary with added pico-pi?)

2021-01-22 Thread Gene Heskett
On Friday 22 January 2021 16:12:00 andy pugh wrote:

> On Fri, 22 Jan 2021 at 20:47, Gene Heskett  
wrote:
> > thing about the precision being 24 bits, as the max of 3 volts full
> > scale says it will need scaled at the inputs to live with 5 volt or
> > higher circuits.
>
> The boards always seem to have lots of unpopulated pads. I assume that
> these are for voltage dividers, but haven't bothered to check as the
> project that I am using with them is 3.3V throughout.

$DayJob, or your stuff? Since I haven't had a $DayJob in going on 19 
years, I sometimes forget the difference.  My bad in that case.

What I see for us, is a need for a higher voltage, equally efficient 
version of the 7 dollar or less, BTS-7960 boards. Zero heat while 
running a 100watt, 24 volt motor from 24 volts, yet its only rated for 
27 volts max. Run it by a mesa pwmgen in mode 2, and it just works. 
Sweet.

But if the PID is tuned wrong, gets into windup and it overshoots, it 
will attempt to reverse the motor at speed, and that will crowbar a 400 
watt 24 volt switcher.  Shuts itself down for about 3 minutes to cool.

But since the BTS-7960 has a 43 Amp rating, It isn't bothered a bit, even 
by that.

Thanks Andy.

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] Another Mesa vhdl question (STMBL summary with added pico-pi?)

2021-01-22 Thread Ralph Stirling
I don't think you are going to use an ADS1256 for
servo feedback.  30khz sounds good, but when you
look at the datasheet fine print, there are caveats.
First, the inputs are multiplexed, so cycling the
multiplexer drops your 30khz data rate to an effective
4.3khz rate.  There is also a 0.2msec settling time
for the digital filter (which would be per channel).
I'm not sure how much it affects CNC control, but
I know in robotics applications non-simultaneous
sampling causes problems.  The sequential multiplexing
causes each axis to be sampled at a different time.

A precision single-turn pot for a linear axis sounds
like a problem for other reasons.  You would have a
giant discontinuity every revolution.

Anyway, this ADS1256 on these Chinese cards does
look very interesting for other, non-realtime applications.

-- Ralph


From: Gene Heskett [ghesk...@shentel.net]
Sent: Friday, January 22, 2021 12:45 PM
To: emc-users@lists.sourceforge.net
Subject: Re: [Emc-users] Another Mesa vhdl question (STMBL summary with added 
pico-pi?)

On Friday 22 January 2021 14:37:56 andy pugh wrote:

> On Fri, 22 Jan 2021 at 18:41, Gene Heskett 
wrote:
> > What comparison can be made between the very limited, fixed scale
> > A-D conversion of a mesa card's 1st 4 inputs on say a 7i76, and the
> > A/D speed and scaling that $4 pico-pi might be able to do when
> > running the STMBL code, and how fast could it do it?
>
> If you want lots of high resolution A to D, have a look for ADS1256
> boards on eBay.

That's a sweet price for that much precision, and 30ksps sounds like its
plenty fast enough to run a servo feedback from precision pots. Good
thing about the precision being 24 bits, as the max of 3 volts full
scale says it will need scaled at the inputs to live with 5 volt or
higher circuits. With an SPI interface, working that out to cohabit with
a 7i90 looks to be an interesting project. And I just ordered a 4
channel digital scope so I can see this stuff better. A 2GS input gets
pricey though.

Thanks Andy.

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://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Femc-users&data=04%7C01%7Cralph.stirling%40wallawalla.edu%7C7b16a513d0b74475828608d8bf16aa15%7Cd958f048e43142779c8debfb75e7aa64%7C0%7C0%7C637469451362247427%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=a20RBPKaM0pedhfPRU4R6WsbazAyJpUMdYABIiImbs8%3D&reserved=0


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


[Emc-users] CANopen on LinuxCNC

2021-01-22 Thread John Dammeyer
Is there an easy way to bring CANopen information into LinuxCNC?
 
I have a number of CANopen modules that have I/O that would work well as tool 
changers or displays for status information like Control Cabinet voltages etc.
 
Under Linux CAN messages are available via SocketCAN.  So it's easy enough to 
hook up something like a Lawicel CANUSB http://www.can232.com/canusb/  which is 
supported by SocketCAN (at least on a BBB or Raspberry Pi) although I haven't 
tried it yet on LinuxCNC.
 
For example, say I had a 4x20 line display mounted in my control cabinet.  If I 
used a CANopen module to read the power supply voltages and currents and maybe 
even cabinet temperature I could easily create a number of PDO messages that 
contain that information.  Another display, also a CANopen module, 
https://www.industry-plaza.com/can-displays-rm-display-1001-p222627.html  can 
be configured to grab elements of PDO messages and display the information.  
The buttons on the display can scroll through the values received.
 
It would be handy to also have LinuxCNC post a few of the HAL values like 
Spindle RPM or even respond to PDOs with messages like Stop Spindle.
 
Google search doesn't seem to turn up anything directly.
 
Thanks
John Dammeyer
 
 
 
"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] Rpi Pico

2021-01-22 Thread Frank Tkalcevic
I just received an advertising email from SparkFun.  They sell the Pi Pico
as well as 3 of their own variants with the RP2040 chip...


Thing Plus - https://www.sparkfun.com/products/17745
MicroMod - https://www.sparkfun.com/products/17720
Pro Micro - https://www.sparkfun.com/products/17717

I just noticed, they are for pre-order.


-Original Message-
From: Chris Albertson [mailto:albertson.ch...@gmail.com] 
Sent: Friday, 22 January 2021 4:05 PM
To: Enhanced Machine Controller (EMC)
Subject: Re: [Emc-users] Rpi Pico

On Thu, Jan 21, 2021 at 7:56 PM Dave Cole  wrote:

> I was thinking multiple RPi Picos to one RPi4, but for just one, that is
> probably the way to go.
>

The Pico is a dual-core M0.   So it is faster than I had originally
thought.   Micro-Python is ported to it so it might be very easy for many
people to program.   I'm got my name in to be notified when they are back
in stock. I still think USB is the simplest way to connect while
experimenting.

One advantage of USB is that you need USB to program the Pico.   You would
run the development system on the Pi4 and change the firmware by copying
files or drag/drop.  If the Pico is SPI connected then you need to hunt
down a USB cable then walk out to the shop to change the firmware.



> I'll try that first!
>
> The Pi Hat as the carrier board is also a good idea.
>
> On 1/21/2021 7:46 PM, Chris Albertson wrote:
> > I'd bet SPI would work well but even easier would be to connect them to
> the
> > Pi4 with USB.  Both sides have software that makes the USB look like a
> > serial port and the physical connection is done with off the shelf
cable.
> >
> > I've used M0 boards this way in the past and using USB lets you also
cnet
> > them to a Linux PC
> >
> > What I like about the Pico is that it can be SMT hand soldered.  I can
> make
> > a simple passive carrier board that has connectors and it is not hard to
> > hand solder 0.1 inch pitch.  The carrier board could be a Pi-hat
> >
> > On Thu, Jan 21, 2021 at 4:30 PM Dave Cole 
> wrote:
> >
> >> I wonder if these could act as SPI slaves to the RPI 4?
> >>
> >> I've been trying to buy two from Adafruit and they keep selling out and
> >> then coming back in stock, and then selling out again!
> >>
> >> Dave
> >>
> >> On 1/21/2021 6:36 PM, andy pugh wrote:
> >>> On Thu, 21 Jan 2021 at 21:52, Chris Albertson <
> albertson.ch...@gmail.com>
> >> wrote:
>  This is an STM32 microcontroller.
> >>> Are you sure? It is an ARM Cortex M0, like the STM32, but is it made
by
> >> ST?
> >>
> >> ___
> >> 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] Another Mesa vhdl question (STMBL summary with added pico-pi?)

2021-01-22 Thread andy pugh
On Fri, 22 Jan 2021 at 20:47, Gene Heskett  wrote:

> thing about the precision being 24 bits, as the max of 3 volts full
> scale says it will need scaled at the inputs to live with 5 volt or
> higher circuits.

The boards always seem to have lots of unpopulated pads. I assume that
these are for voltage dividers, but haven't bothered to check as the
project that I am using with them is 3.3V throughout.

-- 
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] Another Mesa vhdl question (STMBL summary with added pico-pi?)

2021-01-22 Thread Gene Heskett
On Friday 22 January 2021 14:37:56 andy pugh wrote:

> On Fri, 22 Jan 2021 at 18:41, Gene Heskett  
wrote:
> > What comparison can be made between the very limited, fixed scale
> > A-D conversion of a mesa card's 1st 4 inputs on say a 7i76, and the
> > A/D speed and scaling that $4 pico-pi might be able to do when
> > running the STMBL code, and how fast could it do it?
>
> If you want lots of high resolution A to D, have a look for ADS1256
> boards on eBay.

That's a sweet price for that much precision, and 30ksps sounds like its 
plenty fast enough to run a servo feedback from precision pots. Good 
thing about the precision being 24 bits, as the max of 3 volts full 
scale says it will need scaled at the inputs to live with 5 volt or 
higher circuits. With an SPI interface, working that out to cohabit with 
a 7i90 looks to be an interesting project. And I just ordered a 4 
channel digital scope so I can see this stuff better. A 2GS input gets 
pricey though.

Thanks Andy.

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] Another Mesa vhdl question (STMBL summary with added pico-pi?)

2021-01-22 Thread Gene Heskett
On Friday 22 January 2021 14:10:22 Ralph Stirling wrote:

> I really don't know yet how much work it would be to
> port STMBL to the Pico.  A stock STMBL drive, with
> an STM32F405VG processor has four analog inputs
> (as far as I can tell).  Those are 12bit, and can be scaled
> in stmbl's local hal.  I haven't investigated the sampling
> rate for those conversions.  The STM32F4xx processors
> have a lot more analog inputs available, but teasing out
> which ones don't conflict with needed digital i/o, and how
> to route them inside the stmbl code is more than I've done.
> The Pico pinout seems to indicate only 3 analog inputs.

Thanks Ralph, but all my mills are 4 axis. And the pico is probably too 
slow for that to be used as servo feedback anyway.  So do carry on.  Its 
an interesting discussion for sure.

> -- Ralph
> 
> From: Gene Heskett [ghesk...@shentel.net]
> Sent: Friday, January 22, 2021 10:38 AM
> To: emc-users@lists.sourceforge.net
> Subject: Re: [Emc-users] Another Mesa vhdl question (STMBL summary
> with added pico-pi?)
>
>
> What comparison can be made between the very limited, fixed scale A-D
> conversion of a mesa card's 1st 4 inputs on say a 7i76, and the A/D
> speed and scaling that $4 pico-pi might be able to do when running the
> STMBL code, and how fast could it do it?
>
> Having those figures at hand would determine just how usefull the
> pico-pi might be.
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
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] Another Mesa vhdl question (STMBL summary with added pico-pi?)

2021-01-22 Thread andy pugh
On Fri, 22 Jan 2021 at 18:41, Gene Heskett  wrote:

> What comparison can be made between the very limited, fixed scale A-D
> conversion of a mesa card's 1st 4 inputs on say a 7i76, and the A/D
> speed and scaling that $4 pico-pi might be able to do when running the
> STMBL code, and how fast could it do it?

If you want lots of high resolution A to D, have a look for ADS1256
boards on eBay.

-- 
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] Another Mesa vhdl question (STMBL summary with added pico-pi?)

2021-01-22 Thread Ralph Stirling
I really don't know yet how much work it would be to
port STMBL to the Pico.  A stock STMBL drive, with
an STM32F405VG processor has four analog inputs
(as far as I can tell).  Those are 12bit, and can be scaled
in stmbl's local hal.  I haven't investigated the sampling
rate for those conversions.  The STM32F4xx processors
have a lot more analog inputs available, but teasing out
which ones don't conflict with needed digital i/o, and how
to route them inside the stmbl code is more than I've done.
The Pico pinout seems to indicate only 3 analog inputs.

-- Ralph

From: Gene Heskett [ghesk...@shentel.net]
Sent: Friday, January 22, 2021 10:38 AM
To: emc-users@lists.sourceforge.net
Subject: Re: [Emc-users] Another Mesa vhdl question (STMBL summary with added 
pico-pi?)


What comparison can be made between the very limited, fixed scale A-D
conversion of a mesa card's 1st 4 inputs on say a 7i76, and the A/D
speed and scaling that $4 pico-pi might be able to do when running the
STMBL code, and how fast could it do it?

Having those figures at hand would determine just how usefull the pico-pi
might be.


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


Re: [Emc-users] Another Mesa vhdl question (STMBL summary with added pico-pi?)

2021-01-22 Thread Gene Heskett
On Friday 22 January 2021 12:24:14 Ralph Stirling wrote:

> I finally succeeded in getting the STMBL code on a STM32F407
> Discovery eval board talking to a Mesa 7I90 via sserial.  The
> final issue was assuming the wrong pin for sserial tx on the F407.
>
> Here is my final summary of everything necessary to replicate
> what I did, for anybody else trying this.
>
> Steps on F407 end:
> 1. Compile STMBL code following their docs.
> 2. Plug in F407 Discovery st-link usb cable.
> 3. Copy obj_boot/blboot.bin to the F407 st-link drive
> 4. Plug in F407 Discovery otg usb cable (micro-b)
> 5. Run "make all_btburn", which should give flashing progress
> 6. Connect F407 ground to 7I90 ground
> 7. Connect F407 PA0 pin to sserial rx pin on 7I90
> 8. Connect F407 PA10 pin to sserial tx pin on 7I90
> 9. Run STMBL servoterm and connect
> 10. Edit config to have these lines:
>load sserial
>sserial0.rt_prio = 2.0
>sserial0.frt_prio = 2.0
> 11. Save config and type "reset"
> 12. On linuxcnc computer, run "halcmd -I"
> 13. Type:
> loadrt hostmot2
> loadrt hm2_x config=" sserial_port_0=0XXX"
>
> I believe this will work with a variety of STM32F4xx chips and
> boards.  It looks like the stock stmbl code is about 303K in size,
> so a 512K flash cpu is probably the minimum.  The stats given
> by servoterm seem to indicate that cpu usage is low, though,
> so a slower clock may be OK.  I wonder if it would run on the
> new RPi Pico with modest modifications?

What comparison can be made between the very limited, fixed scale A-D 
conversion of a mesa card's 1st 4 inputs on say a 7i76, and the A/D 
speed and scaling that $4 pico-pi might be able to do when running the 
STMBL code, and how fast could it do it?

Having those figures at hand would determine just how usefull the pico-pi 
might be. 

> Thanks for the help and suggestions from Andy and Peter.
> -- Ralph
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
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] Another Mesa vhdl question (STMBL summary)

2021-01-22 Thread Ralph Stirling
I finally succeeded in getting the STMBL code on a STM32F407
Discovery eval board talking to a Mesa 7I90 via sserial.  The
final issue was assuming the wrong pin for sserial tx on the F407.

Here is my final summary of everything necessary to replicate
what I did, for anybody else trying this.

Steps on F407 end:
1. Compile STMBL code following their docs.
2. Plug in F407 Discovery st-link usb cable.
3. Copy obj_boot/blboot.bin to the F407 st-link drive
4. Plug in F407 Discovery otg usb cable (micro-b)
5. Run "make all_btburn", which should give flashing progress
6. Connect F407 ground to 7I90 ground
7. Connect F407 PA0 pin to sserial rx pin on 7I90
8. Connect F407 PA10 pin to sserial tx pin on 7I90
9. Run STMBL servoterm and connect
10. Edit config to have these lines:
   load sserial
   sserial0.rt_prio = 2.0
   sserial0.frt_prio = 2.0
11. Save config and type "reset"
12. On linuxcnc computer, run "halcmd -I"
13. Type:
loadrt hostmot2
loadrt hm2_x config=" sserial_port_0=0XXX"

I believe this will work with a variety of STM32F4xx chips and
boards.  It looks like the stock stmbl code is about 303K in size,
so a 512K flash cpu is probably the minimum.  The stats given
by servoterm seem to indicate that cpu usage is low, though,
so a slower clock may be OK.  I wonder if it would run on the
new RPi Pico with modest modifications?

Thanks for the help and suggestions from Andy and Peter.
-- Ralph

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