Re: [Emc-users] new kinematics

2007-11-04 Thread ben lipkowitz
On Sat, 3 Nov 2007, Stuart Stevenson wrote:

 Gentlemen,
I have been exploring a program called Xrefactory. Xrefactory is
 supposed to build a display of the project's data flow. I have been in
 contact with the company that sells Xrefactory. They told me they will
 download the EMC2 project and run their program to see how to make
 Xrefactory work with it. I am sure it will be trivial for them. It is
 not trivial for me.
Has anyone used a program like this? If you have, what is it?

doxygen can draw flowcharts by using graphviz. there used to be 
instructions for how to do it but now i can't find them. there is a file 
src/doxconfig if you want to play around with it. generally, i think it is 
a waste of time. the taglist plugin for vim is convenient if you use 
vim, and superficially similar to xrefactory. and then there are 
heavyweight IDE's like kdevelop that show code structure in a GUI fashion. 
you can get a better idea of the overall structure of the code by looking 
at http://www.linuxcnc.org/docs/EMC2_Developer_Manual.pdf and 
http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?EMC_Components which were 
actually written by a human and thus can impart real understanding as to 
what the code was intended to do. (rather than what it actually does!)


I want to contribute to the EMC project but I want it to be in a
 logical fashion. I am not a C/C++/Python/TCL/TK programmer, hence the
 need for a tool to show me the data/variable flow. I am an NC
 programmer and machine tool owner/operator/user. I have ideas for
 Enhancing the EMC project. I want to be able to implement my ideas
 in a manner that doesn't conflict or detract from the current state of
 the project.

Most of the kinematics code is in C, and the part you need to write can be 
fairly simple as far as code structure. It is mostly trigonometry. You 
should copy scarakins.c and make it fit your machine, cut out pieces you 
dont need, and document it until you understand everything. Even this 
hard-coded example can be useful for others. Only once you have it working 
and know what needs to be done should you start planning a generalized 
kinematics framework, if you still have the desire to do so. C macros are 
tricky since they are not really part of the language.

While you're at it, I think the addition of tool length compensation to 
kinematics would be very useful; then we could simply specify the position 
and rotation of the tool tip to be in the g-code file. This would require 
adding some code to grab the current tool length from 
emcStatus-task.toolOffset.tran.{xyz} in addition to the regular x y z a b 
c axis variables, and add it to the last coordinate system, which is D5 
and D6 in the SCARA example. I think this may have been what the original 
EMC designers intended, thus the weirdness with tool change position in 
the rs274 spec.

   -fenn

-
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] new kinematics

2007-11-04 Thread Jeff Epler
For source code exploration there are a few more things that it's nice
to be aware of:
 * lxr web page, which allows you to see definition and use of any
   identifier,  http://cvs.linuxcnc.org/lxr
 * tags, search for the definition of any identifier from vi or emacs
   (make tags target in src to set up, :tag or M-x tag or other
   editor-specific functionality to use)
 * swish, full-text search of all the source. (make swish to set up,
   run scripts/swish to use.  The output can be interpreted by many
   editors to automatically go to each file and line where the text is
   matched.

If you are using vim and :source .vimrc in the emc2/src directory,
:tag refers to the tags file built by make tags and :grep runs the
swish full-index search.

Personally, I find tags and swish most useful, because they can run
directly in my editor and pull up information about where identifiers
are defined or used in a second or so.

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] Hardware suggestions for EMC

2007-11-04 Thread Jeff Epler
On Sun, Nov 04, 2007 at 01:20:34PM +0100, [EMAIL PROTECTED] wrote:
 Hi
 
 I have a milling machine here which i want to control with emc. Fo the
 first tests im using the normal parallel port adapter. I'm, however,
 afraid of loosing steps on my stepping motors so im planing to use some
 quadratur encoder to also measure the position of the axes. My questions
 now are:
 
 1. Is it better to use a dedicated board which is able to control the
 stepper motor and readout the quadratur encoders. The board is connected
 via usb (usbserial modul) and the board can send a command for either
 speed or steps of the motor.

No USB hardware is supported by emc at this time.

 2. How would i readout quadratur encoder on the parallel port

Use the 'encoder' module.  After installing emc, man 9 encoder.

 3. How many stepper motor can i control maximum with one parallelport
 and emc?

Each stepper motor requires 2 hardware output pin.  The parallel port
has 13.  So if no pins are required for other purposes, 6 stepper motors
can be controlled, with one output pin left over.

 I know that question one implies writing a adaper for the hal. I have
 basic experience in xenomai programming. Would it be hard to implement
 the usb board into emc?

You'd need a very thorough, low-level knowledge of USB in order to make
a USB driver fit the HAL model (hardware read and write takes place
according to function position in HAL threads, not based on interrupts
or DMA).  I don't even know whether this is possible.

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] Hardware suggestions for EMC

2007-11-04 Thread emc
Jeff Epler wrote:
 No USB hardware is supported by emc at this time.
