Siemens CPU 224 XP analog to real???
Siemens CPU 224 XP analog to real???
(OP)
Hi all
I am using Simatic S7-200
I have connected a cpu 224 xp and a analog sensor (4-20mA) 12 bit resolution inside of a pneumatic cylinder. When the cylinder is fully retracted the value on the PLC is 6304 and @fully retract is 26624.
I have problems converting the analog value in to inches.
I tried to determine the resolution and I have the following results: intercept is -2.4450 and the x variable is 0.0004
I looked over some the other topics but without success.
Can somebody help me with the program?
Thanks’ in advance!
C
I am using Simatic S7-200
I have connected a cpu 224 xp and a analog sensor (4-20mA) 12 bit resolution inside of a pneumatic cylinder. When the cylinder is fully retracted the value on the PLC is 6304 and @fully retract is 26624.
I have problems converting the analog value in to inches.
I tried to determine the resolution and I have the following results: intercept is -2.4450 and the x variable is 0.0004
I looked over some the other topics but without success.
Can somebody help me with the program?
Thanks’ in advance!
C





RE: Siemens CPU 224 XP analog to real???
RE: Siemens CPU 224 XP analog to real???
Does siemans have this same feature on their analog input
cards?
I barely remember analog input cards in PLC5 and it had scaling and output range built into the card configuration itself, but its been awhile, so my memory is vague.
I find it hard to believe that siemens would not have this same feature, but hey this is the germans we are talking about.
RE: Siemens CPU 224 XP analog to real???
RE: Siemens CPU 224 XP analog to real???
S7-300 and 400's have Functions which scale analogues for you.
To scale is a simple maths problem.
From your post;
4mA = 6304, 20mA = 26624.
The range on the above = 26624-6304 = 20320.
If you wanted to scale and give a range between 0-500 for example, divide 500 by 20320 to get the scaling factor.
500/20320 = 0.01878.
So to scale the 4-20mA to 0-500, then do the following maths in the PLC.
(INPUT ANALOGUE - 6304) * 0.01878.
There are a couple of conversion instructions for integer to real etc.
RE: Siemens CPU 224 XP analog to real???
RE: Siemens CPU 224 XP analog to real???
When I'm with the cylinder fully retracted I get a number over 100
I tried this way (please see bellow) but when I'm fully retracted insted of 0 i'm @ 0.070
I've measured with the caliper distance @ different points and I've got:
raw val inches
6304 0
6928 0.328
7584 0.581
8144 0.805
8624 0.99
8848 1.09
9360 1.288
9504 1.353
9680 1.418
9728 1.4435
10384 1.6995
11232 2.039
12565 2.562
12832 2.6735
13648 3.001
14256 3.2405
15184 3.6145
15936 3.914
16720 4.226
17932 4.489
18144 4.79
19312 5.25
19384 5.36
20304 5.648
21152 5.991
21888 6.277
22560 6.55
23504 6.91
24288 7.245
25136 7.582
26192 8.003
26640 8.185
In EXCEL I've run a Regression (Tools->Data Analysis)
and I have the folowing program:
LD Always_On:SM0.0
ITD AIW0, #temp1:LD0
AENO
DTR #temp1:LD0, #temp2:LD4
AENO
*R 0.0003982944, #temp2:LD4
AENO
MOVR #temp2:LD4, DisplacementInches:VD40
-R 2.390614, DisplacementInches:VD40
RE: Siemens CPU 224 XP analog to real???
and 2.390614 to 2.537285602