On 25/02/2012 17:22, Kirk Wallace wrote: > On Sat, 2012-02-25 at 18:24 +0200, Viesturs Lācis wrote: >> 2012/2/25 Lee Osborne<[email protected]>: >>> Hi >>> >>> Can anyone help with making a user m code for a digital output on a >>> mesa 5i20, 7i33 and 7i37 set up. I have managed to get all the servos > ... snip >> Firstly, is it hm2_5i20.0.gpio.0042.out or hm2_5i20.0.gpio.042.out? >> AFAIK the pin number is 3-digit. >> >> Secondly, what do You have in HAL file? >> You need to specify, that gpio.042 is output pin like this: >> setp hm2_5i20.0.gpio.042.is_output True >> >> Thirdly, is there any particular reason not to use M commands that are >> dedicated for output controls from g-code? >> http://linuxcnc.org/docs/html/gcode_main.html#sec:M62-to-M65 >> >> Simply link the hm2_5i20.0.gpio.042.out to motion.digital-out-00 (or >> 01, 02 etc, if You need more outputs for M62-65 commands). >> http://linuxcnc.org/docs/html/config_emc2hal.html#r1_1_2 >> >> Viesturs > Lee, what kind of changer do you have? It's not hard to create a comp or > Ladder program to handle tool changers with the normal Tx M6 codes. I > use M codes to pin bang my lathe's collet closer and other functions and > it's a pain to the butt to remember what M code to use, plus you get > g-code that will only work with that one machine. My tool changer comp > is here: > http://www.wallacecompany.com/cnc_lathe/HNC/emc2/turret.comp > > I've learned a bit since I made this comp and I should update it, but it > works okay for now. Viesturs/Kirk
Thank you for your help as its all working now. It turns out I had already configured the outputs for m62-65 but i didnt really understand how it worked. I have succesfully manually controlled all outputs for the turret in and out and the drawbar. The machine is cincinnati arrow 500 which I have completely stripped and slowly rebuilding. I have replace both x and y servo motors and drives with brand new estun 1kw versions and it all seems ok at the minute. The toolchanger does have me a bit stumped though I must admit as its an umbrella type with 21 tools and bidirectional. My original plan was to use m101 for tool 1 and m102 for tool 2 etc as I dont know how to move the z axisduring a tool change etc. Again any information is gratefully received as I would love to have it working on m6 as this as it should be. regards Lee ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
