Donnie Timmons wrote:

>>From: Sebastian Kuzminsky <s...@highlab.com>
>>Subject: Re: [Emc-users] Hostmot2 and Homing
>>To: "Enhanced Machine Controller (EMC)"
>>    
>>
>>Both of these sources will tell you that (on the 5i23) IO#4 is pin 9 on 
>>P2, and is the index for the second encoder.
>>    
>>
>>If you wanted to look at the logic value on the second encoder's index 
>>pin, you'd look at hm2_5i23.0.gpio.004.in.
>>    
>>
>>Does this make sense?
>>    
>>
>
>You saying that it should look like this?
>
>net Xindex-enable axis.0.index-enable m2_5i23.0.gpio.P2.005.in 
>  
>
No.

Note that the axis.0.index-enable pin is an IO (read/write) pin, and the 
hm2_5i23.0.gpio.P2.005.in pin is also an output (to HAL:  input from the 
real world, output into HAL).  You can only connect IO and "IN" pins 
together, you can't connect an OUT to an IO (or another OUT).
The index-enable signal is completely internal to EMC2.  Depending on 
what's going on, the motion controller may need to wait for an index 
pulse and have the encoder reset to 0 when it occurs, or the motion 
controller may need to get a signal that doesn't reset every time the 
index comes around.  Homing (to index) is one place where the index 
reset is needed (waiting for sync before a spindle-synchronized move 
would be another).  The index-enable output from the motion controller 
tells the encoder module that it should reset on index.  This all has 
nothing to do with the external index connection on your Mesa card.

>Result is this
>
>Starting EMC2...
>
>m5i23.hal:99: Signal 'Xindex-enable' can not add I/O pin 'axis.0.index-enable'
>
>Shutting down and cleaning up EMC2...
>
>Tried this
>
>net Xindex-enable axis.0.index hm2_5i23.0.gpio.P2.005.in 
>
>Got this
>
>Starting EMC2...
>
>m5i23.hal:99: pin 'axis.0.index-in' does not exist
>
>Shutting down and cleaning up EMC2...
>
>The only way it will take it is
>
>Xindex-enable hm2_5i23.0.encoder.00.index-enable axis.0.index-enable
>  
>
This is what you want.

>But Peter send this 
>  
>
>>No, index-enable is not the index input (thats the GPIO pin Sebastian 
>>mentioned)
>>    
>>
Index-enable is the way that the hm2 encoder driver and the motion 
controller talk to each other about index resets.  It has nothing to do 
with the physical pin connected to the encoder index output.

>>index-enable is a bi-directional pin that enables the hardware index logic if 
>>set, It is cleared when a index event occurs.
>>    
>>
>
>
>Found this on IRC
>
>13:34:02 <SWPadnos> hmmm - those are the same in both the stock univstep and 
>my config
>13:34:38 <SWPadnos> strange - I thought the tool prep loopback was added to 
>all the configs
>13:38:13 <rayh> axis.0.index-enable is the only index pin available today in 
>head.
>13:38:35 <rayh> It may be that jmk changed the name of the pin when he got it 
>working last week.
>13:38:46 <SWPadnos> I'm looking for the change that removed index-pulse-in 
>from all the axes
>13:38:48 <SWPadnos> could be
>13:39:25 <SWPadnos> yep - removed index-pulse-in, added index-enable
>13:40:15 <rayh> okay that explains it.  is it grep -r time on the configs 
>directories
>13:40:31 <SWPadnos> I'm not sure.  it seems weird to have index-enable, but no 
>index
>13:40:39 <SWPadnos> nothing to enable
>13:41:20 <rayh> I though it a bit strange which is why I simply commented out 
>the links.
>13:41:56 <SWPadnos> yep - just did that in my config.  I'll ask JMK about it 
>tonight
>13:42:13 <SWPadnos> not sure what he was thinking (and I haven't read the 
>encoder canonical interface yet)
>
>
>So How is the index pulse to be sent to EMC?
>  
>
If you look in the manual you will see everything I've said above.

You should probably learn to use the tools at your disposal, like 
halcmd, halshow, halscope, halmeter, etc.  It looks like you were 
changing things nearly at random to get this to work.  HAL is very 
discoverable, you can fire up EMC2 and then look at all the pins using 
halshow or halcmd.  This would eliminate the questions about whether the 
pin is called axis.0.index-in or axis.0.index or axis.0.index-enable.  
Taking a quick look at the manual (from the CNC menu, and searchable), 
you can see how encodes are supposed to work.  Looking at a sample 
config should show you how others have gotten home-with-index to work.

- Steve


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to