Appendix b - rslogix 5000 sample code, Linear scaling example, Appendix b – Rockwell Automation 842E EtherNet/IP Absolute Encoder User Manual User Manual

Page 61: Rslogix 5000 sample code, Appendix

Advertising
background image

Rockwell Automation Publication 842E-UM001A-EN-P May 2012

53

Appendix

B

RSLogix 5000 sample code

This appendix gives examples of using your encoder, including how to use
RSLogix 5000 to set and read parameters.

“Linear scaling example,” next section

“Setting up your project” on page 54

“Using an explicit message configuration to set preset encoder value” on
page 59

“Using an explicit message configuration to read preset encoder value” on
page 63

“Using an explicit message configuration to obtain the encoder’s run-time
in seconds”
on page 67

Linear scaling example

A linear cart is to be controlled using ball screw slide. The cart will stop after 1 m
of travel for loading and unloading. For precise measurement of the distance
between stops, 10,000 steps are required.

The cart will travel 20 mm for one revolution of the encoder, bringing the
number of rotations the encoder turns for 1m of travel distance to 50. For a
resolution of 10,000 steps per meter, the encoder requires 200 steps per
revolution.

There are three (3) stops along the 3-m track, so our total resolution must be at
least 3 x 10,000 = 30,000 steps to cover the length of the track. For the scaling
function, our total resolution must be

2

n

x CPR

or in this case

2

8

x 200 = 51,200

Advertising