oliver.h Posted April 27, 2013 Share Posted April 27, 2013 I'm using a new Geo Brick LV with a Endat+sinusodial (4D3 option). I have an Endat 2.2 encoder connected. Until now I couldn't receive any encoder data. I connected an oscilloscope to the wires (with encoder) and there is nothing happening. These are the voltages I measure on CH1 with connected encoder and configured PMAC: Pin 01: 4.73 V (Unused) Pin 02: 4.73 V (Unused) Pin 03: 4.84 V (Unused) Pin 04: 4.93 V (Out, Encoder 5 Volts) Pin 05: 3.16 V (In, Data-) Pin 06: 4.76 V (Out, Serial Encoder Clock-) Pin 07: 2.45 V (Unused) Pin 08: 0.04 V (Unused) Pin 09: 4.73 V (Unused) Pin 10: 4.73 V (Unused) Pin 11: 4.84 V (Unused) Pin 12: 0 V (Common Ground) Pin 13: 4.76 V (Out, Serial Encoder Clock+) Pin 14: 0.82 V (In, Data+) Pin 15: 0 V (Unused) With unconnected encoder I measure the following voltages: Pin 01: 4.73 V (Unused) Pin 02: 4.73 V (Unused) Pin 03: 4.84 V (Unused) Pin 04: 4.94 V (Out, Encoder 5 Volts) Pin 05: 4.82 V (In, Data-) Pin 06: 4.83 V (Out, Serial Encoder Clock-) Pin 07: 2.45 V (Unused) Pin 08: 0.05 V (Unused) Pin 09: 4.73 V (Unused) Pin 10: 4.73 V (Unused) Pin 11: 4.84 V (Unused) Pin 12: 0 V (Common Ground) Pin 13: 4.82 V (Out, Serial Encoder Clock+) Pin 14: 4.82 V (In, Data+) Pin 15: 0 V (Unused) Is the encoder IC dead? How can I make a test to see if it should work? This is the configuration i use: CLOSE ; Make sure no buffers are open DEL GAT ; Free memory // EnDat Control Registers Setup //=========================== NOTES ABOUT THIS PLC EXAMPLE ================================// // This PLC example utilizes: - M5990 through M5991 // - Coordinate system 1 Timer 1 // Make sure that current and/or future configurations do not create conflicts with // these parameters. //=========================================================================================// M5990..5991->* ; Self-referenced M-Variables M5990..5991=0 ; Reset at download //========================= GLOBAL CONTROL REGISTERS ======================================// #define EnDatGlobalCtrl1_4 M5990 ; Channels 1-4 EnDat global control register EnDatGlobalCtrl1_4->X:$78B2F,0,24,U ; Channels 1-4 EnDat global control register address //======================== CHANNEL CONTROL REGISTERS ======================================// #define Ch1EnDatCtrl M5991 ; Channel 1 EnDat control register Ch1EnDatCtrl->X:$78B20,0,24,U ; Channel 1 EnDat control register Address //========= POWER-ON PLC EXAMPLE, GLOBAL & CHANNEL CONTROL REGISTERS ======================// Open PLC 1 Clear EnDatGlobalCtrl1_4=$040003 ; Trigger at Phase, xxxMHz serial Clock –User Input //Ch1EnDatCtrl=$15141C ; Send test values Channel 1 EnDat control register –User Input Ch1EnDatCtrl=$38141C ; Channel 1 EnDat control register –User Input //Ch1EnDatCtrl=$15141C ; Reset Channel 1 EnDat control register –User Input I5111=500*8388608/I10 while(I5111>0) endw ; ½ sec delay Dis plc 1 ; Execute once on power-up or reset Close //=========================================================================================// // Set up Encoder Conversion Table // Position I8000=$2F8B20 ; Unfiltered parallel pos of location Y:$78B20 I8001=$1C000 ; Width and Offset. Processed result at $3502 I100=1 ; Mtr#1 Active. Remember to activate the channel to see feedback I103=$3502 ; Mtr#1 position loop feedback address I104=$3502 ; Mtr#1 velocity loop feedback address I108=1 ; Mtr#1 position-loop scale factor I109=1 ; Mtr#1 velocity-loop scale factor I167=8388607 ; Mtr#1 Position Error Limit Link to comment Share on other sites More sharing options...
Richard Naddaf Posted April 27, 2013 Share Posted April 27, 2013 Would you mind sharing your encoder's data sheet and or manufacturer's part number? Link to comment Share on other sites More sharing options...
oliver.h Posted April 28, 2013 Author Share Posted April 28, 2013 Would you mind sharing your encoder's data sheet and or manufacturer's part number? Hi Richard, The manufacturer of the encoder is heidenhain. It is an absolute encoder with 28 bit and endat 2.2. The controller's part number is: GBD4-F3-400-14D4D300 Link to comment Share on other sites More sharing options...
Jay Lee Posted April 29, 2013 Share Posted April 29, 2013 Hi Oliver, here are the 3 things you need to consider: 1. clock Please change your clock to 1Mhz or lower. I don't think 5Mhz will work on GeoBrick LV If you have a very short cable, then 4Mhz might work. 1Mhz clock: EnDatGlobalCtrl1_4=$2003 2. Actual position The actually position in your case, will be separated in two registers, since the data is more than 24 bits. The first 24 bits will be in Y:$78B20, and the rest 4 bits will be in the lower 4 bits in Y:$78B21 You need to define an M-variable, or suggested M-Variable, M162, as the actual position. And then construct the position: M162 = (Y:$78B20) + ((Y:$78B21)&(00000F))*$1000000 3. CRC error You should define M-variables pointing to Serial Data A register (Y:$78B20) and Data B register (Y:$78B21) to monitor the data comes in. If you find bit 22 in Data B is high, then you have a CRC error, meaning the resolution setting is wrong. This means your encoder might not be 28-bit, and you have to check it again. Once the resolution setting is correct, CRC error bit will be 0. Link to comment Share on other sites More sharing options...
oliver.h Posted April 29, 2013 Author Share Posted April 29, 2013 Hi Jay, The communication is fine now. The PLCs weren't working. The next thing I want to do is use the excel file for the configuration and then tune the motor. Link to comment Share on other sites More sharing options...
Recommended Posts