The card implements the USB CDC class (it lookes like a serial card to
the operating system with the usbserial modul). So i thought since
serial connection can be used it would also be possible to use the USB
counterpart.

 
 I know that question one implies writing a adaper for the hal. I have
 basic experience in xenomai programming. Would it be hard to implement
 the usb board into emc?
 
 You'd need a very thorough, low-level knowledge of USB in order to make
 a USB driver fit the HAL model (hardware read and write takes place
 according to function position in HAL threads, not based on interrupts
 or DMA).  I don't even know whether this is possible.

I'm using the same setup (at least for the USB part) for controlling the
speed of up to three dc motor on a mobile robot with xenomai. I wrote
the USB firmware on the board by myself so USB knowledge shouldn't be
problem.
Writing the speed is just a matter of sending the correct codes via the
USB CDC (dev/ttyUSB0) interface, also the position can be read in this way.

So the setup will be like follows:
xenomai + rtusb - /dev/ttyUSB0 - (internally converted to i2c) - 12
stepper motors with quadratur encoders.

I already looked at the emc2/src/hal/drivers directory out i only found
functions which write directly to a set of i/o pins. Isn't there any
function/example to directly write a speed or number of step ticks with
a frequency?

jan



-
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] Avoiding Following Error

2007-11-04 Thread Alex Joni

 I've often thought that that search box ought to be at the top so that
 we'd see it as soon as we opened a page.  I just don't seem to remember
 my admin password or how to edit Joomla to do that.

 Rayh

 although i havent actually tested this, I did waste a good hour trying to
 get usemod running. :)


 while we're at it, it might be nice to move GetAdminBar to the top also,
 so you can edit the page without scrolling to the bottom.


Fenn: thanks for the patch.
I applied it with minor changes..

Re: admin bar, I think you most definately will want to look over the page 
if you decide to edit it.
Otoh pessing end on your keyboard doesn't take that long :)
And the 3rd thign that pops to mind against it, is that there are actually 
only a couple pages which are that long that you need to scroll for quite a 
while before you reach the admin bar

Regards,
Alex


-
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] new kinematics

2007-11-04 Thread Stuart Stevenson
Gentlemen,
Thanks guys. Looks like I have some exploration to do.
thanks
Stuart

-
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] Hardware suggestions for EMC

2007-11-04 Thread Jon Elson
[EMAIL PROTECTED] wrote:
 
 I already looked at the emc2/src/hal/drivers directory out i only found
 functions which write directly to a set of i/o pins. Isn't there any
 function/example to directly write a speed or number of step ticks with
 a frequency?
Well, you could look at the hal_ppmc.c driver.  It uses the 
parallel port as a communication channel to control boards that 
do this.  There are 3 different products.  One is a traditional 
analog velocity servo interface, with a 16-bit DAC.  One 
generates step/direction, and the last generates a PWM signal.
All work like a servo, you read position from an encoder 
counter, compute a new velocity command in the PID routine (not 
in the driver but in another part of EMC2/HAL) and then send the 
new velocity to the controller.  This sounds like what your 
board does using USB.  One reason I have not gone with USB is 
that there is that 1 KHz frame clock.  Maybe that is not a 
limitation with rtusb.  I see that high speed usb has 8 
micro-frames per ms.

Jon

-
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] Hardware suggestions for EMC

2007-11-04 Thread emc


Jon Elson wrote:
 [EMAIL PROTECTED] wrote:
 I already looked at the emc2/src/hal/drivers directory out i only found
 functions which write directly to a set of i/o pins. Isn't there any
 function/example to directly write a speed or number of step ticks with
 a frequency?
 Well, you could look at the hal_ppmc.c driver.  It uses the 
 parallel port as a communication channel to control boards that 
 do this.  There are 3 different products.  One is a traditional 
 analog velocity servo interface, with a 16-bit DAC.  One 
 generates step/direction, and the last generates a PWM signal.
 All work like a servo, you read position from an encoder 
 counter, compute a new velocity command in the PID routine (not 
 in the driver but in another part of EMC2/HAL) and then send the 
 new velocity to the controller.  This sounds like what your 
 board does using USB.  One reason I have not gone with USB is 
 that there is that 1 KHz frame clock.  Maybe that is not a 
 limitation with rtusb.  I see that high speed usb has 8 
 micro-frames per ms.

Thx allot for your answer Jon and Jeff. I will have a closer look at the
drivers you mentioned adn try to get it running.

jan

-
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


[Emc-users] Classic Ladder file

2007-11-04 Thread David Winter
Dear All,
   In 2005 the EMC gurus did a retrofit on a Mazak at the 
CNC-workshop. The machine had a toolchanger. Was the
toolchanger controlled by Classic Ladder and if it was, is the .clp file 
in one of the sample configurations of a standard EMC2
install?   If it isn't, can someone please send me a copy so I can 
better understand how to do a toolchanger in CL.

 
  Thank you,

 
  David Winter.


-
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] Classic Ladder file

2007-11-04 Thread Chris Radek
On Sun, Nov 04, 2007 at 06:17:16PM +, David Winter wrote:
 Dear All,
