Re: [Emc-users] Step Direction

2006-12-28 Thread Mario .
Easiest way will be editing HAL file which describes the stepper
output pins connection and you are done in 30 seconds ;-)

On 12/28/06, David at home <[EMAIL PROTECTED]> wrote:
>
> Help please
>
> I have successfully ungraded to EMC2 (Ubuntu) and things are running
> smoothly with my Stepper motors using the standard set up files. I had
> to add/adjusted the "step length" which now seems fine, but have changed
> little else.
>
> My only problem is, the axis are going the wrong ways!
>
> I've spent about a day playing with various settings "-invert" / "not"
> and have come to the conclusion, I haven't a clue which setup file I
> should be fiddling in. I've even resorted to reading the manual, but I'm
> still none the wiser.
>
> Can any tell me the best place add a "change of direction" command and
> what it should look like, please ?
>
> Thanks David
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Step Direction

2006-12-28 Thread Sam Sokolik
the easiest way that I know of is to simply change the sign in front or your 
input scale value for the offending axis.  This is in your ini file.

INPUT_SCALE = 81920 0

INPUT_SCALE = -81920 0

sam

- Original Message - 
From: "Mario." <[EMAIL PROTECTED]>
To: "Enhanced Machine Controller (EMC)" 
Sent: Thursday, December 28, 2006 9:07 AM
Subject: Re: [Emc-users] Step Direction


> Easiest way will be editing HAL file which describes the stepper
> output pins connection and you are done in 30 seconds ;-)
>
> On 12/28/06, David at home <[EMAIL PROTECTED]> wrote:
>>
>> Help please
>>
>> I have successfully ungraded to EMC2 (Ubuntu) and things are running
>> smoothly with my Stepper motors using the standard set up files. I had
>> to add/adjusted the "step length" which now seems fine, but have changed
>> little else.
>>
>> My only problem is, the axis are going the wrong ways!
>>
>> I've spent about a day playing with various settings "-invert" / "not"
>> and have come to the conclusion, I haven't a clue which setup file I
>> should be fiddling in. I've even resorted to reading the manual, but I'm
>> still none the wiser.
>>
>> Can any tell me the best place add a "change of direction" command and
>> what it should look like, please ?
>>
>> Thanks David
>>
>> -
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share 
>> your
>> opinions on IT & business topics through brief surveys - and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> ___
>> Emc-users mailing list
>> Emc-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-users
>>
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share 
> your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users 


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Step Direction

2006-12-28 Thread Chris Radek
On Thu, Dec 28, 2006 at 03:08:26PM +, David at home wrote:
> 
> Can any tell me the best place add a "change of direction" command and
> what it should look like, please ?

Just make the INPUT_SCALE negative in the .ini.

Chris

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Step Direction

2006-12-28 Thread Andy Ibbotson
David,
Try reversing the sign of the INPUT_SCALE parameter in the AXIS_#
section of your .ini file.  I used this to reverse the direction of my
steppers i.e.

INPUT_SCALE = 12000 0 turns clockwise

INPUT_SCALE = -12000 0 should turn anti-clockwise

Hope this helps.
Andy

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David at
home
Sent: 28 December 2006 15:08
To: emc-users@lists.sourceforge.net
Subject: [Emc-users] Step Direction


Help please

I have successfully ungraded to EMC2 (Ubuntu) and things are running
smoothly with my Stepper motors using the standard set up files. I had
to add/adjusted the "step length" which now seems fine, but have changed
little else. 

My only problem is, the axis are going the wrong ways!

I've spent about a day playing with various settings "-invert" / "not"
and have come to the conclusion, I haven't a clue which setup file I
should be fiddling in. I've even resorted to reading the manual, but I'm
still none the wiser.

Can any tell me the best place add a "change of direction" command and
what it should look like, please ?

Thanks David


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE
V
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Step/Direction Drivers

2007-11-05 Thread Peter C. Wallace
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 and assuming the Rutex 'protocol' is trivial, SPI 
should be much simpler than Ethernet, as it has short and known latencies and 
is likely point to point. Assuming SPI hardware on the PC, Output only SPI 
should not be much more than writing the (properly formated) data to a port.



> 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


Re: [Emc-users] Step/Direction Drivers

2007-11-05 Thread Kirk Wallace
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?

> 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:
NameAdr   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
Revision12h   8-bit R/W   Firmware revision
StepSize13h   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


