Delta Tau GEO BRICK LV User Manual

Page of 271
Geo Brick LV User Manual
 
PinOuts and Software Setup 
 80 
Encoder Loss Detection, Sinusoidal 
Encoder  loss  detection  with  Sinusoidal  encoders  can  be  performed  using  the  encoder  conversion  table. 
The  ECT  can  be  set  up  to  compute  the  sum  of  the  squares  of  the  sine  and  cosine  terms  (including  user 
introduced biases). Using channel #1, the encoder conversion table (5-line entry) for computing the sum 
of the squares would look like: 
 
I8024 = $F78B00 
; Diagnostic entry for sinusoidal encoder(s) 
I8025 = $100000 
; Bit 0 is 0 to compute sum of the squares 
I8026 = $0 
 
; Active Sine/Cosine Bias Corrections 
I8027 = $0 
 
;  
I8028 = $0 
 
; Sum of the squares result 
 
The result (@ $351D for example) corresponds to:  
(SineADC + SineBias)
2
 + (CosineADC + CosineBias)
2
 
 
This term can be monitored to check for loss of the encoder. If the inputs are no longer driven externally, 
for example because the cable has come undone, the positive and negative input pair to the ADC will pull 
to substantially the same voltage, and the output of the ADC will be a very small number, resulting in a 
small  magnitude  of  the  sum  of  squares  in  at  least  part  of  the  cycle.  (If  both  signals  cease  to  be  driven 
externally, the sum of squares will be small over the entire cycle). The high four bits (bits 20 – 23) of the 
sum-of-squares result can be  monitored, and  if the four-bit value  goes to 0, it can be  concluded that the 
encoder has been “lost”, and the motor should be “killed”. 
 
The 4-bit value can be obtained as follows: 
 
#define Mtr1EncLoss 
M180 
; Motor#1 Encoder Loss Status 
Mtr1EncLoss->X:$351D,20,4 
; Upper 4 bits of the sum of the squares 
 
!
Caution 
Appropriate  action  (user-written  plc)  needs  to  be  implemented  when 
an  encoder  loss  is  encountered.  To  avoid  a  runaway,  an  immediate 
Kill of the motor/encoder in question is strongly advised.   
 
No  automatic  firmware  (Geo  Brick)  action  is  taken  upon  detection  of  encoder(s)  loss;  it  is  the  user’s 
responsibility to perform the necessary action to make the application safe under these conditions. Killing 
the  motor/encoder  in  question  is  the  safest  action  possible,  and  strongly  recommended  to  avoid  a 
runaway, and machine damage. Also, the user should decide the action to be taken (if any) for the other 
motors in the system.