In 2005 the EMC gurus did a retrofit on a Mazak at the 
 CNC-workshop. The machine had a toolchanger. Was the
 toolchanger controlled by Classic Ladder and if it was, is the .clp file 
 in one of the sample configurations of a standard EMC2
 install?   If it isn't, can someone please send me a copy so I can 
 better understand how to do a toolchanger in CL.

Yes.  http://cvs.linuxcnc.org/cvs/emc2/configs/demo_mazak/

-
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


[Emc-users] Step/Direction Drivers

2007-11-04 Thread Kirk Wallace
I am starting work on my mill setup, which uses Sanyo BLDC motors and
Rutex drives. The Rutex drives have SPI and step/direction inputs.
Without thinking too much about it, I brought up the standard stepper
configuration in Axis and before I tried to command a move, I grabbed
the motor shaft and turned it to check the encoder polarity. Dooh, of
course nothing happened, and I was reminded that the encoder feedback
stops at the drive. So I studied the Stepgen diagram in the Integrator's
Manual to see how to route the encoder back to EMC and began to realize
that most of Stepgen is already in the drive. Why would I want to use
Stepgen when all I need is a way to get position commands into the
drive? Unless someone can provide valid arguments to the contrary,
step/direction inputs on drives seem to just be a hack to make it
convenient to interface to legacy systems. What would be the cleanest
way to use the step/direction as a communications path (albeit, output
only)?

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?

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


[Emc-users] Output Port Blues on EMC2, Ubuntu 6.06

2007-11-04 Thread [EMAIL PROTECTED]
I was running EMC using BDI 4.49.  Changed over to EMC2, Ubuntu 6.06.  The mini 
interface runs on the computer just fine, but the machine no longer 
communicates with my stepper box on LPT1.  Does anyone know what file contains 
the I/O and pin settings for EMC2 on Ubuntu 6.06?

W. Bickford
Aiken, SC


-
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] Why not use USB to replace the Printer Port

2007-11-04 Thread Stephen Wille Padnos
[EMAIL PROTECTED] wrote:

 I am puzzled by the issues raised of DMA and interrupts as a problem 
 in using USB.

I think that was part of the RT ethernet discussion, but I could be wrong :)

  In the WinXP system a common way of using USB connections is to 
 handle it as a 'Virtual Comm Port' (VCP). When you plug in your USB 
 device it is assigned a Comm port number. After that the data link 
 behaves exactly like a full duplex RS232 link.
  
 Also if you do a Google search you will find several venders selling 
 USB to Printer Port converters. These enable printers without USB 
 capability to be run from laptops without printer ports.
  
 So why cannot EMC use a USB port exactly like it uses the printer port?

Because a printer doesn't care when it receives the bytes to print, as 
long as they don't come too fast.  EMC2 needs to change the port outputs 
with very exact timing to make a motor move.  This is not accomplished 
by a USB to parallel converter.  Although USB is capable of moving way 
more data than necessary, it doesn't maintain the timing between port 
writes.

  Obviously you need the equivalent of a WinXP Virtual Com Port driver. 
 Is that so difficult to produce?

It's not hardware that matters, it's the timing.  There are Linux 
drivers for the virtual comm ports, and I suspect for the parallel ports 
as well.

  The main attraction of the USB connection is that much higher data 
 rates are possible.

This is completely useless unless you can control the timing, which you 
can not with USB (unless you make custom hardware).  USB has a 1 
millisecond frame time.  That makes for some very slow step outputs 
without custom hardware.

- 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


[Emc-users] gantrykins.c

2007-11-04 Thread Stuart Stevenson
Gentlemen,

emc2-trunk/src/emc/kinematics/gantrykins.c

It looks to me like line 94 is incorrect:

is - char *coordinates = XYZABC

s/b - char *coordinates = XYZABCUVW.

   Is the 'is' correct or is the 's/b' correct?

thanks
Stuart

-
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] Output Port Blues on EMC2, Ubuntu 6.06

2007-11-04 Thread Kirk Wallace
If you did a fresh install, your EMC should be like mine. Parallel port
pin assignments are made in a .hal file that is referred to by an .ini
file. Look in your home directory under .../emc2/configs
(or /home/your_home/emc2/configs) for a directory that matches the name
of the configuration you tried to run. Go to that directory and open
the .ini file. Look for something like:

...
[HAL]

HALFILE =  suchandsuch.hal
HALFILE =  anotherhal.hal
...

In the same directory look in the .hal files listed in your .ini file
for parport.X.pin-XX to get the pin assignments.

I hope this helps.

On Sun, 2007-11-04 at 22:13 +, [EMAIL PROTECTED] wrote:
 I was running EMC using BDI 4.49.  Changed over to EMC2, Ubuntu 6.06.  The 
 mini interface runs on the computer just fine, but the machine no longer 
 communicates with my stepper box on LPT1.  Does anyone know what file 
 contains the I/O and pin settings for EMC2 on Ubuntu 6.06?
 
 W. Bickford
 Aiken, SC


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