Tải bản đầy đủ (.pdf) (31 trang)

Analog manual tài liệu siemen tia portal s7 1200

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (2.55 MB, 31 trang )

Siemens TIA
Portal (S7 1200)


Scaling of a 0-10 V DC
Analog Input using
NORM_X and SCALE_X

These notes are the property of Peter Vree, and shall
not be copied or used without consent of the author.


These notes are the property of Peter Vree, and shall
not be copied or used without consent of the author.

Siemens Simatic S7-1200 System Manual
Link: />

• Analog signal modules provide expected output values that
represent your physical variable with either a voltage range or a
current range.
• These ranges are most likely 0 – 10 V DC or 4 to 20 mA DC.

• The Siemens Analog module will provide integer values for these
ranges, where 0 to 27648 represents the 0 – 10 V DC input Analog
voltage. Anything outside the range represents either an overflow or
underflow.

These notes are the property of Peter Vree, and shall
not be copied or used without consent of the author.


Siemens Simatic S7-1200 System Manual (p.110)
Link: />

These notes are the property of Peter Vree, and shall
not be copied or used without consent of the author.

Siemens Simatic S7-1200 System Manual (P.916)
Link: />

These notes are the property of Peter Vree, and shall
not be copied or used without consent of the author.


These notes are the property of Peter Vree, and shall
not be copied or used without consent of the author.


Note: The model of S7 1200 PLC that I am using only allows for a 0 – 10 V DC input (x2)

These notes are the property of Peter Vree, and shall
not be copied or used without consent of the author.


These notes are the property of Peter Vree, and shall
not be copied or used without consent of the author.

Siemens Simatic S7-1200 System Manual (p.852)
Link: />

These notes are the property of Peter Vree, and shall

not be copied or used without consent of the author.

Siemens Simatic S7-1200 System Manual (p.854)
Link: />

-

+

Sensor
(0-10 V DC Output)

-

These notes are the property of Peter Vree, and shall
not be copied or used without consent of the author.

+


• In your control program, you probably need to use these values in
engineering units, for example to represent a flow, level, pressure,
temperature, volume, weight or other quantitative value.
• To do this for an analog input, you must first normalize the analog value
to a real (floating point) value from 0.0 to 1.0. Then you must scale it to
the minimum and maximum values of the engineering units that it
represents.
• For values that are in engineering units that you need to convert to an
analog output value, you first normalize the value in engineering units to
a value between 0.0 and 1.0, and then scale it between 0 and 27648,

or - 27648 to + 27648, depending on the range of the analog module.
• STEP 7 provides the NORM_X and SCALE_X instructions (Page 251) for
this purpose.

These notes are the property of Peter Vree, and shall
not be copied or used without consent of the author.

Siemens Simatic S7-1200 System Manual (p.110)
Link: />

These notes are the property of Peter Vree, and shall
not be copied or used without consent of the author.

Siemens Simatic S7-1200 System Manual
Link: />

As we have done before… open up your Base PLC Program. I am choosing to open my PLC HMI
configuration in the hopes of incorporating the Analog Signal with my HMI at a later date =)

These notes are the property of Peter Vree, and shall
not be copied or used without consent of the author.


We’ve already done all the configurations, let’s get down to business… click on Project View
These notes are the property of Peter Vree, and shall
not be copied or used without consent of the author.


Drop two “Empty Boxes” on to the first rung of Network 1
These notes are the property of Peter Vree, and shall

not be copied or used without consent of the author.


Simply type in Norm_X and Scale_X in the Instruction Tab, and the Generic
Box will be converted to the appropriate instruction.

These notes are the property of Peter Vree, and shall
not be copied or used without consent of the author.


The Input data type for Norm_X is Int.
The Output data type for Norm_X is Real.

These notes are the property of Peter Vree, and shall
not be copied or used without consent of the author.


The Input data type for Scale_X is Real.
The Output data type for Scale_X is Real.

These notes are the property of Peter Vree, and shall
not be copied or used without consent of the author.


Now, for the NORM_X instruction:
Change the Min to 0, and the MAX to 27648

These notes are the property of Peter Vree, and shall
not be copied or used without consent of the author.



These notes are the property of Peter Vree, and shall
not be copied or used without consent of the author.

Click on Device Configuration and scroll down to Analog Inputs


Here you can see that the default address for
Analog Input 0 is: %IW64
Note: There is no option to change this input to a 4 – 20 mA signal
These notes are the property of Peter Vree, and shall
not be copied or used without consent of the author.


Here you can see that the default address for
Analog Input 0 is: %IW64
These notes are the property of Peter Vree, and shall
not be copied or used without consent of the author.


Here you can see that the default address for
Analog Input 1 is: %IW66
Note: Each Analog input takes up 2 Words, i.e. the addresses are:
%IW64 & %IW66
These notes are the property of Peter Vree, and shall
not be copied or used without consent of the author.


Ok, so now that we are clear on the addressing for Analog Inputs…
go back to the Main OB1

for the NORM_X instruction:
Change the VALUE to %IW64

These notes are the property of Peter Vree, and shall
not be copied or used without consent of the author.


The NORM_X instruction takes the 0 – 27648 input value
from the ADC and converts it to a value between 0 – 1.
These notes are the property of Peter Vree, and shall
not be copied or used without consent of the author.


×