Re: [Emc-users] Step/Direction Drivers

2007-11-05 Thread Peter C. Wallace

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

To: "Enhanced Machine Controller (EMC)" 
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:
NameAdr   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
Revision12h   8-bit R/W   Firmware revision
StepSize13h   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


Re: [Emc-users] Step/Direction Drivers

2007-11-05 Thread Kirk Wallace
On Mon, 2007-11-05 at 08:31 -0800, Peter C. Wallace wrote:
> 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)"
> > 
> > To: "Enhanced Machine Controller (EMC)" 
> > 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
... snip
> > 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.

Where can I get more information on Hostmot2?

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


Re: [Emc-users] Step/Direction Drivers

2007-11-05 Thread Stephen Wille Padnos
Kirk Wallace wrote:

> [snip]
>
>Where can I get more information on Hostmot2?
>  
>
I think the Hostmot2 files are on the Mesa website, but my understanding 
was that they only work with the 5i22.  I should look more closely at 
the VHDL source I guess :)

At the moment, there is no EMC2 driver for the HostMot2 configuration.  
Hardware that's this configurable is difficult to use in the HAL model, 
because the HAL pins you need are dependent on the configuration of the 
hardware, and can't be changed after driver load time.  This means that 
you either need to specify all of the options on the driver load line (a 
nightmare when there are so many functions), or you need to export all 
possible pins in HAL, along with enable / mode bits that allow the user 
to (re)configure the hardware in HAL.  This is difficult at best because 
some functions require other functions to be shut off, and there are 
"unintended consequences" - for example, if you enable an SPI port, that 
disables the I/O functionality on those two pins (though you can still 
read back the pin state, I believe), so what do you do if someone has 
connected those I/Os to a HAL signal?

I think there will also be SPI blocks in the configurable Mesa HAL 
driver at some point, FWIW.

- Steve


-
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


Re: [Emc-users] Step/Direction Drivers

2007-11-05 Thread Kirk Wallace
On Mon, 2007-11-05 at 12:17 -0500, Stephen Wille Padnos wrote:
> Kirk Wallace wrote:
> 
> > [snip]
> >
> >Where can I get more information on Hostmot2?
> >  
> >
> I think the Hostmot2 files are on the Mesa website, but my understanding 
> was that they only work with the 5i22.  I should look more closely at 
> the VHDL source I guess :)
> 
> At the moment, there is no EMC2 driver for the HostMot2 configuration.  
> Hardware that's this configurable is difficult to use in the HAL model, 
> because the HAL pins you need are dependent on the configuration of the 
> hardware, and can't be changed after driver load time.  This means that 
> you either need to specify all of the options on the driver load line (a 
> nightmare when there are so many functions), or you need to export all 
> possible pins in HAL, along with enable / mode bits that allow the user 
> to (re)configure the hardware in HAL.  This is difficult at best because 
> some functions require other functions to be shut off, and there are 
> "unintended consequences" - for example, if you enable an SPI port, that 
> disables the I/O functionality on those two pins (though you can still 
> read back the pin state, I believe), so what do you do if someone has 
> connected those I/Os to a HAL signal?
> 
> I think there will also be SPI blocks in the configurable Mesa HAL 
> driver at some point, FWIW.
> 
> - Steve

Are you talking about reconfiguring the 5i20 after loading EMC and the
5i20 driver? Normally, I would think, you would create the new
configuration in a new driver. It certainly would be cool to be able to
dynamically configure EMC and the 5i20, but might not be good for people
like me to know about it.

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


Re: [Emc-users] Step/Direction Drivers

2007-11-05 Thread Peter C. Wallace
On Mon, 5 Nov 2007, Kirk Wallace wrote:

