×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# tenths, hundredths?

## tenths, hundredths?

(OP)
I'm in the conception phase of a new project and wondering if I can use a PLC as the control device.  I need to measure the opacity of a solution, most likely using a diode-receiver pair with a proportional voltage output. My question is how precise of a measurement can I obtain with a plc analog card (how many decimal places) one would be fine, two would be optimum.  Can anyone sequence me through the steps of obtaining decimal places from a BCD value?  I'm fairly familiar with ladder logic however this would be my first time dealing with an analog input.

I would most likely use an Automation Direct DL06 PLC with a F0-2AD2DA-2 Analog Combination Card.

Thanks in Advance for any assistance,

Pete

### RE: tenths, hundredths?

Ok, this is a 12 bit card with 0-5v or 0-10v ranges. If you use 0-5 then a count of one represents is 5/4095=1.22mv. If you use 0-10 then it's 10/4095=2.44mv. I don't quess I understand your question about decimal places, since the data won't be represented that way anywhere in your program. You always should maintain an engineering count base of 0 to 4095 taking 4095 to be 100% of something. Anyway, to scale the result to units that you may be dealing with such as opacity, you should use the line formula y=mx+b where m=slope and b=zero offset. Don't fiddle around with decimal places at all in the plc unless you absolutly must because this can only slow down your control system. BCD integer data handling is the best for well built control and instrumentation systems. If you need to display data as a 2 decimal point number on a display device most of these allow you to tell it how many decimal places the number represents. But, all this being said, what is the units of opacity anyway? I hope this helps, holler if I confused anything.

### RE: tenths, hundredths?

(OP)
Thanks Skills,

The objective of the system is to measure the nickel concentration of a plating solution.  The concentration of a nickel plating solution is measured in g/L, with 6 g/L considered a 100% concentration.  The color of a 100% Nickel plating solution is a deep green and lightens linearly with a decrease in concentration. I have already proven that I can obtain a linear voltage output throughout the practical concentration rage of 60 to 100%.

I've been trying to display measured voltages on an Automation Direct EZTouch Panel in two different ways; in grams per litter (0.00-6.00 g/L), and in concentration percentage (0.00-100.00%).  I'm failing miserably at both

The Touch panel programming software lets you pick the data type (integer, BCD, BIN, OCT, etc), digits to display (1 -5) and also how many fractional digits to display.  However, lets say I'm displaying the number 4, and would like it to be displayed as 4.0, I choose "BCD", "display two digits" and "1 fractional digit" in the program but it displays the value as 0.4 not 4.0...

If anyone has any idea what I'm talking about I would greatly appreciate some guidance :)

### RE: tenths, hundredths?

OK! several things... 1st, which system would you prefer g/l or %? Next, your it seems as if your scaling is inappropriate for what you want to see on your EZ touch, which, by the way is one of my favorite display systems. If you decide to display 2 digits with 1 decimal place, this implies that the PLC register data is scaled X10. See, you shouldn't be sending 4 to see this, you should send 40. Let me try an example. 0-4095 corresponds to 0-60ips in speed. Remember y=mx+b. Since 4095 is greater than 60 I elect to carry data in hundreths ips. So 4095 =60.00. In this example, the y is 6000 since it is the scaled target and x is 4095 and b is 0 since the offset is zero. So 6000= 4095m
or m=6000/4095 or m=1.465. m ~~ 146/100. In integer math I would mult raw data by 146 and then divide by 100 to keep the accumatolor from puking. This example wasn't well thought out because of the large number problem; but, you see that when I have 1526 in the display register, it represents 15.26 ips. If you want to use a EZ panel your register MUST contain your data X10 for tenths display or X100 for hundreths display. I hope this helps you in your work. Holler if it doesn't

### RE: tenths, hundredths?

It just occurred to me that if you send all pertinent scaling data that I could put the code together to set this up for you. If your interested just post the transfer function and what you want to display.

### RE: tenths, hundredths?

(OP)
THANK YOU SKILLS...

Sorry it has taken me so long to reply but I live in the northeast and we just got hammered with 30 inches of snow...

Anyway thanks for the info...I'll see what I can do with it.  If you can help me a little more that would be great.

This is what I have, and what I need done:

(1) I'm using the card at a 0-5V input
(2) I need displayed 0.0 - 10.0 g/L

### RE: tenths, hundredths?

Ok,  0-5volt @ 12 bits = 1.22mv/count and 5 volt=4095. The display register holds 0 to display 0.0 and 100 to display 10.0 with display system set for 1 decimal place. y=mx+b
1st take a reading of 0.0g/l solution and the raw value in is your zero or b that we want to subtract from the raw value.Write a line that takes RAW DATA in and subtracts b from the RAW DATA and places in in a register called 'zerod'. Next having done that, take a reading of 10.0g/l solution and look at value in 'zerod'. Your scale factor must divide into 'zerod' and result in 100. Place the result in a register called 'Display'. That's all there is to it. I'm assuming that you have experience with subtract, mult, and divide blocks. Try this and write back if you have any problems with overflow or what have you. This technique you should learn as it is the one I always use to calibrate scales, displays, or data aquisition systems. Hope this helps.

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

#### Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a partâ€™s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!