Position Calibration with encoder and ML1100/PV C200

framerotblues

Member
Join Date
Jun 2015
Location
MN
Posts
2
Hello,

I've recently had to write some ladder involving an encoder and an AB MicroLogix 1100, and it involves positioning. I currently have tags on function keys of the Panelview C200 writing to bits to move static numbers into integer registers (in inches), and I've got a bit of a mental block/lack of experience. I can do the math to get the feet an inches to display properly, but...

Currently, the user will drive the object to 48 inches and press a button that will stick the encoder counts into a long integer, then drive the object to 120 inches and press another button to stick that encoder count into another long integer, and I can derive number of encoder counts per inch based on this. But unless I can set the HSC to some arbitrary count number at the 120 inch mark, I can't seem to determine how to make it count up and down from here.

Current ladder:

hzCeTAz.png

jDsIY7V.png


I'd appreciate any help or pointers anyone's willing to give.
Thanks!
 
Last edited:
I'm not understanding the problem. Why do you want an arbitrary number for the HSC count? You are measuring the actual count values, so you should be using the actual HSC count for the numerator in your divide for engineering units position.

And, as always, I don't like using an HSC count value directly in my programs, I always create an internal counter based off of an HSC, and use that.
 
In this program I'm using the HSC for user-recordable positioning that existed previously, a kind of "turn the key for 5 seconds and lights blink in sequence, choose the sequence you want for the position you want to record and turn the key for 5 seconds again" wherein there was no display, but the motor would travel the device to the proper preset, stop until the button was released, and then travel again to the next preset. That portion works fine. Now we're adding a position display in feet and inches and I want to be able to have the user calibrate the travel so the display is accurate, without touching the preset portion of the program.

If I write to the HSC (which apparently I can do) and when calibrating it at, say, 10 feet and insert a predetermined HSC count, that will cause havoc with the presets if they already exist. I agree that moving the HSC to a separate counter is a direction I'd like to go, and then I can adjust that counter during calibration without touching the presets. I'll give that a try, thanks!
 

Similar Topics

I have an array of 55 REAL values. Is there a way to multiply based on the array location ? I have 55 transfer belts that are equally spaced...
Replies
3
Views
150
Hi All, I could do with some advice on a hydraulic control system. It is necessary for me to accurately position a vertical hydraulic ram with...
Replies
34
Views
1,892
Hello I am trying to make a program work with a sqo instruction .The process has 5 steps ,and a starting step of zero.There should be 8 sec...
Replies
17
Views
1,033
It's been a long time since I've had to think of P&ID tag nomenclature myself (and not gone along with some scheme devised by someone else). I've...
Replies
1
Views
227
Out of interest, I'd like some thoughts on what would be considered best practice with regards to a 2-position turntable control scheme (see...
Replies
17
Views
1,124
Back
Top Bottom