> Date: Mon, 05 Nov 2007 09:37:27 -0800
> From: Kirk Wallace <[EMAIL PROTECTED]>
> Reply-To: "Enhanced Machine Controller (EMC)"
> 
> To: "Enhanced Machine Controller (EMC)" 
> Subject: Re: [Emc-users] Step/Direction Drivers
> 
> On Mon, 2007-11-05 at 12:17 -0500, Stephen Wille Padnos wrote:
>> Kirk Wallace wrote:
>>
>>> [snip]
>>>
>>> Where can I get more information on Hostmot2?
>>>
>>>
>> I think the Hostmot2 files are on the Mesa website, but my understanding
>> was that they only work with the 5i22.  I should look more closely at
>> the VHDL source I guess :)
>>
>> At the moment, there is no EMC2 driver for the HostMot2 configuration.
>> Hardware that's this configurable is difficult to use in the HAL model,
>> because the HAL pins you need are dependent on the configuration of the
>> hardware, and can't be changed after driver load time.  This means that
>> you either need to specify all of the options on the driver load line (a
>> nightmare when there are so many functions), or you need to export all
>> possible pins in HAL, along with enable / mode bits that allow the user
>> to (re)configure the hardware in HAL.  This is difficult at best because
>> some functions require other functions to be shut off, and there are
>> "unintended consequences" - for example, if you enable an SPI port, that
>> disables the I/O functionality on those two pins (though you can still
>> read back the pin state, I believe), so what do you do if someone has
>> connected those I/Os to a HAL signal?
>>
>> I think there will also be SPI blocks in the configurable Mesa HAL
>> driver at some point, FWIW.
>>
>> - Steve
>
> Are you talking about reconfiguring the 5i20 after loading EMC and the
> 5i20 driver? Normally, I would think, you would create the new
> configuration in a new driver. It certainly would be cool to be able to
> dynamically configure EMC and the 5i20, but might not be good for people
> like me to know about it.



You could also pretend that its not dynamically changeble and have the driver 
setup the IO options permamently when initilaizes the card, having a handful 
of different driver options, maybe changing IO only on a per connector basis, 
like the current hardware does.

And yes, GPIO is always readable even if its used for another function. If the 
other function is input, there is no problem, but if its output, of course the 
alternate function controls the pin, and inuts of that bit wil read the 
alternate functions output state.


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


Re: [Emc-users] Step/Direction Drivers

2007-11-05 Thread Stephen Wille Padnos

Kirk Wallace wrote:

>[snip]
>Are you talking about reconfiguring the 5i20 after loading EMC and the
>5i20 driver? Normally, I would think, you would create the new
>configuration in a new driver. It certainly would be cool to be able to
>dynamically configure EMC and the 5i20, but might not be good for people
>like me to know about it.
>
Well, there are two things here.

First is hostmot2 and how something like that could work with EMC2.  The 
Hostmot2 config has all sorts of I/O, but all of the advanced functions 
can be disabled.  There are registers that select whether each port pin 
will be connected to the generic I/O function, or whether they'll be 
connected to the "alternate function".  These are dynamically changeable 
in the FPGA.  There are two ways for HAL to deal with this:
1) Many load-time parameters.  The loadrt line in the hal file would 
have to specify which UARTS, SPIs, PWMs, quadrature counters, and 
stepgens are going to be enabled.  Also, you need to specify which pins 
should be inputs and which should be outputs.  This is what tells the 
HAL driver which pins to export.  The driver would then configure the 
board as specified, and run from there.  For maximum flexibility, you'd 
end up with a load line like this:
loadrt hal_hostmot2 spien="0,0,0,1,0,1" stepen="0,0,0,0,0,0,0,0,1,1,1,1" 
pwmen="0,0,0,0,0,0,0,0,0,0,1,1" quaden="0,0,1,1,1,1" 
uarten="0,0,0,0,0,0,0,0" iodirmap="0xFF,0xFF,0xFF,0xFF0"
(I may have forgotten something there too)
That might be the syntax to get 2 SPI ports, 4 stepgens, 2 PWM, 4 
quadrature counters, no UARTs, and two I/O connectors that are 
compatible with the 7I37 (16 in + 8 out).

2) The HAL driver exports all possible pins for all functions.  There 
would then be parameters that control which functions are enabled.  Even 
something as simple as an I/O pin would have the following:
pins:
blahblah.0.dio.00-in
blahblah.0.dio.00-in-not
blahblah.0.dio.00-out
params:
blahblah.0.dio.00-invert
blahblah.0.dio.00-mode

When you have 72 or 96 I/O pins, this gets to be a very large number of 
mostly useless HAL pins.
Now we add the fact that the SPI and other advanced functions are 
overlaid on top of I/O pins.  For example, one connector has the SPI 
ports, so you'd also have these pins/params (at least, I haven't thought 
it through completely):
pins:
blahblah.0.spi.0.data
blahblah.0.spi.0.busy

params:
blahblah.0.spi.0.baudrate
blahblah.0.spi.0.numbits
blahblah.0.spi.0.clk_phase
blahblah.0.spi.0.clk_polarity
blahblah.0.spi.0.enable

