Re: [Emc-users] Hostmot2 homing index

2009-10-19 Thread Richard Arthur
...@candrarthur.demon.co.uk Sent: Sunday, October 18, 2009 8:43 PM To: EMC Users emc-users@lists.sourceforge.net Subject: [Emc-users] Hostmot2 homing index I am moving from 2.17(working) to 2.33. I am using HM2-Servo 3 axis 5i20. Halscope: http://imagebin.org/68314 I expected homing

Re: [Emc-users] Hostmot2 homing index

2009-10-19 Thread Jeff Epler
You probably need to connect the index-enable signal between the motion controller and the encoder counter: net Xindex-enable axis.0.index-enable = hm2_5i20.0.encoder.00.index-enable (this is equivalent to the old-style newsig Xindex-enable linksp Xindex-enable axis.0.index-enable

Re: [Emc-users] Hostmot2 homing index

2009-10-19 Thread Richard Arthur
That resolved it. I just wish I understood it properly :-) Thank you. Richard Jeff Epler wrote: You probably need to connect the index-enable signal between the motion controller and the encoder counter: net Xindex-enable axis.0.index-enable = hm2_5i20.0.encoder.00.index-enable (this

[Emc-users] Hostmot2 homing index

2009-10-18 Thread Richard Arthur
I am moving from 2.17(working) to 2.33. I am using HM2-Servo 3 axis 5i20. Halscope: http://imagebin.org/68314 I expected homing to complete at the index (gpio 005). Homing is at level 16. I added this to the standard io block in hm2-servo.hal: # X axis limit and home newsig Xminlim-and-home

Re: [Emc-users] Hostmot2 homing index

2009-10-18 Thread Alex Joni
motion knows index has happened. Regards, Alex -- From: Richard Arthur rich...@candrarthur.demon.co.uk Sent: Sunday, October 18, 2009 8:43 PM To: EMC Users emc-users@lists.sourceforge.net Subject: [Emc-users] Hostmot2 homing index I am moving from

Re: [Emc-users] Hostmot2 homing

2009-07-18 Thread Kenneth Lerman
Does that make sense? If the terminator is really 100 ohms, that would imply that the pull up is in the order of ten ohms. (Am I correct in my assumption that the power supply is five volts?) Ken Leslie Newell wrote: Hi Ken, Yes, this was under load. Les Kenneth Lerman wrote: Did

Re: [Emc-users] Hostmot2 homing

2009-07-18 Thread Leslie Newell
Hi Ken, It does make sense. It looks like the encoder outputs are push-pull. Just fro the record I never said they had pullups. Someone just mentioned that some encoders do have weak pullups. Les Kenneth Lerman wrote: Does that make sense? If the terminator is really 100 ohms, that would

Re: [Emc-users] Hostmot2 homing

2009-07-18 Thread Leslie Newell
Hi Peter, What is the default value for the filter? I found that a value of 1 nearly sorted the problem. A value of 2 was pretty well rock solid. Just to be sure I set it to 6 as my max frequency is well under 200kHz. I guess it is already on your to-do list but I would guess that it would be

Re: [Emc-users] Hostmot2 homing

2009-07-18 Thread Peter C. Wallace
: [Emc-users] Hostmot2 homing Hi Peter, What is the default value for the filter? I found that a value of 1 nearly sorted the problem. A value of 2 was pretty well rock solid. Just to be sure I set it to 6 as my max frequency is well under 200kHz. Default is 0x800 which gives divide by one (33

Re: [Emc-users] Hostmot2 homing

2009-07-17 Thread Roland Jollivet
? An open collector output is just that, open collector. You need to terminate it at the lead end with resistor according to the voltage you're using, to the positive rail. Terminating with a 100R to ground is simply a poor configuration. Regards Roland 2009/7/17 Jon Elson

Re: [Emc-users] Hostmot2 homing

2009-07-17 Thread Leslie Newell
Hi Peter, One difference is that the TTL inputs have an RC filter, the differential inputs have none. Hmm, that could still point towards a noise issue then. I wonder if your index outputs can drive the termination resistor. Have you measured you index and /index outputs for reasonable

Re: [Emc-users] Hostmot2 homing

2009-07-17 Thread Peter C. Wallace
: [Emc-users] Hostmot2 homing Hi Peter, One difference is that the TTL inputs have an RC filter, the differential inputs have none. Hmm, that could still point towards a noise issue then. I wonder if your index outputs can drive the termination resistor. Have you measured you index

Re: [Emc-users] Hostmot2 homing

2009-07-17 Thread Leslie Newell
Hi Peter, Each output swings from 0.48V to 4.1V. When IDX is high, /IDX is low. Therefore the voltage between them is about 3.6V. Les What I was asking about (maybe not very well) is differential drive: in other words measured between IDX and /IDX. This should be positive in one index

Re: [Emc-users] Hostmot2 homing

2009-07-17 Thread Kenneth Lerman
Did you measure that while it was connected to the receiver? If the terminator is 100 ohms and the pull up is 1K ohms, the voltage under load would only be around 400 mv. That should be fine, I think. If the pull up is 10K, then you would have around 40 mv. I don't think that would work too

Re: [Emc-users] Hostmot2 homing

2009-07-17 Thread Peter C. Wallace
: [Emc-users] Hostmot2 homing Hi Peter, Each output swings from 0.48V to 4.1V. When IDX is high, /IDX is low. Therefore the voltage between them is about 3.6V. Les Well if the extra filtering of the TTL inputs helps, I would do the trick with raw-write to setup the filter time constant

Re: [Emc-users] Hostmot2 homing

2009-07-17 Thread Leslie Newell
Hi Ken, Yes, this was under load. Les Kenneth Lerman wrote: Did you measure that while it was connected to the receiver? If the terminator is 100 ohms and the pull up is 1K ohms, the voltage under load would only be around 400 mv. That should be fine, I think. If the pull up is 10K,

Re: [Emc-users] Hostmot2 homing

2009-07-16 Thread Leslie Newell
Hi Peter, I have been doing some more tests on this. Playing around with filters and screening had no noticeable effect. However I have hit an odd anomaly. Just out of interest I switched the 7I29 to single ended input and suddenly it is rock solid. So it can't be noise pickup in the cabling.

Re: [Emc-users] Hostmot2 homing

2009-07-16 Thread Peter C. Wallace
: [Emc-users] Hostmot2 homing Hi Peter, I have been doing some more tests on this. Playing around with filters and screening had no noticeable effect. However I have hit an odd anomaly. Just out of interest I switched the 7I29 to single ended input and suddenly it is rock solid. So it can't

Re: [Emc-users] Hostmot2 homing

2009-07-16 Thread Jon Elson
Leslie Newell wrote: Another odd thing - in differential mode if I disconnect one line the input toggles randomly, obviously picking up noise. Again, shouldn't a balanced input give no output with one line disconnected? No. Unless either a bias is added to the inputs, or the comparator

Re: [Emc-users] Hostmot2 homing

2009-07-16 Thread Jon Elson
Peter C. Wallace wrote: One difference is that the TTL inputs have an RC filter, the differential inputs have none. I wonder if your index outputs can drive the termination resistor. Have you measured you index and /index outputs for reasonable differential output voltage when terminated

Re: [Emc-users] Hostmot2 homing

2009-07-12 Thread Sebastian Kuzminsky
Peter C. Wallace wrote: Unfortunately, the HM2 driver does not support lowering the encoder sample rate sample rate yet The only control over the encoder sample rate that the hostmot2 driver currently exposes is the quadrature filter bit. From the hostmot2(9) manpage: (bit r/w) filter: If

Re: [Emc-users] Hostmot2 homing

2009-07-12 Thread Sebastian Kuzminsky
John Kasunich wrote: A simple test to see if screened cable will help can be done with some aluminum foil. Make a screen around the cable, ground it, and see if it helps. Just be carefull that the exposed foil doesn't short anything. Like this? :-)

Re: [Emc-users] Hostmot2 homing

2009-07-12 Thread John Thornton
That looks like Morgus the Magnificent at work. Anyone know who that is? John On 12 Jul 2009 at 16:30, Sebastian Kuzminsky wrote: John Kasunich wrote: A simple test to see if screened cable will help can be done with some aluminum foil. Make a screen around the cable, ground it, and

Re: [Emc-users] Hostmot2 homing

2009-07-10 Thread Leslie Newell
Hi Peter, If it is edge sensitive then as you say, inverting the signal has little effect. I was going by your previous statement where you said it was dependent on the state. After doing more tests, noise looks to be a possible culprit. It seems odd that I have a relatively bad noise problem

Re: [Emc-users] Hostmot2 homing

2009-07-10 Thread Peter C. Wallace
: [Emc-users] Hostmot2 homing Hi Peter, If it is edge sensitive then as you say, inverting the signal has little effect. I was going by your previous statement where you said it was dependent on the state. After doing more tests, noise looks to be a possible culprit. It seems odd that I have

Re: [Emc-users] Hostmot2 homing

2009-07-10 Thread Wayne Patterson
Leslie, If you are using this under florescent lights you will pick-up a lot of noise on a four foot cable. If the cable is shielded it shouldn't pick up much noise though. Is the cable shielded? LennyWayne Leslie Newell wrote: Hi Peter, If it is edge sensitive then as you say, inverting the

Re: [Emc-users] Hostmot2 homing

2009-07-10 Thread Leslie Newell
Thanks Peter, rate sample rate yet, but this could be tried by using the raw-write command in your HAL init file. With a 5I20, the encoder sample rate is 33 MHz, when the filter is on, 15 clocks are required to recognize an input (the ~.5 uSec above) If for example the sample rate were

Re: [Emc-users] Hostmot2 homing

2009-07-10 Thread Leslie Newell
Hi Wayne, It isn't that near a fluorescent light but it is obviously in close proximity to the motor cables and it is also in the same cabinet as the 7.5kW spindle inverter. The cable isn't screened. Screened 50 way ribbon cable is difficult to obtain and very expensive. Les Wayne

Re: [Emc-users] Hostmot2 homing

2009-07-10 Thread Peter C. Wallace
: [Emc-users] Hostmot2 homing Thanks Peter, rate sample rate yet, but this could be tried by using the raw-write command in your HAL init file. With a 5I20, the encoder sample rate is 33 MHz, when the filter is on, 15 clocks are required to recognize an input (the ~.5 uSec above) If for example

Re: [Emc-users] Hostmot2 homing

2009-07-10 Thread John Kasunich
Leslie Newell wrote: Hi Wayne, It isn't that near a fluorescent light but it is obviously in close proximity to the motor cables and it is also in the same cabinet as the 7.5kW spindle inverter. The cable isn't screened. Screened 50 way ribbon cable is difficult to obtain and very

Re: [Emc-users] Hostmot2 homing

2009-07-10 Thread Peter C. Wallace
: [Emc-users] Hostmot2 homing On Fri, 10 Jul 2009, Leslie Newell wrote: Date: Fri, 10 Jul 2009 19:29:55 +0100 From: Leslie Newell les.new...@fastmail.co.uk Reply-To: Enhanced Machine Controller (EMC) emc-users@lists.sourceforge.net To: Enhanced Machine Controller (EMC) emc-users

Re: [Emc-users] Hostmot2 homing

2009-07-10 Thread Leslie Newell
Thanks, I'll take a look. Les Take a look at the HostMot2 manual page about raw-write and the regmap file. The sample rate of all encoders in HM2 is controlled by the QFilterRate register at offset 0x3400. If you set this register to 0x008 you will have 10 times longer filter time

Re: [Emc-users] Hostmot2 homing

2009-07-10 Thread Leslie Newell
Hi Peter, I can't see any way of achiving a trip in 20ms. I have the PID saturation limit hooked to my estop chain but it only trips once the amp reaches full output (BTW, the hostmot2 example config does not implement this). If the I term doesn't build up quickly to saturate the output then

Re: [Emc-users] Hostmot2 homing

2009-07-10 Thread Peter C. Wallace
: [Emc-users] Hostmot2 homing Hi Peter, I can't see any way of achiving a trip in 20ms. I have the PID saturation limit hooked to my estop chain but it only trips once the amp reaches full output (BTW, the hostmot2 example config does not implement this). If the I term doesn't build up quickly

Re: [Emc-users] Hostmot2 homing

2009-07-10 Thread Peter C. Wallace
Hi Peter, I can't see any way of achiving a trip in 20ms. I have the PID saturation limit hooked to my estop chain but it only trips once the amp reaches full output (BTW, the hostmot2 example config does not implement this). If the I term doesn't build up quickly to saturate the output

Re: [Emc-users] Hostmot2 homing

2009-07-10 Thread Leslie Newell
Hi Peter, With a small error (1 count or so) thats possible but that also most likely indicates that your integral term is way too low. LOL. Most people have been telling mee i'm using too MUCH I term... Thats probably something that should be fixed in the PID component (indicate saturate

Re: [Emc-users] Hostmot2 homing

2009-07-10 Thread Leslie Newell
Hi Peter, Interesting idea. You probably still need a delay to allow for braking. This isn't a real problem to implement though. Les Peter C. Wallace That gives me another idea: if commanded velocity is 0, set the PID output limit to 20% or so and use the PID saturate

Re: [Emc-users] Hostmot2 homing

2009-07-10 Thread Peter C. Wallace
: [Emc-users] Hostmot2 homing Hi Peter, With a small error (1 count or so) thats possible but that also most likely indicates that your integral term is way too low. LOL. Most people have been telling mee i'm using too MUCH I term... I think somehow the P and I terms for HostMot2 are different

Re: [Emc-users] Hostmot2 homing

2009-07-10 Thread Peter C. Wallace
: [Emc-users] Hostmot2 homing Hi Peter, Interesting idea. You probably still need a delay to allow for braking. This isn't a real problem to implement though. Les Peter C. Wallace That gives me another idea: if commanded velocity is 0, set the PID output limit to 20% or so and use the PID

Re: [Emc-users] Hostmot2 homing

2009-07-10 Thread Leslie Newell
How about tripping if the PID output is greater than a certain percentage and the encoder velocity is below a certain threshold? Les Peter C. Wallace wrote: I think the nuisance tripping can be avoided with the right time delay in other words if your PID output or integral term are saturated

Re: [Emc-users] Hostmot2 homing

2009-07-10 Thread Peter C. Wallace
: [Emc-users] Hostmot2 homing How about tripping if the PID output is greater than a certain percentage and the encoder velocity is below a certain threshold? Run the PID output through the LP filter before the test and that may well work (the PID output will be fairly noisy at low speeds until

[Emc-users] Hostmot2 homing

2009-07-09 Thread Leslie Newell
Now I have the motor tuning sorted out and here is my next problem... I am using hostmot2 and trying to use index and home switch. My setup is as follows: hm2 configuration: loadrt driver=hm2_pci config=firmware=hm2/5i20/SV12.BIT num_encoders=6 num_pwmgens=6 num_stepgens=0 net xinex-en

Re: [Emc-users] Hostmot2 homing

2009-07-09 Thread Chris Radek
On Thu, Jul 09, 2009 at 04:28:23PM +0100, Leslie Newell wrote: Watching GPIO 28 with halmeter I can see the index so the hardware is working correctly, going TRUE when the index is active. When I home, it appears to ignore the index completely. The machine hits the home switch, backs off

Re: [Emc-users] Hostmot2 homing

2009-07-09 Thread Peter C. Wallace
On Thu, 9 Jul 2009, Chris Radek wrote: Date: Thu, 9 Jul 2009 11:13:07 -0500 From: Chris Radek ch...@timeguy.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

Re: [Emc-users] Hostmot2 homing

2009-07-09 Thread Chris Radek
On Thu, Jul 09, 2009 at 10:51:07AM -0600, Sebastian Kuzminsky wrote: GPIO 28 is the I/O pin used for Index for encoder #5 on the firmware Les is using. He's watching the raw value on the input pin, bypassing the encoder, to verify that his wiring is correct. OK, so he may only see a

Re: [Emc-users] Hostmot2 homing

2009-07-09 Thread Leslie Newell
Basically it is ignoring the index signal. If I press home and manually operate the home switch I can get it to home anywhere. Doing this it should only home to an integer multiple of the screw pitch. I just tried homing with HOME_SEARCH_VEL = 0 and that works correctly. It sees the index and

Re: [Emc-users] Hostmot2 homing

2009-07-09 Thread Peter C. Wallace
: [Emc-users] Hostmot2 homing Basically it is ignoring the index signal. If I press home and manually operate the home switch I can get it to home anywhere. Doing this it should only home to an integer multiple of the screw pitch. I just tried homing with HOME_SEARCH_VEL = 0 and that works

Re: [Emc-users] Hostmot2 homing

2009-07-09 Thread Chris Radek
On Thu, Jul 09, 2009 at 07:02:09PM +0100, Leslie Newell wrote: By the way, for some reason I have a following error problem when homing. Just after the home switch/index releases I can hear the machine thump and get a joint following error unless I turn the limits way high. This is

Re: [Emc-users] Hostmot2 homing

2009-07-09 Thread Leslie Newell
That was one of the first things I tried. I have now found the problem. encoder.nn.index-invert does not work. Setting it to 1 or 0 makes no difference (at least for encoder 05). Inverting the index pulse by physically swapping the encoder outputs sorted the problem. Les Did you try index

Re: [Emc-users] Hostmot2 homing

2009-07-09 Thread Leslie Newell
Hi Chris, You may regret asking that :-). Here we go: ini http://pastebin.ca/1490014 Hal is broken into a number of files load.hal - loads modules http://pastebin.ca/1490015 motion.hal - motion control If the spindle code looks complicated it is because of the three speed electromechanical

Re: [Emc-users] Hostmot2 homing

2009-07-09 Thread John Kasunich
Leslie Newell wrote: Hi Chris, You may regret asking that :-). Here we go: ini http://pastebin.ca/1490014 Hal is broken into a number of files To be honest, one of the best ways to share your HAL config is to start EMC, and then (in another shell) run halcmd show all, redirect the

Re: [Emc-users] Hostmot2 homing

2009-07-09 Thread Leslie Newell
Here you go... http://pastebin.ca/1490066 Les John Kasunich wrote: To be honest, one of the best ways to share your HAL config is to start EMC, and then (in another shell) run halcmd show all, redirect the output to a file, and post that. The show all command will show you every pin,

Re: [Emc-users] Hostmot2 homing

2009-07-09 Thread Peter C. Wallace
: [Emc-users] Hostmot2 homing That was one of the first things I tried. I have now found the problem. encoder.nn.index-invert does not work. Setting it to 1 or 0 makes no difference (at least for encoder 05). Inverting the index pulse by physically swapping the encoder outputs sorted the problem