Re: [Emc-users] endoscope camera mount?
How about a magnetic dial indicator base? Unscrew the rod from the magnetic base and tap a hole into the spindle casting to screw it in there instead. It would give you fine adjustability anyway. Scott On Nov 22, 2013, at 11:32 AM, Gene Heskett ghesk...@wdtv.com wrote: Greetings all; I finally managed to cobble up an EMBED_TAB_COMMAND = camview-emc -C camview.cfg -g togle-caa.ui -H campins.hal -w {XID} That actually works if I use the original halio.c, and I don't even have to patch /usr/bin/axis to get it to run. So except for the lack of a background for the DRO display in camview, its looking good enough to make me think about making a mount for the camera. I go out and stare at the right side of the spindle casting, and the camera, in search of a vision as to how to mount it both rigidly AND adjustable for alignment. And I'm fresh out of visions, must have used up my allotment for this year. Or something along those lines... So I would be interested in how someone else has mounted one of the endoscope cameras on his mill, allowing for suitable methods of tweaking alignment. PM's with attached pix would be fine if someone has the time to send them. Thanks all. 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) NT (as in Windows NT) is short for Nothing There. A pen in the hand of this president is far more dangerous than 200 million guns in the hands of law-abiding citizens. -- Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] G-code sample for threading on lathe
I've been working to make general purpose threading scripts for the members at our hackerspace. Scripts that face and turn down (or bore out) as well as thread. My efforts at understanding and explaining CNC lathe threading are here: http://code.google.com/p/sector67-sandbox/wiki/CNCLatheThreading I'll be working to update that page as I get things figured put further, and plan to submit it here for feedback when it is complete. So caveat emptor it is currently a work in progress but should help you get started with CNC threading on LinuxCNC. Scott On Nov 5, 2013, at 10:48 AM, Viesturs Lācis viesturs.la...@gmail.com wrote: 2013/11/5 andy pugh bodge...@gmail.com On 5 November 2013 16:35, Viesturs Lācis viesturs.la...@gmail.com wrote: Can anybody share a piece of g-code that creates any kind of thread on lathe with LinuxCNC 2.5.0 on it? It typically only needs a single G-code line with a G76 statement. Or perhaps I am misunderstanding the question? Yes, G76 or G33 commands should do the trick. I would prefer G76 but there are lots of additional words to specify, so I would appreciate somebody sharing whatever G76 command they have used successfully. -- Viesturs -- November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Still puzzling over encoder
I believe velocity is a scaled value of edges per second, so in quadrature mode you'd need to multiply your slots by 4 to find the right scaling. Do you numbers add up if you do that? Scott On Wed, Dec 12, 2012 at 8:14 PM, John figie zephyr9...@gmail.com wrote: What is the sample rate of the halscope and what is the motor rpm? Maybe the halscope is aliasing. On Dec 12, 2012 6:22 PM, Gene Heskett ghesk...@wdtv.com wrote: Greetings all; My encoder wheel has 39 slots detected in A/B quadrature, plus of course the index, Z. Running in rpms mode (as opposed to rps), then it seems to me that I'd need to multiply that by 1.5384615384615384615 in oder to convert that to the unit of measurement, in this case a single revolution. I've also tried the reciprocal or .65, but neither of the resultant figures actually gets me a displayed halmeter velocity that corresponds to the actual speed. Its rather hard to make sense too, of the halscope timebase. Looking at the same signals with my Hitachi, the halscope displayed graticle is off by at least a factor of 3. How can I adjust this? 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) My web page: http://coyoteden.dyndns-free.com:85/gene is up! Without followers, evil cannot spread. -- Spock, And The Children Shall Lead, stardate 5029.5 I was taught to respect my elders, but its getting harder and harder to find any... -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] limit override question
Thanks to everyone for the advice. Home/limits are working properly now. My primary issue was that I had mis-configured the system so that after a home operation in the positive direction the machine thought it was at the negative soft limit, thus it would not let me jog off the hard limit even with override limits checked. Fixing this allowed the override limits to work properly. Now I can home the machine and can't jog to the limit switch either way. This does work very nicely. Thanks all! Scott On Fri, Nov 30, 2012 at 11:00 AM, Jon Elson el...@pico-systems.com wrote: John Thornton wrote: Now you need to set your ini entries for min and max limit and you'll never jog into a limit switch again. One slight quibble, you need to home first before the soft limits can know what the safe travel zone is. Then, you need to set the .ini file parameters MAX_LIMIT and MIN_LIMIT to slightly less than the range of travel that will hit the switches. But, after homing, then John is correct, it becomes impossible to jog or command movement into the limit switches. Good for jogging, but REALLY GREAT for setting up, as you get a program exceeds some axis limit at line 123 error message when you load the G-code file or when you hit the run button, before actually starting any cutting. Then you know you need to reposition the part. Jon -- Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Keep yourself connected to Go Parallel: BUILD Helping you discover the best ways to construct your parallel projects. http://goparallel.sourceforge.net ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Spindle position, direction and Index with only one channel.
Interestingly, this sort of sensor would have been helpful on my latest problem with the lathe spindle Z pulse encoder I wanted to run on a pulley at 3x the spindle rate, presuming there was software support for it. In my case the pulse length accounting would have had to have been in the 7i33 firmware though. Being able to count a backwards pulse as backwards would have allowed me to accurately ignore every third pulse in software, regardless of rock back or other spindle changes in direction. Scott On Fri, Nov 23, 2012 at 2:00 PM, Jon Elson el...@pico-systems.com wrote: Stuart Stevenson wrote: Seems to me a resolver would be the best choice for position on start up. Velocity could be derived also. A resolver on the cam and crank could tell you the next piston to reach tdc You check the price on a resolver, lately? The problem is a wound-rotor brushless resolver is pretty expensive to make. The bigger they are, the more expensive, too. Variable reluctance resolvers are cheaper, as there are no windings on the rotor, and so can be made arbitrarily large. but, those have multiple poles/rev, and so you don't get absolute crank position at power-on. So, from a cost standpoint, alone, I don't think the auto makers are going to go to a resolver over a cheap solid state sensor. One absolute sensor on the cam would be all you'd need, they have plenty of resolution. Jon -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
[Emc-users] 0-10V spindle control via Mesa 7i33
All- My Sieg KC4S lathe conversion is moving along, and I have a question about driving a spindle motor controller using a Mesa 7i33 servo controller. According to the docs, that daughter card uses sign/magnitude mode , which will generate 0 to +10V analog out when the direction is positive and 0 to -10 V analog. My problem is that the drive controller has a direction input and a speed input and the speed input is 0 to +10V regardless of direction. My thinking was that I could just tie the direction pin feeding to the 7i33 high and wire a different I/O pin to the direction input of the drive and tie that pin to the spindle direction. Unfortunately, I can't figure out how to tie the direction pin feeding the 7i33 to high. In the pncconf-generated configuration there is no explicit configuration that I can see tying the spindle direction to the direction pin expected by the 7i33. Am I missing something obvious or is there a different way to accomplish what I want? Thanks! Scott -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Sieg SC2518 CNC lathe conversion questions
I can confirm that with the Mesa 7i33 card an open collector encoder will work but needs pull-up resistors, I used 1k to pull up to 5V, for the positive encoder inputs. For a 100ppr quadrature encoder that is so far working fine. With respect to the encoder Z pulse, if I had a Z pulse three times per spindle revolution would a software solution to ignoring every two out of three be feasible? My spindle pulley is 75 teeth, and a 25 tooth encoder pulley would be convenient. I seem to recall the Mesa refresh rate being tied to the servo thread, and I am guessing this might impede a software solution. Thanks! Scott On Sun, Nov 11, 2012 at 3:30 PM, andy pugh bodge...@gmail.com wrote: On 11 November 2012 20:00, Scott Hasse scott.ha...@gmail.com wrote: I plan on integrating the spindle control to be able to thread, but I am wondering if the Z pulse needs to be strictly once per chuck revolution Yes, it must be once per spindle revolution. The system will always start the threading pass on the index, and if that index happens at a different point in the spindle revolution, then so will the thread. Further, I am wondering the best way to interface a 12-24V open collector encoder with the Mesa 7i33 servo control card. That's one for Pete. -- atp If you can't fix it, you don't own it. http://www.ifixit.com/Manifesto -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_nov ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Sieg SC2518 CNC lathe conversion questions
Thanks all for the advice. I hadn't considered the case of reversing the spindle a bit, that does shoot that idea down. Although I've enjoyed Gene's spindle encoder adventures vicariously I don't think that's a path I want to walk, so at this point my plan is to obtain a 1:1 timing belt pulley and use the Z pulse in the encoder I already have. Hopefully that should be fairly straightforward. Thanks again and I'll let you know how it goes. Scott On Tue, Nov 13, 2012 at 12:50 PM, andy pugh bodge...@gmail.com wrote: On 13 November 2012 18:34, Gene Heskett ghesk...@wdtv.com wrote: I'd have reservations about index sensing at servo rate, depending on the top speed of the spindle, and try to set the mesa to respond in real time. The Mesa encoder counter responds in Mesa time, and zeros the counts instantly. The next time that the FPGA is polled the return value is the number of counts since the index. -- atp If you can't fix it, you don't own it. http://www.ifixit.com/Manifesto -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
[Emc-users] Sieg SC2518 CNC lathe conversion questions
All- I'm starting in the process of converting a Sieg SC2518 CNC lathe to LinuxCNC control. I'll be using Mesa hardware, 5i23+7i33+7i37 and have had good experience with that in the past. Incomplete in-process documentation is here: http://code.google.com/p/sector67-sandbox/wiki/SiegCNCLathe If anyone has done a conversion like this I'd certainly appreciate any advice. More specifically, I have two questions with respect to the encoder. The machine is built with a 100 ppr Automation Driect TRD-S100BD 12-24V open collector encoder plus a magnetic reed switch that triggers once per chuck revolution. The encoder has a Z pulse but as it is on a belt it will not fire once per chuck revolution, but some fraction of that. I plan on integrating the spindle control to be able to thread, but I am wondering if the Z pulse needs to be strictly once per chuck revolution or if I could instead use the Z pulse directly from the encoder, which would be a bit simpler. Further, I am wondering the best way to interface a 12-24V open collector encoder with the Mesa 7i33 servo control card. I presume I would set the jumpers for TTL mode, but then after doing so can I just connect the A/B or conversely not A/not B? I guess the question is are the encoder inputs in TTL mode on the Mesa 7i33 pulled up to positive voltage. Thanks in advance for the advice, Scott -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_nov ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Sieg SC2518 CNC lathe conversion questions
Thanks, I should have been more accurate in my initial description. It is a hall effect sensor. Scott On Sun, Nov 11, 2012 at 6:34 PM, Bruce Layne linux...@thinkingdevices.comwrote: On 11/11/2012 03:00 PM, Scott Hasse wrote: ...plus a magnetic reed switch that triggers once per chuck revolution. I wouldn't use any mechanical switch in that application. There's a chance it won't be able to respond fast enough at the faster spindle speeds, but I'd be much more concerned about reliability. Most mechanical switches are rated for mechanical life, independent of contact wear from making and breaking current. Even with no current flowing through the switch, most switches are rated for something in the ballpark of 100,000 to 1,000,000 switch activations. That's a lot if you're pushing a button, but if you're racking up 2000 switch activations per minute for the spindle index pulse, you'll reach 100,000 in 50 minutes of spindle time. I'd be looking at a solid state switch with no moving parts... either a Hall effect switch for that magnet, or I'd use a slot or a hole in an opaque disk with an optical interrupter. -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_nov ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_nov ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] encoder component in counter mode velocity stability issues
As a follow-up I had a chance to look at my frequency signal with a digital scope and found that it was indeed unstable to the tune of 20%. I had not expected that as I used an LM331 chip with seemingly appropriate components. Hooking a real function generator to the input worked great, with the expected ~2% fluctuation (20,000 ns base thread sampling a 1kHz signal). I'm now looking closer at my circuit and supply voltages to determine where the variances are coming from. Very glad this is not a problem in the parallel port hardware nor LinuxCNC, and glad to see with the function generator I should be able to get a usable input once I am generating a frequency appropriately. Thanks everyone for their insight on this issue. Scott On Mon, Jul 2, 2012 at 9:01 AM, Jon Elson el...@pico-systems.com wrote: Scott Hasse wrote: John is correct. My logging could be more clear. The time between is the since the last rising edge of the input pulse as detected by the update function of the encoder running in the base thread. The counts between is the number of base thread runs since the last rising edge input pulse. The time goes with the count of runs directly below it. For the sample Jon referenced, I believe the the two data points are: 40 runs in 796760 ns = 19919 ns/run 60 runs in 1195140 ns = 19919 ns/run The 1035788 ns time is actually from 52 runs, also = 19919 ns/run OK, I admit I didn't read the code, so I made wrong assumptions. Well, then, if this isn't thread jitter, then the pulse source must be quite irregular. Or else, the device reading the input signal is pretty imprecise in detecting it. Granted, this is the time passed into the update function as the period, not an actual system time, but I think that shows there is very little (if any) thread timing jitter. There is absolutely variance there, but the data I have would seem to point toward an unstable input signal (or somehow a significant amount of random variance being introduced somewhere between, which would be very odd), but it would also be odd for my input signal to vary based on the way I am generating the signal. I can confirm all that once I get back in a week or so. It will be interesting to find out what the cause of this is, but if the test signal is no good, then the test doesn't answer any questions. Jon -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] encoder component in counter mode velocity stability issues
kernel: [ 4078.261291] ENCODER time between: 976031 Jun 30 17:48:41 scott-desktop kernel: [ 4078.261305] ENCODER runs between: 49 Jun 30 17:48:41 scott-desktop kernel: [ 4078.262266] ENCODER time between: 976031 Jun 30 17:48:41 scott-desktop kernel: [ 4078.262280] ENCODER runs between: 49 Jun 30 17:48:41 scott-desktop kernel: [ 4078.263323] ENCODER time between: 1055707 Jun 30 17:48:41 scott-desktop kernel: [ 4078.263337] ENCODER runs between: 53 Jun 30 17:48:41 scott-desktop kernel: [ 4078.264299] ENCODER time between: 976031 Jun 30 17:48:41 scott-desktop kernel: [ 4078.264313] ENCODER runs between: 49 Jun 30 17:48:41 scott-desktop kernel: [ 4078.265487] ENCODER time between: 1175221 Jun 30 17:48:41 scott-desktop kernel: [ 4078.265490] ENCODER runs between: 59 Jun 30 17:48:41 scott-desktop kernel: [ 4078.266422] ENCODER time between: 936193 Jun 30 17:48:41 scott-desktop kernel: [ 4078.266426] ENCODER runs between: 47 Jun 30 17:48:41 scott-desktop kernel: [ 4078.267327] ENCODER time between: 916274 Jun 30 17:48:41 scott-desktop kernel: [ 4078.267342] ENCODER runs between: 46 Jun 30 17:48:41 scott-desktop kernel: [ 4078.268503] ENCODER time between: 1175221 Jun 30 17:48:41 scott-desktop kernel: [ 4078.268517] ENCODER runs between: 59 Jun 30 17:48:41 scott-desktop kernel: [ 4078.269529] ENCODER time between: 1015869 Jun 30 17:48:41 scott-desktop kernel: [ 4078.269533] ENCODER runs between: 51 Jun 30 17:48:41 scott-desktop kernel: [ 4078.270446] ENCODER time between: 916274 Jun 30 17:48:41 scott-desktop kernel: [ 4078.270450] ENCODER runs between: 46 Jun 30 17:48:41 scott-desktop kernel: [ 4078.271231] ENCODER time between: 796760 Jun 30 17:48:41 scott-desktop kernel: [ 4078.271245] ENCODER runs between: 40 Jun 30 17:48:41 scott-desktop kernel: [ 4078.272267] ENCODER time between: 1035788 Jun 30 17:48:41 scott-desktop kernel: [ 4078.272281] ENCODER runs between: 52 Jun 30 17:48:41 scott-desktop kernel: [ 4078.273243] ENCODER time between: 976031 Jun 30 17:48:41 scott-desktop kernel: [ 4078.273257] ENCODER runs between: 49 Jun 30 17:48:41 scott-desktop kernel: [ 4078.274259] ENCODER time between: 1015869 Jun 30 17:48:41 scott-desktop kernel: [ 4078.274274] ENCODER runs between: 51 The between-pulse variance is clear in that data, which I think for the most part rules out an encoder.c defect. It is seeing and counting the pulses. I think my next step is to either get a hold of a real frequency generator or scope (local hackerspace to the rescue!) so I can confirm my current LM331-based frequency generator. Unfortunately, that will have to wait a week as I am heading out on vacation today. Thanks much for the solid advice so far and I'll update this thread once I get a good look at my frequency generator to confirm how stable it is. Scott On Sat, Jun 30, 2012 at 7:10 PM, Peter C. Wallace p...@mesanet.com wrote: On Sat, 30 Jun 2012, Scott Hasse wrote: Date: Sat, 30 Jun 2012 18:01:02 -0500 From: Scott Hasse scott.ha...@gmail.com Reply-To: Enhanced Machine Controller (EMC) emc-users@lists.sourceforge.net To: Enhanced Machine Controller (EMC) emc-users@lists.sourceforge.net Subject: Re: [Emc-users] encoder component in counter mode velocity stability issues My base thread is 2 ns (50 khz) and my servo thread is 100 ns. I am running the update-counters in the base thread. I was thinking that should limit my sampling noise to ~2% but instead it is ~20%. I don't think I'm getting bounce errors as the parallel port pins in halscope show regular pulses as I would expect. To understand this issue better, I've set up the following standalone hal configuration: ** loadrt threads name1=base-thread period1=2 name2=servo-thread period2=100 loadrt probe_parport loadrt hal_parport cfg=0x378 out setp parport.0.reset-time 5000 addf parport.0.read base-thread addf parport.0.write base-thread addf parport.0.reset base-thread loadrt encoder num_chan=1 loadrt lowpass setp encoder.0.counter-mode true net encoder-0-phase-A encoder.0.phase-A = parport.0.pin-10-in setp encoder.0.position-scale 1.0 addf lowpass.0 servo-thread setp lowpass.0.gain 0.001 net lowpass-0-in lowpass.0.in = encoder.0.velocity net temp-0-in-filtered = lowpass.0.out addf encoder.update-counters base-thread addf encoder.capture-position servo-thread start ** that I kick off like so: halrun -U sudo /etc/init.d/realtime restart halcmd -f thermal-input.hal halmeter and added some logging to the encoder.c component and installed it via: sudo comp --install encoder.c and then I see the my additional error-level logging in /var/log/messages As an aside, I was astounded how easy it is to develop (or at least modify and debug existing) c-level components. Great job to all who have made that system what it is. I thought it might take me days to get a re-compiled encoder.c component working
Re: [Emc-users] encoder component in counter mode velocity stability issues
Are you perhaps associating the wrong run count and run times log entries? In the four-line log snippet you show I believe the middle two entries would be associated with each other. I see the times between divided by runs between to be quite stable. I have run the latency tests and get about 8000 ns on this 525mw with hyper threading disabled and the other recommended tweaks. Scott On Jul 1, 2012, at 11:38 AM, Jon Elson el...@pico-systems.com wrote: Scott Hasse wrote: Jun 30 17:48:41 scott-desktop kernel: [ 4078.255547] ENCODER runs between: 60 Jun 30 17:48:41 scott-desktop kernel: [ 4078.256330] ENCODER time between: 796760 Jun 30 17:48:41 scott-desktop kernel: [ 4078.256344] ENCODER runs between: 40 Jun 30 17:48:41 scott-desktop kernel: [ 4078.257366] ENCODER time between: 1035788 It appears you have really large real time jitter in this system. It could be either the base thread or the servo thread, not completely sure. But I see about 30% jitter on the time, and 50% on the runs! That will make any control loop malfunction badly. Have you run the latency tests on this system? Jon -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] encoder component in counter mode velocity stability issues
John is correct. My logging could be more clear. The time between is the since the last rising edge of the input pulse as detected by the update function of the encoder running in the base thread. The counts between is the number of base thread runs since the last rising edge input pulse. The time goes with the count of runs directly below it. For the sample Jon referenced, I believe the the two data points are: 40 runs in 796760 ns = 19919 ns/run 60 runs in 1195140 ns = 19919 ns/run The 1035788 ns time is actually from 52 runs, also = 19919 ns/run Granted, this is the time passed into the update function as the period, not an actual system time, but I think that shows there is very little (if any) thread timing jitter. There is absolutely variance there, but the data I have would seem to point toward an unstable input signal (or somehow a significant amount of random variance being introduced somewhere between, which would be very odd), but it would also be odd for my input signal to vary based on the way I am generating the signal. I can confirm all that once I get back in a week or so. Thanks much! Scott -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] encoder component in counter mode velocity stability issues
My base thread is 2 ns (50 khz) and my servo thread is 100 ns. I am running the update-counters in the base thread. I was thinking that should limit my sampling noise to ~2% but instead it is ~20%. I don't think I'm getting bounce errors as the parallel port pins in halscope show regular pulses as I would expect. To understand this issue better, I've set up the following standalone hal configuration: ** loadrt threads name1=base-thread period1=2 name2=servo-thread period2=100 loadrt probe_parport loadrt hal_parport cfg=0x378 out setp parport.0.reset-time 5000 addf parport.0.read base-thread addf parport.0.write base-thread addf parport.0.reset base-thread loadrt encoder num_chan=1 loadrt lowpass setp encoder.0.counter-mode true net encoder-0-phase-A encoder.0.phase-A = parport.0.pin-10-in setp encoder.0.position-scale 1.0 addf lowpass.0 servo-thread setp lowpass.0.gain 0.001 net lowpass-0-in lowpass.0.in = encoder.0.velocity net temp-0-in-filtered = lowpass.0.out addf encoder.update-counters base-thread addf encoder.capture-position servo-thread start ** that I kick off like so: halrun -U sudo /etc/init.d/realtime restart halcmd -f thermal-input.hal halmeter and added some logging to the encoder.c component and installed it via: sudo comp --install encoder.c and then I see the my additional error-level logging in /var/log/messages As an aside, I was astounded how easy it is to develop (or at least modify and debug existing) c-level components. Great job to all who have made that system what it is. I thought it might take me days to get a re-compiled encoder.c component working and was pleased to find it was actually only minutes. Doing that showed me that although the base thread runs were sufficient in number and capturing the transitions properly, there actually was variance between the between-rising-edge times it was catching, ranging in a short sample from 817us to 1173us for what should be a fairly steady 1khz/1000us signal. Modifying the encoder component to have it log a count of update runs between pulses shows anywhere from 40 to 60 runs between a rising edge detection, but always averaging right at 50 and typically subsequent intervals compensating for the previous intervals in terms of overall time. For instance, an interval with 45 base thread runs between a rising edge detected would be followed by an interval with 55 base thread runs. This is leading me to wonder about timing in the parport driver. I see there is a reset function for pushing values faster, but it seems like that is for output. Is anyone aware of how input data propagates through the parport driver and if there are opportunities for delay? Thanks much, Scott -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
[Emc-users] disabling a stepper motor between moves?
I've been working to create some integration between the reprap RAMPS stepper driver board and LinuxCNC. One interesting thing some 3D printers do is disable the Z stepper motor when it is not moving. This relies on the friction of the Z axis assembly for keeping the head in place, but allows hand-adjustment of that axis while the machine is in motion, for instance when starting a print. In fact a popular part to print is a small hand wheel for the Z axis to adjust it. Putting the question of if this is a good or bad thing aside for a moment, I'm wondering if anyone has any ideas about how this would be done with LinuxCNC. Somewhat complicating things is that stepper drivers typically have an enable delay, so that would likely need to be respected, presumably by the motion component prior to moving the axis. Thoughts on this interesting problem? Thanks, Scott -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
[Emc-users] RepRap RAMPS stepper controller board with LinuxCNC?
All- I am starting in with some experiments using the RepRap RAMPS board ( http://reprap.org/wiki/Arduino_Mega_Pololu_Shield) (basically a 3-5 axis small stepper driver board with additional heater outputs and temperature inputs), but instead of using an Arduino with firmware like sprinter for controlling it, I plan to use LinuxCNC with a parallel port. To that end I've acquired an Intel 525MW board and am so far very pleased with it. To adapt a parallel port to drive the RAMPS board, I plan to make a small circuit board with the same footprint as the Arduino shield that would normally driver the RAMPS board, but route the parallel port pins instead. I am expecting this will generally be fairly straightforward, and there is just barely enough parallel I/O to be workable, but I have a few questions that I thought I would run by you all: 1) Many of the output pins are step/dir which of course will require real time control, but others things like heater outputs, etc, that would not suffer too much from latency. Has anyone used a latching shift register for extending parallel port output when latency is less of a concern? 2) I've gotten some basic encoder-based frequency-based analog input working in other scenarios ( http://code.google.com/p/sector67-sandbox/wiki/FrequencyBasedAnalogInput) and plan to use that for the analog temperature inputs on the parallel port if feasible. Does that seem reasonable? 3) Has anyone else done anything similar to this? I've followed the http://reprap.org/wiki/EMCRepRap effort, but that doesn't use the RAMPS board. I expect the user interface and gcode translation tools from that project to be useful. Thanks, Scott -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
[Emc-users] RepRap RAMPS stepper controller board with LinuxCNC?
All- I am starting in with some experiments using the RepRap RAMPS board ( http://reprap.org/wiki/Arduino_Mega_Pololu_Shield) (basically a 3-5 axis small stepper driver board with additional heater outputs and temperature inputs), but instead of using an Arduino with firmware like sprinter for controlling it, I plan to use LinuxCNC with a parallel port. To that end I've acquired an Intel 525MW board and am so far very pleased with it. To adapt a parallel port to drive the RAMPS board, I plan to make a small circuit board with the same footprint as the Arduino shield that would normally drive the RAMPS board, but route the parallel port pins instead to the shield headers. I am expecting this will generally be fairly straightforward, and there is just barely enough parallel I/O to be workable, but I have a few questions that I thought I would run by you all: 1) Many of the output pins are step/dir which of course will require real time control, but others things like heater outputs, etc, that would not suffer too much from increased latency. Has anyone used a latching shift register for extending parallel port output for cases where latency is less of a concern? 2) I've gotten some basic encoder-based frequency-based analog input working in other scenarios ( http://code.google.com/p/sector67-sandbox/wiki/FrequencyBasedAnalogInput) and plan to use that for the analog temperature inputs on the parallel port if feasible. Does that seem reasonable? 3) Has anyone else done anything similar to this? I've followed the http://reprap.org/wiki/EMCRepRap effort, but that doesn't use the RAMPS board. I expect the user interface and gcode translation tools from that project to be quite useful. Thanks, Scott -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] OT-Retrofitting machines
Of course there are some people and businesses for which a retrofit will make no sense. For our organization (community group with almost no capital to speak of but lots of volunteer time/interest), our LinuxCNC retrofits have been great. We are a group of hackers, many of whom subscribe to the self repair manifesto: http://www.ifixit.com/Manifesto If you can't fix it you don't own it. We completed a retrofit of two bridgeport-class mills (including Mesa hardware) for an equivalent cost of replacing one proprietary board in either of those systems. This is of course counting our time as free, but we work on those machines as a hobby and rather enjoy it. What was a magic black box is now well-understood and fixable. That is worth a lot IMO. Scott On Sun, May 13, 2012 at 8:44 AM, Viesturs Lācis viesturs.la...@gmail.comwrote: Stuart, I think that I will mark Your email for later reference, because it perfectly explains the same situation I was 3 years ago as a result of which I am now making my living on building cnc machines or retrofitting existing ones and LinuxCNC is the only and exclusive controller for me. Sometimes I feel that people do not really believe me, so another opinion that supports that is what I needed :) Viesturs 2012/5/13 Stuart Stevenson stus...@gmail.com: USD10,000 equals 1 to 3 control repairs. A retrofit can be less than 10k and avoid current and further control repairs. A retrofit to replace a control that repair parts are unavailable for makes all kinds of sense. On one of my machines with a functioning control (year model 1998 and the control runs fine) I want to replace the control because upgrade features I want from the manufacturer cost in excess of USD20.000 for the software alone. On another machine (also 1998 and functioning) upgrades are NOT available because the OEM is no longer developing software for that model. A retrofit to a current OEM control with the desired capability is more than USD120,000. I have several three axis mills. I have several rotary tables. To marry the tables to the current controls will be more expensive than a retrofit. My retrofits are on the network for communication. The OEM controls are not. A LinuxCNC retrofit does not require all steppers or all servos or even all the components of either to be the same. ...etc ad nauseum :) What's not to like? The main gripe is the 'start from line'. I agree that could be 'enhanced' although my Fanuc controls are not much better at starting from a line if the program is long enough to need to run by DNC. Also, the Fanuc start from line doesn't start from a line in the middle of a tool without switching to MDI to make sure the prep codes are correct. Some of the other controls are much better at starting from a line. Having some fun now. Stuart On Sunday, May 13, 2012, Viesturs Lācis wrote: 2012/5/13 dave dengv...@charter.net javascript:;: It depends on the final usage. If you are commercial paying 10K to refit a machine it may not make much sense. Could You, please, explain, why not? If the overall condition of mechanics of machine is very good, the controller is dead (could be some minor issues with mechanics), then 10K is more than sufficient to bring in somebody to do the retrofit (there are several members of this list that are doing this, I would consider myself in that category too). LinuxCNC is advanced enough that the functionality of the retrofitted machine will totally match capabilities of brand new machine. Viesturs -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net javascript:; https://lists.sourceforge.net/lists/listinfo/emc-users -- dos centavos -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat
[Emc-users] Raspberry pi integration?
I presume many of you have seen the hype on the Raspberry Pi. Am I correct in thinking that getting LinuxCNC to run on one of those would require an arm-specific RTAI and drivers for the device-specific I/O? Has anyone else given any thought to this potentially disruptive platform in the context of LinuxCNC? Scott -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Mesa card help
I did a somewhat similar machine (+-10V amps, encoders) with similar Mesa hardware with some documentation here: http://code.google.com/p/sector67-sandbox/wiki/ProjectSheetCake Getting the machine to move under control should be fairly straightforward. Integrating the limits/estop and servo enable can be a bit more work, depending on how you want to do it. I prefer a hardware estop, which can require slightly more integration work. You'll also want to determine if your servo amps are running in torque mode or velocity mode, as how you tune the PID control loop will be different depending on that. In my opinion, pncconf will generally be your friend, but spend some time getting comfortable with it and reviewing the actual hal and ini output files to better understand what it is doing for you. Hope that helps, Scott On Sun, Apr 29, 2012 at 7:37 AM, Joe H 67p...@gmail.com wrote: Nothing to hide, the control is a Protrak. The company name is Southwestern Industries. It probably is no big deal now, but I decided to hide it because a box on the corner of the print says not to reproduce it. Thanks for reply, I will get the computer up and running today. Joe -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Mesa card help
I've been meaning to do that, I just have not had the time yet. Hopefully in the next few weeks. Scott On Sun, Apr 29, 2012 at 11:20 AM, Greg Bernard yankeelena2...@yahoo.comwrote: That is a great writeup, Scott! It gave me a very solid understanding of what's involved in a complete servo system. Perhaps you could add it to the wiki? +++ We are like tenant farmers chopping down the fence around our house for fuel when we should be using Nature's inexhaustible sources of energy -- sun, wind and tide. ... I'd put my money on the sun and solar energy. What a source of power! I hope we don't have to wait until oil and coal run out before we tackle that. -Thomas Edison, inventor (1847-1931) From: Scott Hasse scott.ha...@gmail.com To: Enhanced Machine Controller (EMC) emc-users@lists.sourceforge.net Sent: Sunday, April 29, 2012 9:07 AM Subject: Re: [Emc-users] Mesa card help I did a somewhat similar machine (+-10V amps, encoders) with similar Mesa hardware with some documentation here: http://code.google.com/p/sector67-sandbox/wiki/ProjectSheetCake Getting the machine to move under control should be fairly straightforward. Integrating the limits/estop and servo enable can be a bit more work, depending on how you want to do it. I prefer a hardware estop, which can require slightly more integration work. You'll also want to determine if your servo amps are running in torque mode or velocity mode, as how you tune the PID control loop will be different depending on that. In my opinion, pncconf will generally be your friend, but spend some time getting comfortable with it and reviewing the actual hal and ini output files to better understand what it is doing for you. Hope that helps, Scott On Sun, Apr 29, 2012 at 7:37 AM, Joe H 67p...@gmail.com wrote: Nothing to hide, the control is a Protrak. The company name is Southwestern Industries. It probably is no big deal now, but I decided to hide it because a box on the corner of the print says not to reproduce it. Thanks for reply, I will get the computer up and running today. Joe -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Mesa card help
Glad I can give back to this incredible community and project in some way. We've done another retrofit as well, but I'm still working on the documentation for that. As you have questions, let me know. If the documentation doesn't make sense, I'm glad to clarify it. Scott On Sun, Apr 29, 2012 at 5:04 PM, Joe H 67p...@gmail.com wrote: Scott, I checked out your write up. That is awesome. Ive looked a lot on line for details on other retrofits. That is one of the best that I have seen. I will be studying it, and referring back to it. I thank you also. Joe -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Trajectory planning and other topics from a EMC(LinuxCNC) newbie (TheNewbie)
Unfortunately, this approach doesn't work well for things like plastic extrusion where it can be difficult to control the extrusion rate precisely. Repraps, etc are able to succeed in part because they take a very naive approach to trajectory planning and can get away with it because of the low moving mass. They basically try to fly around at a consistent speed regardless, and extrude at a constant rate. The output of the skeinforge tool chain is also totally line segments. As far as I understand it, this makes LinuxCNC somewhat unsuitable for this very fast-growing and cool DIY CNC market segment. Two cents, Scott On Apr 20, 2012, at 4:33 AM, charles green xxzzb...@yahoo.com wrote: if speed is an issue, consider the solution of being a doctor: have patience. -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Trajectory planning and other topics from a EMC(LinuxCNC) newbie (TheNewbie)
It seems to me that the likelihood of fixing all of the methods of gcode generation such that they don't generate short line segments is approximately zero. Also, it seems that even if a proprietary LinuxCNC gcode extension allowed arbitrary plane arcs, splines, etc. that the likelihood of CAM packages being able to make proper use of that is also approximately zero. Rather than trying to solve this problem in a million places not under our control, doesn't it make sense to try and solve it properly in one place and look more closely at using more than one line for look ahead? Of course I have no idea how hard this problem is, and since it has not yet been solved yet in LinuxCNC I presume it is significantly hard, but I am wondering what specifically makes it hard. Thanks, Scott -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Voltage to frequency for analog input
Thanks much for the correction, and you're certainly welcome to stop by Madison any time and check out what we're doing. http://code.google.com/p/sector67-sandbox/wiki/FrequencyBasedAnalogInput -- Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Voltage to frequency for analog input
Definitely an interesting idea. To answer Thomas' question from earlier, I was able to read a 500-1000 Hz range reliably enough to successfully control EDM plunge/retreat for successful EDM on our first try using the simple conditional gcode I referenced on the wiki page describing this. A lot more refinement is necessary, and I still have questions/further investigations about why the frequency limit is so low, and additional encountered some of the same sort of instability that Gene is encountering in his encoder readings (even at a stable frequency input), but have not filtered it as of yet using the component referenced in that thread. I'm not sure an EDM system would really benefit from it anyway, as fast response is more important than a stable reading, and there is no mechanical momentum as their is on a lathe spindle. Scott On Sun, Apr 15, 2012 at 1:34 PM, andy pugh bodge...@gmail.com wrote: On 9 March 2012 03:46, Scott Hasse scott.ha...@gmail.com wrote: My question is about this analog input. One way to do this that I keep meaning to experiment with is to use a PWM output to create a reference voltage, and a comparator to detect whether it is above or below the voltage to be measured. A custom HAL component would be needed to ramp up/down the PWM value to track the measured voltage. -- atp The idea that there is no such thing as objective truth is, quite simply, wrong. -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Voltage to frequency for analog input
I think there might be some confusion about what we are reading in via voltage to frequency using a software encoder velocity in this case. The analog value read as a frequency between 500 and 1000Hz is a scaled version of the voltage of the EDM process itself. Our relatively naive understanding is that this value can be used to determine when to further plunge, stay in place or retreat, and the gcode at http://code.google.com/p/sector67-sandbox/wiki/FrequencyBasedAnalogInputhas a loop of code with logical if/then bands between 500 and 1000 that are set appropriately to control the plunge/stay/retreat behavior of the Z axis depending on the analog value read. For instance if the input is 500 Hz that would mean basically zero voltage, a shorted electrode that needs to be backed off. An input of 1000Hz would mean top-of-the-range voltage that needs to be plunged further. Of course the physical axis has momentum, but the voltage value being read as analog input in this case might change quite dramatically as the electrode is for instance too close, and as such I don't believe this analog value has meaningful momentum such that it would need to be smoothed. In fact my understanding is that we'd want the fastest retreat (for instance) response possible and smoothing would only hurt that. Again, we are not measuring motion with this input but voltage. I don't know the actual frequency that the motion control loop runs with, as that depends on the speed of the gcode loop interpretation, analog read, etc., but in our testing the motion response was sufficiently fast to successfully achieve basically stable arcing EDM in both steel and aluminum, with further refinements very likely possible as we learn more about the very interesting EDM process. Hope that helps clarify, and I'm certainly open to any advice and correction. Scott -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Voltage to frequency for analog input
I must have been making some silly mistake. Adding the thread before the EMCMOT is working for me now, and I have reasonable analog values being read now. Thanks for the double check. The frequency capability is still not as high as I calculated would be possible, but it is high enough to avoid egregious interpolation problems (but not interpolation free). Thank you Viesturs, Chris, Peter and others! I have some basic documentation of the full solution here: http://code.google.com/p/sector67-sandbox/wiki/FrequencyBasedAnalogInput Basically, frequency to analog input using a software encoder though a Mesa 5i23 and 7i37 isolating daughterboard, hooked to the analog 00 input and used from the M66 gcode command is now working. Any suggestions or refinements, please let me know. Scott On Sun, Mar 18, 2012 at 2:07 AM, Chris Morley chrisinnana...@hotmail.comwrote: Scott I added loadrt threads name1=testthread period1=20 to a config before loading EMCMOT it seemed to load fine. What commands did you use? Date: Sat, 17 Mar 2012 21:08:43 -0500 From: scott.ha...@gmail.com To: emc-users@lists.sourceforge.net Subject: Re: [Emc-users] Voltage to frequency for analog input Stopped down to the shop tonight to try: addf hm2_5i23.0.read_gpio base-thread Debug file information: HAL: ERROR: function 'hm2_5i23.0.read_gpio' needs FP analog-in.hal:4: addf failed To me this implies it is not a real time capable function? I tried creating a separate thread, but I get: insmod: error inserting '/usr/realtime-2.6.32-122-rtai/modules/emc2/threads.ko': -1 Operation not permitted Presumably with motmod initializing and loading threads I cannot add others afterward. This leaves me in kind of a bind. Does anyone have any ideas about adding the read_gpio function to the base thread or alternately loading a thread that it could bind to? -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Voltage to frequency for analog input
to use this mill for other things like playing with 3d printing with multiple heated head temperatures and a heated bed temperature to measure and who knows what else. **2) **Have the arduino generate binary output and use a weighted sum component to get the analog value. This will eat up I/O quickly, but is probably workable as a short term solution. **3) **Have the arduino generate a frequency and use a custom Mesa firmware and have it count encoder pulses on-card using the third connector with the isolated I/O daughter card. This is probably technically feasible, but as this machine is collectively maintained by a diverse group of hackers, I want to try and stay on the beaten path as much as possible.** ** ** ** I’d really like to get the software encoder approach working, and feel like I must be missing something simple for it to not be able to handle anything above about 500Hz. ** ** Hope that helps clarify the situation, ** ** Scott On Thu, Mar 15, 2012 at 11:43 AM, Kirk Wallace kwall...@wallacecompany.comwrote: On Thu, 2012-03-15 at 10:56 -0500, Scott Hasse wrote: I'd prefer not to use the mesa encoder primarily because I want to use the optical isolation I already have on the 7i37. Additionally with the firmware setup I have (4 pwm, 4 encoders, 4 stepgens) and the 3rd 50 pin cable for io like estop and limit I only have one Mesa-based encoder available with no optical isolation. Ideally I'd like to run multiple analog inputs. Although if I go the weighted sum route I'd be limited by my io as well. It seem I must be doing something wrong with the software encoder though, as i think it should easily be keeping up with the frequencies I'm sending, Thanks, Scott Opto-isolators might be considered slow. From my experience, they might be good to tens of kilohertz to maybe a hundred kilohertz with the the fast ones setup properly. Data signals generally don't need to be nearly as fast, so I would tend to isolate the data instead of the analog signals. I wonder... these should be pretty fast: http://en.wikipedia.org/wiki/Small_form-factor_pluggable_transceiver http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_1552798_-1 -- Kirk Wallace http://www.wallacecompany.com/machine_shop/ http://www.wallacecompany.com/E45/index.html California, USA -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Marketing LinuxCNC, was Re: Trajectory planning and other topics from a EMC(LinuxCNC) newbie
As a relative LinuxCNC newbie, I can say that a more clear presentation of the capabilities of the system would have made it less daunting to choose LinuxCNC. As a hobby CNC user, I had been exposed to probably 20 half-baked open source CAM tools/packages and been impressed with a total of zero. As a hacker space, we were philosophically committed to open source and so pursued LinuxCNC, but given that previous CAM experience I thought it was going to be a down the rabbit hole experience. I was greatly pleased to find out not only that LinuxCNC is extremely mature and stable, but that the architecture is well-thought-out and well executed, there are configuration generators for the most common use cases, a choice of clean functional extensible GUIs, and so many other batteries included that I absolutely was not expecting. Not to mention what others have said with respect to the helpfulness and openness of this support community. I'm now through two conversions and could not be more pleased: http://code.google.com/p/sector67-sandbox/wiki/3300MillConversion http://code.google.com/p/sector67-sandbox/wiki/ProjectSheetCake and would be willing to pitch in the documentation I have and additional videos, etc. to help more accurately represent the excellent state of this software and community to prospective users. My two cents, Scott On Sat, Mar 17, 2012 at 8:34 AM, gene heskett ghesk...@wdtv.com wrote: On Saturday, March 17, 2012 09:05:00 AM Mark Wendt (Contractor) did opine: On 3/16/2012 10:31 PM, Stuart Stevenson wrote: Gentlemen, Just how do you 'market' a free item/product? The free LinuxCNC software is not even a loss leader. The whole thing is free - all the time - even the advice - even the help. Just asking. thanks Stuart Stuart, Marketing is marketing, whether for profit or for non-profit. Even if free, you still want to be able to give it away. Like Kent mentioned, Case Studies and perhaps Testimonials are our Free advertising. That's the kind of stuff that needs to be in big, bold letters for folks looking at our stuff and wondering whether it's worth their time and effort to install the software, and become part of our user base. We need to show them what the software can do for them, how our support works, and how it all benefits them. Otherwise, if they see no benefit, they'll say the hell with it and become a Mach user. Mark While I tend to agree that we need to polish up our sales pitch and material, one of the things I think we need to emphasize is the level of support, I think it is fantastic compared to anything I've ever seen before, where software packages that cost $2500/month, often have bugs that don't get fixed till the next annual, send lots more money, update. That is the usual situation at a tv station, where the software that handles Traffic, is the heart and soul of the business model. LinuxCNC with its random releases that to my knowledge have only once or twice not been 100% backwards compatible, has amazed me. But I guess I'm getting used to the Linux way of doing things. Take amanda, the backup program, where I have been playing the canary in the coal mine for the bleeding edge development versions for nearly 10 years running it for 14. Only one, non-compatible update has ever taken place and that was at least a decade ago. It gets broken by support library changes regularly, most recently by a glib-utils update, but was fixed in 3 days. That rapidity of fixing things we have no control over means we get broken more often than an M$ product is, but we still fix it 10x faster too. IMO, this rapid response to problems, should be quite near the top of the list of advantages to choosing LinuxCNC. 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) My web page: http://coyoteden.dyndns-free.com:85/gene Credit ... is the only enduring testimonial to man's confidence in man. -- James Blish -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Voltage to frequency for analog input
With respect to messing it up, the hal and ini file are as they are directly generated from pncconf. The source simply does an input and I am doing that to keep the configuration modular. I run various configurations on this machine, and can pick and choose configurations by sourcing different sub-hal files in the custom hal. On Sat, Mar 17, 2012 at 9:31 AM, Viesturs Lācis viesturs.la...@gmail.comwrote: 2012/3/17 Scott Hasse scott.ha...@gmail.com: [HAL] HALUI = halui HALFILE = 3300_mill.hal HALFILE = custom.hal POSTGUI_HALFILE = custom_postgui.hal SHUTDOWN = shutdown.hal ... the custom.hal file: source analog-in.hal the analog-in.hal file: #http://linuxcnc.org/docs/devel/html/hal/rtcomps.html#sec:Encoder # hm2_5i23.0.gpio.048.in is the freqeuncy in # load the component loadrt encoder num_chan=1 setp encoder.0.counter-mode true #encoder.0.phase-A net analog-A encoder.0.phase-A = hm2_5i23.0.gpio.048.in # set the velocity of the encoder for a proper scale setp encoder.0.position-scale 1.0 # set the volicity out to feed the analog input net analog-1 = encoder.0.velocity # add the component to the thread addf encoder.update-counters base-thread addf encoder.capture-position servo-thread Why are You messing it all up? In INI file You load custom.hal file, but in that You tell - look in analog-in.hal file. And then all the stuff is hidden in analog-in.hal file... Any particular reason not to specify analog-in.hal file already in INI file or at least copy/paste all the commands in custom.hal file? I am telling this, because it is the first time I see source command in HAL. I do not remember seeing it in docs too, so I have no idea, how it works or how it affects the performance. The same goes for alias pins in Your main HAL file. Have You tried routing the frequency input directly to 5i23 card? IMHO that way You would check, if You are exceeding opto-isolators' capabilities. Viesturs -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Voltage to frequency for analog input
But this is really really wasteful Presuming my PC can handle a reasonable base-thread rate, is it really wasteful of a scarce resource? It seems if I want to use a real encoder counter given my configuration I'll need a custom 5i23 firmware? Thanks! Scott On Sat, Mar 17, 2012 at 10:01 AM, Peter C. Wallace p...@mesanet.com wrote: On Sat, 17 Mar 2012, Scott Hasse wrote: snip-- It acts like it is sampling the encoder at the servo-thread frequency, despite the update-counters function being bound to the base-thread. When I view the configuration from axis, the base-thread does show the encoder.update-counters function bound to it. You probably are sampling at the servo thread, to avoid this you would have to do the the hm2_read at the base thread. But this is really really wasteful, much better to use a real encoder counter (and dump the base thread sucking computer resources altogether) Peter Wallace -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Voltage to frequency for analog input
It just makes difficult for any observer to understand, what is going on there. If it works and You understand it - very good. But remember that if You will ever want somebody else to understand it, then it can cause frustration. I think that in situations like this it is best to stick to KISS principle (Keep It Simple and Stupid). My understanding is that the simple and most well-traveled approach for servo systems with Mesa hardware is to use pncconf. If you have a recommendation for a simpler or stupider solution I am certainly open to it. Personally I have found pncconf to be invaluable and just to clarify, I have not modified the ini or main hal file beyond that generated by pncconf. So if you have a problem with the aliasing, etc. that is an issue with that tool and certainly not of my implementation. If I would do what you suggest and put my changes directly in the hal file, then every change I make in pncconf would require me to manually re-merge my custom changes. AFAIK, the recommended approach for custom hal via pncconf is custom.hal (and custom_postgui.hal), and that is where I have my custom stuff. If the sourcing obfuscates things I apologize, but I don't know a better way to keep configurations relatively modular and still use pncconf. For what it is worth, I believe in the future pncconf is going to use the source command as well for this purpose. AFAIK having or not having a base thread - yes, it can make a difference in the realtime performance of Your PC. If I recall correctly, You had set base-thread to 1 ns. I am 100% sure that You are getting realtime error messages. True with that configuration I have under revision control. I typically run at 5 ns and had set it to 1 as a diagnostic measure to see if I could increase the sampling rate. Again, though, if I can run a base thread with reasonable performance on all other fronts, why not do that? I am talking about frequency-based analog inputs for things like temperatures and voltage levels where if I miss an encoder count it is certainly not the end of the world. That is what I told since the very beginning - use encoder module in 5i23... You have loaded 4 pwmgens and 4 encoders and are using only 3 of them. So You a spare encoder module to attach the frequency input to. I have tried to explain several times why I want a software-based encoder: 1) Eventually I will want more analog inputs. 2) Without a custom firmware I cannot align the encoder with optically isolated I/O. Additionally I'd like to try and build a solution that I can document for anyone to use regardless of specialized hardware. BTW why do You have 4 stepgens loaded, if You use only one? That also is a little waste of resources :) If You would load 1 stepgen, then those pins, currently occupied by 3 unused stepgen instances would be available as gpio pins. This would help me conserve a resource that is not at all scarce to me. I have 4 stepgens configured because if I change the number of stepgens pncconf wants me to reconfigure everything. I expect I will want to add a stepper or two in various future machine configurations and so have reserved them in that configuration. The non-isolated I/O alongside the one stepgen in use goes unused otherwise anyway. As You can see, there are bitfiles, that offer 8 encoder modules along with pwmgens and stepgens. Yes of course. But as far as I can tell there is no stock bitfile that allows me to run my three main servos and encoders, isolated I/O for limit, etstop, etc. along with isolated I/O for a number of other encoders, a non-isolated stepgen and still make use of the Mesa servo controller card and isolated I/O daughterboard with their specific set of input and output pins. Conversely, if I can get software encoders to work, I can stack software-based encoders using one isolated input each wherever they fit, basically giving me as many as I could ever need. Regards, Scott -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Voltage to frequency for analog input
OK, now I think I'm starting to wrap my head around why it is not working. Even with my software encoder sampling on the base-thread, with this line: addf hm2_5i23.0.read servo-thread updated I/O values were only being read from the 5i23 on the servo-thread. A bit counter intuitive to me, but clear in hindsight. I presume I could remedy this by running the hm2_5i23.0.read function on the base-thread. Peter: I know you have advised against this approach as inefficient use of the PC's CPU, but presuming it is workable performance-wise, is there any functional reason I should not do this? Would I also want to do it for hm2_5i23.0.write or is there no need? Thanks much, Scott On Sat, Mar 17, 2012 at 10:55 AM, Peter C. Wallace p...@mesanet.com wrote: On Sat, 17 Mar 2012, Scott Hasse wrote: Date: Sat, 17 Mar 2012 10:43:56 -0500 From: Scott Hasse scott.ha...@gmail.com Reply-To: Enhanced Machine Controller (EMC) emc-users@lists.sourceforge.net To: Enhanced Machine Controller (EMC) emc-users@lists.sourceforge.net Subject: Re: [Emc-users] Voltage to frequency for analog input But this is really really wasteful Presuming my PC can handle a reasonable base-thread rate, is it really wasteful of a scarce resource? Depending on the thread rate, you may use 20% or more of your PCs horsepower doing I/O. Also the hardware encoder counter will do a better job of frequency counting, even high res counting of low frequencies (it uses a 1MHz timestamp for inverse time frequency calculation) than the software encoder counter (which uses the jittery basethread for timestamping). It seems if I want to use a real encoder counter given my configuration I'll need a custom 5i23 firmware? Possible but since you only need one more encoder counter, theres possibly a bitfile that will do (depending on what other functions you have) Thanks! Scott On Sat, Mar 17, 2012 at 10:01 AM, Peter C. Wallace p...@mesanet.com wrote: On Sat, 17 Mar 2012, Scott Hasse wrote: snip-- It acts like it is sampling the encoder at the servo-thread frequency, despite the update-counters function being bound to the base-thread. When I view the configuration from axis, the base-thread does show the encoder.update-counters function bound to it. You probably are sampling at the servo thread, to avoid this you would have to do the the hm2_read at the base thread. But this is really really wasteful, much better to use a real encoder counter (and dump the base thread sucking computer resources altogether) Peter Wallace -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ 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 email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Voltage to frequency for analog input
Stopped down to the shop tonight to try: addf hm2_5i23.0.read_gpio base-thread Debug file information: HAL: ERROR: function 'hm2_5i23.0.read_gpio' needs FP analog-in.hal:4: addf failed To me this implies it is not a real time capable function? I tried creating a separate thread, but I get: insmod: error inserting '/usr/realtime-2.6.32-122-rtai/modules/emc2/threads.ko': -1 Operation not permitted Presumably with motmod initializing and loading threads I cannot add others afterward. This leaves me in kind of a bind. Does anyone have any ideas about adding the read_gpio function to the base thread or alternately loading a thread that it could bind to? Thanks, Scott -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Voltage to frequency for analog input
I'd prefer not to use the mesa encoder primarily because I want to use the optical isolation I already have on the 7i37. Additionally with the firmware setup I have (4 pwm, 4 encoders, 4 stepgens) and the 3rd 50 pin cable for io like estop and limit I only have one Mesa-based encoder available with no optical isolation. Ideally I'd like to run multiple analog inputs. Although if I go the weighted sum route I'd be limited by my io as well. It seem I must be doing something wrong with the software encoder though, as i think it should easily be keeping up with the frequencies I'm sending, Thanks, Scott On Mar 15, 2012, at 2:50 AM, Viesturs Lācis viesturs.la...@gmail.com wrote: 2012/3/15 Scott Hasse scott.ha...@gmail.com: with the frequency out going to an isolated I/O daughter card input (Mesa 7i37 I believe) of a Mesa 5i23. The problem to me seems to be the software encoder rate, which I believe I would hit with your suggestion as well. Any particular reason not to use encoder module right in 5i23 card? It will certainly count much higher frequencies and You will get rid of base-thread. Viesturs -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Voltage to frequency for analog input
If you just want to go from analog to LinuxCNC, have you considered using an ATmega to parallel port interface? The AVR can accept pure analog or some pulsed variety, such frequency counting , PWM or PDM. A dual parallel port PCI card is ~$15, Arduino Pro Mini for $20: http://www.sparkfun.com/products/9218 You could isolate the parallel port pins with a parallel port breakout board. This could run with a real-time component. As far as I understand it that is basically what I am doing with my current approach of an Arduino with a small program to go from an analog input to frequency output, with the frequency out going to an isolated I/O daughter card input (Mesa 7i37 I believe) of a Mesa 5i23. The problem to me seems to be the software encoder rate, which I believe I would hit with your suggestion as well. Or are you suggesting not doing analog-to-frequency but rather something like 8 digital inputs and using the weighted_sum component? Thanks for clarifying, Scott -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Voltage to frequency for analog input
it is unclear, if the problem is with the hardware, or with the signal handling within LinuxCNC... Really both, but I've gotten solid advice on both as well. Hardware-wise, the Mesa board looks good for my application. Signal-handling-wise, I thought that an M66 analog read could be set to return immediately and set the analog value to #*5399 for subsequent use in conditional logic. I'll play with it, but I think this lets me get it done in gcode only.* * * *Scott* On Fri, Mar 9, 2012 at 1:51 AM, Viesturs Lācis viesturs.la...@gmail.comwrote: 2012/3/9 Dave e...@dc9.tzo.com: Mesa has their THC board that I believe does exactly what you are looking for. Dave, I think that it is unclear, if the problem is with the hardware, or with the signal handling within LinuxCNC... Look at the very last item on this page: http://www.mesanet.com/ Scott, THCAD-10 is the name of the board, look under anything i/o daughter cards at the very bottom. Viesturs -- 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 Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- 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 Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
[Emc-users] Voltage to frequency for analog input
I'm doing some volunteer work for a local hackerspace (sector67.org). We recently completed conversion of two anilam knee mills to LinuxCNC, including adding a 4th rotary stepper axis for one of the mills. We now want to do some simple plunge EDM'ing, and ideally would reuse the LinuxCNC z axis control. Although I could make a custom control loop, I'm thinking that a simple conditional/looping gcode program, looking at the value of an analog input (m66) to determine whether to move up, stay in place or move down should get the job done in the regular axis GUI (with perhaps the addition of a pyvcp panel for a simple status). My question is about this analog input. I used A Mesa 5i23 card with servo and isolated I/O daughter cards, so I have ample digital I/O. Has anyone used a circuit with a voltage to frequency converter (LM331 or similar) to create a digital pulse train read in linuxCNC as an encoder I presume and then hooked that up to the analog m66 inputs? Looking for advice on that specific problem or other ideas on solving the overall problem. Thanks much, Scott -- 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 Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] parsing the current language dialect, and describing as EBNF [Was: question on gcode parsing]
I must admit I've I've watched this thread unfold with a bit of apprehension. Certainly the current direction has evolved to the point where the result will likely not be usable for my purposes. I don't see a way of using a flex/bison-based parser from python apart from native bindings, so in terms of having a portable parser or lint-type tool this would not result in one AFAIK. The grammar might provide a good starting point for me, though. Secondly, although gcode is certainly not a great language, I'm not sure I fully understand the motivation behind yet another custom gcode syntax extension. I have always thought decoupling was a good basic idea, and IMO the practical interface between LinuxCNC is a gcode file. As long as this interface is stable, and ideally as concise and standard as possible, it allows myriad CAM tools to reliably generate input files. Keeping it dumb IMO has great benefits. It allows CNC educational programs and those who learned basic gcode a long while back to continue to be productive. For the relatively smaller edge case of those wanting to hand-code sophisticated machine control, gcode (even the LinuxCNC flavor) is already a terrible starting point. Wouldn't it make more sense to just develop something like a simple python API that corresponds to (results in) machine motion operations (it could ultimately generate gcode), and modify the LinuxCNC interface to interpret those files line-by-line (the code displayed and stepped through would be the e.g. python, not gcode). Then you would have as much looping, conditional, file inclusion, etc. as you could hope for. Language design is fun, and there certainly is a trend toward domain-specific languages, but we already have many good choices for scripting languages that could be employed to be much more capable than any sort of gcode extension could ever be. Of course, I typically use low-end CAM or write gcode generators, and I am a relative LinuxCNC newbie, so perhaps I am not understanding the use case for an incrementally better custom gcode vs. using a mature scripting language. My two cents, Scott On Sat, Feb 4, 2012 at 9:48 PM, Erik Christiansen dva...@internode.on.netwrote: On 04.02.12 16:25, Michael Haberler wrote: This is different from the original language: the pre-oword syntax was context-free, which is why there's a meaningful EBNF in the Tom Kramer report, and working context-free parsers based on ANTLR and bison like here: http://fennetic.net/irc/emc3/src/emc/interpreter/) It is worth noting here that the link points to another grammar which is empty of working gcodes. Look in: http://fennetic.net/irc/emc3/src/emc/interpreter/rs274ngc-flex-bison/parser.ypp Below the top-level block structure, we see grammar for only expressions and parameter settings. Like the empty grammar posted upthread, it is devoid of any grammar for gcodes. After checking both parser.ypp and the lexer (scanner.l) several times, I find that the letter 'G' is passed through, like a dose of epsom salts, without touching the sides. The so-called parser does not even know that a gcode exists. It looks like an Alphabet parser with some expressions. The empty grammars(*1) put up so far look disappointingly like that first 2% of a grammar that a uni student has to whack together in order to pass computer science 101. All the hard work remains to be done. I wonder if there is one out there with any gcodes in it? On 04.02.12 16:25, Kenneth Lerman wrote: The use of matching labels to resolve ambiguity was just a cheap trick to lower the cost of implementation. There is no reason that we should keep the labels on control structures. We should then follow the same rules that C uses. +1 Erik (*1) Empty of any handling of the input. There's not even a yyerror() function to generate syntax error messages. Since a yacc/bison parser calls that function on any syntax error, it's hard to see how these toys can be called a working grammar. -- The Roman Rule The one who says it cannot be done should never interrupt the one who is doing it. -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free
Re: [Emc-users] parsing the current language dialect, and describing as EBNF [Was: question on gcode parsing]
I see no need for anything pythonesk in machine control. This just adds an obscure level of abstraction from the real machine. I too wrote a gcode generator for some of my standard shapes but found it was more elegant to do it in gcode as I could use sensible(ish) variable names. why enter in a form, generate code, transfer, when it is a simple edit to a standard gcode file. Gcode needs bringing up to date we no longer need cater for paper tape. To me your first sentence does not seem congruent with your second. Surely a real scripting language would allow for much more elegance and expressiveness than a gcode language extension. One does not seem necessarily more obscure or abstract than the other to me. Although I must admit I would rather point someone at an existing scripting language tutorial for variables, looping and conditionals than try to explain the LinuxCNC gcode extensions for the same, even with sweeter syntactic sugar. In that sense, using an existing scripting language seems much less obscure. Also, I am not proposing an intermediate step such as filling out a form, generating gcode, etc. The scripting API would be directly interpreted by LinuxCNC, allowing the sort of edit-in-place you describe. Whether it generated gcode or made NML calls (or some other approach) would be an API implementation detail not visible to the person running the program. Hope that helps clarify, Scott -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] question on gcode parsing
I understand where you are coming from. Word order is not important as long as you understand how things will be interpreted, and that understanding matches what actually happens. I think this discussion has ranged across several useful applications for a formalized parser, including: 1) My original intent, which is to clean up and normalize gcode input so that subsequent filters can be much more naive yet still safe. The parser in this case would fail on malformed input, disambiguate lines to make things as clear as possible and normalize output, including things like white space. I could probably achieve my original use case (wrapping a Y axis around an A axis) for my specific input files in a very short python program, and it would serve my purpose. But that is something I wouldn't feel responsible releasing to others (even with caveats) because ultimately the code would be used to move machines, etc. As a result my work would be a development dead end and there would be no benefit to LinuxCNC. I expect there are one-off translation scripts like this all over the place that will never see the light of day because of the lack of robustness. I know I have several. Since I have some modest experience as a software developer writing parsers, this is something (along with the Y-A wrapper filter) I can work on and hopefully contribute back in exchange for all of the benefits I have accrued from LinuxCNC. 2) If this parser/validator existed and was portable, it could be used to verify gcode in general, serving what some developers call a lint function against gcode (http://en.wikipedia.org/wiki/Lint_%28software%29). This might have a positive effect for gcode in the wild, as CAM and motion control developers could check their output and those considering extending the language might realize sooner that there are good and bad ways to extend the language. 3) Further, if the parser/validator was sophisticated enough to understand the LinuxCNC extensions and could be integrated via C/C++, it could be used as a front-end to the LinucCNC gcode interpretation process, hopefully providing more robust parsing and validation, more clear error messages, and better ability for developers to understand and enhance the parsing process. That is the discussion so far at least as far as I understand it. Michael has done a nice job of providing some requirements for case #3, which is probably the hardest case, but those requirements impact how we might go about #1 and #2 as well, in that we would ideally want to pick a parser generator that would let us re-use the grammar. Hope that helps clarify, others please check me if I have this wrong. Scott On Sun, Jan 22, 2012 at 9:09 AM, John Harris jdhhar...@customstage.netwrote: I have followed this thread for a day or two, but I cannot understand what would be achieved by the parsing. The beauty of gcode is its simplicity, a whole block is read and decoded before any action is taken, so why is word order important? Are you looking for: Letter codes without values, or values without letter codes? Wrong type values? Motion with zero speed set? I am currently working on a gcode reader in 'C' for a small 3-axis machine, and wonder if I am missing something? __ John Harris E-Mail jdhhar...@customstage.net On 1/22/2012 2:46 AM, Michael Haberler wrote: Am 22.01.2012 um 04:36 schrieb Scott Hasse: I agree there is a large and difficult problem with respect to the semantic checking if the desire is to assure that a program will run properly. I'm really aiming for a step or two below that, where the code would be parsed, any semantic checks that can be done statically would be done, the words would be re-ordered on the blocks in a standard way, and blocks split up in a standard way to more clearly disambiguate the order of execution. so you're really looking at source-to-source translation and I guess AST rewriting, cool Unfortunately I don't have the C chops to be of much assistance with an interpreter rewrite (I am a Java guy primarily, getting into Python), but -^^^ I'm already sit in that pit I'd be glad to help with work on a common grammar, even though that is only a small part of the problem, as you say. well, my requirements for a vehicle would be roughly like so: - industrial-strength error diagnosis and recovery, LALR(1) capable - can generate a C/C++ scanner/parser from grammer, lexical definition - the parser/scanner can be used from C/C++ or Python - optional parse tree generation a plus - mainstream/widely used code base a plus that probably suggests some bison or byacc base; I'd refrain from a Python-only solution like PLY because that's bound to diverge from the current interpreter since it cant be easily used a frontend; however, there was some discussion about moving the interpreter to fully-Python. I think
[Emc-users] question on gcode parsing
All- I'm thinking about writing some gcode filters for EMC2 in python, and want to make these as robust and flexible as possible. To that end, I'm wondering if there is a typical approach to parsing and validating arbitrary-format gcode into some sort of canonical form so that a text-based approach to transformation could be more generically written. I see there is rs274 python bindings, but the API for that is not clear to me. It seems it is for parsing gcode, but I don't see how I would use it to pretty print or normalize a gcode file for subsequent processing. In particular my first goal is a filter that would take XYZ input and with some parameters (radius, etc.) wrap the Y axis around an A axis. Any advice on that particular problem or alternate approaches is certainly welcome. I've very much enjoying EMC2 and am working on my second machine conversion (an Anilam 3300) using Mesa 5i23 after finishing building and integrating a stepper-based rotary table: http://code.google.com/p/sector67-sandbox/wiki/FourthStepperAxis Thus my need for some software to generate A axis gcode :-) Thanks much! Scott -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] question on gcode parsing
I understand the basic parsing for the majority of common cases can be done fairly easily, but this seems rather error-prone for something that will eventually be moving a machine. I am hoping to build something that is more robust for handling, e.g. inline comments and all of the other special cases present in the specification. I then want to expand it further to perform validation and normalization of the gcode, splitting lines, etc. There is seemingly a grammar for the language that could be used to http://www.isd.mel.nist.gov/documents/kramer/RS274VGER_11.pdf around page 60. Unless something like this exists, my plan would be to use a parser generator like antlr to build a parser using that grammar, and then implement the validation on top of that, verifying using for instance the modal group rules here: http://www.linuxcnc.org/docview/html/gcode_overview.html And ordering things per the actual order of execution rules. My hope is that then I will be able to safely use a simple text-based transformation against the output of this process after the file has been parsed, normalized and validated. I am hoping someone at some point did most of that work, though, in a way that can be used from python in EMC2. Hope that helps clarify, Scott On Sat, Jan 21, 2012 at 1:10 PM, Ed Nisley ed.08.nis...@pobox.com wrote: On Sat, 2012-01-21 at 12:44 -0600, Jon Elson wrote: Every numeric value is preceded by a letter telling what it is. Except in the wonderful world of RepRap, wherein they're now (contemplating?) dual-extruder G-Code with multiple numeric values after the E axis to mix / simultaneously extrude multiple materials: http://reprap.org/wiki/G-code#M160:_Number_of_mixed_materials The E axis must then absorb a linear distance of filament, plus the mix fractions for each material. The RepRap dialect seems to be diverging fairly rapidly from what the LinuxCNC parser understands; in particular, their myriad M codes look like a problem. -- Ed http://softsolder.com -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] question on gcode parsing
In the absence of an existing solution that is basically my plan as stated above with antlr, which can generate a python parser. Although once the grammar is codified, there is no shortage of parser generators that could be applied. Some of the reasons Chris points out above lie at the heart of my motivation as well. Perhaps it is a lost cause, but having some sort of what I would call a gcode lint tool would allow people who sometimes take a naive approach to gcode extension to have an reality check. I can certainly say I didn't think there was actually a gcode specification until long after I was exposed to various flavors of gcode in the wild. I think that is probably common, but perhaps not good for consistency of extension. The rs274 bindings seem interesting but from what I can tell are geared toward generating motion type commands (and backplots), and as a native binding don't really lend themselves well to being a portable parser/verifier. Appreciate the input from all so far! Scott On Sat, Jan 21, 2012 at 7:36 PM, Michael Haberler mai...@mah.priv.atwrote: On Sat, Jan 21, 2012 at 12:44:14PM -0600, Jon Elson wrote: G-code is extremely easy to parse. Every numeric value is preceded by a letter telling what it is. The LinuxCNC dialect is a context-free language at least with respect to expressions and control structures and as such cannot be parsed with regular expressions, or by looking at letters (which is equivalent to regexes in expressive power). to build a parser, the best route IMO would be to use a flex/bison type tool combination for C/C++; for Python tools can be found here: http://wiki.python.org/moin/LanguageParsing (unsure what would be the tool of choice these days; Yapps is already used for comp in LinuxCNC) It would be useful longer term to have such a grammer scanner combination to serve both as a concise executable language definition, and as a basis for both LinuxCNC and other tools (like CAM programs) as well. -- to just parse a program for backplot-type purposes, you might look into using the rs274ngc module which sports Python callbacks for machine primitives. An example can be found here: http://git.mah.priv.at/gitweb/rs274-python.git - Michael -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] integrating a spindle fault signal in a modular way?
Ugh... I realized I was trying to reply on this thread from a different email account and the mails didn't come through. In any case, I ended up solving this with a classicladder program for estop and a separate one to delay the spindle fault estop signal until one second after the machine was on. This allowed the Anilam 240V contactors to power up the VFD so it was able to report un-faulted. This is documented some more here: http://code.google.com/p/sector67-sandbox/wiki/1100SpindleBlok#Integration_stage_1:_spindle_controller_fault Thanks all very much for the solid advice. Scott On Wed, Nov 9, 2011 at 3:17 PM, Thomas Powderly tomp4...@gmail.com wrote: On 11/8/11, Karl Cunningham ka...@keckec.com wrote: On 11/06/2011 08:36 PM, Scott Hasse wrote: It seems the normal way to do this would be to take the input to the existing estop-ext signal put that into an or or component and link that with the spindle fault and the link the or component to the estop-ext. However, that can't be done in a very modular way from what I can see. Any opinions on the best way to integrate multiple external estop signals? We have a spindle VFD which faults every few hours. We really need a new one, but that will come. Not sure the cause, but there are electric trains nearby and we suspect power surges may be the problem. Or maybe just a flaky VFD. The VFD has a fault relay which has NC and NO contacts. We wired one of the contacts to motion.enable, like this: net vfd-ok motion.enable = hm2_5i20.0.gpio.052.in_not We also have a pushbutton called RESET in the pyvcp panel of axis, which drives the VFD's reset line. When there is a fault it halts motion, and after pressing F2 in axis and the reset button on the panel, it can be restarted. Not sure if this is optimal, but it seems to work ok. I'm not sure if this would work with the vault logic your VFD has. Karl -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
[Emc-users] integrating a spindle fault signal in a modular way?
I am working on the finishing touches of an Anilam 1100 knee mill conversion to EMC2, with details here: http://code.google.com/p/sector67-sandbox/wiki/ProjectSheetCake Over the last couple of months our spindle VFD (a Compumotor SpindleBlok) has faulted 5 or 6 times (a description of that particular problem can be found at http://code.google.com/p/sector67-sandbox/wiki/1100SpindleBlok, but that is not really central to the issue). The spindle and EMC2 to this point have not been integrated at all. However, I am hoping to integrate a spindle fault signal to put EMC2 to an estop state, or to at least stop milling. This has been somewhat complicated as the previous Anilam system simply switched 240V on and off to the spindle on machine enable. The 240V also powers the VFD logic, and so when the machine is off it appears to be in the faulted state. I've worked through this particular problem by creating a classicladder program that takes in a delayed enable signal as input and my custom spindle-fault as an input and outputs a signal that appropriate signals a spindle fault when the machine is enabled. So far so good. Now, I want to integrate that spindle faulted signal into EMC2 and am somewhat struggling with the best way to do that. The machine is a CNC mill for a hacker space and we'll likely be running it in multiple configurations, e.g. normal 3-axis milling, different 4th rotary axis configurations, etc. I am hoping to make the configuration somewhat modular so that alternative configurations don't have to be copy and paste but rather can include files as needed. I've been using the hal source filename command to include other files with custom hal commands (an analog joystick jog and a custom servo-reset signal that Anilam used), and this has so far worked to make the configuration somewhat modular. Now I find myself with two ladder logic programs and needing to add a new way to get to the estop state. I don't seem to be able to determine a clean, modular way to do that. I can run the two classicladder programs in one file and hook up the inputs and outputs as necessary of course, and that is not such a big deal (but if there was a way to load individual classicladder programs that would be great). However, the bigger challenge is now to add a new way to get the machine to estop when the spindle faults. It seems the normal way to do this would be to take the input to the existing estop-ext signal put that into an or or component and link that with the spindle fault and the link the or component to the estop-ext. However, that can't be done in a very modular way from what I can see. Any opinions on the best way to integrate multiple external estop signals? Thanks in advance, Scott -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Mesa 5i23/7i33TA servo instability question
No problem at all. PNCconf was still an absolute time saver, and this issue was a good reason to get more into some lower-level aspects of EMC2. I now understand PID feedback a lot better than I did before, and I think that knowledge will serve me very well as I complete this conversion project. I'll definitely check out the buildbot system and look to update. Thanks! Scott On Thu, Aug 18, 2011 at 11:10 PM, Chris Morley chrisinnana...@hotmail.comwrote: Sorry, for the record I'll try to be as clear as possible. I have confirmed the fix. When using pncconf with version 2.4.3, I needed to invert the motor signal as determined in the open loop pncconf test. This was also causing the MAX_OUTPUT parameter to be set to negative for that axis. Manually changing the ini file to have a positive MAX_OUTPUT resolved the issue. Thanks to all who helped resolve this. Glad you got it Scott and sorry PNCconf sent you down the river without a paddle - though you are using a pretty old version. one pretty painless way to use a more current version is to use the buildbot. http://buildbot.linuxcnc.org/ There you can get the latest bug fixes for your current version (2.4.7 actually not released yet) or you could checkout the soon to be released 2.5 version. Chris M -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Mesa 5i23/7i33TA servo instability question
Jon: That indeed does sound like a good plan. I should have some time to try that tonight. I believe my hal configuration does have all that set properly, but I will double check. Peter: Agreed, I will check the feedback direction Andy: I should have clarified this better. When things are correct, X+ does indeed move the table left. I guess the it I was referring to was the fixed tool head relative to the table :-S. John: The encoder does not go to the servo amp, only EMC2/Anilam depending on what is hooked up. Photos would be great, and I'll try to get some up as well some point soon. One hopefully quick question I have is with respect to the PID P parameter. Everything I've seen seems to indicate this should be a positive number in the EMC2 configuration. Is that correct? Thanks, Scott On Thu, Aug 18, 2011 at 6:28 AM, John Thornton bjt...@gmail.com wrote: Scott, it does sound like you have exact same 1100M package as me. I was lucky when I purchased mine and a friend from Florida had the phone number for the Anilam Service Tech when I had a tuning problem. He spent 45 minutes on the phone with me tuning the amps mostly with a voltmeter and a screwdriver. I'm going to the other shop today (where the Anilam is located) and I'll bring my notes back that I tried to take while talking on the phone and tuning the amps. There might be some useful info on the amps in there. I've not looked as close at mine as you have but the encoder is shared by both the drive and the controller? I'll take some photos of my cabinets and put them on the forum later. John On 8/17/2011 2:48 PM, Scott Hasse wrote: John: Thanks, I'm hoping the documentation will turn out to be useful. We got the mill second or third hand, so we don't have the conversion information. Do you know if you can see the tuning parameters in the Anilam control software? Even with the following error at 1 inch it eventually hits following error. This Anliam mill has the velocity feedback going directly to the servo amps, both for EMC2 and Anilam control (I did not change that wiring). I have rotary encoders only. -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Mesa 5i23/7i33TA servo instability question
That was absolutely the bug I was hitting. After manually changing the I'm now moving forward with the PID tuning! Thanks all! Scott On Thu, Aug 18, 2011 at 8:18 PM, Scott Hasse scott.ha...@gmail.com wrote: I'm running 2.4.3 per the live CD. I'll try manually making the max output positive again manually. Scott On Thu, Aug 18, 2011 at 7:18 PM, Chris Morley chrisinnana...@hotmail.comwrote: You might check whether pncconf is producing the proper polarity in the INI file for INPUT_SCALE (for the encoder) and OUTPUT_SCALE (for the PWM servos). I believe there was a bug in an earlier version of pncconf. I ran into that and had to edit the INI file by hand to make both values negative, which was required for my setup. Karl There indeed was a bug in PNCconf that would not negate the encoder scale. That was fixed in 2.4.5 There also was a bug that would create a following error if one inverted the motor direction as it would negate the max output setting too. also fixed in 2.4.5 I asked earlier but I'm not sure you answered Scott. What version of EMC are you using? Chris M -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Mesa 5i23/7i33TA servo instability question
Sorry, for the record I'll try to be as clear as possible. I have confirmed the fix. When using pncconf with version 2.4.3, I needed to invert the motor signal as determined in the open loop pncconf test. This was also causing the MAX_OUTPUT parameter to be set to negative for that axis. Manually changing the ini file to have a positive MAX_OUTPUT resolved the issue. Thanks to all who helped resolve this. Scott On Thu, Aug 18, 2011 at 8:26 PM, Scott Hasse scott.ha...@gmail.com wrote: That was absolutely the bug I was hitting. After manually changing the I'm now moving forward with the PID tuning! Thanks all! Scott On Thu, Aug 18, 2011 at 8:18 PM, Scott Hasse scott.ha...@gmail.comwrote: I'm running 2.4.3 per the live CD. I'll try manually making the max output positive again manually. Scott On Thu, Aug 18, 2011 at 7:18 PM, Chris Morley chrisinnana...@hotmail.com wrote: You might check whether pncconf is producing the proper polarity in the INI file for INPUT_SCALE (for the encoder) and OUTPUT_SCALE (for the PWM servos). I believe there was a bug in an earlier version of pncconf. I ran into that and had to edit the INI file by hand to make both values negative, which was required for my setup. Karl There indeed was a bug in PNCconf that would not negate the encoder scale. That was fixed in 2.4.5 There also was a bug that would create a following error if one inverted the motor direction as it would negate the max output setting too. also fixed in 2.4.5 I asked earlier but I'm not sure you answered Scott. What version of EMC are you using? Chris M -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Mesa 5i23/7i33TA servo instability question
I'm in the shop working on this right now and am wondering how to verify the PID loop is providing feedback to each axis. I've been using pncconf to generate the configuration, and assumed since it allows you to set PID that it would configure it to feedback automatically. However, since I've been using pncconf as a crutch, I'm not sure off-hand how to config PID feedback is working. I see P, I, D values in the ini file for each axis, but I am still seeing small amounts of servo instability. I see the instability even with the servo signal grounded. I have followed this page: http://wiki.linuxcnc.org/emcinfo.pl?Tuning_EMC2/HAL_PID_Loops and verified that the output voltages are correct, but get stumped at the: Set up PID loop add the loop and interconnect step. Thanks in advance for any advice, Scott On Wed, Aug 17, 2011 at 7:55 AM, John Thornton bjt...@gmail.com wrote: The 1100M came both ways with glass scales (earlier model) then with encoder feedback. Mine is the encoder variety of 1100M. John On 8/17/2011 7:28 AM, andy pugh wrote: On 17 August 2011 04:15, Scott Hassescott.ha...@gmail.com wrote: To the point, though, I am having one not-so-minor problem. When I enable the servos, they are not completely stable, and I'll get following error almost immediately after enabling them. They don't run away, but the encoders show them moving ever so slightly, and physically the motors actually are moving. Are you retaining the velocity feedback to the amps, so that they run an internal velocity loop, and then you use velocity commands to close your position loop based on the encoders? The previous Anilam system I chatted to someone about had velocity tachs on the motors and linear scales, no rotary encoders. So, in Anilam control is the feedback from linear scales, and encoders in EMC2 mode? -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Mesa 5i23/7i33TA servo instability question
I typed this up last night but realized I forgot to send it: Thanks to all for the feedback so far. I'll try to answer all the questions in one thread: Peter: The servos are not getting enabled too soon, in fact they are getting enabled later than is typical due to an extra servo reset signal that emulates previous Anilam behavior and sets up a hardware-level relay latch that allows estop and limit switches to disable the servos in hardware. However, I have not tuned PID at all (I currently have the pncconf defaults), so that is likely my problem. I was using the pncconf wizard, so it was open loop. Grounding the servo input is a great idea as a diagnostic. If I make ferror larger it will eventually hit even that limit and go to a machine off state. I do believe I have the servo amp ground and shield both grounded. I'll measure cable power to see if I should switch it. Karl: It is possible there is some offset, but trying to tune that out with pncconf (DAC offset I believe) showed that it was not a fixed value. Since this system is fine with the Anilam controls, I am thinking it is probably ok, but I'll try shorting the servo amp inputs (in a safe way of course), to see if the drives move. I definitely don't have a reasonable Igain as I am currently at pncconf defaults, so that needs to be tested. The drives are physically moving and the chance for encoder noise should be low, but that can be tested as well. Interesting thoughts on applying a load, I'll try that if the PID tuning does not work. Chris: Thanks, I will definitely add a link once the docs are finished. You are correct that I don't have the encoders scaled properly, and that needs to be done. I'm looking to get that done soon, and will use your suggested technique to determine the encoder count. Mark: Thanks, pictures are definitely coming to the wiki page. Agreed about this group being great. John: Thanks, I'm hoping the documentation will turn out to be useful. We got the mill second or third hand, so we don't have the conversion information. Do you know if you can see the tuning parameters in the Anilam control software? Even with the following error at 1 inch it eventually hits following error. This Anliam mill has the velocity feedback going directly to the servo amps, both for EMC2 and Anilam control (I did not change that wiring). I have rotary encoders only. Thanks to all for the solid advice! Looking forward to taking this conversion forward! My current plan is to first try PID tuning for real, and see what kind of effect that has. Scott On Wed, Aug 17, 2011 at 7:55 AM, John Thornton bjt...@gmail.com wrote: The 1100M came both ways with glass scales (earlier model) then with encoder feedback. Mine is the encoder variety of 1100M. John On 8/17/2011 7:28 AM, andy pugh wrote: On 17 August 2011 04:15, Scott Hassescott.ha...@gmail.com wrote: To the point, though, I am having one not-so-minor problem. When I enable the servos, they are not completely stable, and I'll get following error almost immediately after enabling them. They don't run away, but the encoders show them moving ever so slightly, and physically the motors actually are moving. Are you retaining the velocity feedback to the amps, so that they run an internal velocity loop, and then you use velocity commands to close your position loop based on the encoders? The previous Anilam system I chatted to someone about had velocity tachs on the motors and linear scales, no rotary encoders. So, in Anilam control is the feedback from linear scales, and encoders in EMC2 mode? -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Mesa 5i23/7i33TA servo instability question
OK, so this has turned into a more interesting problem than I initially thought it would be. I've used halmeter to verify that, for instance, pin pid.x.enable is indeed getting enabled when the machine gets to the on state. Additionally, the pid.x.output becomes non-zero after the machine is turned to the on state, so I believe EMC2 for some reason thinks the motor needs to move. One odd thing is that I have triple verified in the pncconf open loop test that pressing + moves the table in the X+ direction and the encoders reflect positive movement. Negative moves the table in the X- direction and the encoders reflect negative movement. My encoders might not be absolutely scaled correctly, but they are in the ballpark. This correct configuration requires me to have the motor directions reversed. Under that configuration the mill wants to run away fairly rapidly. However, when the directions are aligned such pressing - in the pncconf open loop test actually moves it in a X+ direction, it reaches a following limit but not nearly as rapidly. With the servo amp input signal grounded, the axes do indeed move a tiny amount, but my understanding is that is OK and the the EMC2 PID feedback loop should correct that. I've put the full pncconf, hal and ini configuration files under revision control here: http://code.google.com/p/sector67-sandbox/source/browse/trunk/ProjectSheetCake/#ProjectSheetCake%2Femc2-configs%2Fpncconf The configs are 100% generated via pncconf, no hand-editing. This one for now has me stumped, so I'll have to sleep on it. Again, thanks all for the great advice. I still suspect I have a simple problem, but I cannot figure out what. Scott On Wed, Aug 17, 2011 at 4:03 PM, James Louis james.lo...@gastechnology.orgwrote: Scott, You got a lot of replies on a topic with a lot of fog surrounding it, but I need to chime in here so you don't repeat my mistake: I broke a motor coupling about a year ago during servo tuning. The sound almost scared the coolant out of me! I am no controls expert, but I now know why it happened. It was because I didn't model my own system before blindly tinkering with the ini file. Before doing anything I would advise knowing your Anilam servo amps. For example, my Yaskawa servo amps close a current loop internally, then have a velocity loop outside of that with adjustable P and I (via autotuning). EMC2 then closes the outermost position loop using only P and FF1. This is known as a P/PI Cascade Loop with Velocity Feed Forward. The I and D terms in my ini file remain at zero! It took a lot of reading outside of EMC2 documentation to cut through the fog, but it is now clear to me. There are several possible ways of nesting loops and combining control terms beside PID, so don't fall for the add a little of this and then a little of that approach. Jim -Original Message- From: Scott Hasse [mailto:scott.ha...@gmail.com] Sent: Wednesday, August 17, 2011 2:32 PM To: Enhanced Machine Controller (EMC) Subject: Re: [Emc-users] Mesa 5i23/7i33TA servo instability question I'm in the shop working on this right now and am wondering how to verify the PID loop is providing feedback to each axis. I've been using pncconf to generate the configuration, and assumed since it allows you to set PID that it would configure it to feedback automatically. However, since I've been using pncconf as a crutch, I'm not sure off-hand how to config PID feedback is working. I see P, I, D values in the ini file for each axis, but I am still seeing small amounts of servo instability. I see the instability even with the servo signal grounded. I have followed this page: http://wiki.linuxcnc.org/emcinfo.pl?Tuning_EMC2/HAL_PID_Loops and verified that the output voltages are correct, but get stumped at the: Set up PID loop add the loop and interconnect step. Thanks in advance for any advice, Scott On Wed, Aug 17, 2011 at 7:55 AM, John Thornton bjt...@gmail.com wrote: The 1100M came both ways with glass scales (earlier model) then with encoder feedback. Mine is the encoder variety of 1100M. John On 8/17/2011 7:28 AM, andy pugh wrote: On 17 August 2011 04:15, Scott Hassescott.ha...@gmail.com wrote: To the point, though, I am having one not-so-minor problem. When I enable the servos, they are not completely stable, and I'll get following error almost immediately after enabling them. They don't run away, but the encoders show them moving ever so slightly, and physically the motors actually are moving. Are you retaining the velocity feedback to the amps, so that they run an internal velocity loop, and then you use velocity commands to close your position loop based on the encoders? The previous Anilam system I chatted to someone about had velocity tachs on the motors and linear scales, no rotary encoders. So, in Anilam control is the feedback from linear scales
[Emc-users] Mesa 5i23/7i33TA servo instability question
All- I'm about a month into retrofitting an older Anilam 1100M 3-axis mill to EMC2 using a Mesa 5i23 PCI board with a 7i33TA for servo interfacing and 7i37TA for general I/O. I'm documenting the build here: http://code.google.com/p/sector67-sandbox/wiki/ProjectSheetCake with my build notes here: http://code.google.com/p/sector67-sandbox/wiki/SheetCakeBuildLog although my documentation is a work in progress, you can get a feel for where I am at with this project. It's volunteer work for a hackerspace and eventually EMC2 is going to enable us to do all sorts of interesting stuff with this hardware. I have been extremely impressed with the overall maturity and capability of the EMC2 ecosystem. The live CD was an absolute time saver and wonderful resource. The sample configurations got me basically going out of the box, pncconf has been unbelievably helpful as I've advanced in what is hooked up, and halmeter and halscope are pure genious. Great job to all involved, and I hope to do my small part by documenting another mill conversion in (hopefully) very accessible detail. To the point, though, I am having one not-so-minor problem. When I enable the servos, they are not completely stable, and I'll get following error almost immediately after enabling them. They don't run away, but the encoders show them moving ever so slightly, and physically the motors actually are moving. The Anilam system I'm converting is a servo drive with velocity feedback directly to the servo amps and rotary encoder output that I've wired to the 7i33TA board. The servo amps take +/-10V for direction and velocity. I can move the axis using the pncconf tuning page, and have tried to stabilize them using the DAC compenstation, but there is not a fixed amount of DAC compensation that seems to work. The Anilam controls still work perfectly fine and the servos are stable when that control is running. I suspect a problem like ground differential, but the cable to the servo amp has ground, signal and shielding, so I was thinking I should be OK. Despite the schematic on the wiki above, I am not powering the 7i33TA or 7i37TA on-board, but instead am using cable power (but I believe that is the only inaccuracy in the schematic). The 50 pin ribbon cables are ~3 feet. Would it be better to power the boards from the 5V supply already in the chassis? Is this a problem that can be solved with PID tuning? Has anyone seen anything like this? I've searched the email list and have not been able to find anyone with the same problem. Thanks very much in advance, Scott -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users