As you can see, it gets mighty crowded mighty fast :)

I just saw Pete's email, which has a reasonable third option, but the 
alternate functions would probably need to be moved around a bit.  Doing 
things by connector would make it so you get 0 or 12 stepgens, since 
they're all on the same header.  So if you want one quad counter, one 
SPI, one stepgen, one UART, and one SPI, you get no digital I/Os ;)

It could be simpler for the load line as well, the parameters could 
specify only the count of each function, but that prevents you from 
choosing which ones to enable (to work around demaged pins, or to have 
some I/Os next to stepgens for amp enables, for example)

So, that was the first part ;)
The second way is to do it like the new configurable firmware.  An FPGA 
designer might make a config with 6 stepgens, 6 quad counters, and 6 
SPIs, for example.  There would be a GUI tool (and likely command-line 
options as well) to allow a user to choose which functions should be 
enabled, and when there's an option, where the special functions get 
connected.  The tools put this "selected configuration" information into 
the FPGA bitfile, and the program that programs the FPGA puts that data 
into a RAM area on the FPGA.  The driver reads the RAM area, and exports 
the correct set of pins for the selected functions.
This is a little different in that the FPGA must be programmed before 
loading the HAL driver, though that can be done in the same hal file 
with a loadusr command.

It's not a simple problem to decide which way is "right".
- Steve


-
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


Re: [Emc-users] Step/Direction Drivers

2007-11-05 Thread Stephen Wille Padnos
Of course, it would have been better if I had put parts 1, 2, and 3 in 
the correct numerical order.

Please rearrange in your head ;)

- Steve


-
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


Re: [Emc-users] Step/Direction Drivers

2007-11-05 Thread Jeff Epler
Yes, you'd need a special HAL driver that takes a velocity input to send
to the drive, and produces a position output to send back to emc.

Looking at the pdf you linked to, you would have to arrange for emc to
produce a 16-bit velocity command to be written to register 0x30
("Velocity Word FIFO input"), then read 32 bits from register 0x48
("Buffered DRO output") to get the feedback position.  Another 32 bits
would need to be read from register 0x58 ("Index counter") if index
handling is desired.

Back-of-the-envelope for doing this on the bit-banged parport:
* Each SPI bit written takes 2 or 3 outb()s
* Each SPI bit read takes 2 outb()s and 1 inb()
* Each read or write seems to take an 8-bit address plus 8, 16 or 32
  bits data
* The clock can be shared between all SPI channels, making the pin usage
  (drives+1) outputs and (drives) inputs.  The 5 input limitation of the
  standard parport will be the limiting factor here.
* A total of (24+48+48)=120 bits must be transferred, or 72 bits if no index
  handling is desired, or up to 360 I/O instructions.  That makes at
  least 360uS, more than 1/3 of a 1kHz/1ms servo cycle. (the same length
  of time would be required for 1 motor or for 5)

This could probably be done, but it would likely require the emc "servo"
period to be increased (e.g., to 2ms) because of the large amount of
time spent in I/O.

There's a lot that datasheet leaves unsaid, so it's possible I'm
completely off the mark here.

There's also no question that for high loop speeds you'd be better off
with dedicated hardware that is fast for EMC to talk to and which can
generate high speed SPI waveforms -- the 5i20 would be that, if only
emc's hal_m5i20 driver knew how to use the SPI interface.

Jeff

-
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


Re: [Emc-users] Step Direction Timing Page

2008-05-02 Thread John Kasunich
John Thornton wrote:
> I started a step and direction timing page on the wiki site. If anyone can 
> add to it 
> that would be great. I use the same format as the stepconf setup page so 
> newbee's 
> won't get confused nor will I...
> 
> http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Stepper_Drive_Timing
> 
> John

Excellent idea!  One of those "duh, why didn't we do that a long time 
ago" ones.

Regards,

John Kasunich

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Step Direction Timing Page

2008-05-02 Thread Geoff
On Saturday 03 May 2008 00:43, John Kasunich wrote:
> John Thornton wrote:
> > I started a step and direction timing page on the wiki site. If anyone
> > can add to it that would be great. I use the same format as the stepconf
> > setup page so newbee's won't get confused nor will I...
> >
> > http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Stepper_Drive_Timing
> >
> > John
>
> Excellent idea!  One of those "duh, why didn't we do that a long time
> ago" ones.
>
> Regards,
>
> John Kasunich
snipped

