sorry it took so long to reply, some good comments.
I am using an enhanced plc5;
Ken, I agree with Ron thanks you are a real asset to this site (not to minimize anyone else):
The modulo function is what I was looking for; CLX has a MOD block it as well as Rsview uses the mod operation in expressions. I am using an enhanced PLC5. I looked in the instruction list and there wasn’t a function for it. I did find it when I searched MOD (“modulus”) under topics. I tried it in a CPT function as suggested and it worked fine, although it is not listed in the operations available for that function.
Todster,
I tried your formula, it is like one I had experimented with but the PLC5 rounds an integer word up when the result of a division is greater than .5. example: 16 / 10 = 2, where 13 / 10 would = 1. My intent was to strip off the last digit of a number. Example: If the number was 1234 I want to get the 4. The problem with the way the plc solves the integer part of the calc will result in a correct answer for 1234 but a – 4 for 1236. At least that is how it came out when I programmed it. The Mod instruction works for my app but any suggestions (anyone) on how to make the formula work without major lim tests (just curious)? simialr to Alaric's comment
I am using an enhanced plc5;
Ken, I agree with Ron thanks you are a real asset to this site (not to minimize anyone else):
The modulo function is what I was looking for; CLX has a MOD block it as well as Rsview uses the mod operation in expressions. I am using an enhanced PLC5. I looked in the instruction list and there wasn’t a function for it. I did find it when I searched MOD (“modulus”) under topics. I tried it in a CPT function as suggested and it worked fine, although it is not listed in the operations available for that function.
Todster,
I tried your formula, it is like one I had experimented with but the PLC5 rounds an integer word up when the result of a division is greater than .5. example: 16 / 10 = 2, where 13 / 10 would = 1. My intent was to strip off the last digit of a number. Example: If the number was 1234 I want to get the 4. The problem with the way the plc solves the integer part of the calc will result in a correct answer for 1234 but a – 4 for 1236. At least that is how it came out when I programmed it. The Mod instruction works for my app but any suggestions (anyone) on how to make the formula work without major lim tests (just curious)? simialr to Alaric's comment