Analog scaling in Step 7

SIMATIC S7-200/300/400, Step7, PCS7, CFC, SFC, PDM, PLCSIM,
SCL, Graph, SPS-VISU S5/S7, IBHsoftec, LOGO ...
Post Reply
internal
Posts: 8
Joined: Sat Mar 18, 2017 4:21 am
Location: United Arab Emirates
Contact:

Analog scaling in Step 7

Post by internal » Wed Jul 05, 2017 6:08 am

I have CPU 312-2DP and digital and analog i/o modules , I want to make a program which work like this

there is a input signal to the Analog module with range of 0-10 vdc , i want to save this values in a data block , please let me know what memory type i should use word or int or real , i use word or double word

once the value is saved in the data block i want to use this data block address and not scale this value to 0-5 v range and move output to the Analog output module

jokfem2016
Posts: 20
Joined: Thu Mar 16, 2017 7:34 pm

Re: Analog scaling in Step 7

Post by jokfem2016 » Tue Jul 11, 2017 2:14 pm

internal wrote:I have CPU 312-2DP and digital and analog i/o modules , I want to make a program which work like this

there is a input signal to the Analog module with range of 0-10 vdc , i want to save this values in a data block , please let me know what memory type i should use word or int or real , i use word or double word

once the value is saved in the data block i want to use this data block address and not scale this value to 0-5 v range and move output to the Analog output module
Select FC 105 from standard library... Define your high and low setpoint. For this block your high and low limit will be real (data type) meaning you are going to use double word.. Your analog output is going to be real as well.. After this select FC 106 to unscale your output value to an integer data type for your analog output card.. Hope this is helpful..

Dfcz
Posts: 875
Joined: Tue Dec 26, 2006 5:21 am
Location: Russia

Re: Analog scaling in Step 7

Post by Dfcz » Wed Jul 12, 2017 12:26 pm

L PIW 256 // ANALOGICA TRASDUTTORE
L 0
<=I
JC PR
L PIW 256 // ANALOGICA TRASDUTTORE
L 69
/I
PR: T #PRESSURE // PRESSIONE
T MW250 // PRESSIONE
T MD260 // PRESSIONE
T DB1.DBW 0 // PRESSIONE
Last edited by Dfcz on Wed Jul 12, 2017 12:31 pm, edited 3 times in total.

Dfcz
Posts: 875
Joined: Tue Dec 26, 2006 5:21 am
Location: Russia

Re: Analog scaling in Step 7

Post by Dfcz » Wed Jul 12, 2017 12:28 pm

This is input validation.

L PIW 256 // LETTURA TRASDUTTORE
L W#16#7FFF // ERRORE
==I
O(
L PIW 256 // LETTURA TRASDUTTORE
L W#16#8000 // ERRORE
==I
)
= M 126.1 // ALLARME

Post Reply