On Sun, 2008-07-27 at 16:49 +0100, Ian W. Wright wrote: > Hi, > > Thanks for the replies. > > Alex, using Xen has done the trick as far as starting and stopping > the > spindle from G-code but I have now lost the MDI buttons to control it > manually. I've tried to re-jig the various signals/pins to recover > this > but, once again, I've failed miserably - so far...
AXIS looks for keywords in your configuration files to figure out what features to include on the screen. I think you need lines with: motion.spindle-forward motion.spindle-reverse in your lathe.hal file to get these buttons to appear. Usually these are connected to something like a parallel output pin to activate relays or some kind of control. In your situation, I think they might work without connecting them. On the other hand, motion.spindle-speed-out may not allow negative numbers, so you may need to use the motion.spindle-for/rev pins to set the direction signal. >From a terminal command line you can use "man" to read manual pages for various EMC2 commands, such as "man motion", "man stepgen", etc. Use the arrow or page keyboard buttons to move around and Q to quit. I use man to find a complete list of functions, pins and parameters contained in a component I am thinking of using. The motion man page indicates motion.spindle-speed-out outputs a float so I guess negative numbers are possible. Does your spindle work well in both directions? I think better graphically, so I used Inkscape to draw out what I figured out from your pastebin'd config files. http://www.wallacecompany.com/machine_shop/spindle_stepper.png I didn't go into the axis information. The counter doesn't seem to be connected to anything so the counter, lowpass, mult2 stream could be deleted if you wanted to simplify the file. It may be useful for trouble shooting or some other reason, but if you save the removed bits (and notes to self) to another file, you can put them back in when needed. > What I'd really like to achieve is what I have now plus the kind of > MDI > control and speed indication in the 'sim lathe' configuration which > accompanies the EMC2 install (although I think a vertical bar graph > would be preferable to the horizontal one which seems to use up too > much > screen). I didn't see anything in your lathe.ini file that sets up pyVCP to add a spindle speed indicator. The .ini file [DISPLAY] and [HAL] sections need: [DISPLAY] ... PYVCP = lathe.xml ... [HAL] ... POSTGUI_HALFILE = lathe_postgui.hal ... You will also need the files that these lines call. lathe.xml ~~~~~~~~~~~~~~~ <?xml version='1.0' encoding='UTF-8'?> <pyvcp> <vbox> (create a box that stacks features vertically) <label><text>"Spindle speed:"</text></label> (create a text feature) <bar><halpin>"spindle-speed"</halpin><max_>5000</max_></bar> (create a bar feature just below the previous feature, make the end of the bar represent 5000 units, create a HAL pin called "spindle-speed") </vbox> (stop adding features to the vbox) </pyvcp> (done with pyvcp) ~~~~~~~~~~~~~~~ (Leave the parenthetical text out of the file) lathe_postgui.hal ~~~~~~~~~~~~~~~ net spindle-rpm-filtered => pyvcp.spindle-speed ~~~~~~~~~~~~~~~ This file tells AXIS to HAL connect a signal called "spindle-rpm-filtered" to the pyVCP "spindle-speed" pin on the bar feature. (BTW, the => indicates that spindle-rpm-filtered is an output to pyvcp.spindle-speed's input. <= would indicate the opposite. These =>, <= don't really do anything but add a little more readability. I think a utility looks for these to make graphic connection charts) The unconnected counter, lowpass, etc. stream I talked about earlier may be there for a pyVCP spindle bar. This section would need to be modified (names and connections) to fit your current setup. > Kirk, I have posted my 'lathe.hal' and 'lathe.ini' files on pastebin > at > *http://tinyurl.com/5jq4e6 > > *I'm not sure how I would link to a previous post other than to say > that > the first relevant post was message 1 in Emc-users Digest, Vol 27, > Issue ... snip I seem to recall that the machine in question was a mill of some type. The spindle in question is part of a lathe mounted to the mill table. The lathe spindle is driven by a stepper to make it work as a rotary axis. You also wanted to use the lathe as a normal lathe, but with a stepper spindle when not mounted to the mill. (?) The plan was to have two configuration directories, one for the mill/lathe-rotary-axis and another for the lath with stepper spindle. I was thinking a similar brief overview of your machine could be posted with your config files. Maybe it would be even better to have it in the .ini file itself. I may have to do this for my machines. > My computer hardware is a PC with a 1.7GHz AMD Duron processor, 1Gb > RAM and a couple of 160Gb hard drives. On my 'production machine' I'm > running the Ubuntu 6.06 Dapper Drake version loaded from a live CD > image. I also have a similar 'development machine' running the Ubuntu > 8.04 Hardy Heron version. > > I don't know why I'm having so much trouble getting to grips with HAL, > I'm sure it should be easy but I get completely confused when every > little change I make to the HAL file seems to gain me a load of new > pins/signals/parameters and lose as many others.... I have been > trying to find my original documentation for EMC to see if that would > help but I can't find it and the link to John's description of how it > works from the main EMC2 website is down. The newer "net" commands are easier to follow: net [signal_name] [pin_to_connect] [pin_to_connect] (the bracketed items are optional) as opposed to: newsig signal_name setsp signal_to_connect_to pin_to_connect_to setsp signal_to_connect_to pin_to_connect_to Pins that are inputs are set by pins that are outputs, but can only listen to one pin. So for a particular signal_name only one connected pin can be an output. Pins that are outputs can talk to one or more pins that are inputs, just like you can talk to a group of people and have them understand you, but you can't understand a group of individual conversations. I have more trouble with knowing what to connect with what. Having a familiarity with all of the components and what they do, is a big help, but it's kind of like having to know everything before you know anything. Just keep at it and it should get easier. -- Kirk Wallace (California, USA http://www.wallacecompany.com/machine_shop/ Hardinge HNC/EMC CNC lathe, Bridgeport mill conversion, doing XY now, Zubal lathe conversion pending Craftsman AA 109 restoration Shizuoka ST-N/EMC CNC) ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
