On Mon, 5 Nov 2007, Kirk Wallace wrote:

Date: Mon, 05 Nov 2007 08:11:07 -0800
From: Kirk Wallace <[EMAIL PROTECTED]>
Reply-To: "Enhanced Machine Controller (EMC)"
    <emc-users@lists.sourceforge.net>
To: "Enhanced Machine Controller (EMC)" <emc-users@lists.sourceforge.net>
Subject: Re: [Emc-users] Step/Direction Drivers

On Mon, 2007-11-05 at 06:11 -0800, Peter C. Wallace wrote:
On Sun, 4 Nov 2007, Kirk Wallace wrote:

Has there been any movement on adding SPI to EMC? Paul_C updated a
parallel port SPI driver for me to work with 2.6 kernels, so I can
communicate with SPI devices, but my guess is, this is just a small part
of getting EMC to talk to SPI drives. Would it be more accurate to to
say, what I need is a Rutex driver that happens to use SPI? If getting
SPI working would be similar to Ethernet I/O, has there been any
documentation created from the recent thread on Ethernet I/O that I
could study?


If the hardware is there ...

I think one of the problems is that the only SPI interfaces are parallel
port bit banging, which is too slow; and USB to SPI which is
non-real-time and very expensive. Could the 5i20 be configured to
provide high speed SPI ports?


Yes, already does (Hostmot2) (up to 32 bit SPI) Hostmot2 also supports step+direction, high speed UART (10 mbps), SSI (absolute encoder protocol), quadrature counters, 10,11 or 12 bit PWM (100 Mhz base), all overlaid on GPIO.



and assuming the Rutex 'protocol' is trivial,

All I have now is Rutex' drive datasheet:

http://www.rutex.com/pdf/R20x0.pdf

Which has this on page 4:

Internal SPI registers:
Name        Adr   Size  Type  Description
Dummy8      10h   8-bit R/W   Dummy FFh register
StatusReg   11h   8-bit R/w   Status Register ?? holds the status of
FIFO, input and error
Revision    12h   8-bit R/W   Firmware revision
StepSize    13h   8-bit E/W/E Size of the step multiplier
Im          14h   8-bit R     Motor current - real time reading
... snip

 SPI
should be much simpler than Ethernet, as it has short and known latencies and
is likely point to point.

You can chain the data to the slaves and run chip selects to each, or
you can chain both and, I think, you address the slave by the number of
bytes you send after the data byte or put the address in with the data.

Assuming SPI hardware on the PC, Output only SPI
should not be much more than writing the (properly formated) data to a port.

Of course, bi-directional communications would be better because the
only way to tune the drive is through the SPI port. It bugs me to no end
that I have to boot Windows to tune the drive. Plus, I can't use
Halscope either.

--
Kirk Wallace (California, USA
http://www.wallacecompany.com/machine_shop/
Hardinge HNC lathe
Bridgeport mill conversion pending
Zubal lathe conversion pending)


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to