Encoder Help needed Please

Levi G

Member
Join Date
Sep 2015
Location
Alberta
Posts
148
Hi I have Micrologix 1100 and an incremental encoder, what I would like to do is convert the HSC:acc value to inches using a SCP instruction I am not sure how to go about it.
My encoder has a resolution of 1200p/r and the diameter of the wheel is 5"
 
Just use 0, 1200 for the 'input' and 0.0, 15.7079632 as the 'scaled'. Send the result to a float.

example:

SCP N7:0 0.0 1200.0 0.0 15.7079632 F8:0

Note - you'll have to MOV the HSC accumulator to an integer. The SCP won't accept the long accumulator.
 
Last edited:
SCP is best used for scaling a process variable that constantly varies which is probably not what you are looking for. Simple math function would probably work better.

I assume you know how to work out the math to convert one pulse to inches. Once you get that, multiple that number by the number of pulses to get you the inches.
 
So 5" is the diameter of the wheel on the encoder. Do I put in the circumference of the wheel (5x3.14=15.7)where you put the 5? correct me if I'm wrong.
 
No, you didn't misread it. I realized I messed up and edited it, probably while you were reading it.

But I am concerned in that it wouldn't be able to use a count greater than 32767. Will you reset each revolution?
 

Similar Topics

Hi Guys, Been years since I have done this stuff. I am struggling with the tracking/encoder and marrying the camera result data to the encoder...
Replies
19
Views
8,008
Help needed, Is there anyone who ever write code for OMRON Rotary Encoder with MicroChip's PIC16Fxxx series. I'm seriously needed. Thompson Soe...
Replies
0
Views
3,455
This application has a motor with encoder feedback that drives a linear actuator that moves in/out, and is at roughly 45 degs from horiz. As the...
Replies
19
Views
1,369
Hi, I have a S7-1200 (214-1HG40-0XB0) connected to a SEW Movitrac MCX91A-CFN V4.0 through profinet. Now I have a EZ2Z Singleturn encoder on my...
Replies
7
Views
632
Hi everyone, I have a Micrologix 1400 using an HSL instruction (High Speed Counter Load). This instruction is used in junction with an encoder...
Replies
1
Views
820
Back
Top Bottom