Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
EnDat encoder on ACC-24E3
#1
I'm sorry for posting this twice, but I see that my initial post went into Manuals and Documentation, and it probably won't get seen as much there.

I'm just starting to hook up a Heidenhain EnDat encoder to an ACC-24E3 channel that already has a quadrature encoder. It looks like the serial encoder strobe signal uses the same connector pins as the quadrature encoder's index signal. The Heidenhain doesn't have a strobe signal. Is this going to cause a problem with being able to use the quadrature encoder's index? Is there some way to switch which encoder gets to use the pins?

In the ACC-24E3 hardware reference, on page 30, there is very little information on setting up a serial encoder. It says to refer to the Software Reference Manual. I can't find a Software Reference Manual for the ACC-24E3, and none of the sections of the main Software Reference Manual seem to refer to setting up serial encoders. Where do I find this information? If anyone has set up a Heidenhain EnDat encoder and has all the secret codes, I'd be very happy to receive them.

Thanks!
Reply
#2
horacevan,

Unfortunately the index signal on quadrature input can not be detected while the serial encoder read is enabled. However, if you're only going to use the index signal for homing routine, we can disable the serial encoder read by setting Acc24E3[i].Chan[j].SerialEncEna=0 and complete the homing using the index signal from quadrature encoder and then enable the serial encoder data read by setting Acc24E3[i].Chan[j].SerialEncEna=1 and read the absolute position from your EnDat encoder.

And here is a quick note on how to setup an EnDat2.2 encoder on ACC-24E3:
Code:
//Acc24E3[i].SerialEncCtrl bit description
//SerialProtocol [3:0]
//       0000 None
//       0001 SPI
//       0010 SSI
//       0011 EnDat
//       0100 Hiperface
//       0101 Sigma I
//       0110 Sigma II
//       0111 Tamagawa
//       1000 Panasonic
//       1001 Mitutoyo
//       1010 Kawasaki
//       1011 – 1110 Reserved
//{reserved} [7:4]
//SerialTrigDelay [15:8]
//     This bit field is used to program a trigger delay relative to
//     the active
//     edge of the trigger clock. Units are in SER_Clock cycles
//SerialTrigEdgeSel [16]
//     This bit is used to select the active clock edge for the
//     trigger clock:
//     0=rising edge, 1=falling edge.
//SerialTrigClockSel [17]
//     This bit is used to select the trigger clock for initiating serial
//     encoder communications:
//     0=PhaseClock, 1=ServoClock
//{reserved} [19:18]
//SerialClockNDiv [23:20]
//     This bit field is used to program the final clock frequency
//     for SER_Clock.
//     The final clock is generated from a 2N divider clocked by
//     the intermediate clock.
//SerialClockMDiv [31:24]
//     This bit field is used to program the intermediate clock frequency
//     for SER_Clock. The intermediate clock is generated from a
//     (M+1) divider clocked at 100 MHz.
//     SER_Clock = 100 MHz / ((M+1)*2^N)
Acc24E3[i].SerialEncCtrl=$3

