Delta Tau GEO BRICK LV User Manual

Page of 271
Geo Brick LV User Manual
 
PinOuts and Software Setup 
 93 
Field 
Value 
Notes 
Channel Control Word 
Command code 
=$38 
Hex 0x38 for EnDat 2.2 only 
$381425 
Trigger Mode 
=0 
Continuous trigger (typical) 
Trigger Enable 
=1 
Enable 
Data Ready / Senc Mode  =1 
Enable serial driver 
Protocol Bits 
=37 
Hex 0x25 
 
Control Registers Power-On PLC  
The Global and Channel Control words have to be executed once on power-up  
//=========================== 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=$3  ; Trigger at Phase, 4MHz serial Clock –User Input 
Ch1EnDatCtrl=$381425  ; 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   
 
 
//=========================================================================================// 
 
 
Note 
Some  EnDat2.2  Encoders  do  not  support  additional  information  with 
the  $38  (111000)  command  code.  Try  using  $07  (000111)  command 
code  if  you  cannot  see  data  in  the  Serial  Data  Register  A,  or  in  the 
position window (after setting up the Encoder Conversion Table).