Jon Elson wrote:

 >> Your index pulse has the wrong polarity.  Note it is sending
 >> true almost all the time, then goes false for a moment.  You
 >> want it to be false except for a short duration.  If it is a
 >> differential signal, then switcxh the two wires to reverse the
 >> sense.  If it is single-ended, you should be able to invert the
 >> polarity at hal level, although that may defeat the logic in the
 >> mesa board.

The above is misleading.

1) Index latching is almost certainly edge triggered, not level
triggered, so the polarity probably doesn't matter (other than
determining which edge of the index pulse is used).  I say probably
because I haven't checked the VHDL and/or driver code.

2) You can't invert it in HAL.  The 5i20 is counting and latching
things in hardware.  Any inversion would ALSO have to be done in
the hardware.

Richard Arthur wrote:
> It is single-ended (I had assumed a change in state was all that was 
> required).

You are almost certainly correct - I would be astonished if the index
was level triggered.  Inverting it would only change the edge that it
triggers on, and you usually don't care which edge that is as long as
it is consistent.

> How do I invert the signal at HAL level.

Any "bit" HAL signal can be inverted by running it through a HAL "not"
component.  But that's not the answer to your problem.

> Would you expand a 
> little on why that may defeat the logic in the mesa board please?

I think Jon means that inverting it in HAL won't invert what the 5i20
hardware sees.

>>> Why doesn't homing complete at the index pulse shown here:

I suspect that the 2.1.x driver for the 5i20 simply doesn't do indexing
correctly (or at all).  I have a 5i20 board, and I can probably dig up
an encoder with an index pulse, but it will take me some time to wire
it up for testing.  I will attempt to test the 2.1.x and the upcoming
2.2 versions of the driver and see if I can fix it.  This will be a
matter of several days, not a few hours, so please be patient.

In the meantime, home to the switch, and set the latch velocity slow
enough to ensure that you don't move more than one encoder count per
servo period.  For the usual 1mS servo period and a 25,000 count per
inch encoder that would be about 0.040 inches/second.  With the slow
latch velocity, the homing accuracy will be limited by the switch.

Once the driver is working right, it will be able to home to 1 count
accuracy at higher speeds - thats one of the advantages of latching
the index in hardware.

Regards,

John Kasunich



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to