Re: [Emc-users] Stepper configuration
Jon Elson wrote: Sebastian Kuzminsky wrote: If I disable the steppers on the 7i43 (with config=num_steppers=0) and run it with 4 servo channels (and 24 accessible GPIOs), I get these figures: read time=191, tmax=203 write time=190, tmax=239 That's about 1 KHz. Very interesting! I wonder if you can improve this by streamlining the driver. I can do 4 axes on my USC or UPC board at about 100 us, on a 600 MHz Pentium II through the motherboard parallel port. A safe 5 KHz. Yeah something's not right there, 190 us is way too long. Hm, these numbers come from 'halcmd show param hm2_7i43.*.time', which I thought was in nanoseconds, but looking at hal_lib.c I see that it's in CPU clock cycles. Is that intentional? In hal_lib.c's thread_task(), it calls rtapi_get_clocks() instead of rtapi_get_time(). http://cvs.linuxcnc.org/cvs/emc2/src/hal/hal_lib.c?rev=1.59 Mine's a 2.6 GHz CPU, so 190 cycles is about 74 microseconds. With the 50% margin we've been working with that's 3 KHz, which is a little better. Each EPP cycle takes right around 1 us on my test system. read() does this: 2 write-address cycles (address gpio data register) 8 read-data cycles (read two 4-byte gpio registers, 24 pins on each) 2 write-address cycles (address encoder count register) 16 read-data cycles (read four 4-byte encoder count registers) That's 28 EPP cycles total, so even counting time correctly it should be *much* faster than 75 us... Oh, hm, I had two threads running, both doing EPP I/O (with the spinlock cli functions Paul suggested). If I move all the I/O into one thread it's much faster. Strange. Oh I think I see, if a function in a slow thread is preempted by a faster (higher-priority) thread, then the time that the lower-priority function spends blocked still counts. Oh yeah, and I was doing some I/O to the 5i20 at the same time, that'll worsen the preemption perturbation some. Ok, nice to have all that out of the way. Now here are some new numbers for just the 7i43, with all I/O from one thread (so there should be little or no time spent blocking on faster threads), and the numbers are actually reported in microseconds now instead of cycles. 7i43: pet_watchdog(): 21 us read() 4 encoder counts 48 gpios (only 24 usable): 43 us write() 4 pwmgen duty-cycles 48 gpios (only 24 usable): 40 us So that's 4-channel servo control at 4.8 KHz, with 50% of the CPU time left over for pid in emc2, GUIs, etc. Drop the watchdog (not that you should) and it goes up to 6 KHz. For GPIO only: pet_watchdog(): 21 us read_gpio (48 gpios): 15 us write_gpio (48 gpios): 15 us So that's just under 10 KHz, or 16+ KHz if you dont need the watchdog. Whew, that's a bit better -- Sebastian Kuzminsky Cryogenic travel has improved since then... I woke screaming in a translucent box. “There, there,” said the box. “Everything will be all right. Have some coffee.” -- Ken Macleod, Who's afraid of Wolf 359 http://outofthiseos.typepad.com/blog/files/KenMacleodWhosAfraidofWolf359.htm - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Repost: Teach with joystick. (Welding)
A more elegant solution based on the same principle if you need a continuous track would be to generate a probe hit signal when the the current position has moved more than XX units from the previous position. That way you don't generate uneeded points when standing still/moving slowly and they won't be too coarse when moving quickly. Something like that should be implementable in HAL, right? (Some variables for the last recorded position, compared with the current position and some logic elements). Jonathan On Wed, Aug 13, 2008 at 2:46 AM, Bjørn Kristiansen [EMAIL PROTECTED] wrote: Hi. i have been playing with the tougth for a while, can you use the probe function. in my case move to a position press a button conected to probe in to record the coordinates and then go on to the next poss.. or if you ned a track just get a switching signal to the probe pin, and then if you adjust the speed of the switcing you would get as many coordinates as you need to get a smooth mowement to a robot. could i be on to somehing?? Bjørn. ti., 12.08.2008 kl. 12.29 -0400, skrev Organic Engines: Hi Craig, 1. Software to Generate basic G-code from a sequence of positions should not be a very difficult problem. I was thinking there would need to be a time component though. A click track. 2. It would seem to me that welding a good bead (not spot welding) would require either very consistent materials or some feedback on puddle properties. Puddle properties could be measured from a visual and/or IR image. Measuring welding voltage/current might also be useful. (It has been some years since I considered this problem, so good technical solutions may since have been found.) Craig Yeah, consistent materials and a solid jig is what I am hoping will do the trick. Weld seam tracking and all that jazzy stuff is probably overkill, but can be added if necessary. I think if EMC can record my welding with the joysticks accurately enough, dwell this long at this amperage, feed this much wire, etc. all will be well. Dan. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
[Emc-users] R: New user new problem
Emm yes and no My cnc mount a Kress and it dont have a rapid change tool, when emc2 find M6 pause the program, i change tool, but the new tool isnt to zero. Whit a collet I can do the change correctly, but Im more happy if I find an automatically zero tool procedure whit a switch/probe. Whit g38.2 the tool go down to probe, but g38.2 dont set the zero tool Tanks for attention. -Messaggio originale- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Per conto di Sven Wesley Inviato: mercoledì 13 agosto 2008 1.28 A: Enhanced Machine Controller (EMC) Oggetto: Re: [Emc-users] New user new problem Isn't this Tool Lenght Compensation/Tool Offset? --Sven - Original Message - From: snoopy mailto:[EMAIL PROTECTED] To: emc-users@lists.sourceforge.net Sent: Tuesday, August 12, 2008 6:34 AM Subject: [Emc-users] New user new problem Hi, i am a new Italian Emc user (sorry for english), i have a problem: Can I, when emc change tool give o the new tool a new zero? - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Parallel Port Test
Andy, This link shows how to connect leds to the parallel port for testing. http://www.epanorama.net/circuits/parallel_output.html I took a printer cable and hacked one end off and used that when I was testing my parallel port. Then when I got my BOB with leds from CNC4PC testing was easy. John On 12 Aug 2008 at 9:24, Andrew Ayre wrote: Hi, Is there an easy way of testing the parallel port without having an oscilloscope? A friend's controller board started smoking (Z axis driver chip) and now none of the axis work. It's pretty easy to replace chips, check solder joints, etc. but how to test the parallel port? thanks, Andy -- Andy PGP Key ID: 0xDC1B5864 -- --- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] R: New user new problem
On Wed, Aug 13, 2008 at 10:33:00AM +0200, snoopy wrote: Whit a collet I can do the change correctly, but I?m more happy if I find an automatically zero tool procedure whit a switch/probe. http://cvs.linuxcnc.org/cvs/emc2/nc_files/tool-length-probe.ngc?rev=1.4 This Gcode program shows how I do that. This sample file is also in the EMC2 distribution. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Stepper configuration
Sebastian Kuzminsky wrote: Jon Elson wrote: Sebastian Kuzminsky wrote: If I disable the steppers on the 7i43 (with config=num_steppers=0) and run it with 4 servo channels (and 24 accessible GPIOs), I get these figures: read time=191, tmax=203 write time=190, tmax=239 That's about 1 KHz. Very interesting! I wonder if you can improve this by streamlining the driver. I can do 4 axes on my USC or UPC board at about 100 us, on a 600 MHz Pentium II through the motherboard parallel port. A safe 5 KHz. Yeah something's not right there, 190 us is way too long. Hm, these numbers come from 'halcmd show param hm2_7i43.*.time', which I thought was in nanoseconds, but looking at hal_lib.c I see that it's in CPU clock cycles. Is that intentional? Yes - it was changed at rev 1.31 of hal_lib.c. We found that the RTAI function invoked by rtapi_get_time was incredibly slow - in some cases it was taking several times longer to run than the code that it was timing. In hal_lib.c's thread_task(), it calls rtapi_get_clocks() instead of rtapi_get_time(). http://cvs.linuxcnc.org/cvs/emc2/src/hal/hal_lib.c?rev=1.59 Unfortunately, conversion from clocks to time is non-trivial, so we simply report the results in clocks. The situation is getting worse, not better. In the name of progress, we now have to deal with CPUs that change their clock frequencies on the fly. I've even heard a report that on some modern CPUs, the TSC can no longer even be counted on to be monotonic. Regards, John Kasunich - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Parallel Port Test
Thanks Alex and John for the suggestions. I will pass them along! :) Andy John Thornton wrote: Andy, This link shows how to connect leds to the parallel port for testing. http://www.epanorama.net/circuits/parallel_output.html I took a printer cable and hacked one end off and used that when I was testing my parallel port. Then when I got my BOB with leds from CNC4PC testing was easy. John On 12 Aug 2008 at 9:24, Andrew Ayre wrote: Hi, Is there an easy way of testing the parallel port without having an oscilloscope? A friend's controller board started smoking (Z axis driver chip) and now none of the axis work. It's pretty easy to replace chips, check solder joints, etc. but how to test the parallel port? thanks, Andy -- Andy PGP Key ID: 0xDC1B5864 -- --- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- Andy PGP Key ID: 0xDC1B5864 - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Stepper configuration
Sebastian Kuzminsky wrote: Yeah something's not right there, 190 us is way too long. Hm, these numbers come from 'halcmd show param hm2_7i43.*.time', which I thought was in nanoseconds, but looking at hal_lib.c I see that it's in CPU clock cycles. Is that intentional? In hal_lib.c's thread_task(), it calls rtapi_get_clocks() instead of rtapi_get_time(). http://cvs.linuxcnc.org/cvs/emc2/src/hal/hal_lib.c?rev=1.59 Mine's a 2.6 GHz CPU, so 190 cycles is about 74 microseconds. With the 50% margin we've been working with that's 3 KHz, which is a little better. Ahh, I measure this stuff with a logic analyzer. But, those numbers seem much more reasonable! (Darn, thought I had a competitive advantage, he he!) Each EPP cycle takes right around 1 us on my test system. I can get down to about 800 ns with mo-bo parport, and 640 or so with a PCI parport. Jon - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Repost: Teach with joystick. (Welding)
Hi All, I occurred to me that all you need to do is poll your positions once a second and then construct a G01 from that. For the feed rate use G93 F60, inverse time, so it completes the move in one sixtieth of a second. I think a one second position update interval will work fine for welding, but it could be any speed. Does this sound workable? Dan - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Stepper configuration
Jon Elson wrote: Sebastian Kuzminsky wrote: Yeah something's not right there, 190 us is way too long. Hm, these numbers come from 'halcmd show param hm2_7i43.*.time', which I thought was in nanoseconds, but looking at hal_lib.c I see that it's in CPU clock cycles. Is that intentional? In hal_lib.c's thread_task(), it calls rtapi_get_clocks() instead of rtapi_get_time(). http://cvs.linuxcnc.org/cvs/emc2/src/hal/hal_lib.c?rev=1.59 Mine's a 2.6 GHz CPU, so 190 cycles is about 74 microseconds. With the 50% margin we've been working with that's 3 KHz, which is a little better. Ahh, I measure this stuff with a logic analyzer. But, those numbers seem much more reasonable! (Darn, thought I had a competitive advantage, he he!) Just to keep the record straight, that 74 us number is high too - it includes 30 or so microseconds of a higher-priority thread sampling all the gpios (in addition to the servo thread doing it). The actual frequency, once I figured out how to measure it properly, is right at 5 KHz. Each EPP cycle takes right around 1 us on my test system. I can get down to about 800 ns with mo-bo parport, and 640 or so with a PCI parport. I get quite a bit of jitter on my on-board parport. Uploading 128 KB of firmware goes anywhere from 850 KBps to 1.1 MBps. Contention on the PCI bus maybe? There's a wifi card and a bunch of other stuff there. I have a plug-in PCI parport card, but I haven't gotten it to work yet... -- Sebastian Kuzminsky Cryogenic travel has improved since then... I woke screaming in a translucent box. “There, there,” said the box. “Everything will be all right. Have some coffee.” -- Ken Macleod, Who's afraid of Wolf 359 http://outofthiseos.typepad.com/blog/files/KenMacleodWhosAfraidofWolf359.htm - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Stepper configuration
On Wednesday 13 August 2008, John Kasunich wrote: Unfortunately, conversion from clocks to time is non-trivial, so we simply report the results in clocks. (get_cycles()*10^6)/cpu_khz Is that non-trivial ?? The situation is getting worse, not better. In the name of progress, we now have to deal with CPUs that change their clock frequencies on the fly. You need to read the RTAI docs again - Disabling CPU_FREQ is *strongly* recommended because it messes up realtime response. But if you have disabled all power management, that option will not be available. I've even heard a report that on some modern CPUs, the TSC can no longer even be counted on to be monotonic. Almost correct - What happens with multiple processors is the TSC drifts slightly, however, recent developments in the kernel RT patches periodically resyncronise the TSCs. Disregarding TSC drift, the value returned will be accurate enough for your needs. --- Paul. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
[Emc-users] Jog speeds in Axis 2.2.6
On a machine that has rather different axes, with different maximum velocities, I find it inconvenient that Axis (as I know how to use it) seems to read only one value for MAX_LINEAR_VELOCITY from the [TRAJ] section of the .ini file and uses this to determine the Jog Speed range for all 3 axes (of a simple 3 axis stepper setup).Is it possible to configure Axis, through the .ini file to have different maximum Jog Speeds, one for each axis? This would let me jog my fast axes briskly, without the risk of losing steps on my slow one. Right now I have to set a MAX_LINEAR_VELOCITY appropriate to the slowest axis, which is a pain. [EMAIL PROTECTED] - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Stepper configuration
On Thursday 14 August 2008 03:23, Kirk Wallace wrote: snipped Are there other CPU's that would better cater to realtime? Some sort of lean, fast RISC, not designed to cope with Windows upgrades. There are a bunch out there, just look at the number of archs that debian is available for. It will take one of the gurus to tell which might handle realtime better? Right now my desk Linux box is a HP PA-RISC box, _very_ reliable and built like a brick outhouse :-). Cheers, Geoff. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] R: New user new problem
Thats where I saw it! Sure it's not a fancy automated function implemented as a feature in EMC but the variables are there to make it possible. Thanks for the link Chris - my machine is covered with some tarps right now and the dual boot system is in Billy Goat mode crunching away at video recording/compression/burn cycle so it would have taken some time for me to find it in the samples. Snoopy - I hope that helps and makes sense to you - all it is doing is taking the value that is probed at the start (and each successive time) and using that as an add/subtract to calculate the new offset to find the new Z zero and allow you to move onto the next cutting operation with the correct tool length set. Read the documentation about variables and I think you'll understand what his code is doing. You'd need to insert that manually into any G-code you generate (I believe Cambam (what I use) lets you add G code routines into the MOP tree so saving the code for insertion whenever you start a new operation with a different tool should be fairly easy - otherwise there's always the text editors (see the other threads that have sprung up recently about those...)). Greg www.distinctperspectives.com - Original Message - From: Chris Radek To: Enhanced Machine Controller (EMC) Sent: Wednesday, August 13, 2008 8:01 AM Subject: Re: [Emc-users] R: New user new problem On Wed, Aug 13, 2008 at 10:33:00AM +0200, snoopy wrote: Whit a collet I can do the change correctly, but I?m more happy if I find an automatically zero tool procedure whit a switch/probe. http://cvs.linuxcnc.org/cvs/emc2/nc_files/tool-length-probe.ngc?rev=1.4 This Gcode program shows how I do that. This sample file is also in the EMC2 distribution. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database: 270.6.1/1608 - Release Date: 8/12/2008 4:59 PM - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Repost: Teach with joystick. (Welding)
Typo Alert! I occurred to me that all you need to do is poll your positions once a second and then construct a G01 from that. For the feed rate use G93 F60, inverse time, so it completes the move in one sixtieth of a second. Edit..one sixtieth of a minute I think a one second position update interval will work fine for welding, but it could be any speed. Does this sound workable? Dan - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Repost: Teach with joystick. (Welding)
Yes i agree, that would have been ewen better as you tend to go slow in compex mowements, but then again the track would be better when the mowements are compex and more coarce if you are going fast straight foreward, a solution for the standstills is too just stop the clock if there are no mowement. i think i hawe too play a litle with this too se how it works.. Bjørn.. on., 13.08.2008 kl. 09.36 +0200, skrev Jonathan / Hydra: A more elegant solution based on the same principle if you need a continuous track would be to generate a probe hit signal when the the current position has moved more than XX units from the previous position. That way you don't generate uneeded points when standing still/moving slowly and they won't be too coarse when moving quickly. Something like that should be implementable in HAL, right? (Some variables for the last recorded position, compared with the current position and some logic elements). Jonathan On Wed, Aug 13, 2008 at 2:46 AM, Bjørn Kristiansen [EMAIL PROTECTED] wrote: Hi. i have been playing with the tougth for a while, can you use the probe function. in my case move to a position press a button conected to probe in to record the coordinates and then go on to the next poss.. or if you ned a track just get a switching signal to the probe pin, and then if you adjust the speed of the switcing you would get as many coordinates as you need to get a smooth mowement to a robot. could i be on to somehing?? Bjørn. ti., 12.08.2008 kl. 12.29 -0400, skrev Organic Engines: Hi Craig, 1. Software to Generate basic G-code from a sequence of positions should not be a very difficult problem. I was thinking there would need to be a time component though. A click track. 2. It would seem to me that welding a good bead (not spot welding) would require either very consistent materials or some feedback on puddle properties. Puddle properties could be measured from a visual and/or IR image. Measuring welding voltage/current might also be useful. (It has been some years since I considered this problem, so good technical solutions may since have been found.) Craig Yeah, consistent materials and a solid jig is what I am hoping will do the trick. Weld seam tracking and all that jazzy stuff is probably overkill, but can be added if necessary. I think if EMC can record my welding with the joysticks accurately enough, dwell this long at this amperage, feed this much wire, etc. all will be well. Dan. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Stepper configuration
Sebastian, I am getting close. I generated a single hal file for a two stepper and one pwm configuration. Currently in the ini file I have it configured for only 2 axes and references only the single hal file. The error I am getting is a following error any time I try to move an axis. I have included the minimal hal file below. What am I still missing? --HAL FILE-- loadrt trivkins loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD traj_period_nsec=[EMCMOT]TRAJ_PERIOD key=[EMCMOT]SHMEM_KEY num_joints=[TRAJ]AXES loadrt hostmot2 debug_idrom=1 debug_module_descriptors=1 debug_pin_descriptors=1 debug_modules=1 loadrt hm2_5i20 config=firmware=hm2/5i20/SVST8_4.BIT num_stepgens=2 num_pwmgens=1 num_encoders=0 addf motion-command-handler servo-thread addf motion-controller servo-thread addf hm2_5i20.0.pet_watchdog servo-thread addf hm2_5i20.0.read servo-thread addf hm2_5i20.0.write servo-thread # set up the watchdog # setp hm2_5i20.0.watchdog.timeout_ns 1000 # create a signal for the estop loopback net estop-loop iocontrol.0.user-enable-out iocontrol.0.emc-enable-in # create signals for tool loading loopback net tool-prep-loop iocontrol.0.tool-prepare iocontrol.0.tool-prepared net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed # connect position commands from motion module to step generator net Xpos-cmd axis.0.motor-pos-cmd = hm2_5i20.0.stepgen.00.position-cmd net Ypos-cmd axis.1.motor-pos-cmd = hm2_5i20.0.stepgen.01.position-cmd # net Zpos-cmd axis.2.motor-pos-cmd = stepgen.2.position-cmd # connect position feedback from step generators # to motion module net Xpos-fb hm2_5i20.0.stepgen.00.position-fb = axis.0.motor-pos-fb net Ypos-fb hm2_5i20.0.stepgen.01.position-fb = axis.1.motor-pos-fb # net Zpos-fb stepgen.2.position-fb = axis.2.motor-pos-fb # connect enable signals for step generators # net Xen axis.0.amp-enable-out = stepgen.0.enable # net Yen axis.1.amp-enable-out = stepgen.1.enable # net Zen axis.2.amp-enable-out = stepgen.2.enable # set stepgen module scaling - get values from ini file setp hm2_5i20.0.stepgen.00.position-scale [AXIS_0]SCALE setp hm2_5i20.0.stepgen.01.position-scale [AXIS_1]SCALE # setp stepgen.2.position-scale [AXIS_2]SCALE # set stepgen module accel limits - get values from ini file # setp hm2_5i20.0.stepgen.00.maxaccel [AXIS_0]STEPGEN_MAXACCEL # setp hm2_5i20.0.stepgen.01.maxaccel [AXIS_1]STEPGEN_MAXACCEL # setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL setp hm2_5i20.0.stepgen.00.dirsetup0.002 setp hm2_5i20.0.stepgen.00.dirhold 0.002 setp hm2_5i20.0.stepgen.00.steplen 0.40 setp hm2_5i20.0.stepgen.00.stepspace 0.40 setp hm2_5i20.0.stepgen.01.dirsetup0.002 setp hm2_5i20.0.stepgen.01.dirhold 0.002 setp hm2_5i20.0.stepgen.01.steplen 0.40 setp hm2_5i20.0.stepgen.01.stepspace 0.40 --END HAL FILE-- Regards, Eric Excellent, thanks for trying it out! What you did looks almost right, the only problem I see there is the firmware part of the config argument. There are several hostmot2 firmwares available for the 5i20, and the firmware= part needs to name a specific one, located where the driver can find it. The hostmot2 driver uses the standard kernel firmware loading mechanism, which means the firmware must be accessible in /lib/firmware. The first step is putting the firmwares where the loader can find them: If you installed EMC2 from the Debian package, the firmwares are already there and you dont need to do anything. If instead you checked out the CVS tree and are using run-in-place, you need to symlink the hostmot2 firmware directory to /lib/firmware with a command like this: sudo ln -s $HOME/my/emc2/sandbox/src/hal/drivers/mesa-hostmot2/firmware /lib/firmware/hm2 (change the source path to point to your actual sandbox) Once that's done we can pick a firmware file to load. You can see the available files by looking in /lib/firmware/hm2/5i20; each .BIT file is a firmware file you can tell the driver to load. The firmwares available in 2.2.6 are: 0 [EMAIL PROTECTED] /home/seb ls -1 /lib/firmware/hm2/5i20/*.BIT /lib/firmware/hm2/5i20/SV12.BIT /lib/firmware/hm2/5i20/SVST2_8.BIT /lib/firmware/hm2/5i20/SVST8_4.BIT SV12 means 12 servo channels. SVST2_8 means 2 servos and 8 steppers. SVST8_4 means 8 servos and 4 steppers. Either of the last two would work with the rest of the config line you specified; let's say you want SVST8_4.BIT. You'd use a loadrt line like this: loadrt hm2_5i20 config=firmware=hm2/5i20/SVST8_4.BIT num_stepgens=2 num_pwmgens=1 num_encoders=0 Give that a try and let me know how it goes. :-) Oh yeah, and if it doesnt work, please attach the file /var/log/syslog to the next email. -- Sebastian Kuzminsky Cryogenic travel has improved since then... I woke
Re: [Emc-users] Stepper configuration
Eric H. Johnson wrote: # set stepgen module accel limits - get values from ini file # setp hm2_5i20.0.stepgen.00.maxaccel [AXIS_0]STEPGEN_MAXACCEL # setp hm2_5i20.0.stepgen.01.maxaccel [AXIS_1]STEPGEN_MAXACCEL # setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL I didn't read everything, so maybe I overlooked something else, but I did notice that you have the lines that set the step generator accel limits commented out. I bet you meant to remove the # signs ;-) Regards, John Kasunich - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Stepper configuration
John, I commented them out because it generated an error. I do not see pins for maxaccel with hostmot2. # set stepgen module accel limits - get values from ini file # setp hm2_5i20.0.stepgen.00.maxaccel [AXIS_0]STEPGEN_MAXACCEL # setp hm2_5i20.0.stepgen.01.maxaccel [AXIS_1]STEPGEN_MAXACCEL # setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL Regards, Eric I didn't read everything, so maybe I overlooked something else, but I did notice that you have the lines that set the step generator accel limits commented out. I bet you meant to remove the # signs ;-) Regards, John Kasunich - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Stepper configuration
hm I am seeing something similar with the step generator. Its feedback position never changes. no errors in dmesg. (jmk, there's not (yet) an enable, or velocity or accel limit pins/parameters in hm2--I imagine that's why the lines are commented out) [running in an interactive halrun] halcmd: save comp # components loadrt threads name1=th period1=100 loadrt hm2_5i20 config=firmware=hm2/5i20/SVST8_4.BIT loadrt hostmot2 debug_idrom=1 halcmd: show pin hm2_5i20.0.stepgen.00. Component Pins: Owner Type Dir Value Name 4 s32 OUT 0 hm2_5i20.0.stepgen.00.counts 4 u32 OUT hm2_5i20.0.stepgen.00.debug.accumulator 4 float OUT-1 hm2_5i20.0.stepgen.00.debug.error 4 u32 OUT 00989C66 hm2_5i20.0.stepgen.00.debug.rate 4 float IN 1 hm2_5i20.0.stepgen.00.position-cmd 4 float OUT 0 hm2_5i20.0.stepgen.00.position-fb 4 float OUT 0 hm2_5i20.0.stepgen.00.velocity-fb halcmd: show param hm2_5i20.0.stepgen.00. Parameters: Owner Type Dir Value Name 4 float RW 0.00049149 hm2_5i20.0.stepgen.00.dirhold 4 float RW 0.00049149 hm2_5i20.0.stepgen.00.dirsetup 4 float RW 1 hm2_5i20.0.stepgen.00.position-scale 4 float RW 0.00049149 hm2_5i20.0.stepgen.00.steplen 4 float RW 0.00049149 hm2_5i20.0.stepgen.00.stepspace halcmd: show thread Realtime Threads: Period FP Name ( Time, Max-Time ) 999849 YESth ( 529,64009 ) 1 hm2_5i20.0.read 2 hm2_5i20.0.write 3 hm2_5i20.0.pet_watchdog Jeff - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Stepper configuration
Kirk Wallace wrote: On Wed, 2008-08-13 at 12:03 -0500, Jon Elson wrote: John Kasunich wrote: Unfortunately, conversion from clocks to time is non-trivial, so we simply report the results in clocks. The situation is getting worse, not better. In the name of progress, we now have to deal with CPUs that change their clock frequencies on the fly. I've even heard a report that on some modern CPUs, the TSC can no longer even be counted on to be monotonic. Newer Intel and AMD CPUs have thermal protection logic that causes it to skip clocks when geting hot, and shuts off the clock when severely overheated (150 C die temp). Just what you need in a guaranteed-latency real-time system! Jon Are there other CPU's that would better cater to realtime? Some sort of lean, fast RISC, not designed to cope with Windows upgrades. The Arm 7 (and newer Arm 9) CPUs look quite good, and start at $12 or so. They need VERY little support stuff, either. The AD Sharc series (now called Blackfin) is even faster, but a bit trickier to program efficiently. Jon - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Stepper configuration
Jeff Epler wrote: hm I am seeing something similar with the step generator. Its feedback position never changes. no errors in dmesg. Yes, I can reproduce this here - stepgen doesnt work on the 5i20. Sorry guys... How embarassing. :-( My test setup consists of a PC running emc2 TRUNK. It's got a 7i43 plugged into a parport and a 5i20 on the PCI bus. The 7i43 has two steppers on it, and the 5i20 has 3 servos on it. This setup conspicuously doesnt test steppers on the 5i20 or servos on the 7i43. I dont currently have the hardware to have both servos and steppers plugged into both the 7i43 and the 5i20, so my testing isnt as good as it should be... I should fix that... The HAL config I test with leaves one of the 5i20 servos un-driven, reads its encoder as a kind of MPG, and drives the other two 5i20 servos and the two 7i43 steppers to copy its position. So i can twist the motor shaft of the third servo and the other four motors follow it. Anyway. Here are some observations: 7i43: Using firmware SVST4_4S.BIT Enable raw mode (config=enable_raw). (Raw mode is documented in hostmot2(9), it's Peter's idea and it's really handy for this kind of debugging.) Set raw.read_address to 0x2100 (stepgen.00's Accumulator register). Run one halmeter watching the pin stepgen.00.debug.rate and one watching the pin raw.read_data (ie, the value at address 0x2100). Command stepgen.00 to move and I can see the Rate register commanding the FPGA to step, and I can see the stepgen's reported position in the Accumulator increasing, and I can see the stepper motor turn. 5i20: Using firmware SVST8_4.BIT Same setup (enable raw mode, tell raw to read the stepgen.00 Accumulator at 0x2100, and use halmeter to watch stepgen.00.debug.rate and raw.read_data). Command stepgen.00 to move and I can se the Rate register commanding the FPGA to step, but I do *not* see the stepgen's reported position in the Accumulator increasing. (Since there's no stepper or oscilloscope on the stepgen.00 pins, I really dont know what the control lines are doing, but the Accumulator register should definately increase.) I've taken a screenshot showing this, it's at http://highlab.com/~seb/snapshot1.png. There are six halmeters. The three on the left are looking at 7i43, the three on the right are looking at the 5i20. stepgen.00 on both boards are getting the same position-cmd (because they're netted together in the follow-the-leader net, show in the halcmd output). However, the 7i43 has long since gotten there, and it's Rate is now 0 and it's Accumulator has the number of steps it took to get there. The 5i20 on the other hand is commanding a high Rate, and it's Accumulator still shows 0. Both go through the same code path in the hostmot2 driver, so this behavior is strange to me. Peter, could you make the stepgen Rate register read/write, so I can read back the command for sanity checking? -- Sebastian Kuzminsky Cryogenic travel has improved since then... I woke screaming in a translucent box. “There, there,” said the box. “Everything will be all right. Have some coffee.” -- Ken Macleod, Who's afraid of Wolf 359 http://outofthiseos.typepad.com/blog/files/KenMacleodWhosAfraidofWolf359.htm - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Stepper configuration
Peter, could you make the stepgen Rate register read/write, so I can read back the command for sanity checking? I'll do that sometime tommorow... -- Sebastian Kuzminsky Cryogenic travel has improved since then... I woke screaming in a translucent box. “There, there,” said the box. “Everything will be all right. Have some coffee.” -- Ken Macleod, Who's afraid of Wolf 359 http://outofthiseos.typepad.com/blog/files/KenMacleodWhosAfraidofWolf359.htm - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ 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.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Stepper configuration
Sebastian Kuzminsky wrote: My test setup consists of a PC running emc2 TRUNK. It's got a 7i43 plugged into a parport and a 5i20 on the PCI bus. The 7i43 has two steppers on it, and the 5i20 has 3 servos on it. This setup conspicuously doesnt test steppers on the 5i20 or servos on the 7i43. I dont currently have the hardware to have both servos and steppers plugged into both the 7i43 and the 5i20, so my testing isnt as good as it should be... I should fix that... Well, at least servos on the 7i43 still work. :-/ -- Sebastian Kuzminsky Cryogenic travel has improved since then... I woke screaming in a translucent box. “There, there,” said the box. “Everything will be all right. Have some coffee.” -- Ken Macleod, Who's afraid of Wolf 359 http://outofthiseos.typepad.com/blog/files/KenMacleodWhosAfraidofWolf359.htm - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users