Absolute encoder on controllogix

A "sourcing" encoder is likely compatible with the 1756-IB16 inputs, which are conventionally thought of as "sinking" because you apply +24V DC to them.

The principal trick to getting Gray code to work reliably on 1756 series modules is to use a Synchronous Copy (CPS) instruction to copy the data out of the module into a holding register before decoding it. This prevents the module's RPI from possibly updating in the middle of the Gray decode logic.

Examples of Gray code -> integer logic can be found in the RA Knowledgebase article 32743 (TechConnect Required).

I would use the simple Structured Text loop described in that document. You could even embed it into an Add-On Instruction if you like.

Code:
LENGTH:=31;

INDEX:=LENGTH-1;

BIN_DST.[LENGTH]:=GRAY_SRC.[LENGTH];

For INDEX:=LENGTH-1 to 0 BY -1 DO

BIN_DST.[INDEX]:=GRAY_SRC.[INDEX] XOR BIN_DST.[INDEX+1];

END_FOR;
 
Ken, the RSLogix version I was using for the project didn't have Structured Text, but I was able to use ladder logic to convert the Grey Code to Binary using the Knowledge Base article you linked. Using the CPS instruction, there is actually much less logic needed using the absolute encoder than the old incremental encoder. The new routine hads4 rungs, as compared to over 30 on the old routine. The only downside I could tell was that the resolution of the old encoder was 2000 cycles per revolution, as compared to a max of 255 on the absolute encoder.

Another thing I was wondering...when I called ElectroCam to see if they had information about which module they recommended using, they seemed to have no information at on on ControlLogix, even though they had example logic and module information for the SLC right in the documentation included with the encoder. Should I call and share the information with them, or keep it to myself?
 
Last edited:

Similar Topics

Hello. An absolute encoder on a rotary axis gives values in range -2147483648 to 2147483648. When value is > 2147483648 , the encoder value is...
Replies
20
Views
2,293
I have 2 Absolute Encoders 8192 steps per Rev. (Model TR Electronic CEV65m-11003) These Encoders communicate to the PLC5-60 via Parallel push/pull...
Replies
3
Views
1,516
Hi guys I am new to Encoders, so I have limited understanding of how to actually configure it, to the situation that I am in. Using this Absolute...
Replies
2
Views
1,576
Hello to you all! I hope there is someone who can clarify some things to me..... Equipment used: TM PosInput1 (6ES7138-6BA00-0BA0) to read the...
Replies
0
Views
1,270
How to connect the absolute encoder(12 bit resolution) to Hsc module of Slc500 Plc and get raw-data to my ladder logic? Please give me example...
Replies
8
Views
2,696
Back
Top Bottom