I am newbie in S7 and PLC and i am trying to learn analog processing in S7. I have got an example, which raise some questions.
[font=BHPLLN+Arial]In the following example, a value from 0 to 10V with an analog module SM334 in slot 6 is inputted (PIW288). It is first presented as an INTEGER (16 Bit) and should be normalized from 100 to 1000 in REAL format and saved in the memory bit double word MD10.
[/font]Solution in STL:
[font=BHPLLN+Arial]L PIW 288 //Analog value input 0 to 10 V contains 0 to 27648 integers (16 Bit)
ITD //Value of integer (16 Bit) converted into integer (32 Bit)
DTR //Value of integer (32 Bit) converted into a real number
L 2.7648e+4 //
/R //Division with real number 27648
L 9.000e+2 //
*R //
L 1.000e+2 //
+R // Addition with real number 100 (Offset)
T MD10 //Normalized value 100 to 1000 in real format
a) 'Analog value input 0 to 10 V contains 0 to 27648 integers (16 Bit) ' why analog value have 27648 integers, does not it 65536 as 16 bit?
b)'L 2.7648e+4 ' why this and why 2.7648e+4?
c)'/R ' why this?
d)'L 9.000e+2' why this and why 9.000e+2?
f)'*R ' why this ?
g)' L 1.000e+2 ' why this ? and why 1.000e+2?
h)'+R' why this?
i)'Normalized value 100 to 1000 in real format' why does it mean?
If any one help me with the reply it will be a great help.
arocon
[/font]
[font=BHPLLN+Arial]In the following example, a value from 0 to 10V with an analog module SM334 in slot 6 is inputted (PIW288). It is first presented as an INTEGER (16 Bit) and should be normalized from 100 to 1000 in REAL format and saved in the memory bit double word MD10.
[/font]Solution in STL:
[font=BHPLLN+Arial]L PIW 288 //Analog value input 0 to 10 V contains 0 to 27648 integers (16 Bit)
ITD //Value of integer (16 Bit) converted into integer (32 Bit)
DTR //Value of integer (32 Bit) converted into a real number
L 2.7648e+4 //
/R //Division with real number 27648
L 9.000e+2 //
*R //
L 1.000e+2 //
+R // Addition with real number 100 (Offset)
T MD10 //Normalized value 100 to 1000 in real format
a) 'Analog value input 0 to 10 V contains 0 to 27648 integers (16 Bit) ' why analog value have 27648 integers, does not it 65536 as 16 bit?
b)'L 2.7648e+4 ' why this and why 2.7648e+4?
c)'/R ' why this?
d)'L 9.000e+2' why this and why 9.000e+2?
f)'*R ' why this ?
g)' L 1.000e+2 ' why this ? and why 1.000e+2?
h)'+R' why this?
i)'Normalized value 100 to 1000 in real format' why does it mean?
If any one help me with the reply it will be a great help.
arocon
[/font]