STEP-7 FC105 analogue value processing

Levanteri

Member
Join Date
Jan 2008
Location
Cluj-Napoca
Posts
18
Hello again.
I`m still stuck with the analogue-part of my program and
hope you could answer a couple of questions.

I use the FC105-block to read and scale analogue value.
Let`s go through the block one-by-one.

1. IN, here comes the analogue value from the analog-input, for example PIW130 etc.?
2. HI_LIM this is high value of my scaled analogue?
3. LO_LIM and this is the low value?

For example I have a analogue thermometer which gives me a signal between 4-20mA. I want to use a temperature between 0-50 degrees.
So do is set the LO_LIM to 0 and HI_LIM to 50, or are these values for something else?

Next the BIPOLAR, what is this used for? It`s either on or off.
Is BIPOLAR for example needed if I use +- 5V instead of 4-20mA
or for something else?

4. RET_VAL, where does this lead to?
5. OUT, is this the scaled output value which I then can
move to a DB and then process from thereon?

I`ll put a linki which shows the block, which I hope to simplify what I mean:)

http://www.flickr.com/photos/7938592@N05/2262853344/sizes/l/

Thanks in advance!
 
1. IN: here comes the analogue value from the analog-input, for example PIW130 etc.? Correct
2. HI_LIM: this is high value of my scaled analogue? This is where you enter the temperature value that corresponds to 20mA.
3. LO_LIM: and this is the low value? This is where you enter the temperature value that corresponds to 4mA.
4.BIPOLAR: dunno, but I'd set it to false...:D
5. RET_VAL: Same as every other SFC/SFB/FC/FB from the library
6. OUT: This is your scaled value as INT. Just need to enter the destination adress.

Hope that helps
 
the hi and lo values should be the 4ma and 20ma actual values from your hardware, not what you want it to be.

You cannot set this to 0-50 degrees if the 4-20ma recieved does not give you this.

Whatever you are using to give a temerature should have data sheets to tell you what you should expect at 4ma and 20ma.

Also, is it linear??
 
Bipolar

Hi,

BIPOLAR means if the value you are measuring is bipolar or not. i.e.:
4..20mA = Not bipolar
-20..+20mA = Bipolar
0..10V = Not Bipolar
-10..+10V = Bipolar

Not bipolar means that the input variable must be a 0.
Bipolar -> input =1.

Kelkoon
 
Ok. Got the BIPOLAR thing cleared.
So I should set the HI_LIM to 27648 and LO_LIM to 0 since
they are the actual values I get from CP343-2P.
But then where does the actual scaling happen?
I mean if I get a value of for example 15500 to the IN from CP343,
where do I define the scaling range I want to use?
Where is the value 15500 converted to engineering units, like 30, which then would mean the temperature of +30c?
No I need other blocks, db`s etc. for this action?
I think this is linear.
Hope you undestand what I mean.

Also: The OUT is a doubleword, but I`d only need a Word for for getting INT result.
How do I convert the doubleword to a word, or is it possible?
And, where is the RET_VAL needed?
 
Last edited:
Whats the actual temperature when your analog thermometer gives you 20mA?
This is what you specify in HI_LIM.
Whats the actual temerature when your analog thermometer gives you 4mA?
This is what you specify in LO_LIM.

What the FC will do is a linear scaling from 0-27648 to the min-max from your thermometer.

Example:
-20C° is the lower limit of your thermometer. This gives you 4mA or 0
380C° is the upper limit of your thermometer. This gives you 20mA or 27648.
LO_LIM : -20
HI_LIM : 380

For a process value of 15500 -> OUT : 204.247....

LO_LIM, HI_LIM and OUT are real's, floating point. To convert the OUT to Integer you could use:

L #out // being the OUT value supplied by the FC
RND
T #int // Being the MW or DBW you want to use later on


Hope this will make it clear.....
 
Last edited:
No no no

HI_LIM is your maximum value in engineering units so set to 50(deg)
LO_LIM is your minimum value in engineering units so set to 0(deg)

The 0 to 27648 returned from the analog input module is assumed by the block if the BIPOLAR input =0

(or -27648 to +27648 is assumed if BIPOLAR =1)

Just read the F1 help on FC105 ...it's all there


***edit***
cross posted with Jeebs.
 
Ok. That was what I was also thinking ;D
So I set the values to 0 and 50 and BIPOLAR is false.
But then; what is the RET_VAL used for and
is there a way to convert the OUT doubleword to a word?
 
Yeah things got much clearer, thanks:)
"To convert the OUT to Integer you could use:

L #out // being the OUT value supplied by the FC
RND
T #int // Being the MW or DBW you want to use later on"

I`m not really into STL at all, so are we talking about a BLOCK?
RND is a converter block?
I`m stupid, forgive me ;)
 
In your LAD/STL/FBD-editor. Select the help menu, then select help on LAD. In the index search for ROUND.
You'll get the info needed on this block. And RND is a conversion from real to double int.
 

Similar Topics

I am having a step7 v5.4 program where the blocks are encrypted and locked. And the manufacturer is stopped the support. Is there any ways to...
Replies
2
Views
131
Good Morning, Hoping someone with some Siemens experience can give me a hand with this one. Customer has a S7-200 cpu, which has a 6GK7...
Replies
0
Views
214
HI! HOW COULD I OBTAIN THE NAMES OF THE STEPS OF A ROUTINE IN SFC LANGUAGE IN STUDIO5000? Or is there a system variable that gives me those...
Replies
0
Views
331
I'm just trying to figure out the right method of adding a DO card to an existing rack. It's not the *next* open slot, but I have to move the AO...
Replies
5
Views
526
Hi Siemens Experts, I am hoping someone can shed some light on my issue. I have uploaded the code from a S7-300 (317-2PN/DP) using Step 7...
Replies
9
Views
591
Back
Top Bottom