Brick Motion Controller Hardware Reference Manual
Encoder Loss Setup
The Brick Motion Controller has
Note
A
For the Brick Motion Controller Controller
Channel# | Address | Description |
|
|
|
Encoder #1 | Y:$78807,0,1 | Encoder #1 Loss Input Signal |
|
|
|
Encoder #2 | Y:$78807,1,1 | Encoder #2 Loss Input Signal |
|
|
|
Encoder #3 | Y:$78807,2,1 | Encoder #3 Loss Input Signal |
|
|
|
Encoder #4 | Y:$78807,3,1 | Encoder #4 Loss Input Signal |
|
|
|
Encoder #5 | Y:$78807,4,1 | Encoder #5 Loss Input Signal |
|
|
|
Encoder #6 | Y:$78807,5,1 | Encoder #6 Loss Input Signal |
|
|
|
Encoder #7 | Y:$78807,6,1 | Encoder #7 Loss Input Signal |
|
|
|
Encoder #8 | Y:$78807,7,1 | Encoder #8 Loss Input Signal |
|
|
|
As of this writing, there is no automatic action taken on detection of encoder loss. Users who want to take action on detecting encoder loss should write a PLC program to look for a change in the encoder loss bit and take the appropriate action. Generally, the only appropriate response is to kill (open loop, zero output, disabled) the motor with lost encoder feedback; other motors may be killed or aborted as well.
This next example program reacts to a detection of encoder loss. This is a more serious condition than a count error, so a “kill” command is issued when the loss is detected. The example is for a single axis only, but is easy to duplicate for multiple axes.
; Substitutions and definitions | ; Motor status bit | |
#define Mtr1OpenLoop | M138 | |
M180 | ; Standard definition | |
#define Enc1LossIn | ; Input | |
P180 | ; Brick Motion Controller Ch1 loss bit | |
#define Mtr1EncLossStatus | ; Internal latched status | |
#define Lost | 0 | ; |
#define OK | 1 | ; High is encoder present |
;Program (PLC) to check for and react to encoder loss
OPEN PLC 18 CLEAR
;Logic to disable and set fault status
IF (Mtr1OpenLoop=0 AND Enc1LossIn=Lost) ; Closed loop, no enc
CMD^K | ; Kill all motors |
Mtr1EncLossStatus=1 | ; Indicate encoder loss |
ENDIF |
|
; Logic to clear fault status
IF (Mtr1OpenLoop=1 AND Enc1LossIn=OK AND Mtr1EncLossStatus=0)
Mtr1EncLossStatus=0 | ; Indicate valid encoder signal |
ENDIF |
|
CLOSE |
|
|
|
System Wiring | 25 |