Re: [Emc-users] Joypad Example
On Fri, 22 Feb 2008, Kirk Wallace wrote: Another bit I don't understand: /* STEP 3: allocate shared memory for joystick data */ js_data = (hal_js_t *) hal_malloc(sizeof(hal_js_t)); if (js_data == 0) { printf( ERROR: hal_malloc() failed\n); hal_exit(comp_id); return -1; } hal_js_t is a defined variable type. sizeof(hal_js_t) is the memory size of this type. hal_malloc(sizeof(hal_js_t)) returns the memory location of this variable. I don't understand what (hal_js_t *) does. hal_js_t is a type so it is similar to (int *)? hal_malloc returns a (void *) pointer; this would presumably make subsequent code complain about pointer mismatches, and the compiler wouldn't know where to look in the data structure for variables like (js_data-axis[n]). the (hal_js_t *) casts the returned pointer to the correct pointer type. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Spindle control for micromill Q's
Gene, This probably isn't exactly the one you're looking for, but it's considerably cheaper than $90. You do have to install a 5k pot. They work very similar to the mini-lathe motor controllers in that you have to ramp up the speed. I think they're based on the controls for treadmills and are rated for 8 amp continuos output at 130 VDC. I've got two of these fellas I'll be using on my CNC saw beveler. http://www.surpluscenter.com/item.asp?UID=2007122717513748item=11-2449catname=electric Mark At 06:03 PM 2/22/2008, you wrote: Greetings; I came across a link 4 or 5 days ago for a speed controller for these line voltage dc motors like the HF mill and 7zx12 lathes use that had all the fwd/reverse relays etc incorporated on the board, along with a variable voltage optoisolated source that replaced the speed pot in the KBIC circuit, and sold for a hair less than $90, which compares with the DigiSpeedXL at $66 but it didn't have the extra reversing relays this interface kit does. I neglected to bookmark the site, and now google can't find it again. And I'd would rather not deal with an au company as they advertise in USD, but I've wound up paying in AUD which is a good premium charge for somebody. Twice now, and the diff has totalled to nearly 50 bucks. Can anyone else recall the name or url for the interface/control device I'm describing? Thanks. -- Cheers, Gene There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order. -Ed Howdershelt (Author) Your/our computer(s) had suffered a memory leak, and we are waiting for them to be topped up. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Lathe
Thanks Dale, A good idea but not workable in my case I'm afraid. Have you tried pouring hot metal into a 0.5mm hole? Almost all the work I do is on antique watches and marine chronometers and so the screw sizes I deal with are from about 0.3mm up to 3mm. That is why I resort to cocktail sticks and mouldable plastic which can be forced into the hole easily. For the bigger screws I do also sometimes use one of the hard modelling waxes such as dentists and jewellers use and this has very little shrinkage but, in reality, at these sizes, the shrinkage of anything is almost unmeasurable. Now I'm set along the line of using a stepper motor to drive my lathe spindle, how d'you reckon I might be able to get it to turn continually like a normal lathe when I'm not wanting to use it for screwcutting - i.e. to do normal turning? Am I going to have to set up another separate driver and pulse generator or is there a way to persuade EMC2 to set one axis going and then ignore it while running G-code on the others? -- Best wishes, Ian Ian W. Wright Sheffield UK The difference between theory and practice is much smaller in theory than in practice... - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Spindle control for micromill Q's
On Saturday 23 February 2008, Mark Wendt (Contractor) wrote: Gene, This probably isn't exactly the one you're looking for, but it's considerably cheaper than $90. You do have to install a 5k pot. They work very similar to the mini-lathe motor controllers in that you have to ramp up the speed. I think they're based on the controls for treadmills and are rated for 8 amp continuos output at 130 VDC. I've got two of these fellas I'll be using on my CNC saw beveler. http://www.surpluscenter.com/item.asp?UID=2007122717513748item=11-2449cat name=electric Mark Thanks Mark, but the KBIC I have internal to the micromill is functioning just fine. However that, and that .75 horse DC motor would make a nice combo for spindle drive as the existing motors maximum of 2500 at the spindle is a limit to using it for engraving. OTOH, I have no idea how long that spindle would survive at 10k rpms either. It certainly could be boxed up for swarf protection and remotely mounted for use as a replacement should the KBIC die. For that, having one on the shelf might not be a bad idea since they want around a 100 dollar bill for a new one if I let the smoke out of this one. That motor, face mount, Item 10-2326 at $19.95 certainly isn't suitable though as its cooling is lengthwise and the ends are wide open, looks to be very cheaply made and for a clean location. 13 lbs, at least double the weight of the existing motor. But I'd have to build a whole new drive box and that's a bigger mill called an X3 I believe. :) Anyway, to run that unit with emc, I'd still need Steve's interface to control it he is only a half a days drive from me if I can figure out the road. OTOH he takes VISA. :-) At 06:03 PM 2/22/2008, you wrote: Greetings; I came across a link 4 or 5 days ago for a speed controller for these line voltage dc motors like the HF mill and 7zx12 lathes use that had all the fwd/reverse relays etc incorporated on the board, along with a variable voltage optoisolated source that replaced the speed pot in the KBIC circuit, and sold for a hair less than $90, which compares with the DigiSpeedXL at $66 but it didn't have the extra reversing relays this interface kit does. I neglected to bookmark the site, and now google can't find it again. And I'd would rather not deal with an au company as they advertise in USD, but I've wound up paying in AUD which is a good premium charge for somebody. Twice now, and the diff has totalled to nearly 50 bucks. Can anyone else recall the name or url for the interface/control device I'm describing? Thanks. -- Cheers, Gene There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order. -Ed Howdershelt (Author) Don't go around saying the world owes you a living. The world owes you nothing. It was here first. -- Mark Twain - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Modbus Progress and Userspace
On Thu, Feb 21, 2008 at 01:43:13PM -0800, Kirk Wallace wrote: I just noticed the --userspace flag for comp. Can I just massage my C file into comp form and have comp do all the real work? Then just use loadusr instead of the loadrt I am used to with comp files? What do I do with main? comp --userspace is not as well-tested as comp for building realtime modules. But I do think that it works. There is a comp --userspace example in the manual: http://linuxcnc.org/docs/html/hal_comp.html#r1_13_6 and a tiny bit more documentation above about the userspace-specific things -- option userspace yes and option userinit yes. However, comp and modbus are probably a bad match -- my impression of a generic modbus component is that it will be desirable to read a configuration file when the component is initialized; however, comp requires that the pins and parameters of the component be declared when the component is compiled. Jeff - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Lathe
Hi Ian, My understanding of the threading module is simply that is coordinates motion between the spindle and the X and does not need to control the speed of the spindle. Hence an AC motor will serve. It is my impression that you need much higher rpm on the spindle than you can get with a stepper. People have used 360 ppr encoders with index on the spindle and done just fine. I'm plotting a lathe conversion sometime this summer but have a few speed bumps to get over first. HTH Dave Project sequence: first one plots, then one schemes and if that doesn't work then on connives. On Feb 23, 2008, at 1:20 AM, Ian W. Wright wrote: snip Now I'm set along the line of using a stepper motor to drive my lathe spindle, how d'you reckon I might be able to get it to turn continually like a normal lathe when I'm not wanting to use it for screwcutting - i.e. to do normal turning? Am I going to have to set up another separate driver and pulse generator or is there a way to persuade EMC2 to set one axis going and then ignore it while running G-code on the others? -- Best wishes, Ian Ian W. Wright Sheffield UK The difference between theory and practice is much smaller in theory than in practice... -- --- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Lathe
On Friday 22 February 2008 02:22, Ian W. Wright wrote: For proper restoration work, it is essential that any new screws match the originals as closely as possible and so I'm looking for a way to do this using EMC2 and my little milling machine, with a lathe bed attachment. you could thread mill them put the rotary table horizontal and center the screw blank then give a G1 Z...A... command with a 60deg slitting saw to cut the whole thing in one pass ,you can get the saws here http://www.martindaleco.com/HTML/MetalWorkingMicaSaws/MicaUndercutting_HSSandTC.htm or get some reground if you have 55deg threads the same kind of setup would work with the stepper driven lathe head and a small motorized saw arbor on the cross slide Brian - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Joypad Example
On Sat, 2008-02-23 at 07:52 +, ben lipkowitz wrote: On Fri, 22 Feb 2008, Kirk Wallace wrote: Another bit I don't understand: /* STEP 3: allocate shared memory for joystick data */ js_data = (hal_js_t *) hal_malloc(sizeof(hal_js_t)); if (js_data == 0) { printf( ERROR: hal_malloc() failed\n); hal_exit(comp_id); return -1; } hal_js_t is a defined variable type. sizeof(hal_js_t) is the memory size of this type. hal_malloc(sizeof(hal_js_t)) returns the memory location of this variable. I don't understand what (hal_js_t *) does. hal_js_t is a type so it is similar to (int *)? hal_malloc returns a (void *) pointer; this would presumably make subsequent code complain about pointer mismatches, and the compiler wouldn't know where to look in the data structure for variables like (js_data-axis[n]). the (hal_js_t *) casts the returned pointer to the correct pointer type. Thanks Ben. The cast makes sense. I think of void as being an invention to allow functions that return nothing, so the function return type (void *) tells me that a pointer is returned that points to a nonexistent variable. Is the (void *) just a reminder to always cast the return pointer to the variable type we happen to need? -- Kirk Wallace (California, USA http://www.wallacecompany.com/machine_shop/ Hardinge HNC lathe, Bridgeport mill conversion, doing XY now, Zubal lathe conversion pending) - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Lathe
On Saturday 23 February 2008, Brian Pitt wrote: On Friday 22 February 2008 02:22, Ian W. Wright wrote: For proper restoration work, it is essential that any new screws match the originals as closely as possible and so I'm looking for a way to do this using EMC2 and my little milling machine, with a lathe bed attachment. you could thread mill them put the rotary table horizontal and center the screw blank then give a G1 Z...A... command with a 60deg slitting saw to cut the whole thing in one pass ,you can get the saws here http://www.martindaleco.com/HTML/MetalWorkingMicaSaws/MicaUndercutting_HSSa ndTC.htm or get some reground if you have 55deg threads They must be shut down over the weekend, I can't reach them. the same kind of setup would work with the stepper driven lathe head and a small motorized saw arbor on the cross slide Brian - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Cheers, Gene There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order. -Ed Howdershelt (Author) Mountain Dew and doughnuts... because breakfast is the most important meal of the day. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
[Emc-users] E-Stop circuitry
Greetings; I've been to the wiki, and searched for e-stop, but there isn't very much there except the MAZAK setup as text. I read schematics better. Does anyone have a suitable schematic link I could adapt for use with this xylotex 4 axis and Steves (PMDX) spindle controller? I still have parport pins 1, 11, 12, 13 available on the breakout, although, and correct me if I'm wrong, I assume the pin 1 output which is listed in my current my-mill.hal as an e-stop output, which presumably is brought true-low by the enabling press of the f1 key, intended to re-cock the external chain so that an e-stop condition is cleared, and it probably goes away when the key is released. Correct? The 11,12,13 pins I could probably rig for homing switches if I could figure out how to mount and actuate them reliably on this POJ micromill. Or do I need them for a possible e-stop input? It does seem to me we need to tell emc the machine has a tummy ache. -- Cheers, Gene There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order. -Ed Howdershelt (Author) Mountain Dew and doughnuts... because breakfast is the most important meal of the day. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
[Emc-users] Charge Pump
Hi all [I originally posted this at CNCZone, not realising that this list is the prime organ for EMC. Apologies in advance therefore for any breach of propriety.] I'm looking for some guidance about the charge-pump set-up in EMC. I have found in the set-up docs how to assign a parallel port pin to the charge-pump, but that's all. A search on CNCZone yields a post about setting up a torch system in which there is mention of the 15 kHz output (but nothing about how to enable it) and searches of the EMC docs (and the Sherline docs) add nothing further. My conclusion is that I'm looking in the wrong place. So, can anyone answer: * Where is the charge-pump set up documentation? * What's the charge-pump output amplitude (voltage)? * What's the charge-pump output frequency? * Is there anything else I need to do within EMC (other than assign a pin to the charge-pump) in order to set up a controller which expects a charge-pump signal? Grateful thanks for any info. Z - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Charge Pump
Here is the relevant hal stuff for one of my setups. This is from a .hal file for that machine. # Add a charge pump for the PMDX-131 loadrt charge_pump addf charge-pump servo-thread newsig charge-pump bit linksp charge-pump charge-pump.out linksp charge-pump parport.0.pin-17-out As you can see this runs the charge pump on my PMDX-131 board. It is that board that does the work of saying charge pump is being enabled or is not being enabled by the PC. That board uses parport pin 17 so that is where the signal is sent by the last linksp. All of this is dated HAL code. I believe that now days the HAL folk prefer using the net command. There are also a couple of parameters associated with the module. There is a value in there of 769 for charge-pump.time but I suspect that is a default because I don't see any set command for that parameter. The frequency that you need is determined by the device you are sending it to. The current documentation should include a man page for charge_pump should be included in the pdf at http://www.linuxcnc.org/docs/HAL_Documentation.pdf HTH Rayh On Sat, 2008-02-23 at 22:45 +, zeta wrote: Hi all [I originally posted this at CNCZone, not realising that this list is the prime organ for EMC. Apologies in advance therefore for any breach of propriety.] I'm looking for some guidance about the charge-pump set-up in EMC. I have found in the set-up docs how to assign a parallel port pin to the charge-pump, but that's all. A search on CNCZone yields a post about setting up a torch system in which there is mention of the 15 kHz output (but nothing about how to enable it) and searches of the EMC docs (and the Sherline docs) add nothing further. My conclusion is that I'm looking in the wrong place. So, can anyone answer: * Where is the charge-pump set up documentation? * What's the charge-pump output amplitude (voltage)? * What's the charge-pump output frequency? * Is there anything else I need to do within EMC (other than assign a pin to the charge-pump) in order to set up a controller which expects a charge-pump signal? Grateful thanks for any info. Z - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
[Emc-users] Cordax CMM
Gentlemen, Another project, another question. I bought an old Sheffield Cordax manual CMM. This is supposed to replace a surface plate and height gages. Our inspectors have experience with manual CMM's. They are looking forward to using it instead of height gages. This was supposed to be a running machine. It was running after a fashion. The DRO always shows fault lights. When the EMC men were here we got it functioning. While using it we find one scale will count correct sometimes, other times it will only count in one direction and other times it counts up when the axis is moved in either direction. On another board a trim pot will sometimes short and sometimes work correct and sometime open. I identify with age problems. Sometimes things work and sometimes they don't. Needless to say this does not inspire confidence in the machine. I replaced the bulbs in the scale read heads. I have a good signal into the DRO from each scale. Sheffield has the replacement parts BUT the expense is incredible. The bulbs, just the little bulbs not the read head, were $160.00 each. I haven't priced the amplifier/converter board. I am afraid to. I don't think I even want to know. SO The scale feedback to the DRO is four wires with a sin wave on each. These are supposed to be 0, 90, 180 and 270 degrees. Is there a way to convert the sin wave into a pulse? If I can convert the sin wave to a pulse I will hook two of the pulse signals from each axis to a soft encoder in EMC2 and have an EMC2 CMM. At this time it would be just a DRO. Maybe we could add functions later ie. coordinate system rotation, etc... All help, comments and suggestions are greatly appreciated. thanks Stuart - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Cordax CMM
I am certainly not an expert but have read quite a bit-others can correct me hmm . From what I remember Heidenhain takes those four signals and superimposes them into two signals. This creates a sin wave on each wire pair (of two pairs) that cross zero. Then you can get a black box that converts that to quadrature. Basically the photodiodes are wired together- in parallel -and in opposite polarity. This creates a push-pull signal (which is the two signals superimposed). There are two such signal 'groups', offset so as to create a quadrature relationship. There are two types of sin signals that are common current (11-16 micro amps) and voltage (1vpp). When you say there are four wires does that mean four wires with a common ground or four sets of wires (two for each signal)? The other question is what about replacing the encoders with something more common (like from ebay)? What are the lengths and accuracy needed? Just for reference if you can wire your encoders to create standard sin signals the 'black box' to convert to square waves would cost aprox. $50 from ebay (oem price is something like $800 or more ) . They come in a variety of signal multiplying options. my $.002 Chris Morley Sheffield has the replacement parts BUT the expense is incredible. The bulbs, just the little bulbs not the read head, were $160.00 each. I haven't priced the amplifier/converter board. I am afraid to. I don't think I even want to know. SO The scale feedback to the DRO is four wires with a sin wave on each. These are supposed to be 0, 90, 180 and 270 degrees. Is there a way to convert the sin wave into a pulse? If I can convert the sin wave to a pulse I will hook two of the pulse signals from each axis to a soft encoder in EMC2 and have an EMC2 CMM. _ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users