Technical Forum

STEP 7 (TIA Portal)

SCALE and UNSCALE

Thread Starter: Pegaia   Started: 6/24/2009 5:38 PM   Replies: 49

« Previous thread Next thread »
12345» Page 1 of 5 (50 items)
  6/24/2009, 5:38 PM
Joined 7/24/2008
Last visit: 7/24/2014
Posts: 2467
Rating:
Rated: Excellent [4.33 out of 5 / rated 432 time(s)]. (432) 
Users with special expertise supervising conferences
Rated: Excellent [4.1 out of 5 / rated 10 time(s)]. (10) 
Hi, 

The theme “scale analogical signals” is always recurrent in any PLC families.

The S7-1200 has two instructions to do it: SCALE_X and NORM.

 

I wrote a FAQ suggestion about the theme, which was approved but not yet published. In this mean time, I let here a draft of it.

 

I attached also a project with a version for S7-1200 of the S7-300/400 FC105 / 106. It was not tested, so if some one tests it please let know if it works.

NOTES: 

- V11 version was posted in the follow post of this TIP (page2).

- V12 version was posted in the follow post of this TIP (page3).

 

news on V12:

New Blocks (that could be used also in S7-1500):

SCALE_LREAL / UNSCALE_LREAL (for the case where is necessary an extra - accuracy in the scaling)

RESCALE / RESCALE_LREAL (to scaling REAL to REAL or LREAL to LREAL)

SCALE_TC_RTD (to convert analogical inputs for Termo coupler or standard RTD)

SCALE_ RTD_climatic  (to convert analogical inputs for climatic RTD)

 


Attachment: Scale.zip  (5009 Downloads)



=== Edited by Pegaia @ 3/3/2013 5:09 PM [GMT ] ===


=== Edited by Pegaia @ 3/3/2013 5:07 PM [GMT ] ===


=== Edited by Pegaia @ 8/29/2011 3:56 PM [GMT ] ===
Note for V11

=== Edited by Pegaia @ 2/18/2010 10:21 AM [GMT ] ===
The new version has news blocks for SCALE / UNSCALE of 4..20mA done by analog modules that has just 0..20mA.

=== Edited by Pegaia @ 7/27/2009 2:00 PM [GMT ] ===
I have tested the blocks. Here is the revised version.


Denilson Pegaia
Siemens Industry Sector
- Technical Support & Hotline -
Hotline – Atenção ao Cliente / Customer Care
Tel.: +55 11 3833-4040
E-Mail: atencao.cliente.ac.br@siemens.com

Top
Thank you for this post from:
  6/26/2009, 10:41 AM
Joined 12/3/2008
Last visit: 7/21/2014
Posts: 121
Rating:
Rated: Excellent [4.5 out of 5 / rated 2 time(s)]. (2) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
I did not test your program. But I've tested scaling on S7-1200. Using NORM-X and SCALE-X to scale an analog +/- 10V signal, into a [-10;10] range. Everything works fine and is easier than scaling in s7-200...

As soon as I get the 1200, I'll try to test the program U've uploaded

Best regards
dzwilu
Top
Thank you for this post from:
  6/29/2009, 5:05 PM
Joined 7/24/2008
Last visit: 7/24/2014
Posts: 2467
Rating:
Rated: Excellent [4.33 out of 5 / rated 432 time(s)]. (432) 
Users with special expertise supervising conferences
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Thanks

Denilson Pegaia
Siemens Industry Sector
- Technical Support & Hotline -
Hotline – Atenção ao Cliente / Customer Care
Tel.: +55 11 3833-4040
E-Mail: atencao.cliente.ac.br@siemens.com
Top
  8/25/2009, 12:46 PM
Joined 7/24/2008
Last visit: 7/24/2014
Posts: 2467
Rating:
Rated: Excellent [4.33 out of 5 / rated 432 time(s)]. (432) 
Users with special expertise supervising conferences
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi,
I did a fast test. They are ok.