Hi Guys,
Does anybody have this kind of data for the step-direction drives that 
Oatley 
electronics sells? I have built a set and tested them rat's nest style with 
EMC. I am yet to integrate them with my mill. If all else fails i'll do it 
the hard way and post the data here.

Cheers, Geoff.

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Step Direction Timing Page

2008-05-02 Thread Jason Cox
John,
I have run 3 of these on a mill without any major issues.the only
problem I have found is that some of the revixsion of the controller pcb
used opto isolators witha limiting resitor in series with led in the
opto. this tends to cut down the highest speed you can run at. my fix on
these was to bypass the resistor. later pcb used transitor which works
beter.

Unfortunatly when my old pc dies i lost my configs, but my top speed was
limited to aprox 200mm/m on a 1mm pitch screw and 200 step/rev steppers.

With timing, I didn't change any of the timing from the defaults in the
sherline mm  config.

hope it helps.
Jason Cox
PS I can try to dig up a config file if you would like..

On Sat, 2008-05-03 at 08:14 +1000, Geoff wrote:
> On Saturday 03 May 2008 00:43, John Kasunich wrote:
> > John Thornton wrote:
> > > I started a step and direction timing page on the wiki site. If anyone
> > > can add to it that would be great. I use the same format as the stepconf
> > > setup page so newbee's won't get confused nor will I...
> > >
> > > http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Stepper_Drive_Timing
> > >
> > > John
> >
> > Excellent idea!  One of those "duh, why didn't we do that a long time
> > ago" ones.
> >
> > Regards,
> >
> > John Kasunich
> snipped
> 
> Hi Guys,
>   Does anybody have this kind of data for the step-direction drives that 
> Oatley 
> electronics sells? I have built a set and tested them rat's nest style with 
> EMC. I am yet to integrate them with my mill. If all else fails i'll do it 
> the hard way and post the data here.
> 
> Cheers, Geoff.
> 
> -
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save $100. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
> 


-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Step Direction Timing Page

2008-05-02 Thread John Thornton
Anything you can add will help others speed past this part of installing and 
running 
EMC.

John

On 3 May 2008 at 8:23, Jason Cox wrote:

> John,
>  I have run 3 of these on a mill without any major issues.the only
> problem I have found is that some of the revixsion of the controller
> pcb used opto isolators witha limiting resitor in series with led in
> the opto. this tends to cut down the highest speed you can run at. my
> fix on these was to bypass the resistor. later pcb used transitor
> which works beter.
> 
> Unfortunatly when my old pc dies i lost my configs, but my top speed
> was limited to aprox 200mm/m on a 1mm pitch screw and 200 step/rev
> steppers.
> 
> With timing, I didn't change any of the timing from the defaults in
> the sherline mm  config.
> 
> hope it helps.
> Jason Cox
> PS I can try to dig up a config file if you would like..
> 
> On Sat, 2008-05-03 at 08:14 +1000, Geoff wrote:
> > On Saturday 03 May 2008 00:43, John Kasunich wrote:
> > > John Thornton wrote:
> > > > I started a step and direction timing page on the wiki site. If
> > > > anyone can add to it that would be great. I use the same format
> > > > as the stepconf setup page so newbee's won't get confused nor
> > > > will I...
> > > >
> > > > http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Stepper_Drive_Timing
> > > >
> > > > John
> > >
> > > Excellent idea!  One of those "duh, why didn't we do that a long
> > > time ago" ones.
> > >
> > > Regards,
> > >
> > > John Kasunich
> > snipped
> > 
> > Hi Guys,
> > Does anybody have this kind of data for the step-direction drives
> > that Oatley electronics sells? I have built a set and tested them
> > rat's nest style with EMC. I am yet to integrate them with my mill.
> > If all else fails i'll do it the hard way and post the data here.
> > 
> > Cheers, Geoff.
> > 
> > 
> > - This SF.net email is sponsored by the 2008 JavaOne(SM)
> > Conference Don't miss this year's exciting event. There's still time
> > to save $100. Use priority code J8TL2D2.
> > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.c
> > om/javaone ___ Emc-users
> > mailing list Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> > 
> 
> 
> --
> --- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save
> $100. Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com
> /javaone ___ Emc-users
> mailing list Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
> 



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Step Direction Timing Page

2008-05-02 Thread John Thornton
Thanks Geoff. 

