Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

1746-HSCE Encoder, Measuring Long Lengths?

Status
Not open for further replies.

T0n3z

Electrical
Nov 11, 2009
9
Hi,

This is my first ever forum post so here goes.

I have a AB 1746-HSCE encoder card with a 5/03 processor. I have everything working nicely and I get the pulse count. The problem I have is, I want to measure over a distance that exceeds 32767 pulses. What is the proper way of doing this?

Any help is greatly appreciated.
 
Replies continue below

Recommended for you

Converting 16 Bit Unsigned Integer to Floating Point

Since a SLC integer value is treated as two’s complement decimal in math operations, the following may be used to convert the raw 16 bit value to a floating point value instead so the whole range of 0-65535 may be used.


As one possible work-around, the "unsigned" integer word highest order bit can be masked using the MVM instruction and stored in another integer file. This resultant number is the amount of the integer greater than 32,768. Adding this number to 32,768 and storing the result as a floating point number will be the total number desired to perform logical operations and data storage
 
 http://files.engineering.com/getfile.aspx?folder=89c13999-8e35-4116-b406-6cd60f4106af&file=High_Integer[1].doc
Thanks jde777,

I thought if I started doing things like that it would involve the processor which is slower the the hsce card as I understand it. As a result when the processor says stop moving it may not necessarily be at exactly the right position due to it's slower response speed. What's your thoughts on that?
 
Depending on the resolution your application requires, you might consider changing the encoder or the encoder coupling.

If you can tolerate a lower resolution, either replace the encoder with one that has a few less counts per revolution, or change the encoder coupling to reduce the revolution of the encoder shaft.

Either way you could stretch the 32767 pulses out to the required distance.
 
The project that this will be used for is as follows.

We are heating a sheet of plastic in an oven, as the sheet begins to sag the oven floor needs to move down to maintain a constant distance between the heater and the sheet of plastic. The speed at which the sheet sags will increase as it gets hotter, so the variable speed drive will need to be told to speed up or slow down depending on it's position in relation to the sheets position.

I need to compare an analoge in value for the sheets sag in mm and the oven floor position which would be determined from the encoder.

I have no problems getting the alaouge in value scaled to mm and I have the encoder pulse count. Can you give me a rough idea what sort of ladder logic I should use to compare the two inputs to determine up, down and speed for the VSD.

Should I use scale with parameters to convert encoder pulses to mm ?

Should I the use simple comparators?

I'm new to encoders so just trying to determine the most effective way to program them.

Hope I have explained this well enough.

Thanks
 
From your description, I think I would consider using a PID loop for this.
Scale the sheet sag and floor positions both to mm.
The PV is the (floor position - sheet sag) in mm.
SP is in mm.
The loop CV is the drive speed command.
Using reverse acting, E=SP-PV
The loop will try to increase the CV in order to maintain the PV as the sheet sags toward the floor.
When the sheet is removed you disable the loop and return the floor to the SP position, and then enable the loop again when a new sheet is inserted.

Something like that perhaps...
 
NWBeaver,

Thankyou, PID was what I was thinking about using. I will take your advise and give it a go on my test rig.

Thanks.
 
Sorry for the delay. Yes breaking it out in logic will limit you to the processor scan. Also I agree with NWBeaver to use the PID for control.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor