Vetteboy
Member
- Join Date
- Jul 2002
- Posts
- 380
I've done a little research on this but still haven't found an answer.
I'm trying in RSLogix 500 on a SLC 5/04 to calculate an integer I want to use elsewhere in the program. I happened upon the Math overflow of trying to put my non-whole result in an integer file. The question I have is what do I have to do to get a whole result I can use. I do not want to use floating points and can't believe I have to.
Right now with the integers in the formula I am using, I have to divide by 1.0472 (inches per pulse) to calculate the number of pulses before taking the next action. The result right now is 133.3678
Why can't I force the result to be rounded, in this case 133, and stuff the result in an integer file?
I'm trying in RSLogix 500 on a SLC 5/04 to calculate an integer I want to use elsewhere in the program. I happened upon the Math overflow of trying to put my non-whole result in an integer file. The question I have is what do I have to do to get a whole result I can use. I do not want to use floating points and can't believe I have to.
Right now with the integers in the formula I am using, I have to divide by 1.0472 (inches per pulse) to calculate the number of pulses before taking the next action. The result right now is 133.3678
Why can't I force the result to be rounded, in this case 133, and stuff the result in an integer file?