On 3 May 2008 at 8:14, Geoff wrote:

> On Saturday 03 May 2008 00:43, John Kasunich wrote:
> > John Thornton wrote:
> > > I started a step and direction timing page on the wiki site. If
> > > anyone can add to it that would be great. I use the same format as
> > > the stepconf setup page so newbee's won't get confused nor will
> > > I...
> > >
> > > http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Stepper_Drive_Timing
> > >
> > > John
> >
> > Excellent idea!  One of those "duh, why didn't we do that a long
> > time ago" ones.
> >
> > Regards,
> >
> > John Kasunich
> snipped
> 
> Hi Guys,
>  Does anybody have this kind of data for the step-direction drives
>  that Oatley 
> electronics sells? I have built a set and tested them rat's nest style
> with EMC. I am yet to integrate them with my mill. If all else fails
> i'll do it the hard way and post the data here.
> 
> Cheers, Geoff.
> 
> --
> --- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save
> $100. Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com
> /javaone ___ Emc-users
> mailing list Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
> 



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Step & Direction for use on Servo Amps

2012-10-08 Thread andy pugh
On 8 October 2012 17:44, Steve from Tube Gauge  wrote:
> Can the stepper motor 'step & direction' output from EMC2 be used to
> run a servo based system that has step & direction input amplifiers

Yes, absolutely.

In fact there are at least two ways to do it.

You can run open-loop, sending position information as step and
direction signals just as if the servos were stepper motors, or you
can run the stepgens in velocity mode, and have a PID controller
Inside LinuxCNC controlling the position with the servo amps acting
effectively like velocity-mode drives driven by step-rate rather than
analogue voltage.
The latter system requires that the encoder feedback goes to both the
drives and the PC. You will probably run out of pins if using a
parallel port.

-- 
atp
If you can't fix it, you don't own it.
http://www.ifixit.com/Manifesto

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Step & Direction for use on Servo Amps

2012-10-08 Thread Jon Elson
Steve from Tube Gauge wrote:
> Can the stepper motor 'step & direction' output from EMC2 be used to 
> run a servo based system that has step & direction input amplifiers 
> where the servo motor encoder feed back goes into the amp and not EMC2? 
>   I believe the Yaskawa Sigma II amps can run in this mode.   My 
> thought was to build a simpler system and avoid the additional motion 
> control boards if the Yaskawa amps could connect directly to an 
> isolator/break-out board from the parallel port.  Or are these two 
> completely different systems with only the "step & direction" words in 
> common?
>   
Yes, in theory you can do this.  The Yaskawa Servo-Pak drives can accept 
step
and direction signals to optocouplers on their inputs.  You may need a 
breakout
board to supply enough current for their opto-coupled inputs to work.

The problem is the Yaskawa amp/motor setups usually have pretty high 
resolution,
and so you need to provide fairly high step pulse rates to get 
reasonable speed
out of them.  I think the native resolution might be 16384 counts / rev or
something like that.  You can add pulse multiplying with their electronic
gearing feature, but that reduces resolution.  Other than the speed issue,
it certainly should work.

Jon

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Step & Direction for use on Servo Amps

2012-10-09 Thread Todd Zuercher
Of course you can.  I have a machine set-up running like this now.  But as some 
others have already said, the speed of software step generation will be your 
limiting factor.  If I had to do it over I would have taken a different route 
with my set-up, and used hardware step generation (probably with a Mesa 5i25 
and one of its daughter cards).  You can increase your speed with the drives 
internal "gearing" at the expense of resolution.  I had to do this to get 
acceptable speed, taking an 8000count/rev system down to 500.  This large step 
in turn made tuning the drives a little more difficult.

- Original Message -
Can the stepper motor 'step & direction' output from EMC2 be used to 
run a servo based system that has step & direction input amplifiers 
where the servo motor encoder feed back goes into the amp and not EMC2? 
  I believe the Yaskawa Sigma II amps can run in this mode.   My 
thought was to build a simpler system and avoid the additional motion 
control boards if the Yaskawa amps could connect directly to an 
isolator/break-out board from the parallel port.  Or are these two 
completely different systems with only the "step & direction" words in 
common?

Thanks for your help

Steve Van Der Loo

Tube Gauge Inspection Fixtures Inc
420 Neptune Crescent
London, ON N6M 1A1



--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

-- 


Todd Zuercher
mailto:zuerc...@embarqmail.com



--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users