analog scaling problems

escoplcguy

Member
Join Date
Jun 2010
Location
New Jersey
Posts
191
im using a slc 5/03 and the SCP instruction. i am trying to set up laser triangulation displacement sensors and it doesnt seem to be scalling properly, hopefully someone can help me. the signal is 4-20mA user set. so i set the 4mA signal and i set the 20mA signal where 3277 = 0 and 16383 = 241. after i use a div and divide the sacaled number by 8 to get a number that is in 1/8 inch incerments. the problem i am having is ill send something through to be measured and its just not right, i check with a ruler and its off, so i adjust the 241 to set it right and send something else thats higher or lower and its off ..... i guess my question is what is the best way to calibrate?? also, when i set my 4mA its a pallet on a convayor after i remove the pallet i get a lower number than 3277 should i use this as my min??
 
escoplcguy,

please double check your sensor mounting with the manual, your mounting bracket may not be the correct way. what color is your product versus the color of the laser, a red laser doesn't work well with a green surface for example.

is this a wooden pallet or plastic? wood is a rough surface and is not very reflective.


the best way to calibrate is to either use a calibration meter simulating a 4-20 ma signal, or place a pallet under the laser for the 4ma signal and read the input data, this would replace the 3277 amount. then remove the pallet and place what ever object you are detecting for the 20 ma signal and read the input data. this amount would replace the 16384 number.

then do the math and verify what you are doing is correct.
for example, if you are at 4" you will get 32.xxx, the 32 represents (32) 1/8" increments. 8 inches woulb be 64 and so on.

your data will change since you are on a conveyor and using different pallets. you may also have to play with your scaling and math to get the best answer.

regards,
james
 
i thought on the analog card the lowest it could go was 3277 and the highest it could go was 16384....who does my raw signal exceed or go below this number?? i guess i need to take this into account???
 
if the input current goes below 4 mA for any reason then the data will go below 3277 ...

and if the input current goes above 20 mA for any reason then the data will go above 16384 ...

have you checked to see if the readings are CONSISTENT/REPEATABLE? ... in other words, send the same part through the system MANY times in a row ... if you do NOT get the same data results each time, then you've got to fix that problem before you worry about scaling ...

do you realize that you're working with INTEGER numbers here? ... so if you take the number 241 and divide it by 8 (as you said you're doing) then you're only going to have about 30 "steps" of resolution for your system ... is that going to be enough to give you good results? ...

secret handshake: no matter what it says, the signal is not REALLY "analog" ... it's just a series of "steps" ... so ... if you don't have enough steps, you'll end up with "chunky-style" control – instead of "smooth-style" control ...

and what does the number 241 represent anyway? ...
 
Last edited:
hmm interesting Ron... ok here is whats going on and this goes along with another thread I had posted....I have cement blocks that I am doing a height measurement on. After hearing recommendations on the site (where I originally wanted a light curtain but found that wouldn't work for us) I got demo units of some laser triangulation displacement sensors. One from AB (more photo optic than laser displacement) and one from Keyence (IL-600). The object is to
A. Measure a block to see its height and
B.See if said block was within spec range.
Our spec range is +\- 1/8 of an inch. and our blocks also range in size from as low as 5" to 30". The number 241 represents a calibration tool I had built that is 30.125" or 30 and 1/8 inch. my 4mA is set to an empty metal pallet. I then put my tool on this pallet and set my 20mA therefore y = -2.5313x + 30.125 . now leaving it like this, and displaying it on a screen (PV600) the supervisors didn't like it, they wanted to see the display to ONLY read the numbers ramped up in 1/8 inch increments. I posted this thread "http://www.plctalk.net/qanda/showthread.php?t=62013" and came up with a way to scale my blocks in 1/8 inch increments. so now using my calibration tool 241 represents 241 1/8ths in 30.125. I take that number and divide it by 8. Now the reason I'm posting this thread, is my measurements are not right at all. for instance, I calibrate and send a 20in block through, and I get it right on....I then push a 7in block through and I'm way off sometime by 2 inches. So if I then adjust my 241 number, I then put my x/y line off axis and now when I put my 20" block through the system my measurement is off now on this block. I have looked through the manual many times and made sure using a volt meter that my 4ma and 20ma signal were dead on. so my question is what is throwing my axis off??
 
the information that you've just posted is interesting - but we still need to go back to my original question:

have you checked to see if the readings are CONSISTENT/REPEATABLE? ... in other words, send the same part through the system MANY times in a row ... if you do NOT get the same data results each time, then you've got to fix that problem before you worry about scaling ...

think about adjusting the sights on a rifle ...

suppose that you take several shots at a target – and all of the shots go into a small pattern (a tight "grouping") ... in THAT case, you CAN eventually adjust the sights ... it's just a matter of turning the adjustment screws the right amounts - in the right directions – to move the grouping onto the bulls eye ...

now suppose that you take several shots at a target – but all of the shots are scattered all over the place – some left, some right, some up, some down ... specifically, there's no repeatable pattern (no "grouping" to speak of) ... in THAT case, you can NOT adjust the sights ... in other words, which way would you turn the adjustment screws? ...

so ...

maybe you've already made the test I've asked about – but your latest post doesn't specifically tell us whether you have or not ... make sure you've got that step done first – and then work from there ...

in simplest terms ... if sending the SAME block through MULTIPLE times doesn't give CONSISTENT/REPEATABLE results, then you're just wasting your time trying to "scale" the signal ... you'll need another way of making the measurements ...
 
Last edited:
another thought:

I have ... made sure using a volt meter that my 4ma and 20ma signal were dead on.

first of all, you should be using an ammeter (not a voltmeter) ... is that just a "that's what I meant to say" mistake on your part? ...

going further – are you telling us that each of the mA signals from the field device - for each of the various block sizes – all read dead-on-the-money each time? ... in other words, the MEASUREMENT device is RIGHT – but the PLC is somehow converting the field signals into weird off-the-wall data readings? ...

(note: don't check just at the 4 mA (bottom) and 20 mA (top) of the range ... take some readings for various size blocks too) ...

if THAT'S the case, then post your RSS file – this could be something in the way you've written your program ...

and double-check your wiring ... this could be "signal noise" or something along those lines ...
 

Similar Topics

Hi I'm trying to change a project in my workplace. I need to replace an existing analog input card with an analog in/output card on a Siemens...
Replies
6
Views
3,267
Hello, We monitor the temperature of a pipe via a 4-20mA temperature transducer. This goes into DB135(Read Analog Inputs). The issue I have is the...
Replies
0
Views
625
Hi all! I have a question about RSLOGIX and Analog input/output scaling So we have an existing controller with an IF8I and OF81 card. My...
Replies
3
Views
933
I’m trying to perfect the HMI interface for analog configuration. I’ve provided the user the same options for all analog inputs, as follows...
Replies
10
Views
1,669
Hi I have a modicon 984 with proworx 32 that is scaling an analog input, and I need to adjust the scaling. I have new analog input values and %...
Replies
3
Views
1,727
Back
Top Bottom