Analog input issue!

NoName

Member
Join Date
Sep 2003
Location
Domžale
Posts
273
Hello all.

I'm working with a Siemens C7-635 OP.
And this is the first time that i'm working with the analog inputs. On one of my four analog inputs i have connected a measuring device, wich measuers lenght. For instance 10 centimeters of lenght equals 1V, 20 centimeters 2V and so on to 100 centimeters and 10V. The main problem that i have is that the value wich I read from this particular analog input isn't riseing lineary.

For example:
When I measure 10 cm(1V on the analog input) of distance I read 144(INT value) on that analog input.
When I measure 20 cm(2V on the analog input) of distance I read 304(INT value). There is a deviation allready.
When I measure 30 cm(3V on the analog input) of distance I read 448(INT value).

Why is this happening??? I expected that the value would be riseing linearly like the Volts but it doesn't. Is there any way to correct this???
I should also state that i then convert the INT value do DINT and DINT to Real. So that I than devide the REAL value by that much that the final resoult is than 10 if the measuring device is measuring 10 cm...
If it is supposed to be measuring 40 cm the value that i get from the devidement is 75 :(

BTW: the analog input is configured like this:
Measurnig Unit: V
Measuring raneg: 0-10V
Interference frequency: 50Hz.(I changed this to 60Hz and 400 Hz, and nothing changes, I didn't expect it to change but it's worth trying.)

Thank you.
>Ales<
 
No Name,
My company uses analog inputs at an uncommonly high level. The device you're complaining about is probably some type of resistance feedback (in our world we call it a slidewire pot). Most of which contain linearity issues. Some of these measurement devices have a "zero trim and span trim" using small potentiometers on the device. Check to make sure if you have these. If so it's just a "setup" or adjustment problem. If there is no method for "adjustment" on the device. A method we have come to rely on is called a "characteriser". Which is nothing more than a subroutine that uses the raw input data and a lookup table to "relate or characterise" the raw input. How linear you want the signal will have a definite impact on how many "points" you care to plot. The raw input is then "characterised" based on this table. The intial input could also be slightly adjusted by an offset value to get it more closely to resemble what is actually happening in the real world.
Something like a subtract statement that aligns the raw data at the 1 CM spot. 144 - 44 = 100. This would not adversly affect the remaining points unless, the linearity is so bad, it traverses the intended slope of the line, at some other point.

bitmore
 
Last edited:
Where are you measuring voltage? At the terminals of the
analog card or at the sensor? You can also try adding
capacitor accross analog input. Maybe signal is picking up some
noise and your meter and input don't scale it same way
(meters often use True RMS).
 
Thank you for your reply's.
@Bitmore
The device unfortunatley doesn't have any potentiometers for adjusting zero trim and span trim.I have thought about useing the characteriser in this case. But it's alot of work, so I asked if there is a way to sort out the linearity problem.

I've tryed to substract a specific value from the raw value, but the result's aren't right in values above 40 cm.

@Panic mode

I'll measure the Voltage on the terminals of the analog card tomorow with a Osciloscope to see what kind of a signal I get there.

Thank you for the help guys.
I'll check back with the results of the measurment with the Osciloscope.
 
There seems to be a bit (or two) missing here.

I thought a C7 or S7 analogue input signal is delivered to the CPU as an INT between 0-27648 regardless of the source (amps, volts, ohms, monkeys, whatever). So, for a 0-10V signal, 1V would be 10% of the range or 2760-ish (allowing for rounding). 2V should be 20% or 5520-ish etc.

These are way out compared to your monitored values! 144 vs. 2760? It's more than just arithmetic that needs fixing here.

There's either some major interference, or what you're measuring isn't what the C7's getting. When things are that bad, trust the PLC. In this case I would say it's the victim, not the culprit.

Regards

Ken
 
Hello all.

Today I measured the input Voltage on the analog module on my OP. There I found that there is alot of interference.About 0.5V. So I put a capacitator in front and it cleard up all the interferance.

Then I measured the Volt's on that Analog input. The input voltage goes up linearly.For instance 1V is 10 cm... and so on. It's perfect so to speak. But in step 7 if I view the analog input(IW7) the values are not going up linearly. The displayed value is shown in INT-gers.
So what could be wrong??? Is the analog module some how defected or si there a fine tuneing option somewhere??? I doubt that it is though.
It's also strange that at 1V i get 144 on the analog input, not 2760-ish as Ken M stated... What could be the problem...???

The source is linear, but Step 7 doen't wanna play :(
 
Hi NoName,

In your first post you mentioned using the C7-635. This has built-in analogue inputs, but later you've referred to a 'module'. Have you added some extra I/O with standard S7 modules?

If you have added a SM331 analogue input of some form you will have to make sure you have set it up correctly in the Hardware Configuration and then adjusted the plugs in the side of the module if necessary. Siemens' standard analogue modules handle voltage, current, RTDs, thermocouples etc all in the one module. Tell the CPU how to treat each channel, and then put the measuring range plugs in the right way round. (It's a square plug with 4 alignments) These engage the correct circuitry to feed the A-D converter with the correct signal. Unfortunately I believe the default shipping location for these plugs is the voltage setting so unless you or someone else has 'adjusted' them they should have been OK.

I think we're looking at something pretty major like a plug 180 degrees out of alignment or a setting in the Hardware Config telling the CPU we're expecting a Pt100 or something.

This error definitely doesn't fall in to my "fine-tuning" category!

If you're using the built-in analogues, do they all show the same symptoms? Can you try re-wiring to another input channel? If they are all equally affected it may be something common to them all - e.g. either your signal (which you now are sure is OK) or the multiplexed A-D converter.

Regards

Ken.
 
Sorry Ken.
I expressed my self wrong. I ment that I measured the input voltage on the built in module.

In the attached picture there can be seen how the Analog inputs are configurated.
I have also tryed to re-wire it to another input, but the results are the same.
I have connected the source to AI2-U(analog input 2- voltage input), the other 2 inputs of that particular AI AI2-I(currnet measurment), AI2-C(reference potential chanel) I haven't connected any where. They are open so to speak. Is this wired correctly???

Regards
Ales

ai_config.jpg
 
Last edited:
I've found out what the problem was. I didn't wire the Analog inputs the correct way :rolleyes: I shuld have grounded the AI0-C input.
Now that the AI0-C is grounded it works like it should. 1V is around 2760 in INT... and so on! :)

Thank you all for helping me through this. If it wasn't for guys nothing would work as it should. So thanks alot Ken M, panic mode, Bitmore!
 
Glad to hear all is OK, NoName.

And don't worry, your secret is safe with us - we won't tell anyone!

Regards

Ken.
 

Similar Topics

I ran into a strange issue the other day. System has been up and running for many months. An analog input channel suddenly reported 0mA. I...
Replies
21
Views
3,189
Dear all, I a have issue with 1756-IF8 Module , I reading some Air pressure and temperature analog values from this card , I have total 4 Analog...
Replies
7
Views
2,665
Greetings, I'm about to begin a new job taking on a major operation drive by controllogix processors and tons of flex I/O modules.... its a big...
Replies
3
Views
2,886
I have a site with SLC505. The analog card is working but the ladder program is not sensing any analog inputs. It will be helpful if any one can...
Replies
6
Views
5,198
In this sample programming, what does U4 mean? Any assistance would be greatly appreciated.
Replies
8
Views
169
Back
Top Bottom