Download Geo Brick LV User Manual
Transcript
Geo Brick LV User Manual Encoder Loss Example PLC: A 4-axis Geo Brick is setup to kill all motors upon detection of one or more encoder loss. In addition, it does not allow enabling any of the motors when an encoder is in a loss condition: #define Mtr1AmpEna Mtr1AmpEna->X:$B0,19 #define Mtr2AmpEna Mtr2AmpEna->X:$130,19 #define Mtr3AmpEna Mtr3AmpEna->X:$1B0,19 #define Mtr4AmpEna Mtr4AmpEna->X:$230,19 #define Mtr1EncLoss Mtr1EncLoss->Y:$078807,0,1 #define Mtr2EncLoss Mtr2EncLoss->Y:$078807,1,1 #define Mtr3EncLoss Mtr3EncLoss->Y:$078807,2,1 #define Mtr4EncLoss Mtr4EncLoss->Y:$078807,3,1 #define SysEncLoss SysEncLoss=0 M139 M239 M339 M439 M180 M280 M380 M480 P5989 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; Motor#1 Amplifier Enable Status Suggested M-Variable Motor#2 Amplifier Enable Status Suggested M-Variable Motor#3 Amplifier Enable Status Suggested M-Variable Motor#4 Amplifier Enable Status Suggested M-Variable Motor#1 Encoder Loss Status Bit Bit Bit Bit Bit Motor#2 Encoder Loss Status Bit Motor#3 Encoder Loss Status Bit Motor#4 Encoder Loss Status Bit System Global Encoder Loss Status (user defined) Save and Set to 0 at download, normal operation =1 System Encoder Loss Occurred OPEN PLC 1 CLEAR If (SysEncLoss=0) ; No Loss yet, normal mode If (Mtr1EncLoss=0 or Mtr2EncLoss=0 or Mtr4EncLoss=0 or Mtr4EncLoss=0) CMD^K ; One or more Encoder Loss(es) detected, kill all motors SysEncLoss=1 ; Set Global Encoder Loss Status to Fault EndIf EndIF If (SysEncLoss=1) ; Global Encoder Loss Status At Fault? If (Mtr1AmpEna=1 or Mtr2AmpEna=1 or Mtr4AmpEna=1 or Mtr4AmpEna=1) ; Trying to Enable Motors? CMD^K ; Do not allow Enabling Motors, Kill all EndIF EndIF CLOSE 78 Connections And Software Setup