kamenges
Member
This is going to seem an odd post given my responses to the recent scan time thread, but here goes.
We are building a small slitter rewinder for a customer. The max speed is 2500 FPM. We are building child rolls from a larger parent roll. The child rolls need to be wound to an operator entered length. This is not a running transfer operation. The machine stops at the end of every roll. The run speed, the decel rate and both jerk rates are operator adjustable. We need to stop within 3 feet of the operator entered length.
The routine in the attached CLX program does what we need it to do. We can usually stop within one foot of the entered length from 2500 FPM. But this one routine takes about 3 msec to execute. It's also alot of code for what it does.
I know I can speed up execution by going to double integers instead of floating point numbers. However I think I remember seeing a single equation at one time that will calculate distance given speed, accel rate and jerk. Does anyone know where I can find something like that? Now that I have this developed I can re-use it so development won't be painful. I'm just curious if someone knows of a better way.
Keith
We are building a small slitter rewinder for a customer. The max speed is 2500 FPM. We are building child rolls from a larger parent roll. The child rolls need to be wound to an operator entered length. This is not a running transfer operation. The machine stops at the end of every roll. The run speed, the decel rate and both jerk rates are operator adjustable. We need to stop within 3 feet of the operator entered length.
The routine in the attached CLX program does what we need it to do. We can usually stop within one foot of the entered length from 2500 FPM. But this one routine takes about 3 msec to execute. It's also alot of code for what it does.
I know I can speed up execution by going to double integers instead of floating point numbers. However I think I remember seeing a single equation at one time that will calculate distance given speed, accel rate and jerk. Does anyone know where I can find something like that? Now that I have this developed I can re-use it so development won't be painful. I'm just curious if someone knows of a better way.
Keith