Introduction
Beckhoff EL5151 is an encoder module. It can record high speed inputs and send them up the controller. Beckhoff added a new latch feature in EL5151 in 2008. When the C input is high and the EL5151 is enabled for latch in C input, it moves the current counter value to latched value. This is a very useful feature to capture event triggered high speed value. However, it is a little tricky to setup.

Set up the Latch on C feature
For EL5151 to move the counter value to the latch value, value of 7000:01 has to be true. That value is controlled by ENC Outputs – Enable Latch C.  “Enable Latch C” output has to see a transition from 0 to 1 before the system can latch the counter value when C input is high. You can link “Enable Latch C” with Beckhoff System Manager to a hardware input or software.

Beckhoff EL5151 Encoder Module Setup

General Setup on EL5151
To change the EL5151 setup, you need to access its online configuration via System Manager and click on the COE-Online tag as shown. 8000:x is the section you can change, which has “RW” flag (read and write). Any variables with “RO” (Read Only) flag are not changeable by operator.

8000:01 Enable C Reset – if it is true, every time the C input is high, the counter value is reset to 0
8000:03 Enable Up/Down Counter – if it is true, counter value goes up or down base on the inputs.

EL5151 Wiring Diagram
You can get the wiring diagram from Beckhoff Information System or from the module itself. It is troublesome to shut down power and pull the module out just to look at its wiring diagram. I uploaded it here. Hopefully other electricians do not need to go through the same trouble as I did.

Beckhoff EL5151 Wiring
Beckhoff EL5151 Wiring

More Information:
For other settings, please visit http://www.beckhoff.com for more details.