//Acc24E3[i].Chan[j].SerialEncCmd bit description
//SerialPosNumBits [5:0]
//     The bit field is used to define the number of position bits or
//     encoder resolution for the SPI, SSI, and EnDat protocols.
//     The valid range of settings is 12 – 32 (01100 – 10000).
//SerialStatusNumBits [9:6]
//     This bit field is used to define the number of status bits
//     returned from the encoder for the SPI protocol.
//     The valid range of settings is 0 – 12 (0000 – 1100).
//SerialDataReady [10]
//     This read-only bit provides status on the receive data.
//     This bit reads low while the interface logic is busy communicating
//      with the serial encoder.
//     It reads high when all of the data has been received
//     and processed.
//     For slower interfaces that span multiple phase/servo cycles
//     (e.g., Hiperface at 9600 baud), the system must poll this bit
//     to determine when the data is ready.
//SerialGrayBinConv [11]
//     This bit is used to enable Gray code to binary conversion
//     of data returned for the SSI protocol.
//SerialTrigEna [12]
//     This bit is used to enable the trigger for the serial
//     encoder communications (0=disabled, 1=enabled).
//     This bit must be set for either trigger mode.
//     If the TriggerMode bit is set for one-shot mode, the
//     hardware will automatically clear this bit after the trigger occurs.
//SerialTrigMode [13]
//     This bit is used to define the trigger mode for the initiation
//     of the communications
//     (0=continuous trigger, 1=one-shot trigger).
//     All triggers occur at the defined Phase/Servo clock edge and
//     delay setting. See the SerialEncCtrl register.
//SerialParityType [15:14]
//     This bit field is used to define the parity type for the received
//     data packet:
//     00=None
//     01=Odd
//     10=Even
//     11=Reserved
//SerialCmdWord [31:16]
//     This bit field is protocol dependent. It is used to define the
//     command sent to the serial encoder.
//     SPI: 0
//     SSI: 0
//     EnDat:
//          A 6-bit mode command is required for encoder communications.
//          Currently, only two EnDat 2.1 commands are supported:
//          Encoder to Send Position Values (000111)
//          and Encoder to Receive Reset (101010).
//     Hiperface:
//          The Hiperface protocol requires the definition of a 16-bit
//          command word in the SerialEncoderCommand register.
//          The 16-bit command word consists of an 8-bit encoder
//          address in the upper byte and an 8-bit command code in
//          the lower byte. Three command codes are currently
//          supported: Read Position (0x42), Request Encoder Status
//          (0x50), and Reset (0x53).
//     Sigma I:0
//     Sigma II:0
//     Tamagawa:
//          $001A: Data Read
//          $00BA: Reset
//          $00C2: Reset
//          $0062: Reset
//     Panasonic:
//          $002A: Encoder Readout (Multiturn)
//          $0052: Encoder Readout (Single Turn+Encoder ID+AlarmCode)
//          $004A: Reset
//          $00DA: Reset
//          $00F2: Reset
//          $007A: Reset
//     Mitutoyo:
//          $0001: Absolute position read
//          $0085: Absolute position read
//          $0089: Absolute position read
//          $000D: Absolute position read
//          $009D: Absolute position read
//     Kawasaki: 0
Acc24E3[i].Chan[j].SerialEncCmd=$71025

Acc24E3[i].Chan[j].SerialEncEna=1

EncTable[n].Type=1
EncTable[n].pEnc=Acc24E3[i].Chan[j].SerialEncDataA.a
EncTable[n].pEnc1=sys.pushm
EncTable[n].index1=0
EncTable[n].index2=0
EncTable[n].index3=0
EncTable[n].index4=0
EncTable[n].ScaleFactor=1
EncTable[n].MaxDelta=0
Motor[x].pEnc=EncTable[n].a
Motor[x].pEnc2=EncTable[n].a
Motor[x].pPhaseEnc=Acc24E3[i].Chan[j].SerialEncDataA.a
Sina Sattari
Hardware Engineering Manager
Delta Tau Data Systems, Inc.
Reply
#3
Hi Sini,

Thanks for this info. Where can I find it in the manuals? It would be very useful to have documentation that explains the use of the serial encoder feature of the Acc24E3.

I have tried using this, but no success so far. Here is what I have done from the IDE:
Acc24E3[0].SerialEncCtrl=$f400003
Acc24E3[0].Chan[0].SerialEncCmd=$71025
Acc24E3[0].Chan[0].SerialEncEna=1

I used the $f4 in the Ctrl value, since that was the default value that was in the system when I started. I also tried just $3 that you had in your reply, but then there would be no clock divider. I have put a scope on the clock output, and see nothing, either way. Should I see a clock signal coming out all the time?

I also tried setting up the Encoder Conversion Table like in your example. I didn't set up a motor, as I am not going to use this encoder for feedback. If I am not going to use it with a motor, do I have to do the ECT entries?

The encoder I am trying to use is an Heidenhain ROQ 437, which has 25 bits per turn, and 12 turns. This is an EnDat 2.2 encoder. Is that a problem, since everything I see for the 24E3 says EnDat 2.1?

I am trying to get the encoder value from Acc24E3[0].Chan[0].SerialEncDataA.a and B. Is that the right place?

Is there anything else I need to do besides set these 3 values? I have tried it with motor[0] both disabled and enabled, with no difference.

Please, any help on this will be welcomed. Thanks again for anyone who can help me figure out how to read an EnDat encoder.

Bill



Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)