Jump to content

Recommended Posts

Posted (edited)
I have a voltage connected to a f4-08ad analog input module. The voltage scale that I will be reading is 0-10V. I take the input to the module and load the value into memory,divide by 409(this is my scaling factor),then output the value to another memory location.When I read the value in the memory location that I specified I can only read in whole numbers, I would like to read in 1/10th's of a number at a minimum. How can I make my voltage value be displayed with more accuracy? Edited by mad1

Posted
The easy way is to use an implied decimal. This means shifting your scaling slightly to make an extra digit that is implied as a decimal point. Since the upper limit of the analog card is 4095, you can: LD V2000 * Analog value MUL K4090 * 409 * 10 to make an implied decimal place DIV K4095 * Divide by the card resolution OUT V2100 * Output address for scaled number
Posted (edited)
Here is a picture of my sample program and the Data View window. I am inputting 5V to the analog input module. I updated the picture of my program. Edited by mad1
Posted (edited)
Here is my program. My DVM reads 4.99V in comparison to the memory location V2100 with a number of 498. Edited by mad1
Posted
Multiply by 10 before you divide and see what you get as rlp122 suggested. You may have to use double precision math at that point I'm not sure. It's been a while since I've done math with that PLC. The way you have it now you are depending on every bit. That is not realistic. What accuracy do you need? I'm guessing that input card is about 1/4% of F.S. accuracy which would give you about +/- 0.025 volts on a 0-10V scale.
Posted (edited)
That would be acceptable. When I leave the program in the current setup, V2000=2049 V2100=500 After the addition of the X10 box, v2000=2049 V2100=21 Thanks Edited by mad1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...