Denilson Pegaia
Siemens Industry Sector
- Technical Support & Hotline -
Hotline – Atenção ao Cliente / Customer Care
Tel.: +55 11 3833-4040
E-Mail: atencao.cliente.ac.br@siemens.com
Top
Thank you for this post from:
  6/25/2010, 1:11 PM
Joined 2/1/2010
Last visit: 5/20/2014
Posts: 2
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi,
thank you for these useful FC.
I've modified the 4-20scale (FC108) for scaling a 4-20 mA input signal between two process value limits (HI_LIM e LO_LIM). Maybe it isn't an elegant solution but it works fine.
What do you think about it?

Attachment: scale_4-20 (tested).zip  (1622 Downloads)

Top
Thank you for this post from:
  7/7/2010, 11:54 AM
Joined 2/1/2010
Last visit: 5/20/2014
Posts: 2
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
This is a new version of 4-20mA SCALE FC (FC105):

if I<4 mA  OUT=LO_LIM
if I>20 mA  OUT=HI_LIM
if I<3,9 mA or I>21 mA ---> RET_VAL=W#16#8 (anomaly)

Attachment: SCALE4_20new (tested).zip  (1917 Downloads)

Top
Thank you for this post from:
  6/17/2011, 10:25 PM
Joined 11/10/2010
Last visit: 3/21/2014
Posts: 2
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Careful of the original attachment. SCALE_4..20 [FC108] has errors. In NW3, NW4, and NW5, #aux2 should be #LO_LIM. With these changes, I was able to delete NW2.

Or am I missing something?

The original was a good starting point, as I like the use of NORM_X and SCALE_X. In the past, I have done the scaling mathematically, but I like this method better. Rnf:lblSmileyTooltip_



=== Edited by johnchabin @ 6/17/2011 10:26 PM [GMT ] ===


=== Edited by johnchabin @ 6/17/2011 10:26 PM [GMT ] ===


Top
  6/20/2011, 1:31 PM
Joined 7/24/2008
Last visit: 7/24/2014
Posts: 2467
Rating:
Rated: Excellent [4.33 out of 5 / rated 432 time(s)]. (432) 
Users with special expertise supervising conferences
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi,

the use of the FC108 is to read 4..20mA in modules that are just enable to work with 0..20mA scale. In this context it is not possible to use directly the lo lim in the conversion.

Denilson Pegaia
Siemens Industry Sector
- Technical Support & Hotline -
Hotline – Atenção ao Cliente / Customer Care
Tel.: +55 11 3833-4040
E-Mail: atencao.cliente.ac.br@siemens.com
Top
  7/6/2011, 11:04 AM
Joined 4/27/2011
Last visit: 11/29/2011
Posts: 23
Rating:
Rated: Excellent [5 out of 5 / rated 1 time(s)]. (1) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi Mr Pegaia,
Sorry, my question will seem stupid, but my PLC is set on 0..10V, and I can't change it to 0..20mA, the field is greyed in PLC config page.
Is there something to do to unlock ?
Thanks



=== Edited by Jacques-Olivier @ 7/6/2011 1:09 PM [GMT ] ===
Or is it just that the CPU (1214C DC/DC/DC) can''t use 0..20mA but only voltage signal ? Because I''ve just add a SM1231 8AI and it works !

Top
  7/6/2011, 12:08 PM
Joined 7/24/2008
Last visit: 7/24/2014
Posts: 2467
Rating:
Rated: Excellent [4.33 out of 5 / rated 432 time(s)]. (432) 
Users with special expertise supervising conferences
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi,

I'm thinking that you talk about the analogic IO of the CPU. Am I right? This is just for 0..10V. If you need to read current, you should place a "shunt" resistor of 500 Ohms parallely to the input.

Denilson Pegaia
Siemens Industry Sector
- Technical Support & Hotline -
Hotline – Atenção ao Cliente / Customer Care
Tel.: +55 11 3833-4040
E-Mail: atencao.cliente.ac.br@siemens.com
Top
Thank you for this post from:
12345» Page 1 of 5 (50 items)
Actions